Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2012-11-16 21:46:00 +0000
committerSopot Cela2012-11-16 21:46:00 +0000
commitccbfdc824a4ec4d5c51f94b61f15eb5b91fb35d8 (patch)
treec7ce2e932fa23ddacca2cdae4dd4e469f28c7cb0
parentbdac1998be6a4b697da7d03afe6231aa82f919ec (diff)
downloadorg.eclipse.e4.tools-ccbfdc824a4ec4d5c51f94b61f15eb5b91fb35d8.tar.gz
org.eclipse.e4.tools-ccbfdc824a4ec4d5c51f94b61f15eb5b91fb35d8.tar.xz
org.eclipse.e4.tools-ccbfdc824a4ec4d5c51f94b61f15eb5b91fb35d8.zip
Bug 393150 - Deleting a plug-in project will not close the
Application.e4xmi refix
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java
index 0e8b4893..da5fef38 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java
@@ -26,6 +26,7 @@ import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
import org.eclipse.e4.tools.services.IResourcePool;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.swt.widgets.Composite;
@@ -46,7 +47,9 @@ public class ApplicationModelEditor extends ModelEditor {
@Inject
public ApplicationModelEditor(Composite composite, IEclipseContext context, IModelResource modelProvider, @Named(EDITORPROJECT) @Optional IProject project, IResourcePool resourcePool) {
super(composite, context, modelProvider, project, resourcePool);
- resource = modelProvider.getEditingDomain().getResourceSet().getResources().get(0);
+ EList<Resource> resources = modelProvider.getEditingDomain().getResourceSet().getResources();
+ if (!resources.isEmpty())
+ resource = resources.get(0);
}
@Inject

Back to the top