Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2017-08-28 12:33:38 +0000
committerCamille Letavernier2017-08-30 16:00:32 +0000
commit91aeb97aee4eca4cdf8098f27564d713d2d26c54 (patch)
tree38fe6674a9781659d4ef7bfaa67faf43a1e075e1
parentd1aea56e848138234a22bf4286179612f00274c4 (diff)
downloadorg.eclipse.papyrus-91aeb97aee4eca4cdf8098f27564d713d2d26c54.tar.gz
org.eclipse.papyrus-91aeb97aee4eca4cdf8098f27564d713d2d26c54.tar.xz
org.eclipse.papyrus-91aeb97aee4eca4cdf8098f27564d713d2d26c54.zip
Bug 521468: [Palette] Required profiles are not taken into account
anymore https://bugs.eclipse.org/bugs/show_bug.cgi?id=521468 Change-Id: Icfcac3020b934785421e337778c4bbf6de255dee Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ExtendedPluginPaletteProvider.java36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/IProfileDependantPaletteProvider.java5
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_CompoundFilter.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_Equals.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.properties1
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/ConfigurationItemProvider.java13
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java2
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/CustomDrawerConfigurationItemProvider.java11
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml25
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/PaletteConfiguration.ctx227
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/ui/SingleElementDescriptor.xwt44
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java2
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteconfigurationEditor.java2
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/CustomPaletteconfigurationEditor.java58
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/FilterSection.java110
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/NewFilterDialog.java139
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/.settings/.api_filters39
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.ecore3
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.genmodel4
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.notation53
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.uml16
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/pom.xml2
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/Configuration.java47
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/PaletteconfigurationPackage.java93
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/ConfigurationImpl.java68
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF40
31 files changed, 875 insertions, 197 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
index ee9c075732f..5b2bec5d729 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
@@ -69,8 +69,9 @@ Require-Bundle: org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)",
org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
org.eclipse.papyrus.infra.gmfdiag.tooling.runtime;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.gmfdiag.representation;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.filters;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ExtendedPluginPaletteProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ExtendedPluginPaletteProvider.java
index 3e59be748f6..b14b087fe3e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ExtendedPluginPaletteProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ExtendedPluginPaletteProvider.java
@@ -36,6 +36,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gef.RootEditPart;
import org.eclipse.gef.Tool;
import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
import org.eclipse.gef.palette.PaletteContainer;
@@ -48,9 +49,12 @@ import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.ContributeToPaletteOperation;
import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
import org.eclipse.gmf.runtime.gef.ui.internal.palette.PaletteStack;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ChildConfiguration;
@@ -75,11 +79,15 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
+import com.google.common.base.Predicate;
+
/**
* Palette provider with enhanced elements types
+ *
* @since 3.0
*/
+@SuppressWarnings({ "restriction", "deprecation" })
public class ExtendedPluginPaletteProvider extends AbstractProvider implements IPaletteProvider, IProfileDependantPaletteProvider {
/** name of the type */
@@ -116,6 +124,7 @@ public class ExtendedPluginPaletteProvider extends AbstractProvider implements I
protected static final ImageDescriptor DEFAULT_DRAWER_IMAGE_DESCRIPTOR = Activator.imageDescriptorFromPlugin(org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Activator.PLUGIN_ID, "/icons/drawer.gif"); //$NON-NLS-1$
/** cached list of required profiles for this palette to be shown. this will be <code>null</code> until initialized */
+ @Deprecated
protected Collection<String> requiredProfiles = null;
/**
@@ -163,15 +172,28 @@ public class ExtendedPluginPaletteProvider extends AbstractProvider implements I
return;
}
+ Predicate<Configuration> configFilter = c -> matches(editor, c);
+
// work for each configuration
- for (PaletteConfiguration configuration : contributions) {
- List<DrawerConfiguration> drawerConfigurations = configuration.getDrawerConfigurations();
- if (drawerConfigurations != null && drawerConfigurations.size() > 0) {
- for (DrawerConfiguration drawerConfiguration : drawerConfigurations) {
- generateDrawer(root, drawerConfiguration, predefinedEntries);
- }
- }
+ contributions.stream()
+ .filter(configFilter)
+ .flatMap(conf -> conf.getDrawerConfigurations().stream()
+ .filter(configFilter))
+ .forEach(drawer -> generateDrawer(root, drawer, predefinedEntries));
+ }
+
+ private boolean matches(IEditorPart editor, Configuration paletteElement) {
+ Diagram diagram = editor.getAdapter(Diagram.class);
+ if (diagram == null) {
+ return true;
}
+
+ // Most (all?) filters are based on the semantic element,
+ // but for Palettes, it makes more sense to test filters
+ // on diagrams. So... just test on both.
+ // Edit parts don't make sense either, because the palette is global to the diagram.
+ //Moreover, the palette is created before the EditParts, so we don't always have them.
+ return paletteElement.getFilters().stream().allMatch(f -> f.matches(diagram) || f.matches(diagram.getElement()));
}
/**
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/IProfileDependantPaletteProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/IProfileDependantPaletteProvider.java
index b119526fbc7..00b81b3291e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/IProfileDependantPaletteProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/IProfileDependantPaletteProvider.java
@@ -15,12 +15,17 @@ package org.eclipse.papyrus.infra.gmfdiag.common.service.palette;
import java.util.Collection;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
+import org.eclipse.papyrus.infra.filters.Filter;
/**
* Interface implemented by all palette providers that requires some profiles
* applied to be shown
+ *
* @since 3.0
+ *
+ * @deprecated Since 3.1 - Was never supported. Use {@link Filter Filters} in Palette Configuration elements instead.
*/
+@Deprecated
public interface IProfileDependantPaletteProvider extends IPaletteProvider {
/**
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/META-INF/MANIFEST.MF
index 7d2847c4142..236a06869b4 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/META-INF/MANIFEST.MF
@@ -4,6 +4,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.13.0,4.0.0)",
org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.filters;visibility:=reexport,
+ org.eclipse.papyrus.infra.filters.edit;visibility:=reexport,
+ org.eclipse.uml2.types;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)",
org.eclipse.papyrus.emf.facet.efacet.metamodel.edit;bundle-version="[1.2.0,2.0.0)",
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_CompoundFilter.gif b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_CompoundFilter.gif
new file mode 100644
index 00000000000..703c7e1badb
--- /dev/null
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_CompoundFilter.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_Equals.gif b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_Equals.gif
new file mode 100644
index 00000000000..38cd8a017cb
--- /dev/null
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/icons/full/ctool16/CreateConfiguration_filters_Equals.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.properties b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.properties
index 0753573f039..34a06d08956 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.properties
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.properties
@@ -102,3 +102,4 @@ _UI_IdentifiedConfiguration_identifier_feature = Identifier
_UI_NamedConfiguration_name_feature = Name
_UI_InheritanceKind_none_literal = none
_UI_InheritanceKind_all_literal = all
+_UI_Configuration_filters_feature = Filters
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/ConfigurationItemProvider.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/ConfigurationItemProvider.java
index cbbedc9064a..cb0415b2737 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/ConfigurationItemProvider.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/ConfigurationItemProvider.java
@@ -34,6 +34,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.gmfdiag.paletteconfiguration.Configuration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteconfigurationPackage;
@@ -158,6 +159,7 @@ public class ConfigurationItemProvider
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(PaletteconfigurationPackage.Literals.CONFIGURATION__ICON);
+ childrenFeatures.add(PaletteconfigurationPackage.Literals.CONFIGURATION__FILTERS);
}
return childrenFeatures;
}
@@ -208,6 +210,7 @@ public class ConfigurationItemProvider
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case PaletteconfigurationPackage.CONFIGURATION__ICON:
+ case PaletteconfigurationPackage.CONFIGURATION__FILTERS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -224,6 +227,16 @@ public class ConfigurationItemProvider
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PaletteconfigurationPackage.Literals.CONFIGURATION__FILTERS,
+ FiltersFactory.eINSTANCE.createCompoundFilter()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PaletteconfigurationPackage.Literals.CONFIGURATION__FILTERS,
+ FiltersFactory.eINSTANCE.createEquals()));
}
/**
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
index 936ca807891..85122c27d98 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
@@ -18,6 +18,7 @@ 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;
/**
@@ -53,6 +54,7 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
super
(new ResourceLocator [] {
EcoreEditPlugin.INSTANCE,
+ FiltersEditPlugin.INSTANCE,
TypesConfigurationsEditPlugin.INSTANCE,
});
}
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/CustomDrawerConfigurationItemProvider.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/CustomDrawerConfigurationItemProvider.java
index 0835c8d4397..9c2d8f4d48b 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/CustomDrawerConfigurationItemProvider.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/provider/CustomDrawerConfigurationItemProvider.java
@@ -13,8 +13,10 @@
package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.provider;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.List;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
@@ -34,7 +36,6 @@ import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.DrawerConfiguratio
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.IconDescriptor;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ToolConfiguration;
-import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.provider.DrawerConfigurationItemProvider;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.utils.CreatePaletteItemUtil;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.utils.DragAndDropCompoundCommand;
@@ -123,7 +124,13 @@ public class CustomDrawerConfigurationItemProvider extends DrawerConfigurationIt
*/
@Override
public Collection<?> getChildren(final Object object) {
- return ((DrawerConfiguration) object).getOwnedConfigurations();
+ DrawerConfiguration configuration = (DrawerConfiguration) object;
+ List<EObject> children = new ArrayList<>();
+
+ children.addAll(configuration.getFilters());
+ children.addAll(configuration.getOwnedConfigurations());
+
+ return children;
}
/**
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/META-INF/MANIFEST.MF
index ca344998e06..d28119cc224 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/META-INF/MANIFEST.MF
@@ -15,6 +15,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.edit.ui;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.filters.edit;visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.types.edit;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
@@ -32,6 +33,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
org.eclipse.papyrus.infra.emf.types;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.infra.emf.types.ui;bundle-version="[4.0.0,5.0.0)",
org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.7.0"
Bundle-ActivationPolicy: lazy
Import-Package: com.google.common.base
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml
index 33d93f3d20b..c09267a6413 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml
@@ -55,5 +55,30 @@
environmentModel="properties/environment.xmi">
</environment>
</extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="PaletteConfiguration">
+ <propertySection
+ class="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.presentation.FilterSection"
+ id="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor.FilterSection"
+ tab="Filter">
+ <input
+ type="org.eclipse.papyrus.infra.filters.Filter">
+ </input>
+ </propertySection>
+ </propertySections>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="PaletteConfiguration">
+ <propertyTab
+ category="org.eclipse.papyrus"
+ id="Filter"
+ label="Filter">
+ </propertyTab>
+ </propertyTabs>
+ </extension>
</plugin>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/PaletteConfiguration.ctx b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/PaletteConfiguration.ctx
index adec60843c9..7416bd8acd1 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/PaletteConfiguration.ctx
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/PaletteConfiguration.ctx
@@ -1,113 +1,114 @@
-<?xml version="1.0" encoding="ASCII"?>
-<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_QFK38JmjEeW_-tPAoZEp-w" name="paletteconfiguration" label="Palette Configuration Metamodel">
- <tabs xmi:id="_pevIQJmjEeW_-tPAoZEp-w" label="Configuration" id="paletteconfiguration" priority="100">
- <sections xmi:id="_pfL0MJmjEeW_-tPAoZEp-w" name="Single PaletteConfiguration" sectionFile="ui/SinglePaletteConfiguration.xwt">
- <widget href="ui/SinglePaletteConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfMbQJmjEeW_-tPAoZEp-w" name="Single ToolConfiguration" sectionFile="ui/SingleToolConfiguration.xwt">
- <widget href="ui/SingleToolConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfMbQZmjEeW_-tPAoZEp-w" name="Single StackConfiguration" sectionFile="ui/SingleStackConfiguration.xwt">
- <widget href="ui/SingleStackConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNCUJmjEeW_-tPAoZEp-w" name="Single ChildConfiguration" sectionFile="ui/SingleChildConfiguration.xwt">
- <widget href="ui/SingleChildConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNCUZmjEeW_-tPAoZEp-w" name="Single DrawerConfiguration" sectionFile="ui/SingleDrawerConfiguration.xwt">
- <widget href="ui/SingleDrawerConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNCUpmjEeW_-tPAoZEp-w" name="Single Configuration" sectionFile="ui/SingleConfiguration.xwt">
- <widget href="ui/SingleConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNCU5mjEeW_-tPAoZEp-w" name="Single IconDescriptor" sectionFile="ui/SingleIconDescriptor.xwt">
- <widget href="ui/SingleIconDescriptor.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNCVJmjEeW_-tPAoZEp-w" name="Single ElementDescriptor" sectionFile="ui/SingleElementDescriptor.xwt">
- <widget href="ui/SingleElementDescriptor.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNpYJmjEeW_-tPAoZEp-w" name="Single SeparatorConfiguration" sectionFile="ui/SingleSeparatorConfiguration.xwt">
- <widget href="ui/SingleSeparatorConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="_pfNpYZmjEeW_-tPAoZEp-w" name="Single LeafConfiguration" sectionFile="ui/SingleLeafConfiguration.xwt">
- <widget href="ui/SingleLeafConfiguration.xwt#/"/>
- </sections>
- <sections xmi:id="__fyvAOefEeWvSphMoTjkZw" name="SingleApplyStereotypeAction" sectionFile="ui/SingleApplyStereotypeAction.xwt">
- <widget href="ui/SingleApplyStereotypeAction.xwt#/"/>
- </sections>
- </tabs>
- <tabs xmi:id="_MeheUN7kEeWswp6oNc-gJA" label="Actions" id="paletteconfigurationactions" category="" image="" afterTab="_pevIQJmjEeW_-tPAoZEp-w" priority="110">
- <sections xmi:id="_XU-1EN7lEeWswp6oNc-gJA" name="Single ToolActions" sectionFile="ui/SingleToolActions.xwt">
- <widget href="ui/SingleToolActions.xwt#/"/>
- </sections>
- </tabs>
- <views xmi:id="_QFK38ZmjEeW_-tPAoZEp-w" name="Single PaletteConfiguration" sections="_pfL0MJmjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4QpmjEeW_-tPAoZEp-w">
- <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK38pmjEeW_-tPAoZEp-w" name="isSinglePaletteConfiguration">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK385mjEeW_-tPAoZEp-w" name="className" value="PaletteConfiguration"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK39JmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
- </constraints>
- </views>
- <views xmi:id="_QFK39ZmjEeW_-tPAoZEp-w" name="Single ToolConfiguration" sections="_pfMbQJmjEeW_-tPAoZEp-w _XU-1EN7lEeWswp6oNc-gJA" automaticContext="true" datacontexts="_QFK4RZmjEeW_-tPAoZEp-w">
- <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK39pmjEeW_-tPAoZEp-w" name="isSingleToolConfiguration">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK395mjEeW_-tPAoZEp-w" name="className" value="ToolConfiguration"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK3-JmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
- </constraints>
- </views>
- <views xmi:id="_QFK4AZmjEeW_-tPAoZEp-w" name="Single DrawerConfiguration" sections="_pfNCUZmjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4S5mjEeW_-tPAoZEp-w">
- <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK4ApmjEeW_-tPAoZEp-w" name="isSingleDrawerConfiguration">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4A5mjEeW_-tPAoZEp-w" name="className" value="DrawerConfiguration"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4BJmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
- </constraints>
- </views>
- <views xmi:id="_QFK4CZmjEeW_-tPAoZEp-w" name="Single IconDescriptor" sections="_pfNCU5mjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4UpmjEeW_-tPAoZEp-w">
- <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK4CpmjEeW_-tPAoZEp-w" name="isSingleIconDescriptor">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4C5mjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4DJmjEeW_-tPAoZEp-w" name="className" value="IconDescriptor"/>
- </constraints>
- </views>
- <views xmi:id="_QFK4DZmjEeW_-tPAoZEp-w" name="Single ElementDescriptor" sections="_pfNCVJmjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4VZmjEeW_-tPAoZEp-w">
- <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK4DpmjEeW_-tPAoZEp-w" name="isSingleElementDescriptor">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4D5mjEeW_-tPAoZEp-w" name="className" value="ElementDescriptor"/>
- <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4EJmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
- </constraints>
- </views>
- <dataContexts xmi:id="_QFK4QZmjEeW_-tPAoZEp-w" name="paletteconfiguration" label="paletteconfiguration">
- <elements xmi:id="_QFK4QpmjEeW_-tPAoZEp-w" name="PaletteConfiguration" supertypes="_QFK4TZmjEeW_-tPAoZEp-w">
- <properties xmi:id="_QFK4Q5mjEeW_-tPAoZEp-w" name="drawerConfigurations" type="Reference" multiplicity="-1" description="Configuration for Drawer"/>
- <properties xmi:id="_QFK4RJmjEeW_-tPAoZEp-w" name="requiredProfiles" label="Required profiles" multiplicity="-1" description="The List of Required Profiles for this Palette Configuration"/>
- </elements>
- <elements xmi:id="_QFK4RZmjEeW_-tPAoZEp-w" name="ToolConfiguration" supertypes="_QFK4WZmjEeW_-tPAoZEp-w">
- <properties xmi:id="_QFK4RpmjEeW_-tPAoZEp-w" name="kind" label="" type="Enumeration" description="The Kind of the Tool Configuration"/>
- <properties xmi:id="_QFK4R5mjEeW_-tPAoZEp-w" name="elementDescriptors" type="Reference" multiplicity="-1" description=""/>
- <properties xmi:id="_bgGzsA2LEeeAw6ejKZocqQ" name="toolClassName" label="" description="The qualify name of the class wich extends Tool to instanciate for this ToolConfiguration."/>
- </elements>
- <elements xmi:id="_QFK4SJmjEeW_-tPAoZEp-w" name="StackConfiguration" supertypes="_QFK4SpmjEeW_-tPAoZEp-w">
- <properties xmi:id="_QFK4SZmjEeW_-tPAoZEp-w" name="ownedConfigurations" type="Reference" multiplicity="-1"/>
- </elements>
- <elements xmi:id="_QFK4SpmjEeW_-tPAoZEp-w" name="ChildConfiguration" supertypes="_QFK4TZmjEeW_-tPAoZEp-w"/>
- <elements xmi:id="_QFK4S5mjEeW_-tPAoZEp-w" name="DrawerConfiguration" supertypes="_QFK4TZmjEeW_-tPAoZEp-w">
- <properties xmi:id="_QFK4TJmjEeW_-tPAoZEp-w" name="ownedConfigurations" type="Reference" multiplicity="-1"/>
- </elements>
- <elements xmi:id="_QFK4TZmjEeW_-tPAoZEp-w" name="Configuration">
- <properties xmi:id="_QFK4TpmjEeW_-tPAoZEp-w" name="id" label="Identifier" description="Unique Identifier of the Configuration, Used by the Tool to Retrieve the Configuration"/>
- <properties xmi:id="_QFK4T5mjEeW_-tPAoZEp-w" name="label" label="" description="Label of the Configuration, Used Only for Display"/>
- <properties xmi:id="_QFK4UJmjEeW_-tPAoZEp-w" name="description" description="Description of the Configuration."/>
- <properties xmi:id="_QFK4UZmjEeW_-tPAoZEp-w" name="icon" description="Icon of the Configuration"/>
- </elements>
- <elements xmi:id="_QFK4UpmjEeW_-tPAoZEp-w" name="IconDescriptor">
- <properties xmi:id="_QFK4U5mjEeW_-tPAoZEp-w" name="pluginID" description="ID of the plugin where the icon is located. If not set, the tool will look in the bundle defining the palette."/>
- <properties xmi:id="_QFK4VJmjEeW_-tPAoZEp-w" name="iconPath" description="Path of the icon in the bundle. "/>
- </elements>
- <elements xmi:id="_QFK4VZmjEeW_-tPAoZEp-w" name="ElementDescriptor">
- <properties xmi:id="_QFK4VpmjEeW_-tPAoZEp-w" name="elementType" type="Reference"/>
- <properties xmi:id="_QFK4V5mjEeW_-tPAoZEp-w" name="graphicalHints" multiplicity="-1"/>
- </elements>
- <elements xmi:id="_QFK4WJmjEeW_-tPAoZEp-w" name="SeparatorConfiguration" supertypes="_QFK4WZmjEeW_-tPAoZEp-w"/>
- <elements xmi:id="_QFK4WZmjEeW_-tPAoZEp-w" name="LeafConfiguration" supertypes="_QFK4SpmjEeW_-tPAoZEp-w"/>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/environment.xmi#//@modelElementFactories.0"/>
- </dataContexts>
-</contexts:Context>
+<?xml version="1.0" encoding="ASCII"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_QFK38JmjEeW_-tPAoZEp-w" name="paletteconfiguration" label="Palette Configuration Metamodel">
+ <tabs xmi:id="_pevIQJmjEeW_-tPAoZEp-w" label="Configuration" id="paletteconfiguration" priority="100">
+ <sections xmi:id="_pfL0MJmjEeW_-tPAoZEp-w" name="Single PaletteConfiguration" sectionFile="ui/SinglePaletteConfiguration.xwt">
+ <widget href="ui/SinglePaletteConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfMbQJmjEeW_-tPAoZEp-w" name="Single ToolConfiguration" sectionFile="ui/SingleToolConfiguration.xwt">
+ <widget href="ui/SingleToolConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfMbQZmjEeW_-tPAoZEp-w" name="Single StackConfiguration" sectionFile="ui/SingleStackConfiguration.xwt">
+ <widget href="ui/SingleStackConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNCUJmjEeW_-tPAoZEp-w" name="Single ChildConfiguration" sectionFile="ui/SingleChildConfiguration.xwt">
+ <widget href="ui/SingleChildConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNCUZmjEeW_-tPAoZEp-w" name="Single DrawerConfiguration" sectionFile="ui/SingleDrawerConfiguration.xwt">
+ <widget href="ui/SingleDrawerConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNCUpmjEeW_-tPAoZEp-w" name="Single Configuration" sectionFile="ui/SingleConfiguration.xwt">
+ <widget href="ui/SingleConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNCU5mjEeW_-tPAoZEp-w" name="Single IconDescriptor" sectionFile="ui/SingleIconDescriptor.xwt">
+ <widget href="ui/SingleIconDescriptor.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNCVJmjEeW_-tPAoZEp-w" name="Single ElementDescriptor" sectionFile="ui/SingleElementDescriptor.xwt">
+ <widget href="ui/SingleElementDescriptor.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNpYJmjEeW_-tPAoZEp-w" name="Single SeparatorConfiguration" sectionFile="ui/SingleSeparatorConfiguration.xwt">
+ <widget href="ui/SingleSeparatorConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="_pfNpYZmjEeW_-tPAoZEp-w" name="Single LeafConfiguration" sectionFile="ui/SingleLeafConfiguration.xwt">
+ <widget href="ui/SingleLeafConfiguration.xwt#/"/>
+ </sections>
+ <sections xmi:id="__fyvAOefEeWvSphMoTjkZw" name="SingleApplyStereotypeAction" sectionFile="ui/SingleApplyStereotypeAction.xwt">
+ <widget href="ui/SingleApplyStereotypeAction.xwt#/"/>
+ </sections>
+ </tabs>
+ <tabs xmi:id="_MeheUN7kEeWswp6oNc-gJA" label="Actions" id="paletteconfigurationactions" category="" image="" afterTab="_pevIQJmjEeW_-tPAoZEp-w" priority="110">
+ <sections xmi:id="_XU-1EN7lEeWswp6oNc-gJA" name="Single ToolActions" sectionFile="ui/SingleToolActions.xwt">
+ <widget href="ui/SingleToolActions.xwt#/"/>
+ </sections>
+ </tabs>
+ <views xmi:id="_QFK38ZmjEeW_-tPAoZEp-w" name="Single PaletteConfiguration" sections="_pfL0MJmjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4QpmjEeW_-tPAoZEp-w">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK38pmjEeW_-tPAoZEp-w" name="isSinglePaletteConfiguration">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK385mjEeW_-tPAoZEp-w" name="className" value="PaletteConfiguration"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK39JmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
+ </constraints>
+ </views>
+ <views xmi:id="_QFK39ZmjEeW_-tPAoZEp-w" name="Single ToolConfiguration" sections="_pfMbQJmjEeW_-tPAoZEp-w _XU-1EN7lEeWswp6oNc-gJA" automaticContext="true" datacontexts="_QFK4RZmjEeW_-tPAoZEp-w">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK39pmjEeW_-tPAoZEp-w" name="isSingleToolConfiguration">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK395mjEeW_-tPAoZEp-w" name="className" value="ToolConfiguration"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK3-JmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
+ </constraints>
+ </views>
+ <views xmi:id="_QFK4AZmjEeW_-tPAoZEp-w" name="Single DrawerConfiguration" sections="_pfNCUZmjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4S5mjEeW_-tPAoZEp-w">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK4ApmjEeW_-tPAoZEp-w" name="isSingleDrawerConfiguration">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4A5mjEeW_-tPAoZEp-w" name="className" value="DrawerConfiguration"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4BJmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
+ </constraints>
+ </views>
+ <views xmi:id="_QFK4CZmjEeW_-tPAoZEp-w" name="Single IconDescriptor" sections="_pfNCU5mjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4UpmjEeW_-tPAoZEp-w">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK4CpmjEeW_-tPAoZEp-w" name="isSingleIconDescriptor">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4C5mjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4DJmjEeW_-tPAoZEp-w" name="className" value="IconDescriptor"/>
+ </constraints>
+ </views>
+ <views xmi:id="_QFK4DZmjEeW_-tPAoZEp-w" name="Single ElementDescriptor" sections="_pfNCVJmjEeW_-tPAoZEp-w" automaticContext="true" datacontexts="_QFK4VZmjEeW_-tPAoZEp-w">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_QFK4DpmjEeW_-tPAoZEp-w" name="isSingleElementDescriptor">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4D5mjEeW_-tPAoZEp-w" name="className" value="ElementDescriptor"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_QFK4EJmjEeW_-tPAoZEp-w" name="nsUri" value="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8"/>
+ </constraints>
+ </views>
+ <dataContexts xmi:id="_QFK4QZmjEeW_-tPAoZEp-w" name="paletteconfiguration" label="paletteconfiguration">
+ <elements xmi:id="_QFK4QpmjEeW_-tPAoZEp-w" name="PaletteConfiguration" supertypes="_QFK4TZmjEeW_-tPAoZEp-w">
+ <properties xmi:id="_QFK4Q5mjEeW_-tPAoZEp-w" name="drawerConfigurations" type="Reference" multiplicity="-1" description="Configuration for Drawer"/>
+ <properties xmi:id="_QFK4RJmjEeW_-tPAoZEp-w" name="requiredProfiles" label="Required profiles" multiplicity="-1" description="The List of Required Profiles for this Palette Configuration"/>
+ </elements>
+ <elements xmi:id="_QFK4RZmjEeW_-tPAoZEp-w" name="ToolConfiguration" supertypes="_QFK4WZmjEeW_-tPAoZEp-w">
+ <properties xmi:id="_QFK4RpmjEeW_-tPAoZEp-w" name="kind" label="" type="Enumeration" description="The Kind of the Tool Configuration"/>
+ <properties xmi:id="_QFK4R5mjEeW_-tPAoZEp-w" name="elementDescriptors" type="Reference" multiplicity="-1" description=""/>
+ <properties xmi:id="_bgGzsA2LEeeAw6ejKZocqQ" name="toolClassName" label="" description="The qualify name of the class wich extends Tool to instanciate for this ToolConfiguration."/>
+ </elements>
+ <elements xmi:id="_QFK4SJmjEeW_-tPAoZEp-w" name="StackConfiguration" supertypes="_QFK4SpmjEeW_-tPAoZEp-w">
+ <properties xmi:id="_QFK4SZmjEeW_-tPAoZEp-w" name="ownedConfigurations" type="Reference" multiplicity="-1"/>
+ </elements>
+ <elements xmi:id="_QFK4SpmjEeW_-tPAoZEp-w" name="ChildConfiguration" supertypes="_QFK4TZmjEeW_-tPAoZEp-w"/>
+ <elements xmi:id="_QFK4S5mjEeW_-tPAoZEp-w" name="DrawerConfiguration" supertypes="_QFK4TZmjEeW_-tPAoZEp-w">
+ <properties xmi:id="_QFK4TJmjEeW_-tPAoZEp-w" name="ownedConfigurations" type="Reference" multiplicity="-1"/>
+ </elements>
+ <elements xmi:id="_QFK4TZmjEeW_-tPAoZEp-w" name="Configuration">
+ <properties xmi:id="_QFK4TpmjEeW_-tPAoZEp-w" name="id" label="Identifier" description="Unique Identifier of the Configuration, Used by the Tool to Retrieve the Configuration"/>
+ <properties xmi:id="_QFK4T5mjEeW_-tPAoZEp-w" name="label" label="" description="Label of the Configuration, Used Only for Display"/>
+ <properties xmi:id="_QFK4UJmjEeW_-tPAoZEp-w" name="description" description="Description of the Configuration."/>
+ <properties xmi:id="_QFK4UZmjEeW_-tPAoZEp-w" name="icon" description="Icon of the Configuration"/>
+ <properties xmi:id="_5sZggIvtEeegX7GLIzVb2g" name="filter" type="Reference" multiplicity="1"/>
+ </elements>
+ <elements xmi:id="_QFK4UpmjEeW_-tPAoZEp-w" name="IconDescriptor">
+ <properties xmi:id="_QFK4U5mjEeW_-tPAoZEp-w" name="pluginID" description="ID of the plugin where the icon is located. If not set, the tool will look in the bundle defining the palette."/>
+ <properties xmi:id="_QFK4VJmjEeW_-tPAoZEp-w" name="iconPath" description="Path of the icon in the bundle. "/>
+ </elements>
+ <elements xmi:id="_QFK4VZmjEeW_-tPAoZEp-w" name="ElementDescriptor">
+ <properties xmi:id="_QFK4VpmjEeW_-tPAoZEp-w" name="elementType" type="Reference"/>
+ <properties xmi:id="_QFK4V5mjEeW_-tPAoZEp-w" name="graphicalHints" multiplicity="-1"/>
+ </elements>
+ <elements xmi:id="_QFK4WJmjEeW_-tPAoZEp-w" name="SeparatorConfiguration" supertypes="_QFK4WZmjEeW_-tPAoZEp-w"/>
+ <elements xmi:id="_QFK4WZmjEeW_-tPAoZEp-w" name="LeafConfiguration" supertypes="_QFK4SpmjEeW_-tPAoZEp-w"/>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/environment.xmi#//@modelElementFactories.0"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/ui/SingleElementDescriptor.xwt b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/ui/SingleElementDescriptor.xwt
index 362d983314f..a13899f0f5f 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/ui/SingleElementDescriptor.xwt
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/properties/ui/SingleElementDescriptor.xwt
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
- xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:ReferenceDialog input="{Binding}"
- property="paletteconfiguration:ElementDescriptor:elementType"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiString input="{Binding}"
- property="paletteconfiguration:ElementDescriptor:graphicalHints"></ppe:MultiString>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="paletteconfiguration:ElementDescriptor:elementType"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiString input="{Binding}"
+ property="paletteconfiguration:ElementDescriptor:graphicalHints"></ppe:MultiString>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java
index d5b3760b2aa..d3ba086ea61 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java
@@ -20,6 +20,7 @@ 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;
/**
@@ -55,6 +56,7 @@ public final class PaletteConfigurationEditorPlugin extends EMFPlugin {
super
(new ResourceLocator [] {
EcoreEditPlugin.INSTANCE,
+ FiltersEditPlugin.INSTANCE,
TypesConfigurationsEditPlugin.INSTANCE,
});
}
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteconfigurationEditor.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteconfigurationEditor.java
index a5dcb126d74..b55eb1a4e63 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteconfigurationEditor.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/PaletteconfigurationEditor.java
@@ -158,6 +158,7 @@ import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.provider.Paletteco
import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.filters.provider.FiltersItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.types.provider.ElementTypesConfigurationsItemProviderAdapterFactory;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
@@ -654,6 +655,7 @@ public class PaletteconfigurationEditor
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new PaletteconfigurationItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new FiltersItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ElementTypesConfigurationsItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/CustomPaletteconfigurationEditor.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/CustomPaletteconfigurationEditor.java
index 877ec7b5b1b..a476bd9cd26 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/CustomPaletteconfigurationEditor.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/CustomPaletteconfigurationEditor.java
@@ -17,7 +17,9 @@ import java.util.Collections;
import java.util.EventObject;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.command.BasicCommandStack;
@@ -33,7 +35,8 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.CreateChildCommand;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
@@ -44,6 +47,11 @@ import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl;
+import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -52,6 +60,8 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.papyrus.infra.filters.CompoundFilter;
+import org.eclipse.papyrus.infra.filters.util.FiltersAdapterFactory;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Activator;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration;
@@ -153,9 +163,10 @@ public class CustomPaletteconfigurationEditor extends PaletteconfigurationEditor
adapterFactory.addAdapterFactory(new CustomPaletteconfigurationItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new FiltersAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
- BasicCommandStack commandStack = new BasicCommandStack();
+ TransactionalCommandStack commandStack = new TransactionalCommandStackImpl();
// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
commandStack.addCommandStackListener(new CommandStackListener() {
@@ -186,8 +197,10 @@ public class CustomPaletteconfigurationEditor extends PaletteconfigurationEditor
});
// Create the editing domain with a special command stack.
- //
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ TransactionalEditingDomainImpl editingDomain = new TransactionalEditingDomainImpl(adapterFactory, commandStack);
+ WorkspaceEditingDomainFactory.INSTANCE.mapResourceSet(editingDomain);
+
+ this.editingDomain = editingDomain;
}
/**
@@ -349,6 +362,43 @@ public class CustomPaletteconfigurationEditor extends PaletteconfigurationEditor
createToolBarItem(toolbar, CREATE_SEPARATOR_ICON, Messages.CustomPaletteconfigurationEditor_Create_Separator_Tooltip, createNewSeparatorListener(), validatorForNotStackChild);
createToolBarItem(toolbar, CREATE_TOOL_ICON, Messages.CustomPaletteconfigurationEditor_Create_Tool_Tooltip, createNewToolListener(), validator);
createToolBarItem(toolbar, CREATE_STACK_ICON, Messages.CustomPaletteconfigurationEditor_Create_Stack_Tooltip, createNewStackListener(), validatorForNotStackChild);
+ createToolBarItem(toolbar, CREATE_DRAWERS_ICON, "Filter", createFilterListener(), () -> true);
+ }
+
+ /**
+ * @return
+ */
+ private Listener createFilterListener() {
+ return event -> {
+ IStructuredSelection selection = (IStructuredSelection) selectionViewer.getSelection();
+ if (selection == null || selection.size() != 1) {
+ return;
+ }
+
+ Object selected = selection.getFirstElement();
+
+ EObject parent;
+
+ if (selected instanceof Configuration) {
+ parent = (Configuration)selected;
+ } else if (selected instanceof CompoundFilter) {
+ parent = (CompoundFilter)selected;
+ } else {
+ return;
+ }
+
+ List<CommandParameter> newChildDescriptors = editingDomain.getNewChildDescriptors(parent, null).stream()
+ .filter(CommandParameter.class::isInstance)
+ .map(CommandParameter.class::cast)
+ .collect(Collectors.toList());
+
+ NewFilterDialog dialog = new NewFilterDialog(getSite().getShell(), newChildDescriptors);
+ if (dialog.open() == Dialog.OK && dialog.getNewChild() != null) {
+ CommandParameter newChild = dialog.getNewChild();
+ Command createCommand = editingDomain.createCommand(CreateChildCommand.class, new CommandParameter(parent, null, newChild));
+ editingDomain.getCommandStack().execute(createCommand);
+ }
+ };
}
/**
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/FilterSection.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/FilterSection.java
new file mode 100644
index 00000000000..95ee9542765
--- /dev/null
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/FilterSection.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2017 EclipseSource and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * EclipseSource - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.presentation;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.ui.provider.PropertySource;
+import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.filters.Filter;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+
+/**
+ * Dynamic section for all implementations of {@link Filter}
+ */
+public class FilterSection extends AdvancedPropertySection implements IPropertySourceProvider {
+
+ @Override
+ public IPropertySource getPropertySource(Object object) {
+ if (object instanceof IPropertySource) {
+ return (IPropertySource) object;
+ }
+ AdapterFactory af = getAdapterFactory(object);
+ if (af != null) {
+ IItemPropertySource ips = (IItemPropertySource) af.adapt(object, IItemPropertySource.class);
+ if (ips != null) {
+ return new PropertySource(object, ips);
+ }
+ }
+ if (object instanceof IAdaptable) {
+ return ((IAdaptable) object).getAdapter(IPropertySource.class);
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.eclipse.gmf.runtime.diagram.ui.properties.sections.
+ * AdvancedPropertySection# getPropertySourceProvider()
+ */
+ @Override
+ protected IPropertySourceProvider getPropertySourceProvider() {
+ return this;
+ }
+
+ /**
+ * Modify/unwrap selection.
+ *
+ */
+ protected Object transformSelection(Object selected) {
+ if (selected == null) {
+ return null;
+ }
+ if (selected instanceof IAdaptable) {
+ IAdaptable adaptable = (IAdaptable) selected;
+
+ Object adapter = adaptable.getAdapter(IPropertySource.class);
+ if (adapter != null) {
+ // This is a terminal transformation
+ return adapter;
+ }
+ adapter = adaptable.getAdapter(EObject.class);
+ if (adapter != null) {
+ // This is a terminal transformation
+ return adapter;
+ }
+ }
+
+ EObject elem = EMFHelper.getEObject(selected);
+ if (elem != null) {
+ return elem;
+ }
+
+ return selected;
+ }
+
+ /**
+ * Get the adapterFactory of the given object
+ *
+ * @param Object
+ * @return the adapter factory
+ */
+ protected AdapterFactory getAdapterFactory(Object object) {
+ if (getEditingDomain() instanceof AdapterFactoryEditingDomain) {
+ return ((AdapterFactoryEditingDomain) getEditingDomain()).getAdapterFactory();
+ }
+ EditingDomain domain = EMFHelper.resolveEditingDomain(object);
+ if (domain instanceof AdapterFactoryEditingDomain) {
+ return ((AdapterFactoryEditingDomain) domain).getAdapterFactory();
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/NewFilterDialog.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/NewFilterDialog.java
new file mode 100644
index 00000000000..2c5670ed148
--- /dev/null
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/presentation/NewFilterDialog.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2017 EclipseSource and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * EclipseSource - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.presentation;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.filters.FiltersPackage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.SelectionDialog;
+
+/**
+ * Dialog to select the new kind of {@link Filter} to create
+ */
+public class NewFilterDialog extends SelectionDialog {
+
+ private List<CommandParameter> newChildDescriptors;
+
+ private CommandParameter result;
+
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ */
+ public NewFilterDialog(Shell parentShell, List<CommandParameter> newChildDescriptors) {
+ super(parentShell);
+ this.newChildDescriptors = newChildDescriptors;
+ }
+
+ /**
+ * @see org.eclipse.ui.dialogs.SelectionDialog#configureShell(org.eclipse.swt.widgets.Shell)
+ *
+ * @param shell
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText("Create a new filter");
+ }
+
+ /**
+ * @see org.eclipse.ui.dialogs.SelectionDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ */
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+ getButton(OK).setText("Create");
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ * @return
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite self = (Composite) super.createDialogArea(parent);
+
+ Label description = new Label(self, SWT.WRAP);
+ description.setText("Select the kind of Filter to create");
+
+ ListViewer viewer = new ListViewer(self, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ viewer.setContentProvider(new NewFilterContentProvider());
+ viewer.setLabelProvider(new LabelProvider() {
+ public String getText(Object element) {
+ CommandParameter cp = (CommandParameter) element;
+ EObject value = cp.getEValue();
+ return value.eClass().getName();
+ };
+ });
+ viewer.addSelectionChangedListener(event -> {
+ result = (CommandParameter)event.getStructuredSelection().getFirstElement();
+ updateButtons();
+ });
+ viewer.setInput(new Object());
+
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(description);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getList());
+
+ return self;
+ }
+
+ private void updateButtons() {
+ getButton(OK).setEnabled(result != null);
+ }
+
+ private class NewFilterContentProvider implements IStructuredContentProvider {
+
+ /**
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ *
+ * @param inputElement
+ * @return
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return newChildDescriptors.stream()
+ .filter(cp -> cp.getEStructuralFeature() instanceof EReference)
+ .filter(cp -> EMFHelper.isSuperType(FiltersPackage.Literals.FILTER, cp.getEReference().getEType()))
+ .collect(Collectors.toList()).toArray();
+ }
+
+ }
+
+ /**
+ * @return
+ */
+ public CommandParameter getNewChild() {
+ return result;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/.settings/.api_filters b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/.settings/.api_filters
new file mode 100644
index 00000000000..fb893e45c48
--- /dev/null
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/.settings/.api_filters
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration" version="2">
+ <resource path="META-INF/MANIFEST.MF">
+ <filter comment="Generated code not meant to be implemented" id="923795461">
+ <message_arguments>
+ <message_argument value="3.1.0"/>
+ <message_argument value="3.0.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/Configuration.java" type="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration">
+ <filter comment="Generated code not meant to be implemented" id="403804204">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration"/>
+ <message_argument value="getFilters()"/>
+ </message_arguments>
+ </filter>
+ <filter comment="Generated code not meant to be implemented" id="403804204">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration"/>
+ <message_argument value="getFilters(String)"/>
+ </message_arguments>
+ </filter>
+ <filter comment="Generated code not meant to be implemented" id="403804204">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration"/>
+ <message_argument value="getFilters(String, boolean, EClass)"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/ConfigurationImpl.java" type="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.ConfigurationImpl">
+ <filter comment="Generated code not meant to be implemented" id="336658481">
+ <message_arguments>
+ <message_argument value="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.ConfigurationImpl"/>
+ <message_argument value="filters"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/META-INF/MANIFEST.MF
index 9d0c30d2acf..7dc9a984989 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/META-INF/MANIFEST.MF
@@ -2,6 +2,8 @@ Manifest-Version: 1.0
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.filters;visibility:=reexport,
+ org.eclipse.uml2.types;visibility:=reexport,
org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
org.eclipse.gmf.runtime.common.core;bundle-version="[1.7.0,2.0.0)",
org.eclipse.gmf.runtime.common.ui.services;bundle-version="[1.9.0,2.0.0)",
@@ -31,7 +33,7 @@ Export-Package: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration,
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 3.0.0.qualifier
+Bundle-Version: 3.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Activator
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.ecore b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.ecore
index 3926e9b1c98..eb97b435124 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.ecore
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.ecore
@@ -26,6 +26,9 @@
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="icon" eType="#//IconDescriptor"
containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="filters" ordered="false"
+ upperBound="-1" eType="ecore:EClass ../../org.eclipse.papyrus.infra.filters/model/filters.ecore#//Filter"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IconDescriptor">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.genmodel b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.genmodel
index c9217dc067c..dd2c3b1615a 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.genmodel
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.genmodel
@@ -11,7 +11,7 @@
testsDirectory="/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src-gen"
testSuiteClass="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.PaletteConfigurationAllTests"
importerID="org.eclipse.uml2.uml.ecore.importer" complianceLevel="5.0" copyrightFields="false"
- usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.genmodel#//types">
+ usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.infra.filters/model/filters.genmodel#//filters ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.genmodel#//types platform:/plugin/org.eclipse.uml2.types/model/Types.genmodel#//types">
<genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer">
<details key="OPPOSITE_ROLE_NAMES" value="IGNORE"/>
<details key="DUPLICATE_FEATURES" value="DISCARD"/>
@@ -55,6 +55,8 @@
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute PaletteConfiguration.ecore#//Configuration/description"/>
<genFeatures xsi:type="genmodel:GenFeature" property="None" children="true"
createChild="false" ecoreFeature="ecore:EReference PaletteConfiguration.ecore#//Configuration/icon"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="None" children="true"
+ createChild="true" ecoreFeature="ecore:EReference PaletteConfiguration.ecore#//Configuration/filters"/>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="PaletteConfiguration.ecore#//IconDescriptor">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute PaletteConfiguration.ecore#//IconDescriptor/pluginID"/>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.notation b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.notation
index 0ec76badf47..955032f4c5e 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.notation
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.notation
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfdiagrepresentation="http://www.eclipse.org/papyrus/infra/gmfdiag/representation" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_6dfb8CwWEeeGrqtgh2TERg" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_6dfb8CwWEeeGrqtgh2TERg" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_Lwy9gCwcEeetnM91DrjyzA" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_LxC1ICwcEeetnM91DrjyzA" type="Class_NameLabel"/>
<children xmi:type="notation:DecorationNode" xmi:id="_LxC1ISwcEeetnM91DrjyzA" type="Class_FloatingNameLabel">
@@ -406,6 +406,32 @@
<element xsi:nil="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_EZ9kUi8FEeede-9TuA3-_g" x="200"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_yJ-xkIvlEeeGyKO2MvkxHA" type="Interface_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yKDDAIvlEeeGyKO2MvkxHA" type="Interface_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yKDDAYvlEeeGyKO2MvkxHA" type="Interface_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yKDDAovlEeeGyKO2MvkxHA" y="15"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yKDDA4vlEeeGyKO2MvkxHA" type="Interface_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yKDDBIvlEeeGyKO2MvkxHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yKDDBYvlEeeGyKO2MvkxHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yKDDBovlEeeGyKO2MvkxHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yKDDB4vlEeeGyKO2MvkxHA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yKDqEIvlEeeGyKO2MvkxHA" type="Interface_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yKDqEYvlEeeGyKO2MvkxHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yKDqEovlEeeGyKO2MvkxHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yKDqE4vlEeeGyKO2MvkxHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yKDqFIvlEeeGyKO2MvkxHA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yKDqFYvlEeeGyKO2MvkxHA" type="Interface_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yKDqFovlEeeGyKO2MvkxHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yKDqF4vlEeeGyKO2MvkxHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yKDqGIvlEeeGyKO2MvkxHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yKDqGYvlEeeGyKO2MvkxHA"/>
+ </children>
+ <element xmi:type="uml:Interface" href="platform:/resource/org.eclipse.papyrus.infra.filters/model/filters.uml#_ftlkkHBIEeSbg_BqWNBy6A"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yJ-xkYvlEeeGyKO2MvkxHA" x="1000" y="20"/>
+ </children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_6dfb8SwWEeeGrqtgh2TERg" name="diagram_compatibility_version" stringValue="1.3.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_6dfb8iwWEeeGrqtgh2TERg"/>
<styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_6dfb8ywWEeeGrqtgh2TERg" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
@@ -754,4 +780,29 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EZ-ycy8FEeede-9TuA3-_g"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EZ-ydC8FEeede-9TuA3-_g"/>
</edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1VPzsIvlEeeGyKO2MvkxHA" type="Association_Edge" source="_NvxysCwcEeetnM91DrjyzA" target="_yJ-xkIvlEeeGyKO2MvkxHA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_1VPzs4vlEeeGyKO2MvkxHA" type="Association_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1VPztIvlEeeGyKO2MvkxHA" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1VQawIvlEeeGyKO2MvkxHA" type="Association_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1VQawYvlEeeGyKO2MvkxHA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1VQawovlEeeGyKO2MvkxHA" type="Association_TargetRoleLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1VQaw4vlEeeGyKO2MvkxHA" x="35" y="-13"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1VQaxIvlEeeGyKO2MvkxHA" type="Association_SourceRoleLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1VQaxYvlEeeGyKO2MvkxHA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1VQaxovlEeeGyKO2MvkxHA" type="Association_SourceMultiplicityLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1VQax4vlEeeGyKO2MvkxHA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1VQayIvlEeeGyKO2MvkxHA" type="Association_TargetMultiplicityLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1VQayYvlEeeGyKO2MvkxHA" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_1VPzsYvlEeeGyKO2MvkxHA"/>
+ <element xmi:type="uml:Association" href="PaletteConfiguration.uml#_1T5I0IvlEeeGyKO2MvkxHA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1VPzsovlEeeGyKO2MvkxHA" points="[805, 60, -643984, -643984]$[1000, 60, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1XBVUIvlEeeGyKO2MvkxHA" id="(1.0,0.4225352112676056)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1XB8YIvlEeeGyKO2MvkxHA" id="(0.0,0.3883495145631068)"/>
+ </edges>
</notation:Diagram>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.uml b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.uml
index f4c37fb91bd..9359991b80e 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.uml
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/model/PaletteConfiguration.uml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
<uml:Model xmi:id="_2IHXICwWEeeGrqtgh2TERg" name="paletteconfiguration" URI="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8">
+ <packageImport xmi:id="_w97OIIvlEeeGyKO2MvkxHA">
+ <importedPackage xmi:type="uml:Model" href="platform:/plugin/org.eclipse.papyrus.infra.filters/model/filters.uml#_u1APUG86EeSumdlFUM6GVw"/>
+ </packageImport>
<packagedElement xmi:type="uml:Class" xmi:id="_2IHXISwWEeeGrqtgh2TERg" name="PaletteConfiguration">
<generalization xmi:id="_2IHXIiwWEeeGrqtgh2TERg" general="_2IHXKCwWEeeGrqtgh2TERg"/>
<ownedAttribute xmi:id="_2IHXIywWEeeGrqtgh2TERg" name="drawerConfigurations" type="_2IHXOywWEeeGrqtgh2TERg" isOrdered="true" aggregation="composite" association="_2IHXQywWEeeGrqtgh2TERg">
@@ -44,6 +47,11 @@
<ownedAttribute xmi:id="_2IHXMCwWEeeGrqtgh2TERg" name="icon" type="_2IHXMiwWEeeGrqtgh2TERg" isOrdered="true" aggregation="composite" association="_2IHXOSwWEeeGrqtgh2TERg">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_2IHXMSwWEeeGrqtgh2TERg"/>
</ownedAttribute>
+ <ownedAttribute xmi:id="_1ULcsIvlEeeGyKO2MvkxHA" name="filters" aggregation="composite" association="_1T5I0IvlEeeGyKO2MvkxHA">
+ <type xmi:type="uml:Interface" href="platform:/plugin/org.eclipse.papyrus.infra.filters/model/filters.uml#_ftlkkHBIEeSbg_BqWNBy6A"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_1UMq0IvlEeeGyKO2MvkxHA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_1UNR4IvlEeeGyKO2MvkxHA" value="*"/>
+ </ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_2IHXMiwWEeeGrqtgh2TERg" name="IconDescriptor">
<ownedComment xmi:id="_2IHXMywWEeeGrqtgh2TERg" annotatedElement="_2IHXMiwWEeeGrqtgh2TERg">
@@ -118,7 +126,7 @@
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_2IH-OSwWEeeGrqtgh2TERg" value="*"/>
</ownedAttribute>
<ownedAttribute xmi:id="_2IH-OiwWEeeGrqtgh2TERg" name="elementType" association="_2IH-OywWEeeGrqtgh2TERg">
- <type xmi:type="uml:Class" href="ElementTypesConfigurations.uml#_2IhnQCwWEeeGrqtgh2TERg"/>
+ <type xmi:type="uml:Class" href="platform:/plugin/org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.uml#_VkhwQhLoEeeDV7UHoBIkeA"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="_2IH-OywWEeeGrqtgh2TERg" memberEnd="_2IH-OiwWEeeGrqtgh2TERg _2IH-PCwWEeeGrqtgh2TERg">
@@ -139,6 +147,12 @@
<packagedElement xmi:type="uml:Class" xmi:id="_2IH-RSwWEeeGrqtgh2TERg" name="SeparatorConfiguration">
<generalization xmi:id="_2IH-RiwWEeeGrqtgh2TERg" general="_2IH-MSwWEeeGrqtgh2TERg"/>
</packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_1T5I0IvlEeeGyKO2MvkxHA" visibility="public" memberEnd="_1ULcsIvlEeeGyKO2MvkxHA _1UNR4YvlEeeGyKO2MvkxHA">
+ <eAnnotations xmi:id="_1UHLQIvlEeeGyKO2MvkxHA" source="org.eclipse.papyrus">
+ <details xmi:id="_1UIZYIvlEeeGyKO2MvkxHA" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:id="_1UNR4YvlEeeGyKO2MvkxHA" name="configuration" type="_2IHXKCwWEeeGrqtgh2TERg" association="_1T5I0IvlEeeGyKO2MvkxHA"/>
+ </packagedElement>
<profileApplication xmi:id="_2IH-RywWEeeGrqtgh2TERg">
<eAnnotations xmi:id="_2IH-SCwWEeeGrqtgh2TERg" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/pom.xml b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/pom.xml
index d3b2df75ba8..c7fe17a9103 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/pom.xml
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/pom.xml
@@ -8,6 +8,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/Configuration.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/Configuration.java
index 8edc856e399..f1b8d107ce1 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/Configuration.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/Configuration.java
@@ -12,7 +12,10 @@
*/
package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.filters.Filter;
/**
* <!-- begin-user-doc -->
@@ -27,6 +30,7 @@ import org.eclipse.emf.ecore.EObject;
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration#getLabel <em>Label</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration#getDescription <em>Description</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration#getFilters <em>Filters</em>}</li>
* </ul>
*
* @see org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteconfigurationPackage#getConfiguration()
@@ -138,4 +142,47 @@ public interface Configuration extends EObject {
*/
void setIcon(IconDescriptor value);
+ /**
+ * Returns the value of the '<em><b>Filters</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.filters.Filter}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Filters</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Filters</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteconfigurationPackage#getConfiguration_Filters()
+ * @model containment="true" ordered="false"
+ * @generated
+ * @since 3.1
+ */
+ EList<Filter> getFilters();
+
+ /**
+ * Retrieves the first {@link org.eclipse.papyrus.infra.filters.Filter} with the specified '<em><b>Name</b></em>' from the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrus.infra.filters.Filter} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.papyrus.infra.filters.Filter} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getFilters()
+ * @generated
+ * @since 3.1
+ */
+ Filter getFilters(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.papyrus.infra.filters.Filter} with the specified '<em><b>Name</b></em>' from the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.papyrus.infra.filters.Filter} to retrieve, or <code>null</code>.
+ * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass The Ecore class of the {@link org.eclipse.papyrus.infra.filters.Filter} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.papyrus.infra.filters.Filter} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getFilters()
+ * @generated
+ * @since 3.1
+ */
+ Filter getFilters(String name, boolean ignoreCase, EClass eClass);
+
} // Configuration
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/PaletteconfigurationPackage.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/PaletteconfigurationPackage.java
index a9c9faef88e..14c5d22991e 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/PaletteconfigurationPackage.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/PaletteconfigurationPackage.java
@@ -113,13 +113,22 @@ public interface PaletteconfigurationPackage extends EPackage {
int CONFIGURATION__ICON = 3;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONFIGURATION__FILTERS = 4;
+
+ /**
* The number of structural features of the '<em>Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CONFIGURATION_FEATURE_COUNT = 4;
+ int CONFIGURATION_FEATURE_COUNT = 5;
/**
* The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.PaletteConfigurationImpl <em>Palette Configuration</em>}' class.
@@ -168,6 +177,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int PALETTE_CONFIGURATION__ICON = CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_CONFIGURATION__FILTERS = CONFIGURATION__FILTERS;
+
+ /**
* The feature id for the '<em><b>Drawer Configurations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -278,6 +296,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int DRAWER_CONFIGURATION__ICON = CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DRAWER_CONFIGURATION__FILTERS = CONFIGURATION__FILTERS;
+
+ /**
* The feature id for the '<em><b>Owned Configurations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -342,6 +369,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int CHILD_CONFIGURATION__ICON = CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_CONFIGURATION__FILTERS = CONFIGURATION__FILTERS;
+
+ /**
* The number of structural features of the '<em>Child Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -397,6 +433,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int LEAF_CONFIGURATION__ICON = CHILD_CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF_CONFIGURATION__FILTERS = CHILD_CONFIGURATION__FILTERS;
+
+ /**
* The number of structural features of the '<em>Leaf Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -452,6 +497,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int TOOL_CONFIGURATION__ICON = LEAF_CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_CONFIGURATION__FILTERS = LEAF_CONFIGURATION__FILTERS;
+
+ /**
* The feature id for the '<em><b>Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -571,6 +625,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int STACK_CONFIGURATION__ICON = CHILD_CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STACK_CONFIGURATION__FILTERS = CHILD_CONFIGURATION__FILTERS;
+
+ /**
* The feature id for the '<em><b>Owned Configurations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -635,6 +698,15 @@ public interface PaletteconfigurationPackage extends EPackage {
int SEPARATOR_CONFIGURATION__ICON = LEAF_CONFIGURATION__ICON;
/**
+ * The feature id for the '<em><b>Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SEPARATOR_CONFIGURATION__FILTERS = LEAF_CONFIGURATION__FILTERS;
+
+ /**
* The number of structural features of the '<em>Separator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -741,6 +813,17 @@ public interface PaletteconfigurationPackage extends EPackage {
EReference getConfiguration_Icon();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration#getFilters <em>Filters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Filters</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration#getFilters()
+ * @see #getConfiguration()
+ * @generated
+ */
+ EReference getConfiguration_Filters();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.IconDescriptor <em>Icon Descriptor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1020,6 +1103,14 @@ public interface PaletteconfigurationPackage extends EPackage {
EReference CONFIGURATION__ICON = eINSTANCE.getConfiguration_Icon();
/**
+ * The meta object literal for the '<em><b>Filters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONFIGURATION__FILTERS = eINSTANCE.getConfiguration_Filters();
+
+ /**
* The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.IconDescriptorImpl <em>Icon Descriptor</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/ConfigurationImpl.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/ConfigurationImpl.java
index 98226342462..79974042170 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/ConfigurationImpl.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/ConfigurationImpl.java
@@ -12,15 +12,20 @@
*/
package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl;
+import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.infra.filters.Filter;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.IconDescriptor;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteconfigurationPackage;
@@ -37,6 +42,7 @@ import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Paletteconfigurati
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.ConfigurationImpl#getLabel <em>Label</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.ConfigurationImpl#getDescription <em>Description</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.ConfigurationImpl#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.impl.ConfigurationImpl#getFilters <em>Filters</em>}</li>
* </ul>
*
* @generated
@@ -113,6 +119,17 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
protected IconDescriptor icon;
/**
+ * The cached value of the '{@link #getFilters() <em>Filters</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFilters()
+ * @generated
+ * @ordered
+ * @since 3.1
+ */
+ protected EList<Filter> filters;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -242,11 +259,50 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* <!-- end-user-doc -->
* @generated
*/
+ public EList<Filter> getFilters() {
+ if (filters == null) {
+ filters = new EObjectContainmentEList<Filter>(Filter.class, this, PaletteconfigurationPackage.CONFIGURATION__FILTERS);
+ }
+ return filters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Filter getFilters(String name) {
+ return getFilters(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Filter getFilters(String name, boolean ignoreCase, EClass eClass) {
+ filtersLoop: for (Filter filters : getFilters()) {
+ if (eClass != null && !eClass.isInstance(filters))
+ continue filtersLoop;
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(filters.getName()) : name.equals(filters.getName())))
+ continue filtersLoop;
+ return filters;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PaletteconfigurationPackage.CONFIGURATION__ICON:
return basicSetIcon(null, msgs);
+ case PaletteconfigurationPackage.CONFIGURATION__FILTERS:
+ return ((InternalEList<?>)getFilters()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -267,6 +323,8 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
return getDescription();
case PaletteconfigurationPackage.CONFIGURATION__ICON:
return getIcon();
+ case PaletteconfigurationPackage.CONFIGURATION__FILTERS:
+ return getFilters();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -276,6 +334,7 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
* <!-- end-user-doc -->
* @generated
*/
+ @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
@@ -291,6 +350,10 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
case PaletteconfigurationPackage.CONFIGURATION__ICON:
setIcon((IconDescriptor)newValue);
return;
+ case PaletteconfigurationPackage.CONFIGURATION__FILTERS:
+ getFilters().clear();
+ getFilters().addAll((Collection<? extends Filter>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -315,6 +378,9 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
case PaletteconfigurationPackage.CONFIGURATION__ICON:
setIcon((IconDescriptor)null);
return;
+ case PaletteconfigurationPackage.CONFIGURATION__FILTERS:
+ getFilters().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -335,6 +401,8 @@ public abstract class ConfigurationImpl extends EObjectImpl implements Configura
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
case PaletteconfigurationPackage.CONFIGURATION__ICON:
return icon != null;
+ case PaletteconfigurationPackage.CONFIGURATION__FILTERS:
+ return filters != null && !filters.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java
index 294ed5115bc..745ceb0cc77 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.infra.filters.FiltersPackage;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.DrawerConfiguration;
@@ -36,6 +37,7 @@ import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ToolConfiguration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ToolKind;
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage;
+import org.eclipse.uml2.types.TypesPackage;
/**
* <!-- begin-user-doc -->
@@ -169,7 +171,9 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
// Initialize simple dependencies
EcorePackage.eINSTANCE.eClass();
+ FiltersPackage.eINSTANCE.eClass();
ElementTypesConfigurationsPackage.eINSTANCE.eClass();
+ TypesPackage.eINSTANCE.eClass();
// Create package meta-data objects
thePaletteconfigurationPackage.createPackageContents();
@@ -263,6 +267,15 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getConfiguration_Filters() {
+ return (EReference)configurationEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getIconDescriptor() {
return iconDescriptorEClass;
}
@@ -457,6 +470,7 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
createEAttribute(configurationEClass, CONFIGURATION__LABEL);
createEAttribute(configurationEClass, CONFIGURATION__DESCRIPTION);
createEReference(configurationEClass, CONFIGURATION__ICON);
+ createEReference(configurationEClass, CONFIGURATION__FILTERS);
iconDescriptorEClass = createEClass(ICON_DESCRIPTOR);
createEAttribute(iconDescriptorEClass, ICON_DESCRIPTOR__PLUGIN_ID);
@@ -511,6 +525,7 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
setNsURI(eNS_URI);
// Obtain other dependent packages
+ FiltersPackage theFiltersPackage = (FiltersPackage)EPackage.Registry.INSTANCE.getEPackage(FiltersPackage.eNS_URI);
ElementTypesConfigurationsPackage theElementTypesConfigurationsPackage = (ElementTypesConfigurationsPackage)EPackage.Registry.INSTANCE.getEPackage(ElementTypesConfigurationsPackage.eNS_URI);
// Create type parameters
@@ -536,6 +551,7 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
initEAttribute(getConfiguration_Label(), ecorePackage.getEString(), "label", null, 1, 1, Configuration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getConfiguration_Description(), ecorePackage.getEString(), "description", null, 0, 1, Configuration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getConfiguration_Icon(), this.getIconDescriptor(), null, "icon", null, 0, 1, Configuration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConfiguration_Filters(), theFiltersPackage.getFilter(), null, "filters", null, 0, -1, Configuration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(iconDescriptorEClass, IconDescriptor.class, "IconDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getIconDescriptor_PluginID(), ecorePackage.getEString(), "pluginID", null, 0, 1, IconDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF
deleted file mode 100644
index b1873958aff..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
- org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
- org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
- org.eclipse.gmf.runtime.common.core;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.gmf.runtime.common.ui.services;bundle-version="[1.9.0,2.0.0)",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.papyrus.infra.emf;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.views.properties;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.databinding.observable;bundle-version="[1.6.0,2.0.0)",
- org.eclipse.papyrus.infra.widgets;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.databinding;bundle-version="[1.6.0,2.0.0)",
- org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.emf.databinding;bundle-version="[1.3.0,2.0.0)",
- org.eclipse.papyrus.infra.properties;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.ui.emf;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.8.0,2.0.0)",
- org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.papyrus.uml.diagram.paletteconfiguration,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration.descriptor,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration.modelelement,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration.util
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 3.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfiguration;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8

Back to the top