Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2017-04-19 14:24:16 +0000
committerGerrit Code Review @ Eclipse.org2017-04-24 14:04:35 +0000
commit898d12aabffb12562ea024d4bc9d6b543c40ca3b (patch)
tree163ea54392685c4518b7a1070b680acf32811ad6
parent231fa453b8ad44b3c43a318bec3d0eb0266b63a2 (diff)
downloadorg.eclipse.papyrus-898d12aabffb12562ea024d4bc9d6b543c40ca3b.tar.gz
org.eclipse.papyrus-898d12aabffb12562ea024d4bc9d6b543c40ca3b.tar.xz
org.eclipse.papyrus-898d12aabffb12562ea024d4bc9d6b543c40ca3b.zip
Bug 512343 - [Palette] Papyrus Palette framework should be refactored
- fix in genmodel: reload it to put ElemetTypesConfiguration model in import gen model instead of root package. - regenerate, model, edit, editor -Replace test with another(more test will be done later) Change-Id: Icf58d5c69abe5d69fb3ba91dbe115ce434664e73 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl/plugin.xml30
-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/plugin.xml13
-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.editor/META-INF/MANIFEST.MF1
-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/model/PaletteConfiguration.genmodel72
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/impl/PaletteconfigurationPackageImpl.java9
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java1
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationSwitch.java1
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml2
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml2
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.gen.xml2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF7
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml6
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration32
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration30
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration32
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java9
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java209
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/PaletteConfigurationTest.java95
24 files changed, 169 insertions, 401 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/plugin.xml b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/plugin.xml
index 46a691bee93..7735b446dab 100644
--- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/plugin.xml
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/plugin.xml
@@ -617,7 +617,7 @@
<extension
id="Eastald_Class_DataTypes"
name="Eastald_Class_DataTypes"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="DataTypes"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -635,7 +635,7 @@
<extension
id="Eastald_Composite_FunctionModeling"
name="Eastald_Composite_FunctionModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="FunctionModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -653,7 +653,7 @@
<extension
id="Eastald_Class_Timing"
name="Eastald_Class_Timing"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="Timing"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -671,7 +671,7 @@
<extension
id="Eastald_Class_Dependability"
name="Eastald_Class_Dependability"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="Dependability"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -690,7 +690,7 @@
<extension
id="Eastald_Class_VerificationValidation"
name="Eastald_Class_VerificationValidation"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="VerificationValidation"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -708,7 +708,7 @@
<extension
id="Eastald_Class_FeatureModeling"
name="Eastald_Class_FeatureModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="FeatureModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -726,7 +726,7 @@
<extension
id="Eastald_Class_HardwareModeling"
name="Eastald_Class_HardwareModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="HardwareModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -744,7 +744,7 @@
<extension
id="Eastald_Class_Requirements"
name="Eastald_Class_Requirements"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="Requirements"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -762,7 +762,7 @@
<extension
id="Eastald_Class_SystemModeling"
name="Eastald_Class_SystemModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="SystemModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -780,7 +780,7 @@
<extension
id="Eastald_Composite_HardwareModeling"
name="Eastald_Composite_HardwareModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="HardwareModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -798,7 +798,7 @@
<extension
id="Eastald_Class_FunctionModeling"
name="Eastald_Class_FunctionModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="FunctionModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -817,7 +817,7 @@
<extension
id="Eastald_Composite_SystemModeling"
name="Eastald_Composite_SystemModeling"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="SystemModeling"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -836,7 +836,7 @@
<extension
id="Eastald_Class_GenericConstraints"
name="Eastald_Class_GenericConstraints"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="GenericConstraints"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -855,7 +855,7 @@
<extension
id="Eastald_Composite_ErrorModel"
name="Eastald_Composite_ErrorModel"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="ErrorModel"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
@@ -873,7 +873,7 @@
<extension
id="Eastadl_Class_Variability"
name="Eastadl_Class_Variability"
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="Variability"
class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
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 7c7a2cc4daf..fff3a799c48 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
@@ -2,6 +2,7 @@ Manifest-Version: 1.0
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.13.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.edit;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)",
@@ -10,7 +11,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.13.0,4.0.0)",
org.eclipse.gef;bundle-version="[3.11.0,4.0.0)",
org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.types.edit;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.infra.types.edit;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
Export-Package: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.provider,
org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.utils
Bundle-Vendor: %providerName
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.xml b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.xml
index dec5f1a6281..ea211a5c9e8 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.xml
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit/plugin.xml
@@ -23,17 +23,4 @@
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <!-- @generated PaletteConfiguration -->
- <factory
- uri="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2"
- class="org.eclipse.papyrus.infra.types.provider.ElementTypesConfigurationsItemProviderAdapterFactory"
- supportedTypes=
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource"/>
- </extension>
-
</plugin>
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 5fc1c5c523b..7fbe175222f 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
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.provider;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.papyrus.infra.types.provider.TypesConfigurationsEditPlugin;
/**
* This is the central singleton for the PaletteConfiguration edit plugin.
@@ -52,6 +53,7 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
public PaletteConfigurationEditPlugin() {
super(new ResourceLocator[] {
EcoreEditPlugin.INSTANCE,
+ TypesConfigurationsEditPlugin.INSTANCE,
});
}
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 eafc3d749bc..125eccaa6dd 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
@@ -16,6 +16,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
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.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)",
org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="[1.2.0,2.0.0)",
org.eclipse.papyrus.infra.widgets;bundle-version="[3.0.0,4.0.0)",
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 a6c084177be..faa997df402 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
@@ -16,6 +16,7 @@ import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.ui.EclipseUIPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.papyrus.infra.types.provider.TypesConfigurationsEditPlugin;
/**
* This is the central singleton for the PaletteConfiguration editor plugin.
@@ -53,6 +54,7 @@ public final class PaletteConfigurationEditorPlugin extends EMFPlugin {
public PaletteConfigurationEditorPlugin() {
super(new ResourceLocator[] {
EcoreEditPlugin.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 0eab1bfc79e..8d9e12bf89d 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
@@ -624,8 +624,8 @@ public class PaletteconfigurationEditor
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new PaletteconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ElementTypesConfigurationsItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ElementTypesConfigurationsItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
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 39defb8247e..45ccbfff298 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
@@ -10,7 +10,7 @@
testsDirectory="/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src-gen"
testSuiteClass="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.PaletteConfigurationAllTests"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
- usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
+ usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.genmodel#//types">
<foreignModel>PaletteConfiguration.ecore</foreignModel>
<genPackages prefix="Paletteconfiguration" basePackage="org.eclipse.papyrus.infra.gmfdiag"
resource="XML" disposableProviderFactory="true" multipleEditorPages="false"
@@ -46,80 +46,10 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute PaletteConfiguration.ecore#//IconDescriptor/iconPath"/>
</genClasses>
<genClasses ecoreClass="PaletteConfiguration.ecore#//ElementDescriptor">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PaletteConfiguration.ecore#//ElementDescriptor/elementTypeId"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute PaletteConfiguration.ecore#//ElementDescriptor/graphicalHints"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PaletteConfiguration.ecore#//ElementDescriptor/elementType"/>
</genClasses>
<genClasses ecoreClass="PaletteConfiguration.ecore#//SeparatorConfiguration"/>
<genClasses image="false" ecoreClass="PaletteConfiguration.ecore#//LeafConfiguration"/>
</genPackages>
- <genPackages prefix="ElementTypesConfigurations" basePackage="org.eclipse.papyrus.infra"
- ecorePackage="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#/">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//InheritanceKind">
- <genEnumLiterals ecoreEnumLiteral="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//InheritanceKind/none"/>
- <genEnumLiterals ecoreEnumLiteral="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//InheritanceKind/all"/>
- </genEnums>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeSetConfiguration">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeSetConfiguration/elementTypeConfigurations"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeSetConfiguration/adviceBindingsConfigurations"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeSetConfiguration/metamodelNsURI"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeConfiguration/hint"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeConfiguration/kind"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ElementTypeConfiguration/iconEntry"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//IconEntry">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//IconEntry/iconPath"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//IconEntry/bundleId"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ConfigurationElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ConfigurationElement/description"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractMatcherConfiguration"/>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AdviceConfiguration">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AdviceConfiguration/before"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AdviceConfiguration/after"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractAdviceBindingConfiguration">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractAdviceBindingConfiguration/target"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractAdviceBindingConfiguration/containerConfiguration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractAdviceBindingConfiguration/matcherConfiguration"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractAdviceBindingConfiguration/inheritance"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//SpecializationTypeConfiguration">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//SpecializationTypeConfiguration/editHelperAdviceConfiguration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//SpecializationTypeConfiguration/containerConfiguration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//SpecializationTypeConfiguration/matcherConfiguration"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//SpecializationTypeConfiguration/specializedTypes"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ContainerConfiguration">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ContainerConfiguration/containerMatcherConfiguration"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ContainerConfiguration/eContainmentFeatures"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//MetamodelTypeConfiguration">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//MetamodelTypeConfiguration/eClass"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//MetamodelTypeConfiguration/editHelperClassName"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractEditHelperAdviceConfiguration">
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AbstractEditHelperAdviceConfiguration/target"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//EditHelperAdviceConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//EditHelperAdviceConfiguration/editHelperAdviceClassName"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AdviceBindingConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//AdviceBindingConfiguration/editHelperAdviceClassName"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//MatcherConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//MatcherConfiguration/matcherClassName"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//IdentifiedConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//IdentifiedConfiguration/identifier"/>
- </genClasses>
- <genClasses image="false" ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//NamedConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//NamedConfiguration/name"/>
- </genClasses>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ExternallyRegisteredType"/>
- <genClasses ecoreClass="../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.ecore#//ExternallyRegisteredAdvice"/>
- </genPackages>
</genmodel:GenModel>
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 57feb2d5923..75fb7c2a5ec 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
@@ -33,7 +33,6 @@ import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.StackConfiguration
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.papyrus.infra.types.impl.ElementTypesConfigurationsPackageImpl;
/**
* <!-- begin-user-doc -->
@@ -186,19 +185,13 @@ public class PaletteconfigurationPackageImpl extends EPackageImpl implements Pal
// Initialize simple dependencies
EcorePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- ElementTypesConfigurationsPackageImpl theElementTypesConfigurationsPackage = (ElementTypesConfigurationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ElementTypesConfigurationsPackage.eNS_URI) instanceof ElementTypesConfigurationsPackageImpl
- ? EPackage.Registry.INSTANCE.getEPackage(ElementTypesConfigurationsPackage.eNS_URI)
- : ElementTypesConfigurationsPackage.eINSTANCE);
+ ElementTypesConfigurationsPackage.eINSTANCE.eClass();
// Create package meta-data objects
thePaletteconfigurationPackage.createPackageContents();
- theElementTypesConfigurationsPackage.createPackageContents();
// Initialize created meta-data
thePaletteconfigurationPackage.initializePackageContents();
- theElementTypesConfigurationsPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
thePaletteconfigurationPackage.freeze();
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java
index 8c3ecab3c93..b3d3fcc0bdc 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationAdapterFactory.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.*;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.DrawerConfiguration;
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationSwitch.java b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationSwitch.java
index b26535a064c..ac367150d5a 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationSwitch.java
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration/src-gen/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/util/PaletteconfigurationSwitch.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
-import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.*;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.ChildConfiguration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.Configuration;
import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.DrawerConfiguration;
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml
index 388b6e10ed8..98ed6ac30c5 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml
@@ -176,7 +176,7 @@
</extension>
<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition"
name="SYSML_InternalBlock">
<paletteDefinition ID="SYSML_InternalBlock"
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
index b5ef119871e..2ea79e3d5f9 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
@@ -82,7 +82,7 @@
</extension>
<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition"
name="SYSML_Requirement">
<paletteDefinition ID="SYSML_Requirement"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.gen.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.gen.xml
index 928a19a2389..b175a04f860 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.gen.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.gen.xml
@@ -92,7 +92,7 @@
<!-- Palette tool declaration (declares the real palette containment) -->
<extension
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition"
name="UML_InteractionOverviewDiagram">
<paletteDefinition
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath
index 098194ca4b7..eca7bdba8f0 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs
index f08be2b06c4..b3aa6d60f94 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF
index 1fb09395f0d..183d83a69a4 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF
@@ -4,19 +4,14 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.resources;bundle-version="3.8.0",
org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.tests;bundle-version="[1.2.0,2.0.0)",
org.eclipse.papyrus.junit.utils;bundle-version="[2.0.100,3.0.0)",
org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
org.junit;bundle-version="4.11.0",
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.editor;bundle-version="1.1.0",
org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.extensionpoints,
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
@@ -26,3 +21,5 @@ Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.Activator
Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Import-Package: com.google.common.base;version="21.0.0",
+ com.google.common.collect;version="21.0.0"
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml
index 9aa04cfdce1..7f2772728f2 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml
@@ -9,7 +9,7 @@
</elementTypeSet>
</extension>
<extension
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.paletteDefinition"
class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
@@ -38,7 +38,7 @@
</elementTypeSet>
</extension>
<extension
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.fakepaletteDefinition"
class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
@@ -51,7 +51,7 @@
</paletteDefinition>
</extension>
<extension
- point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
+ point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
<paletteDefinition
ID="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.noProfilepaletteDefinition"
class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration
index 1a3dc71a1bc..54018dc8f02 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration
@@ -1,21 +1,11 @@
-<?xml version="1.0" encoding="ASCII"?>
-<paletteconfiguration:PaletteConfiguration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
- id="TestFakePaletteConfiguration"
- label="Test Fake Palette Configuration">
- <drawerConfigurations
- id="TestFakePaletteNodesDrawer"
- label="TestFakePaletteConfigurationNodes"
- description="Test Fake Paletteconfiguration Nodes">
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="testfakepalettemodel.StoOnClass"
- label="FakeTool"
- description="Create a Class With FAke Sto">
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.uml.diagram.paletteconfiguration.fake.tests"/>
- </ownedConfigurations>
- </drawerConfigurations>
- <requiredProfiles>FakeProfile</requiredProfiles>
-</paletteconfiguration:PaletteConfiguration>
+<?xml version="1.0" encoding="ASCII"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="TestFakePaletteConfiguration" label="Test Fake Palette Configuration">
+ <drawerConfigurations id="TestFakePaletteNodesDrawer" label="TestFakePaletteConfigurationNodes" description="Test Fake Paletteconfiguration Nodes">
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="testfakepalettemodel.StoOnClass" label="FakeTool" description="Create a Class With FAke Sto">
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.elementtypesconfigurations#_ubJcsaeUEeSUR5jX0TaAcA"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <requiredProfiles>FakeProfile</requiredProfiles>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration
index 3ee1221e7d3..a5e4904f7a3 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration
@@ -1,20 +1,10 @@
-<?xml version="1.0" encoding="ASCII"?>
-<paletteconfiguration:PaletteConfiguration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
- id="NoProfilePaletteConfiguration"
- label="Test No Profile palette Configuration">
- <drawerConfigurations
- id="TestNoProfilePaletteNodesDrawer"
- label="TestNoProfilePaletteConfigurationNodes"
- description="Test No Profile Paletteconfiguration Nodes">
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="testnoprofile.tool"
- label="NoProfileCreationTool"
- description="Create a Class With no rofile">
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.uml.diagram.paletteconfiguration.fake.tests"/>
- </ownedConfigurations>
- </drawerConfigurations>
-</paletteconfiguration:PaletteConfiguration>
+<?xml version="1.0" encoding="ASCII"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="NoProfilePaletteConfiguration" label="Test No Profile palette Configuration">
+ <drawerConfigurations id="TestNoProfilePaletteNodesDrawer" label="TestNoProfilePaletteConfigurationNodes" description="Test No Profile Paletteconfiguration Nodes">
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="testnoprofile.tool" label="NoProfileCreationTool" description="Create a Class With no rofile">
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.elementtypesconfigurations#_ubJcsaeUEeSUR5jX0TaAcA"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration
index 1098a113b82..9aebd79a5b0 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration
@@ -1,21 +1,11 @@
-<?xml version="1.0" encoding="ASCII"?>
-<paletteconfiguration:PaletteConfiguration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
- id="TestPaletteConfiguration"
- label="Test Palette Configuration">
- <drawerConfigurations
- id="TestPaletteNodesDrawer"
- label="TestPaletteConfigurationNodes"
- description="Test Paletteconfiguration Nodes">
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="testpalettemodel.StoOnClass"
- label="StoOnClass"
- description="Create a Class With StoOnClass">
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests"/>
- </ownedConfigurations>
- </drawerConfigurations>
- <requiredProfiles>TestPaletteConfiguration</requiredProfiles>
-</paletteconfiguration:PaletteConfiguration>
+<?xml version="1.0" encoding="ASCII"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="TestPaletteConfiguration" label="Test Palette Configuration">
+ <drawerConfigurations id="TestPaletteNodesDrawer" label="TestPaletteConfigurationNodes" description="Test Paletteconfiguration Nodes">
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="testpalettemodel.StoOnClass" label="StoOnClass" description="Create a Class With StoOnClass" toolClassName="">
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.elementtypesconfigurations#_ubJcsaeUEeSUR5jX0TaAcA"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <requiredProfiles>TestPaletteConfiguration</requiredProfiles>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java
index 602307a42c3..fc650917391 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
+ * Copyright (c) 2017 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,12 +8,13 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Mickaƫl ADAM (ALL4TEC) mickael.adam@all4tec.net - Bug 512343
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests;
-import org.junit.runner.RunWith;
-import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression.Bug457712PaletteConfigurationRequiredProfile;
+import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression.PaletteConfigurationTest;
import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -21,7 +22,7 @@ import org.junit.runners.Suite.SuiteClasses;
* All tests for this fragment
*/
@RunWith(ClassificationSuite.class)
-@SuiteClasses({ Bug457712PaletteConfigurationRequiredProfile.class, })
+@SuiteClasses({ PaletteConfigurationTest.class, })
public class AllTests {
}
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java
deleted file mode 100644
index 132b90c4c65..00000000000
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * 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:
- * CEA LIST - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.palette.PaletteDrawer;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.Activator;
-import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.junit.utils.EditorUtils;
-import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
-import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.Profile;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * Regression test for bug 457712
- */
-public class Bug457712PaletteConfigurationRequiredProfile implements ITestConstants {
-
- public static final String RESOURCES_FOLDER = "/resources/";
-
- @ClassRule
- public static HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
-
- protected static IProject createProject;
-
- protected static IMultiDiagramEditor openPapyrusEditor;
-
- protected static ModelSet modelset;
-
- protected static UmlModel umlIModel;
-
- protected static Model rootModel;
-
- protected static TransactionalEditingDomain transactionalEditingDomain;
-
- protected static IFile workspaceTestFile;
-
- private static IFile copyTestModel;
-
- private static Diagram classDiagram;
-
- private Profile testProfile;
-
- /**
- * Init test class
- */
- @BeforeClass
- public static void initCreateElementTest() {
-
- // create Project
- createProject = houseKeeper.createProject(BUG457712_PALETTE_CONFIGURATION);
-
- // import test model and profile
- try {
- Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);
- PapyrusProjectUtils.copyPapyrusModel(createProject, bundle, RESOURCES_FOLDER, "TestPalette.profile");
- copyTestModel = PapyrusProjectUtils.copyPapyrusModel(createProject, bundle, RESOURCES_FOLDER, "Model");
- } catch (CoreException e) {
- fail(e.getMessage());
- } catch (IOException e) {
- fail(e.getMessage());
- }
-
- // open project
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- try {
- openPapyrusEditor = houseKeeper.cleanUpLater(EditorUtils.openPapyrusEditor(copyTestModel));
- } catch (PartInitException e) {
- fail(e.getMessage());
- }
- }
- });
-
- transactionalEditingDomain = (TransactionalEditingDomain) openPapyrusEditor.getAdapter(TransactionalEditingDomain.class);
- assertTrue("Impossible to init editing domain", transactionalEditingDomain instanceof TransactionalEditingDomain);
-
- // retrieve UML model from this editor
- try {
- modelset = ModelUtils.getModelSetChecked(openPapyrusEditor.getServicesRegistry());
- umlIModel = UmlUtils.getUmlModel(modelset);
- rootModel = (Model) umlIModel.lookupRoot();
-
- Assert.assertNotNull("root model should not be null", rootModel);
-
- ICreationCommand command = new CreateClassDiagramCommand();
- classDiagram = command.createDiagram(modelset, null, "DiagramToTest");
- modelset.save(new NullProgressMonitor());
-
- assertNotNull("There should be a class diagram for test", classDiagram);
-
- } catch (ServiceException e) {
- fail(e.getMessage());
- } catch (NotFoundException e) {
- fail(e.getMessage());
- } catch (ClassCastException e) {
- fail(e.getMessage());
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testNoProfileApplied() {
- // check the palette. tool to create a class with stereotype StoOnClass should not be present
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- // check with profile applied (it is already applied in the model). The drawer should be visible
- checkPaletteDrawer("TestPaletteNodesDrawer", true);
- checkPaletteDrawer("TestFakePaletteNodesDrawer", false);
- checkPaletteDrawer("TestNoProfilePaletteNodesDrawer", true);
- }
- });
-
- }
-
- protected void checkPaletteDrawer(String identifier, boolean isVisible) {
- IEditorPart part = openPapyrusEditor.getActiveEditor();
- if (part instanceof DiagramEditorWithFlyOutPalette) {
- PaletteViewer paletteViewer = (PaletteViewer) ((DiagramEditorWithFlyOutPalette) part).getAdapter(PaletteViewer.class);
- assertNotNull("There should be a palette viewer on active editor", paletteViewer);
-
- // will do a shortcut here, only test if test drawer is active or not. This may be enhanced by testing the tool itself
- List<?> drawers = paletteViewer.getPaletteRoot().getChildren();
- boolean isDisplayed = false;
- for (Object o : drawers) {
-
- if (o instanceof PaletteDrawer) {
- // check it does not have id: TestPaletteNodesDrawer
- if (identifier.equals(((PaletteDrawer) o).getId())) {
- if (!isVisible) {
- fail("the drawer for test palette should not be here as the profile TestPalette is not applied");
- }
- isDisplayed = true;
- }
- }
-
- }
- if (isVisible & !isDisplayed) {
- fail("the drawer for test palette was not there whereas the profile TestPalette is applied");
- }
- } else {
- fail("impossible to adapt into a papyrus editor");
- }
-
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- public void tearDown() throws Exception {
- }
-
-
-} \ No newline at end of file
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/PaletteConfigurationTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/PaletteConfigurationTest.java
new file mode 100644
index 00000000000..3b0a336b7fe
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/PaletteConfigurationTest.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST 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:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteEntry;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * Test cases checking the load of palette.
+ */
+@PluginResource("resources/Model.di")
+public class PaletteConfigurationTest extends AbstractPapyrusTest {
+
+ /**
+ * The fixture.
+ */
+ @Rule
+ public final PapyrusEditorFixture editorFixture = new PapyrusEditorFixture();
+
+ /**
+ * Constructor.
+ */
+ public PaletteConfigurationTest() {
+ super();
+ }
+
+ /**
+ * Verify that tool from palette configuration models is well loaded.
+ */
+ @Test
+ public void testPaletteConfigurationLoad() {
+ final String diagramTitle = "TestPalette"; //$NON-NLS-1$
+ final String StoOnClassTool = "StoOnClass"; //$NON-NLS-1$
+ final String FakeTool = "FakeTool"; //$NON-NLS-1$
+ final String NoProfileCreationTool = "NoProfileCreationTool"; //$NON-NLS-1$
+
+ PaletteViewer palette = editorFixture.openDiagram(diagramTitle).getPalette();
+
+ // Test the stereotype on class tool
+ palette.setActiveTool(find(palette.getPaletteRoot(), StoOnClassTool, ToolEntry.class));
+ editorFixture.flushDisplayEvents();
+ assertThat(palette.getActiveTool().getLabel(), is(StoOnClassTool));
+
+ // Test the fake tool
+ palette.setActiveTool(find(palette.getPaletteRoot(), FakeTool, ToolEntry.class));
+ editorFixture.flushDisplayEvents();
+ assertThat(palette.getActiveTool().getLabel(), is(FakeTool));
+
+ // Test the NoProfileCreationTool
+ palette.setActiveTool(find(palette.getPaletteRoot(), NoProfileCreationTool, ToolEntry.class));
+ editorFixture.flushDisplayEvents();
+ assertThat(palette.getActiveTool().getLabel(), is(NoProfileCreationTool));
+ }
+
+ private <P extends PaletteEntry> P find(PaletteContainer container, String label, Class<P> type) {
+ P result = null;
+
+ for (P next : Iterables.filter(container.getChildren(), type)) {
+ if (label.equalsIgnoreCase(next.getLabel())) {
+ result = next;
+ break;
+ }
+ }
+ if (null == result) {
+ for (PaletteContainer next : Iterables.filter(container.getChildren(), PaletteContainer.class)) {
+ result = find(next, label, type);
+ if (result != null) {
+ break;
+ }
+ }
+ }
+ return result;
+ }
+}

Back to the top