[ooo-build-commit] ooeclipse: Branch 'master'
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Mon Nov 16 13:13:46 PST 2009
core/source/org/openoffice/ide/eclipse/core/actions/ConvertToManifestAction.java | 10 +++++++++-
core/source/org/openoffice/ide/eclipse/core/model/pack/UnoPackage.java | 7 +++++++
java/source/org/openoffice/ide/eclipse/java/JavaBuilder.java | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
New commits:
commit 57b77a6e0be4e5d9fe9f1c9196315e0489f45001
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Mon Nov 16 22:14:06 2009 +0100
[core]Fixed manifest.xml conversion action
It now adds the types.rdb and language specific entries.
diff --git a/core/source/org/openoffice/ide/eclipse/core/actions/ConvertToManifestAction.java b/core/source/org/openoffice/ide/eclipse/core/actions/ConvertToManifestAction.java
index c1984c7..6905381 100644
--- a/core/source/org/openoffice/ide/eclipse/core/actions/ConvertToManifestAction.java
+++ b/core/source/org/openoffice/ide/eclipse/core/actions/ConvertToManifestAction.java
@@ -48,6 +48,9 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.openoffice.ide.eclipse.core.PluginLogger;
+import org.openoffice.ide.eclipse.core.internal.helpers.UnoidlProjectHelper;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
+import org.openoffice.ide.eclipse.core.model.ProjectsManager;
import org.openoffice.ide.eclipse.core.model.pack.ManifestModel;
import org.openoffice.ide.eclipse.core.model.pack.PackagePropertiesModel;
import org.openoffice.ide.eclipse.core.model.pack.UnoPackage;
@@ -62,7 +65,12 @@ public class ConvertToManifestAction implements IObjectActionDelegate {
public void run( IAction pAction ) {
PackagePropertiesModel propsModel = new PackagePropertiesModel( mPackageFile );
- ManifestModel manifestModel = new ManifestModel();
+
+ String prjName = mPackageFile.getProject().getName();
+ IUnoidlProject prj = ProjectsManager.getProject( prjName );
+ // Create a dummy package to get the automatic entries of the manifest
+ UnoPackage unoPackage = UnoidlProjectHelper.createMinimalUnoPackage( prj, new File( "foo.oxt" ) ); //$NON-NLS-1$
+ ManifestModel manifestModel = unoPackage.getManifestModel();
for (IFolder lib : propsModel.getBasicLibraries()) {
manifestModel.addBasicLibrary( lib );
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/pack/UnoPackage.java b/core/source/org/openoffice/ide/eclipse/core/model/pack/UnoPackage.java
index 0923ed1..c70b5df 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/pack/UnoPackage.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/pack/UnoPackage.java
@@ -133,6 +133,13 @@ public class UnoPackage {
}
/**
+ * @return the manifest.xml model contained in the package
+ */
+ public ManifestModel getManifestModel( ) {
+ return mManifest;
+ }
+
+ /**
* Add a file or directory to the package.
*
* <p>This method doesn't know about the different languages
diff --git a/java/source/org/openoffice/ide/eclipse/java/JavaBuilder.java b/java/source/org/openoffice/ide/eclipse/java/JavaBuilder.java
index 74653cf..0cea493 100644
--- a/java/source/org/openoffice/ide/eclipse/java/JavaBuilder.java
+++ b/java/source/org/openoffice/ide/eclipse/java/JavaBuilder.java
@@ -290,7 +290,7 @@ public class JavaBuilder implements ILanguageBuilder {
path.toString().startsWith("/" + pJavaPrj.getProject().getName())) { //$NON-NLS-1$
// Relative to the project
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile( path );
- if ( file != null ) {
+ if ( file != null && file.exists() ) {
libs.add( file );
}
}
More information about the ooo-build-commit
mailing list