Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2018-11-20 17:22:43 -0500
committerChristian W. Damus2018-11-20 17:34:57 -0500
commit42f48160470ae3d0057d99db271dfcb470cd7dd5 (patch)
treefbf84d54b465253581c51dcffc65e342bb0e28ca
parenteaee6e41760014b48b0795fef6941642d8d1a753 (diff)
downloadorg.eclipse.papyrus-42f48160470ae3d0057d99db271dfcb470cd7dd5.tar.gz
org.eclipse.papyrus-42f48160470ae3d0057d99db271dfcb470cd7dd5.tar.xz
org.eclipse.papyrus-42f48160470ae3d0057d99db271dfcb470cd7dd5.zip
Bug 536405: [NewChild] there is not possibility to add a compound filters in the editor of new child
Regenerate the edit layer with child creation extenders. https://bugs.eclipse.org/bugs/show_bug.cgi?id=536405 Signed-off-by: Christian W. Damus <give.a.damus@gmail.com> Change-Id: I1c8ca5fd13ab8615a9886bcdcebc961f3348d302 Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/.settings/.api_filters11
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/META-INF/MANIFEST.MF8
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/pom.xml2
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelEditPlugin.java9
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelItemProviderAdapterFactory.java48
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/MenuItemProvider.java17
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/models/elementCreationMenuModel.genmodel3
-rw-r--r--plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/pom.xml2
9 files changed, 89 insertions, 13 deletions
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/.settings/.api_filters b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/.settings/.api_filters
new file mode 100644
index 00000000000..1550578ca4f
--- /dev/null
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.infra.newchild.edit" version="2">
+ <resource path="src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelItemProviderAdapterFactory.java" type="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider.ElementCreationMenuModelItemProviderAdapterFactory">
+ <filter comment="An EMFism that no subclass would implement to clash." id="336658481">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider.ElementCreationMenuModelItemProviderAdapterFactory"/>
+ <message_argument value="childCreationExtenderManager"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/META-INF/MANIFEST.MF b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/META-INF/MANIFEST.MF
index db45fcb750c..6e7ccbb2390 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/META-INF/MANIFEST.MF
@@ -1,20 +1,20 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.papyrus.infra.newchild;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.newchild;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.uml2.common.edit;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.types;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.infra.types.edit;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.types.edit;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.filters;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.filters.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.1.0.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/pom.xml b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/pom.xml
index 04bd26b2e9c..166dbceaa19 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/pom.xml
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.newchild.edit</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelEditPlugin.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelEditPlugin.java
index 2755af76955..6ce1e8a2082 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelEditPlugin.java
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelEditPlugin.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2017, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536405
*
*/
package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider;
@@ -17,6 +18,9 @@ package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.papyrus.infra.filters.provider.FiltersEditPlugin;
+import org.eclipse.papyrus.infra.types.provider.TypesConfigurationsEditPlugin;
/**
* This is the central singleton for the ElementCreationMenuModel edit plugin.
@@ -50,6 +54,9 @@ public final class ElementCreationMenuModelEditPlugin extends EMFPlugin {
public ElementCreationMenuModelEditPlugin() {
super
(new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ TypesConfigurationsEditPlugin.INSTANCE,
+ FiltersEditPlugin.INSTANCE,
});
}
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelItemProviderAdapterFactory.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelItemProviderAdapterFactory.java
index 207f895b4a2..44ad2c05cdd 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelItemProviderAdapterFactory.java
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/ElementCreationMenuModelItemProviderAdapterFactory.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2017, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536405
*
*/
package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider;
@@ -17,14 +18,19 @@ package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
import org.eclipse.emf.edit.provider.IDisposable;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -33,6 +39,7 @@ import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage;
import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util.ElementCreationMenuModelAdapterFactory;
/**
@@ -44,7 +51,7 @@ import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util.ElementC
* <!-- end-user-doc -->
* @generated
*/
-public class ElementCreationMenuModelItemProviderAdapterFactory extends ElementCreationMenuModelAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+public class ElementCreationMenuModelItemProviderAdapterFactory extends ElementCreationMenuModelAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender {
/**
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
@@ -62,6 +69,15 @@ public class ElementCreationMenuModelItemProviderAdapterFactory extends ElementC
protected IChangeNotifier changeNotifier = new ChangeNotifier();
/**
+ * This helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @since 4.1
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(ElementCreationMenuModelEditPlugin.INSTANCE, ElementCreationMenuModelPackage.eNS_URI);
+
+ /**
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -234,6 +250,34 @@ public class ElementCreationMenuModelItemProviderAdapterFactory extends ElementC
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @since 4.1
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
* This adds a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/MenuItemProvider.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/MenuItemProvider.java
index 87baf44ca3f..678308ac421 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/MenuItemProvider.java
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild.edit/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/provider/MenuItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2017, 2018 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 536405
*
*/
package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.provider;
@@ -26,6 +27,7 @@ import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -36,6 +38,7 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.filters.FiltersFactory;
import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage;
import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu;
@@ -226,6 +229,16 @@ public class MenuItemProvider
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ElementCreationMenuModelPackage.Literals.MENU__FILTER,
+ FiltersFactory.eINSTANCE.createCompoundFilter()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ElementCreationMenuModelPackage.Literals.MENU__FILTER,
+ FiltersFactory.eINSTANCE.createEquals()));
}
/**
@@ -236,7 +249,7 @@ public class MenuItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ElementCreationMenuModelEditPlugin.INSTANCE;
+ return ((IChildCreationExtender)adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
index bdb8bb30dff..9bd88f55153 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
@@ -21,7 +21,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.0.100.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/models/elementCreationMenuModel.genmodel b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/models/elementCreationMenuModel.genmodel
index 4ecb691729f..6b19175a639 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/models/elementCreationMenuModel.genmodel
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/models/elementCreationMenuModel.genmodel
@@ -34,7 +34,8 @@
</genAnnotations>
<foreignModel>elementCreationMenuModel.uml</foreignModel>
<genPackages xsi:type="genmodel:GenPackage" prefix="ElementCreationMenuModel" basePackage="org.eclipse.papyrus.infra.newchild"
- resource="XMI" disposableProviderFactory="true" contentTypeIdentifier="" fileExtensions="creationmenumodel"
+ resource="XMI" disposableProviderFactory="true" extensibleProviderFactory="true"
+ childCreationExtenders="true" contentTypeIdentifier="" fileExtensions="creationmenumodel"
ecorePackage="elementCreationMenuModel.ecore#/">
<genClasses xsi:type="genmodel:GenClass" ecoreClass="elementCreationMenuModel.ecore#//Folder">
<genFeatures xsi:type="genmodel:GenFeature" property="None" children="true"
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/pom.xml b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/pom.xml
index c6f2f9c5f8e..defb0b531f7 100644
--- a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/pom.xml
+++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.newchild</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file

Back to the top