diff options
author | Mickael ADAM | 2016-04-27 12:45:17 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-05-03 15:11:08 +0000 |
commit | 5b65da3d8a1eec3306fe7dd94c209ce5a9c53afb (patch) | |
tree | e9db34172c2b895d2d5c137828176476d4a53203 /plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor | |
parent | 5cd0f18d5114cb718322ed122d237c8e6d0e9f08 (diff) | |
download | org.eclipse.papyrus-5b65da3d8a1eec3306fe7dd94c209ce5a9c53afb.tar.gz org.eclipse.papyrus-5b65da3d8a1eec3306fe7dd94c209ce5a9c53afb.tar.xz org.eclipse.papyrus-5b65da3d8a1eec3306fe7dd94c209ce5a9c53afb.zip |
Bug 492195 - [NewChild] it shall be possible to have Separator in
MewChild menu
https://bugs.eclipse.org/bugs/show_bug.cgi?id=492195
- Add Separator to creationMenu metamodel
- Add separator menu item to the interpretor
- Add missing dependancy
Change-Id: I312b9daded115043a519c83206b3cf2f83ee1d7e
Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor')
3 files changed, 13 insertions, 6 deletions
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/META-INF/MANIFEST.MF b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/META-INF/MANIFEST.MF index 7c241ffae79..c096a01e0c5 100644 --- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/META-INF/MANIFEST.MF +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/META-INF/MANIFEST.MF @@ -1,11 +1,13 @@ Manifest-Version: 1.0 Export-Package: org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.presentation -Require-Bundle: org.eclipse.core.resources;visibility:=reexport, - org.eclipse.papyrus.infra.newchild.edit;bundle-version="1.2.0";visibility:=reexport, +Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", + org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)";visibility:=reexport, + org.eclipse.papyrus.infra.newchild.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport, org.eclipse.emf.ecore.xmi;visibility:=reexport, org.eclipse.emf.edit.ui;visibility:=reexport, org.eclipse.ui.ide;visibility:=reexport, - org.eclipse.emf.ecore.edit;visibility:=reexport + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.papyrus.infra.filters.edit;visibility:=reexport Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditor.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditor.java index 7a6de090616..b9fd2186bf2 100644 --- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditor.java +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditor.java @@ -51,6 +51,7 @@ import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; +import org.eclipse.papyrus.infra.filters.provider.FiltersItemProviderAdapterFactory; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.util.EContentAdapter; @@ -675,6 +676,7 @@ public class ElementCreationMenuModelEditor adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new ElementCreationMenuModelItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new FiltersItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); // Create the command stack that will notify this editor as commands are executed. @@ -924,7 +926,7 @@ public class ElementCreationMenuModelEditor * @generated */ public void createModel() { - URI resourceURI = EditUIUtil.getURI(getEditorInput()); + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); Exception exception = null; Resource resource = null; try { @@ -952,10 +954,11 @@ public class ElementCreationMenuModelEditor * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { - if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic - (Diagnostic.ERROR, + (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.papyrus.infra.newchild.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditorPlugin.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditorPlugin.java index 3f8bbe5f02d..749c772ef55 100644 --- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditorPlugin.java +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.editor/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/presentation/ElementCreationMenuModelEditorPlugin.java @@ -16,6 +16,7 @@ import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.common.ui.EclipseUIPlugin; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.provider.EcoreEditPlugin; +import org.eclipse.papyrus.infra.filters.provider.FiltersEditPlugin; /** * This is the central singleton for the ElementCreationMenuModel editor plugin. @@ -50,6 +51,7 @@ public final class ElementCreationMenuModelEditorPlugin extends EMFPlugin { super (new ResourceLocator [] { EcoreEditPlugin.INSTANCE, + FiltersEditPlugin.INSTANCE, }); } |