Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag')
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ModelingAssistantProviderOperations.java2
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java8
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/DelegatingModelingAssistantProvider.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java6
-rw-r--r--plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/icons/full/obj16/ExpansionmodelModelFile.gifbin346 -> 0 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java2
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF160
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java57
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java1090
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java515
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java6
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java284
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java286
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/MaskLabelHelper.java152
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler_1_3_0.java123
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramVersioningUtils.java400
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java104
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperlinkNavigationMenuEditPolicy.java18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/plugin.xml4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java18
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java178
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.classpath8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.project28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/META-INF/MANIFEST.MF23
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/about.html28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/build.properties21
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateArchitectureDescriptionLanguage_representationKinds_PapyrusDiagram.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_assistantRules_AssistantRule.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.gifbin0 -> 223 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/AssistantRule.gifbin0 -> 7291 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/ChildRule.gifbin0 -> 289 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PaletteRule.gifbin0 -> 311 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PapyrusDiagram.gifbin0 -> 244 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PathElement.gifbin0 -> 248 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.properties50
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.xml40
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/pom.xml13
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/AssistantRuleItemProvider.java159
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/ChildRuleItemProvider.java250
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PaletteRuleItemProvider.java156
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PapyrusDiagramItemProvider.java255
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PathElementItemProvider.java211
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationEditPlugin.java110
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationItemProviderAdapterFactory.java400
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src/org/eclipse/papyrus/infra/gmfdiag/representation/provider/EReferencePropertyDescriptor.java49
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.classpath8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.project28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/META-INF/MANIFEST.MF19
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/about.html28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/build.properties21
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.ecore70
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.genmodel45
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.properties14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.xml36
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/pom.xml13
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/AssistantRule.java86
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/ChildRule.java126
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PaletteRule.java61
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java165
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PathElement.java95
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationFactory.java89
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java933
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java206
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/ChildRuleImpl.java321
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PaletteRuleImpl.java175
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java406
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementImpl.java224
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryImpl.java201
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java480
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java281
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationSwitch.java277
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleCustomImpl.java114
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementCustomImpl.java70
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryCustomImpl.java62
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.classpath7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.project28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/META-INF/MANIFEST.MF29
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/about.html28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/build.properties20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/icons/full/obj16/PapyrusDiagramStyle.gifbin0 -> 129 bytes
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.properties33
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.xml33
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/pom.xml13
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/PapyrusDiagramStyleItemProvider.java180
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleEditPlugin.java116
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleItemProviderAdapterFactory.java210
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.classpath7
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.project28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/META-INF/MANIFEST.MF22
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/about.html28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/build.properties20
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.ecore9
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.genmodel20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.properties14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.xml35
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/pom.xml13
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/PapyrusDiagramStyle.java92
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StyleFactory.java53
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StylePackage.java201
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/PapyrusDiagramStyleImpl.java229
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StyleFactoryImpl.java105
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StylePackageImpl.java213
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleAdapterFactory.java150
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceFactoryImpl.java52
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceImpl.java47
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleSwitch.java138
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/plugin.xml2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java2
-rw-r--r--plugins/infra/gmfdiag/pom.xml4
120 files changed, 10402 insertions, 1704 deletions
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ModelingAssistantProviderOperations.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ModelingAssistantProviderOperations.java
index a265af5ed9b..e07439a0053 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ModelingAssistantProviderOperations.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ModelingAssistantProviderOperations.java
@@ -478,7 +478,7 @@ public class ModelingAssistantProviderOperations
}
if (result == null) {
- result = ElementTypeUtils.getEditContext();
+ result = ElementTypeUtils.getDefaultClientContext();
if (result == null) {
result = ClientContextManager.getDefaultClientContext();
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java
index 29d48409436..461fd743eb1 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java
@@ -84,8 +84,8 @@ public class ModelingAssistantUtil {
result = new IElementType[] { type };
} else if (context.getClientContext() == null) {
result = ElementTypeRegistry.getInstance().getAllTypesMatching(context.getEObject(), provider.getClientContext());
- if (provider.getClientContext() != ElementTypeUtils.getEditContext()) {
- IElementType[] more = ElementTypeRegistry.getInstance().getAllTypesMatching(context.getEObject(), ElementTypeUtils.getEditContext());
+ if (provider.getClientContext() != ElementTypeUtils.getDefaultClientContext()) {
+ IElementType[] more = ElementTypeRegistry.getInstance().getAllTypesMatching(context.getEObject(), ElementTypeUtils.getDefaultClientContext());
result = (more.length == 0) ? result : (result.length == 0) ? more : ObjectArrays.concat(more, result, IElementType.class);
}
} else {
@@ -97,9 +97,9 @@ public class ModelingAssistantUtil {
List<IElementType> core = Arrays.asList(ElementTypeRegistry.getInstance().getAllTypesMatching(object, provider.getClientContext()));
List<IElementType> resultList = Lists.newArrayListWithExpectedSize(core.size());
- if (provider.getClientContext() != ElementTypeUtils.getEditContext()) {
+ if (provider.getClientContext() != ElementTypeUtils.getDefaultClientContext()) {
// First add the client-context-specific types
- List<IElementType> more = Arrays.asList(ElementTypeRegistry.getInstance().getAllTypesMatching(object, ElementTypeUtils.getEditContext()));
+ List<IElementType> more = Arrays.asList(ElementTypeRegistry.getInstance().getAllTypesMatching(object, ElementTypeUtils.getDefaultClientContext()));
resultList.addAll(more);
}
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/DelegatingModelingAssistantProvider.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/DelegatingModelingAssistantProvider.java
index 77b2e4e6a52..b4140c3914d 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/DelegatingModelingAssistantProvider.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/DelegatingModelingAssistantProvider.java
@@ -241,7 +241,7 @@ public class DelegatingModelingAssistantProvider implements IModelingAssistantPr
if (diagram != null) {
for (Iterator<? extends IElementType> iter = elementTypes.iterator(); iter.hasNext();) {
- if (!PolicyChecker.getCurrent().isInModelingAssistants(diagram, iter.next())) {
+ if (!PolicyChecker.getFor(diagram).isInModelingAssistants(diagram, iter.next())) {
iter.remove();
}
}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
index b107146f95f..e2f060a5ad0 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
@@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.e4.ui.css.core;bundle-version="[0.11.0,1.0.0)",
org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.gmf.runtime.notation.edit;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.papyrus.infra.properties;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.papyrus.infra.properties;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.representation;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 2.1.0.qualifier
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
index e27cd26cdfc..060d78c96ad 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
@@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.notation.NamedStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.Style;
import org.eclipse.gmf.runtime.notation.impl.DiagramImpl;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.DiagramCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
@@ -32,8 +33,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
/**
@@ -129,7 +129,7 @@ public class CSSDiagramImpl extends DiagramImpl implements CSSDiagram, CSSView.I
if (proto == null) {
return null;
}
- PapyrusView conf = proto.getConfiguration();
+ PapyrusRepresentationKind conf = proto.getRepresentationKind();
if (conf == null || !(conf instanceof PapyrusDiagram)) {
return null;
}
diff --git a/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/icons/full/obj16/ExpansionmodelModelFile.gif b/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/icons/full/obj16/ExpansionmodelModelFile.gif
deleted file mode 100644
index c4edfc0c55b..00000000000
--- a/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/icons/full/obj16/ExpansionmodelModelFile.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
index 247d2fbd75d..867dcff6c28 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Require-Bundle: org.eclipse.emf.transaction.ui;bundle-version="[1.4.0,2.0.0)",
org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="[1.7.0,2.0.0)",
org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.emf.gmf;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.representation;bundle-version="0.1.0"
Export-Package: org.eclipse.papyrus.commands,
org.eclipse.papyrus.commands.util,
org.eclipse.papyrus.commands.wrappers
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java
index 0edc4984d37..bb43bde6688 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java
@@ -14,7 +14,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
/**
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 e93c8d792fa..48319b0f8cd 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
@@ -1,79 +1,81 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.common,
- org.eclipse.papyrus.infra.gmfdiag.common.adapter,
- org.eclipse.papyrus.infra.gmfdiag.common.advice,
- org.eclipse.papyrus.infra.gmfdiag.common.commands,
- org.eclipse.papyrus.infra.gmfdiag.common.commands.requests,
- org.eclipse.papyrus.infra.gmfdiag.common.databinding,
- org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom,
- org.eclipse.papyrus.infra.gmfdiag.common.decoration,
- org.eclipse.papyrus.infra.gmfdiag.common.editpart,
- org.eclipse.papyrus.infra.gmfdiag.common.editpolicies,
- org.eclipse.papyrus.infra.gmfdiag.common.figure,
- org.eclipse.papyrus.infra.gmfdiag.common.figure.edge,
- org.eclipse.papyrus.infra.gmfdiag.common.figure.node,
- org.eclipse.papyrus.infra.gmfdiag.common.geometry,
- org.eclipse.papyrus.infra.gmfdiag.common.handler,
- org.eclipse.papyrus.infra.gmfdiag.common.helper,
- org.eclipse.papyrus.infra.gmfdiag.common.internal.sync;x-internal:=true,
- org.eclipse.papyrus.infra.gmfdiag.common.listener,
- org.eclipse.papyrus.infra.gmfdiag.common.locator,
- org.eclipse.papyrus.infra.gmfdiag.common.messages,
- org.eclipse.papyrus.infra.gmfdiag.common.model,
- org.eclipse.papyrus.infra.gmfdiag.common.parsers,
- org.eclipse.papyrus.infra.gmfdiag.common.preferences,
- org.eclipse.papyrus.infra.gmfdiag.common.providers,
- org.eclipse.papyrus.infra.gmfdiag.common.reconciler,
- org.eclipse.papyrus.infra.gmfdiag.common.selection,
- org.eclipse.papyrus.infra.gmfdiag.common.service,
- org.eclipse.papyrus.infra.gmfdiag.common.service.shape,
- org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype,
- org.eclipse.papyrus.infra.gmfdiag.common.snap,
- org.eclipse.papyrus.infra.gmfdiag.common.snap.copy,
- org.eclipse.papyrus.infra.gmfdiag.common.spi,
- org.eclipse.papyrus.infra.gmfdiag.common.strategy,
- org.eclipse.papyrus.infra.gmfdiag.common.strategy.copy,
- org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste,
- org.eclipse.papyrus.infra.gmfdiag.common.structure,
- org.eclipse.papyrus.infra.gmfdiag.common.sync,
- org.eclipse.papyrus.infra.gmfdiag.common.types,
- org.eclipse.papyrus.infra.gmfdiag.common.undocontext,
- org.eclipse.papyrus.infra.gmfdiag.common.updater,
- org.eclipse.papyrus.infra.gmfdiag.common.utils,
- org.eclipse.papyrus.infra.gmfdiag.internal.common.expressions;x-internal:=true,
- org.eclipse.papyrus.infra.gmfdiag.internal.common.model;x-internal:=true
-Require-Bundle: org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="[1.7.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="[1.7.0,2.0.0)";visibility:=reexport,
- org.eclipse.gmf.runtime.draw2d.ui.render.awt;bundle-version="[1.8.0,2.0.0)",
- org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
- org.w3c.dom.svg;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
- org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.xml;bundle-version="[1.6.0,1.7.0)",
- org.eclipse.papyrus.infra.gmfdiag.tooling.runtime;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- com.ibm.icu,
- org.eclipse.papyrus.infra.services.decoration;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.types.core;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.sync;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.services.edit.ui;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.emf.gmf,
- org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="[2.2.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)"
-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.infra.gmfdiag.common.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.common;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.common,
+ org.eclipse.papyrus.infra.gmfdiag.common.adapter,
+ org.eclipse.papyrus.infra.gmfdiag.common.advice,
+ org.eclipse.papyrus.infra.gmfdiag.common.commands,
+ org.eclipse.papyrus.infra.gmfdiag.common.commands.requests,
+ org.eclipse.papyrus.infra.gmfdiag.common.databinding,
+ org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom,
+ org.eclipse.papyrus.infra.gmfdiag.common.decoration,
+ org.eclipse.papyrus.infra.gmfdiag.common.editpart,
+ org.eclipse.papyrus.infra.gmfdiag.common.editpolicies,
+ org.eclipse.papyrus.infra.gmfdiag.common.figure,
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.edge,
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node,
+ org.eclipse.papyrus.infra.gmfdiag.common.geometry,
+ org.eclipse.papyrus.infra.gmfdiag.common.handler,
+ org.eclipse.papyrus.infra.gmfdiag.common.helper,
+ org.eclipse.papyrus.infra.gmfdiag.common.internal.sync;x-internal:=true,
+ org.eclipse.papyrus.infra.gmfdiag.common.listener,
+ org.eclipse.papyrus.infra.gmfdiag.common.locator,
+ org.eclipse.papyrus.infra.gmfdiag.common.messages,
+ org.eclipse.papyrus.infra.gmfdiag.common.model,
+ org.eclipse.papyrus.infra.gmfdiag.common.parsers,
+ org.eclipse.papyrus.infra.gmfdiag.common.preferences,
+ org.eclipse.papyrus.infra.gmfdiag.common.providers,
+ org.eclipse.papyrus.infra.gmfdiag.common.reconciler,
+ org.eclipse.papyrus.infra.gmfdiag.common.selection,
+ org.eclipse.papyrus.infra.gmfdiag.common.service,
+ org.eclipse.papyrus.infra.gmfdiag.common.service.shape,
+ org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype,
+ org.eclipse.papyrus.infra.gmfdiag.common.snap,
+ org.eclipse.papyrus.infra.gmfdiag.common.snap.copy,
+ org.eclipse.papyrus.infra.gmfdiag.common.spi,
+ org.eclipse.papyrus.infra.gmfdiag.common.strategy,
+ org.eclipse.papyrus.infra.gmfdiag.common.strategy.copy,
+ org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste,
+ org.eclipse.papyrus.infra.gmfdiag.common.structure,
+ org.eclipse.papyrus.infra.gmfdiag.common.sync,
+ org.eclipse.papyrus.infra.gmfdiag.common.types,
+ org.eclipse.papyrus.infra.gmfdiag.common.undocontext,
+ org.eclipse.papyrus.infra.gmfdiag.common.updater,
+ org.eclipse.papyrus.infra.gmfdiag.common.utils,
+ org.eclipse.papyrus.infra.gmfdiag.internal.common.expressions;x-internal:=true,
+ org.eclipse.papyrus.infra.gmfdiag.internal.common.model;x-internal:=true
+Require-Bundle: org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="[1.7.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="[1.7.0,2.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.draw2d.ui.render.awt;bundle-version="[1.8.0,2.0.0)",
+ org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
+ org.w3c.dom.svg;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
+ org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.xml;bundle-version="[1.6.0,1.7.0)",
+ org.eclipse.papyrus.infra.gmfdiag.tooling.runtime;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ com.ibm.icu,
+ org.eclipse.papyrus.infra.services.decoration;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.types.core;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.sync;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.services.edit.ui;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.emf.gmf,
+ org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[2.2.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
+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.infra.gmfdiag.common.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.common;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
index dfd80d6b7ca..ba84328e6b5 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
@@ -440,13 +440,6 @@
</paletteProvider>
</extension>
<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/notation.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
-<extension
point="org.eclipse.gmf.runtime.common.ui.services.iconProviders">
<IconProvider
class="org.eclipse.papyrus.infra.gmfdiag.common.providers.ElementTypeIconProvider">
@@ -480,12 +473,5 @@
</dependsOn>
</service>
</extension>
- <extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext"
- path="model/gmfdiag-common.elementtypesconfigurations">
- </elementTypeSet>
- </extension>
</plugin>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
index 101c4953423..6655c7df26a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
@@ -50,6 +50,9 @@ import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.OpenDiagramCommand;
+import org.eclipse.papyrus.infra.architecture.representation.ModelAutoCreate;
+import org.eclipse.papyrus.infra.architecture.representation.OwningRule;
+import org.eclipse.papyrus.infra.architecture.representation.RootAutoSelect;
import org.eclipse.papyrus.infra.core.language.ILanguageService;
import org.eclipse.papyrus.infra.core.resource.IEMFModel;
import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
@@ -60,16 +63,14 @@ import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory;
import org.eclipse.papyrus.infra.emf.readonly.ReadOnlyManager;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramPrototype;
import org.eclipse.papyrus.infra.gmfdiag.common.messages.Messages;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
-import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
-import org.eclipse.papyrus.infra.viewpoints.configuration.RootAutoSelect;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.swt.widgets.Display;
@@ -104,7 +105,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
private EObject element;
- private ViewPrototype prototype;
+ private DiagramPrototype prototype;
private OwningRule rule;
@@ -114,7 +115,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
private IClientContext clientContext;
- public Creator(ModelSet modelSet, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ public Creator(ModelSet modelSet, EObject owner, EObject element, DiagramPrototype prototype, String name) {
this.modelSet = modelSet;
this.owner = owner;
this.element = element;
@@ -139,14 +140,8 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
attachModelToResource(owner, modelResource);
}
- service = ElementEditServiceUtils.getCommandProvider(owner);
- if (service == null) {
- // Something isn't right ...
- return null;
- }
-
try {
- clientContext = TypeContext.getContext();
+ clientContext = TypeContext.getContext(modelSet);
} catch (ServiceException e) {
Activator.log.error(e);
}
@@ -155,7 +150,13 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
return null;
}
- rule = PolicyChecker.getCurrent().getOwningRuleFor(prototype, owner);
+ service = ElementEditServiceUtils.getCommandProvider(owner, clientContext);
+ if (service == null) {
+ // Something isn't right ...
+ return null;
+ }
+
+ rule = PolicyChecker.getFor(modelSet).getOwningRuleFor(prototype, owner);
if (rule == null) {
// Something isn't right ...
return null;
@@ -267,7 +268,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
protected CommandResult doEditDiagramName(ViewPrototype prototype, String name) {
if (name == null) {
- name = openDiagramNameDialog(prototype.isNatural() ? getDefaultDiagramName() : "New" + prototype.getLabel().replace(" ", ""));
+ name = openDiagramNameDialog("New" + prototype.getLabel().replace(" ", ""));
}
// canceled
if (name == null) {
@@ -334,7 +335,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
@Override
public final Diagram createDiagram(ModelSet modelSet, EObject owner, String name) {
Diagram diagram = null;
- ViewPrototype proto = ViewPrototype.get(getCreatedDiagramType(), owner, owner);
+ ViewPrototype proto = ViewPrototype.get(PolicyChecker.getFor(modelSet), getCreatedDiagramType(), owner, owner);
if (proto != null) {
diagram = createDiagram(modelSet, owner, owner, proto, name);
}
@@ -396,7 +397,7 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
*/
@Override
public final ICommand getCreateDiagramCommand(ModelSet modelSet, EObject owner, String name) {
- ViewPrototype proto = ViewPrototype.get(getCreatedDiagramType(), owner, owner);
+ ViewPrototype proto = ViewPrototype.get(PolicyChecker.getFor(modelSet), getCreatedDiagramType(), owner, owner);
if (proto == null) {
return null;
}
@@ -434,18 +435,18 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Creator creator = new Creator(modelSet, owner, element, prototype, name);
+ Creator creator = new Creator(modelSet, owner, element, (DiagramPrototype) prototype, name);
try {
CommandResult commandResult = creator.createDiagram();
if (commandResult != null) {
- if (!commandResult.getStatus().isOK()) {
- return commandResult;
- }
+ if (!commandResult.getStatus().isOK()) {
+ return commandResult;
+ }
- diagram = (Diagram) commandResult.getReturnValue();
- diagramElement = diagram.getElement();
- diagramOwner = DiagramUtils.getOwner(diagram);
- return commandResult;
+ diagram = (Diagram) commandResult.getReturnValue();
+ diagramElement = diagram.getElement();
+ diagramOwner = DiagramUtils.getOwner(diagram);
+ return commandResult;
}
} catch (ServiceException e) {
Activator.log.error(e);
@@ -525,16 +526,14 @@ public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends Abst
* the diagram's name
* @return the created diagram, or <code>null</code> if the creation failed
*/
- protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, DiagramPrototype prototype, String name) {
// create diagram
Diagram diagram = ViewService.createDiagram(element, getDiagramNotationID(), getPreferenceHint());
if (diagram != null) {
diagram.setName(name);
diagram.setElement(element);
DiagramUtils.setOwner(diagram, owner);
- if (!prototype.isNatural()) {
- DiagramUtils.setPrototype(diagram, prototype);
- }
+ DiagramUtils.setPrototype(diagram, prototype);
diagramResource.getContents().add(diagram);
initializeDiagram(diagram);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java
index 329250158c6..ba86f58926f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/SynchronizableGmfDiagramEditor.java
@@ -1,540 +1,550 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 437217
- * Christian W. Damus - bug 451683
- * Christian W. Damus - bug 465416
- * Simon Delisle - Move ReconcilerHelper to a separate class
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gef.DefaultEditDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.commands.CommandStack;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.parts.ContentOutlinePage;
-import org.eclipse.gef.ui.views.palette.PalettePage;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.internal.properties.WorkspaceViewerProperties;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.commands.CheckedDiagramCommandStack;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.CommandIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
-import org.eclipse.papyrus.infra.sync.service.ISyncService;
-import org.eclipse.papyrus.infra.ui.editor.reload.IReloadContextProvider;
-import org.eclipse.papyrus.infra.ui.util.EclipseCommandUtils;
-import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
-import org.eclipse.papyrus.infra.widgets.util.NavigationTarget;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-/**
- *
- * This GMF editor contains a methods in order to reveal visual element from a list of semantic element.
- * <p/>
- * It also provides subclasses with common capability to automatically migrate (reconcile) input diagrams between papurus versions.
- */
-
-@SuppressWarnings("restriction")
-// suppress the warning for WorkspaceViewerProperties
-public class SynchronizableGmfDiagramEditor extends DiagramDocumentEditor implements IRevealSemanticElement, NavigationTarget {
-
- private Collection<PalettePageWrapper> palettePages;
-
- private Object palettePageState;
-
- public SynchronizableGmfDiagramEditor(boolean hasFlyoutPalette) {
- super(hasFlyoutPalette);
- }
-
- /**
- * reveal all editpart that represent an element in the given list.
- *
- * @see org.eclipse.papyrus.infra.core.ui.IRevealSemanticElement#revealSemanticElement(java.util.List)
- *
- */
- @Override
- public void revealSemanticElement(List<?> elementList) {
- revealElement(elementList);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean revealElement(Object element) {
- return revealElement(Collections.singleton(element));
- }
-
-
- /**
- * {@inheritDoc}
- *
- * reveal all editpart that represent an element in the given list.
- *
- * @see org.eclipse.papyrus.infra.core.ui.IRevealSemanticElement#revealSemanticElement(java.util.List)
- *
- */
- @Override
- public boolean revealElement(Collection<?> elementList) {
- // create an instance that can get semantic element from gmf
- SemanticFromGMFElement semanticFromGMFElement = new SemanticFromGMFElement();
-
- // get the graphical viewer
- GraphicalViewer graphicalViewer = getGraphicalViewer();
- if (graphicalViewer != null) {
-
- // look amidst all edit part if the semantic is contained in the list
- Iterator<?> iter = graphicalViewer.getEditPartRegistry().values().iterator();
- IGraphicalEditPart researchedEditPart = null;
- List<?> clonedList = new ArrayList<>(elementList);
- List<IGraphicalEditPart> partSelection = new ArrayList<>();
-
- while (iter.hasNext() && !clonedList.isEmpty()) {
- Object currentEditPart = iter.next();
- // look only amidst IPrimary editpart to avoid compartment and labels of links
- if (currentEditPart instanceof IPrimaryEditPart) {
- Object currentElement = semanticFromGMFElement.getSemanticElement(currentEditPart);
- if (clonedList.contains(currentElement)) {
- clonedList.remove(currentElement);
- researchedEditPart = ((IGraphicalEditPart) currentEditPart);
- partSelection.add(researchedEditPart);
-
- }
- }
- }
-
- // We may also search for a GMF View (Instead of a semantic model Element)
- if (!clonedList.isEmpty()) {
- for (Iterator<?> iterator = clonedList.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (graphicalViewer.getEditPartRegistry().containsKey(element) && !clonedList.isEmpty()) {
- iterator.remove();
- researchedEditPart = (IGraphicalEditPart) graphicalViewer.getEditPartRegistry().get(element);
- partSelection.add(researchedEditPart);
- }
- }
- }
-
- // the second test, as the model element is not a PrimaryEditPart, is to allow the selection even if the user selected it with other elements
- // and reset the selection if only the model is selected
- if (clonedList.isEmpty() || (clonedList.size() == 1 && clonedList.get(0) == getDiagram().getElement())) {
- // all parts have been found
- IStructuredSelection sSelection = new StructuredSelection(partSelection);
- // this is used instead of graphicalViewer.select(IGraphicalEditPart) as the later only allows the selection of a single element
- graphicalViewer.setSelection(sSelection);
- if (!partSelection.isEmpty()) {
- graphicalViewer.reveal(partSelection.get(0));
- }
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class type) {
- if (type == DiagramEditPart.class) {
- return getDiagramEditPart();
- }
- if (type == Diagram.class) {
- return getDiagram();
- }
- if (type == IReloadContextProvider.class) {
- return new DiagramReloadContextProvider(this);
- }
- if (type == PalettePage.class) {
- if (palettePages == null) {
- palettePages = Lists.newArrayListWithExpectedSize(1);
- } else {
- cleanUpPalettePages();
- if (!palettePages.isEmpty()) {
- // Make the new page look just like the last one (for continuity of the UI when the
- // PapyrusPaletteSynchronizer causes a new page to be created)
- Iterables.getLast(palettePages, null).saveState();
- }
- }
- PalettePageWrapper result = new PalettePageWrapper((CustomPalettePage) super.getAdapter(type));
- palettePages.add(result);
- return result;
- }
- if (type == IContentOutlinePage.class) {
- Object result = super.getAdapter(type);
- if (result instanceof ContentOutlinePage) {
- result = new OutlinePageWrapper((ContentOutlinePage) result);
- }
- return result;
- }
- return super.getAdapter(type);
- }
-
- Collection<? extends PalettePage> getPalettePages() {
- if (palettePages == null) {
- return Collections.emptyList();
- } else {
- cleanUpPalettePages();
- return Collections.unmodifiableCollection(palettePages);
- }
- }
-
- void setDeferredPalettePageReloadContext(Object reloadContext) {
- palettePageState = reloadContext;
- }
-
- private void cleanUpPalettePages() {
- for (Iterator<PalettePageWrapper> iter = palettePages.iterator(); iter.hasNext();) {
- if (iter.next().isDisposed()) {
- iter.remove();
- }
- }
- }
-
- /**
- * Configures my diagram edit domain with its command stack.
- * This method has been completely overridden in order to use a proxy stack.
- */
- @Override
- protected void configureDiagramEditDomain() {
-
- DefaultEditDomain editDomain = getEditDomain();
-
- if (editDomain != null) {
- CommandStack stack = editDomain.getCommandStack();
- if (stack != null) {
- // dispose the old stack
- stack.dispose();
- }
-
- // create and assign the new stack
- CheckedDiagramCommandStack diagramStack = new CheckedDiagramCommandStack(getDiagramEditDomain());
-
- editDomain.setCommandStack(diagramStack);
- }
-
- DiagramEditDomain diagEditDomain = (DiagramEditDomain) getDiagramEditDomain();
- diagEditDomain.setActionManager(createActionManager());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- super.setFocus();
- updateToggleActionState();
- }
-
-
- /**
- * this command update the status of the toggle actions
- */
- protected void updateToggleActionState() {
- final ICommandService commandService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class);
- if (commandService != null) {
- final IPreferenceStore wsPreferenceStore = ((DiagramGraphicalViewer) getDiagramGraphicalViewer()).getWorkspaceViewerPreferenceStore();
- org.eclipse.core.commands.Command command = commandService.getCommand(CommandIds.VIEW_GRID_COMMAND);
- EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.VIEWGRID));
-
- command = commandService.getCommand(CommandIds.VIEW_RULER_COMMAND);
- EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.VIEWRULERS));
-
- command = commandService.getCommand(CommandIds.VIEW_PAGE_BREAK_COMMAND);
- EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.VIEWPAGEBREAKS));
-
- command = commandService.getCommand(CommandIds.SNAP_TO_GRID_COMMAND);
- EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.SNAPTOGRID));
-
- } else {
- throw new RuntimeException(String.format("The Eclipse service %s has not been found", ICommandService.class)); //$NON-NLS-1$
- }
- }
-
-
- @Override
- protected void addDefaultPreferences() {
- super.addDefaultPreferences();
- final PreferencesHint preferencesHint = getPreferencesHint();
- final IPreferenceStore globalPreferenceStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- final String diagramType = getDiagram().getType();
- // get the preferences
- final boolean viewGrid = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.VIEW_GRID));
- final boolean viewRuler = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.VIEW_RULER));
- final int rulerUnit = globalPreferenceStore.getInt(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.RULER_UNITS));
- final boolean snapToGrid = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.SNAP_TO_GRID));
- final boolean snapToGeometry = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.SNAP_TO_GEOMETRY));
- final RGB rgb = PreferenceConverter.getColor(globalPreferenceStore, PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_LINE_COLOR));
- final int gridLineColor = FigureUtilities.RGBToInteger(rgb);
- final double gridSpacing = globalPreferenceStore.getDouble(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_SPACING));
- final boolean gridOrder = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_ORDER));
- final int gridLineStyle = globalPreferenceStore.getInt(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_LINE_STYLE));
-
- // set the preferences
- final IPreferenceStore localStore = getWorkspaceViewerPreferenceStore();
- localStore.setValue(PreferencesConstantsHelper.VIEW_GRID_CONSTANT, viewGrid);
- localStore.setValue(PreferencesConstantsHelper.VIEW_RULERS_CONSTANT, viewRuler);
- localStore.setValue(PreferencesConstantsHelper.RULER_UNITS_CONSTANT, rulerUnit);
- localStore.setValue(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT, snapToGrid);
- localStore.setValue(PreferencesConstantsHelper.SNAP_TO_GEOMETRY_CONSTANT, snapToGeometry);
- localStore.setValue(PreferencesConstantsHelper.GRID_LINE_COLOR_CONSTANT, gridLineColor);
- localStore.setValue(PreferencesConstantsHelper.GRID_SPACING_CONSTANT, gridSpacing);
-
- // to force refresh
- localStore.setValue(PreferencesConstantsHelper.GRID_ORDER_CONSTANT, !gridOrder);
- localStore.setValue(PreferencesConstantsHelper.GRID_ORDER_CONSTANT, gridOrder);
-
- localStore.setValue(PreferencesConstantsHelper.GRID_LINE_STYLE_CONSTANT, gridLineStyle);
-
- }
-
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Engage synchronization (if required)
- EditPart diagram = getDiagramEditPart();
- if (diagram != null) {
- try {
- ISyncService syncService = ServiceUtilsForEditPart.getInstance().getService(ISyncService.class, diagram);
- syncService.evaluateTriggers(diagram.getViewer());
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
- }
- }
-
-
-
- protected class PalettePageWrapper implements PalettePage, IAdaptable {
-
- private final CustomPalettePage delegate;
-
- private boolean disposed;
-
- protected PalettePageWrapper(CustomPalettePage delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public void createControl(Composite parent) {
- Control existing = getControl();
- if ((existing != null) && !existing.isDisposed()) {
- // Attempting to creating the page controls again? Bail
- return;
- }
-
- delegate.createControl(parent);
-
- delegate.getControl().addDisposeListener(new DisposeListener() {
-
- @Override
- public void widgetDisposed(DisposeEvent e) {
- disposed = true;
-
- SynchronizableGmfDiagramEditor.this.palettePages.remove(PalettePageWrapper.this);
- }
- });
-
- if (palettePageState != null) {
- // We're re-creating the palette page after having closed it, either for editor re-load
- // or the PapyrusPaletteSynchronizer forcing a palette refresh. Reinitialize from the
- // last saved state
- PaletteViewerReloadContextProvider.getInstance(getPaletteViewer()).restore(palettePageState);
- palettePageState = null;
- }
- }
-
- @Override
- public void dispose() {
- // Save current state for potential re-opening later
- saveState();
- delegate.dispose();
- }
-
- public boolean isDisposed() {
- return disposed;
- }
-
- void saveState() {
- PaletteViewer palette = getPaletteViewer();
- if (palette != null) {
- palettePageState = PaletteViewerReloadContextProvider.getInstance(palette).createReloadContext();
- }
- }
-
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (adapter == IReloadContextProvider.class) {
- return new IReloadContextProvider() {
-
- @Override
- public Object createReloadContext() {
- return (getPaletteViewer() != null) ? PaletteViewerReloadContextProvider.getInstance(getPaletteViewer()).createReloadContext() : null;
- }
-
- @Override
- public void restore(Object reloadContext) {
- if (getPaletteViewer() != null) {
- PaletteViewerReloadContextProvider.getInstance(getPaletteViewer()).restore(reloadContext);
- } else {
- // We'll defer this until the page control is created
- palettePageState = reloadContext;
- }
- }
- };
- }
- return delegate.getAdapter(adapter);
- }
-
- @Override
- public Control getControl() {
- // CustomPalettePage will NPE if asked for the control before the PaletteViewer is created
- return (delegate.getPaletteViewer() == null) ? null : delegate.getControl();
- }
-
- @Override
- public void setFocus() {
- delegate.setFocus();
- }
-
- @Override
- public void setActionBars(IActionBars actionBars) {
- delegate.setActionBars(actionBars);
- }
-
- @Override
- public void init(IPageSite pageSite) {
- delegate.init(pageSite);
- }
-
- @Override
- public IPageSite getSite() {
- return delegate.getSite();
- }
-
- public PaletteViewer getPaletteViewer() {
- return delegate.getPaletteViewer();
- }
-
- }
-
- /**
- * A wrapper for the GMF-provided outline page that lets us clean up references to the model content leaked via the Outline View tool bar.
- */
- private class OutlinePageWrapper implements IPageBookViewPage, IContentOutlinePage {
- private final ContentOutlinePage delegate;
-
- OutlinePageWrapper(ContentOutlinePage delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public void createControl(Composite parent) {
- delegate.createControl(parent);
- }
-
- @Override
- public void dispose() {
- try {
- // Remove the toolbar items that reference me and, through me, the diagram and its associated semantic model
- IActionBars bars = getSite().getActionBars();
- bars.getToolBarManager().removeAll();
- bars.updateActionBars();
- } finally {
- delegate.dispose();
- }
- }
-
- @Override
- public Control getControl() {
- return delegate.getControl();
- }
-
- @Override
- public void setActionBars(IActionBars actionBars) {
- delegate.setActionBars(actionBars);
- }
-
- @Override
- public void setFocus() {
- delegate.setFocus();
- }
-
- @Override
- public void init(IPageSite site) throws PartInitException {
- delegate.init(site);
- }
-
- @Override
- public IPageSite getSite() {
- return delegate.getSite();
- }
-
- @Override
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- delegate.addSelectionChangedListener(listener);
- }
-
- @Override
- public ISelection getSelection() {
- return delegate.getSelection();
- }
-
- @Override
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- delegate.removeSelectionChangedListener(listener);
- }
-
- @Override
- public void setSelection(ISelection selection) {
- delegate.setSelection(selection);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 437217
+ * Christian W. Damus - bug 451683
+ * Christian W. Damus - bug 465416
+ * Simon Delisle - Move ReconcilerHelper to a separate class
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.gef.ui.parts.ContentOutlinePage;
+import org.eclipse.gef.ui.views.palette.PalettePage;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.internal.properties.WorkspaceViewerProperties;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.commands.CheckedDiagramCommandStack;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.ReconcileHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.CommandIds;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
+import org.eclipse.papyrus.infra.sync.service.ISyncService;
+import org.eclipse.papyrus.infra.ui.editor.reload.IReloadContextProvider;
+import org.eclipse.papyrus.infra.ui.util.EclipseCommandUtils;
+import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
+import org.eclipse.papyrus.infra.widgets.util.NavigationTarget;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ *
+ * This GMF editor contains a methods in order to reveal visual element from a list of semantic element.
+ * <p/>
+ * It also provides subclasses with common capability to automatically migrate (reconcile) input diagrams between papurus versions.
+ */
+
+@SuppressWarnings("restriction")
+// suppress the warning for WorkspaceViewerProperties
+public class SynchronizableGmfDiagramEditor extends DiagramDocumentEditor implements IRevealSemanticElement, NavigationTarget {
+
+ private Collection<PalettePageWrapper> palettePages;
+
+ private Object palettePageState;
+
+ public SynchronizableGmfDiagramEditor(boolean hasFlyoutPalette) {
+ super(hasFlyoutPalette);
+ }
+
+ /**
+ * reveal all editpart that represent an element in the given list.
+ *
+ * @see org.eclipse.papyrus.infra.core.ui.IRevealSemanticElement#revealSemanticElement(java.util.List)
+ *
+ */
+ @Override
+ public void revealSemanticElement(List<?> elementList) {
+ revealElement(elementList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean revealElement(Object element) {
+ return revealElement(Collections.singleton(element));
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * reveal all editpart that represent an element in the given list.
+ *
+ * @see org.eclipse.papyrus.infra.core.ui.IRevealSemanticElement#revealSemanticElement(java.util.List)
+ *
+ */
+ @Override
+ public boolean revealElement(Collection<?> elementList) {
+ // create an instance that can get semantic element from gmf
+ SemanticFromGMFElement semanticFromGMFElement = new SemanticFromGMFElement();
+
+ // get the graphical viewer
+ GraphicalViewer graphicalViewer = getGraphicalViewer();
+ if (graphicalViewer != null) {
+
+ // look amidst all edit part if the semantic is contained in the list
+ Iterator<?> iter = graphicalViewer.getEditPartRegistry().values().iterator();
+ IGraphicalEditPart researchedEditPart = null;
+ List<?> clonedList = new ArrayList<>(elementList);
+ List<IGraphicalEditPart> partSelection = new ArrayList<>();
+
+ while (iter.hasNext() && !clonedList.isEmpty()) {
+ Object currentEditPart = iter.next();
+ // look only amidst IPrimary editpart to avoid compartment and labels of links
+ if (currentEditPart instanceof IPrimaryEditPart) {
+ Object currentElement = semanticFromGMFElement.getSemanticElement(currentEditPart);
+ if (clonedList.contains(currentElement)) {
+ clonedList.remove(currentElement);
+ researchedEditPart = ((IGraphicalEditPart) currentEditPart);
+ partSelection.add(researchedEditPart);
+
+ }
+ }
+ }
+
+ // We may also search for a GMF View (Instead of a semantic model Element)
+ if (!clonedList.isEmpty()) {
+ for (Iterator<?> iterator = clonedList.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (graphicalViewer.getEditPartRegistry().containsKey(element) && !clonedList.isEmpty()) {
+ iterator.remove();
+ researchedEditPart = (IGraphicalEditPart) graphicalViewer.getEditPartRegistry().get(element);
+ partSelection.add(researchedEditPart);
+ }
+ }
+ }
+
+ // the second test, as the model element is not a PrimaryEditPart, is to allow the selection even if the user selected it with other elements
+ // and reset the selection if only the model is selected
+ if (clonedList.isEmpty() || (clonedList.size() == 1 && clonedList.get(0) == getDiagram().getElement())) {
+ // all parts have been found
+ IStructuredSelection sSelection = new StructuredSelection(partSelection);
+ // this is used instead of graphicalViewer.select(IGraphicalEditPart) as the later only allows the selection of a single element
+ graphicalViewer.setSelection(sSelection);
+ if (!partSelection.isEmpty()) {
+ graphicalViewer.reveal(partSelection.get(0));
+ }
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class type) {
+ if (type == DiagramEditPart.class) {
+ return getDiagramEditPart();
+ }
+ if (type == Diagram.class) {
+ return getDiagram();
+ }
+ if (type == IReloadContextProvider.class) {
+ return new DiagramReloadContextProvider(this);
+ }
+ if (type == PalettePage.class) {
+ if (palettePages == null) {
+ palettePages = Lists.newArrayListWithExpectedSize(1);
+ } else {
+ cleanUpPalettePages();
+ if (!palettePages.isEmpty()) {
+ // Make the new page look just like the last one (for continuity of the UI when the
+ // PapyrusPaletteSynchronizer causes a new page to be created)
+ Iterables.getLast(palettePages, null).saveState();
+ }
+ }
+ PalettePageWrapper result = new PalettePageWrapper((CustomPalettePage) super.getAdapter(type));
+ palettePages.add(result);
+ return result;
+ }
+ if (type == IContentOutlinePage.class) {
+ Object result = super.getAdapter(type);
+ if (result instanceof ContentOutlinePage) {
+ result = new OutlinePageWrapper((ContentOutlinePage) result);
+ }
+ return result;
+ }
+ return super.getAdapter(type);
+ }
+
+ Collection<? extends PalettePage> getPalettePages() {
+ if (palettePages == null) {
+ return Collections.emptyList();
+ } else {
+ cleanUpPalettePages();
+ return Collections.unmodifiableCollection(palettePages);
+ }
+ }
+
+ void setDeferredPalettePageReloadContext(Object reloadContext) {
+ palettePageState = reloadContext;
+ }
+
+ private void cleanUpPalettePages() {
+ for (Iterator<PalettePageWrapper> iter = palettePages.iterator(); iter.hasNext();) {
+ if (iter.next().isDisposed()) {
+ iter.remove();
+ }
+ }
+ }
+
+ /**
+ * Configures my diagram edit domain with its command stack.
+ * This method has been completely overridden in order to use a proxy stack.
+ */
+ @Override
+ protected void configureDiagramEditDomain() {
+
+ DefaultEditDomain editDomain = getEditDomain();
+
+ if (editDomain != null) {
+ CommandStack stack = editDomain.getCommandStack();
+ if (stack != null) {
+ // dispose the old stack
+ stack.dispose();
+ }
+
+ // create and assign the new stack
+ CheckedDiagramCommandStack diagramStack = new CheckedDiagramCommandStack(getDiagramEditDomain());
+
+ editDomain.setCommandStack(diagramStack);
+ }
+
+ DiagramEditDomain diagEditDomain = (DiagramEditDomain) getDiagramEditDomain();
+ diagEditDomain.setActionManager(createActionManager());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ super.setFocus();
+ updateToggleActionState();
+ }
+
+
+ /**
+ * this command update the status of the toggle actions
+ */
+ protected void updateToggleActionState() {
+ final ICommandService commandService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class);
+ if (commandService != null) {
+ final IPreferenceStore wsPreferenceStore = ((DiagramGraphicalViewer) getDiagramGraphicalViewer()).getWorkspaceViewerPreferenceStore();
+ org.eclipse.core.commands.Command command = commandService.getCommand(CommandIds.VIEW_GRID_COMMAND);
+ EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.VIEWGRID));
+
+ command = commandService.getCommand(CommandIds.VIEW_RULER_COMMAND);
+ EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.VIEWRULERS));
+
+ command = commandService.getCommand(CommandIds.VIEW_PAGE_BREAK_COMMAND);
+ EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.VIEWPAGEBREAKS));
+
+ command = commandService.getCommand(CommandIds.SNAP_TO_GRID_COMMAND);
+ EclipseCommandUtils.updateToggleCommandState(command, wsPreferenceStore.getBoolean(WorkspaceViewerProperties.SNAPTOGRID));
+
+ } else {
+ throw new RuntimeException(String.format("The Eclipse service %s has not been found", ICommandService.class)); //$NON-NLS-1$
+ }
+ }
+
+
+ @Override
+ protected void addDefaultPreferences() {
+ super.addDefaultPreferences();
+ final PreferencesHint preferencesHint = getPreferencesHint();
+ final IPreferenceStore globalPreferenceStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ final String diagramType = getDiagram().getType();
+ // get the preferences
+ final boolean viewGrid = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.VIEW_GRID));
+ final boolean viewRuler = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.VIEW_RULER));
+ final int rulerUnit = globalPreferenceStore.getInt(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.RULER_UNITS));
+ final boolean snapToGrid = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.SNAP_TO_GRID));
+ final boolean snapToGeometry = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.SNAP_TO_GEOMETRY));
+ final RGB rgb = PreferenceConverter.getColor(globalPreferenceStore, PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_LINE_COLOR));
+ final int gridLineColor = FigureUtilities.RGBToInteger(rgb);
+ final double gridSpacing = globalPreferenceStore.getDouble(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_SPACING));
+ final boolean gridOrder = globalPreferenceStore.getBoolean(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_ORDER));
+ final int gridLineStyle = globalPreferenceStore.getInt(PreferencesConstantsHelper.getDiagramConstant(diagramType, PreferencesConstantsHelper.GRID_LINE_STYLE));
+
+ // set the preferences
+ final IPreferenceStore localStore = getWorkspaceViewerPreferenceStore();
+ localStore.setValue(PreferencesConstantsHelper.VIEW_GRID_CONSTANT, viewGrid);
+ localStore.setValue(PreferencesConstantsHelper.VIEW_RULERS_CONSTANT, viewRuler);
+ localStore.setValue(PreferencesConstantsHelper.RULER_UNITS_CONSTANT, rulerUnit);
+ localStore.setValue(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT, snapToGrid);
+ localStore.setValue(PreferencesConstantsHelper.SNAP_TO_GEOMETRY_CONSTANT, snapToGeometry);
+ localStore.setValue(PreferencesConstantsHelper.GRID_LINE_COLOR_CONSTANT, gridLineColor);
+ localStore.setValue(PreferencesConstantsHelper.GRID_SPACING_CONSTANT, gridSpacing);
+
+ // to force refresh
+ localStore.setValue(PreferencesConstantsHelper.GRID_ORDER_CONSTANT, !gridOrder);
+ localStore.setValue(PreferencesConstantsHelper.GRID_ORDER_CONSTANT, gridOrder);
+
+ localStore.setValue(PreferencesConstantsHelper.GRID_LINE_STYLE_CONSTANT, gridLineStyle);
+
+ }
+
+ @Override
+ protected void initializeGraphicalViewer() {
+ super.initializeGraphicalViewer();
+
+ // Engage synchronization (if required)
+ EditPart diagram = getDiagramEditPart();
+ if (diagram != null) {
+ try {
+ ISyncService syncService = ServiceUtilsForEditPart.getInstance().getService(ISyncService.class, diagram);
+ syncService.evaluateTriggers(diagram.getViewer());
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ }
+ }
+
+ @Override
+ public void doSetInput(IEditorInput input, boolean releaseEditorContents) throws CoreException {
+ super.doSetInput(input, releaseEditorContents);
+ if (getDiagram() != null && !DiagramVersioningUtils.isOfCurrentPapyrusVersion(getDiagram())) {
+ new ReconcileHelper(getEditingDomain()).reconcileDiagram(getDiagram());
+ }
+ }
+
+ protected class PalettePageWrapper implements PalettePage, IAdaptable {
+
+ private final CustomPalettePage delegate;
+
+ private boolean disposed;
+
+ protected PalettePageWrapper(CustomPalettePage delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ Control existing = getControl();
+ if ((existing != null) && !existing.isDisposed()) {
+ // Attempting to creating the page controls again? Bail
+ return;
+ }
+
+ delegate.createControl(parent);
+
+ delegate.getControl().addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ disposed = true;
+
+ SynchronizableGmfDiagramEditor.this.palettePages.remove(PalettePageWrapper.this);
+ }
+ });
+
+ if (palettePageState != null) {
+ // We're re-creating the palette page after having closed it, either for editor re-load
+ // or the PapyrusPaletteSynchronizer forcing a palette refresh. Reinitialize from the
+ // last saved state
+ PaletteViewerReloadContextProvider.getInstance(getPaletteViewer()).restore(palettePageState);
+ palettePageState = null;
+ }
+ }
+
+ @Override
+ public void dispose() {
+ // Save current state for potential re-opening later
+ saveState();
+ delegate.dispose();
+ }
+
+ public boolean isDisposed() {
+ return disposed;
+ }
+
+ void saveState() {
+ PaletteViewer palette = getPaletteViewer();
+ if (palette != null) {
+ palettePageState = PaletteViewerReloadContextProvider.getInstance(palette).createReloadContext();
+ }
+ }
+
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if (adapter == IReloadContextProvider.class) {
+ return new IReloadContextProvider() {
+
+ @Override
+ public Object createReloadContext() {
+ return (getPaletteViewer() != null) ? PaletteViewerReloadContextProvider.getInstance(getPaletteViewer()).createReloadContext() : null;
+ }
+
+ @Override
+ public void restore(Object reloadContext) {
+ if (getPaletteViewer() != null) {
+ PaletteViewerReloadContextProvider.getInstance(getPaletteViewer()).restore(reloadContext);
+ } else {
+ // We'll defer this until the page control is created
+ palettePageState = reloadContext;
+ }
+ }
+ };
+ }
+ return delegate.getAdapter(adapter);
+ }
+
+ @Override
+ public Control getControl() {
+ // CustomPalettePage will NPE if asked for the control before the PaletteViewer is created
+ return (delegate.getPaletteViewer() == null) ? null : delegate.getControl();
+ }
+
+ @Override
+ public void setFocus() {
+ delegate.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ delegate.setActionBars(actionBars);
+ }
+
+ @Override
+ public void init(IPageSite pageSite) {
+ delegate.init(pageSite);
+ }
+
+ @Override
+ public IPageSite getSite() {
+ return delegate.getSite();
+ }
+
+ public PaletteViewer getPaletteViewer() {
+ return delegate.getPaletteViewer();
+ }
+
+ }
+
+ /**
+ * A wrapper for the GMF-provided outline page that lets us clean up references to the model content leaked via the Outline View tool bar.
+ */
+ private class OutlinePageWrapper implements IPageBookViewPage, IContentOutlinePage {
+ private final ContentOutlinePage delegate;
+
+ OutlinePageWrapper(ContentOutlinePage delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ delegate.createControl(parent);
+ }
+
+ @Override
+ public void dispose() {
+ try {
+ // Remove the toolbar items that reference me and, through me, the diagram and its associated semantic model
+ IActionBars bars = getSite().getActionBars();
+ bars.getToolBarManager().removeAll();
+ bars.updateActionBars();
+ } finally {
+ delegate.dispose();
+ }
+ }
+
+ @Override
+ public Control getControl() {
+ return delegate.getControl();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ delegate.setActionBars(actionBars);
+ }
+
+ @Override
+ public void setFocus() {
+ delegate.setFocus();
+ }
+
+ @Override
+ public void init(IPageSite site) throws PartInitException {
+ delegate.init(site);
+ }
+
+ @Override
+ public IPageSite getSite() {
+ return delegate.getSite();
+ }
+
+ @Override
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ delegate.addSelectionChangedListener(listener);
+ }
+
+ @Override
+ public ISelection getSelection() {
+ return delegate.getSelection();
+ }
+
+ @Override
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ delegate.removeSelectionChangedListener(listener);
+ }
+
+ @Override
+ public void setSelection(ISelection selection) {
+ delegate.setSelection(selection);
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java
index 8140da0a824..c57f50e87ca 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultSemanticEditPolicy.java
@@ -1,253 +1,262 @@
-/*****************************************************************************
- * Copyright (c) 2011 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
- * Vincent Lorenzo - bug 492522
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
-
-/**
- * Non diagram-specific class replacing UMLBaseItemSemanticEditPolicy generated
- * by GMF Tooling.
- */
-public class DefaultSemanticEditPolicy extends SemanticEditPolicy {
-
- public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
-
- /**
- * Extended request data key to hold editpart visual id.
- * Add visual id of edited editpart to extended data of the request
- * so command switch can decide what kind of diagram element is being edited.
- * It is done in those cases when it's not possible to deduce diagram
- * element kind from domain element.
- *
- */
- @Override
- @SuppressWarnings("unchecked")
- public Command getCommand(Request request) {
- if (request instanceof ReconnectRequest) {
- Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
- if (view instanceof View) {
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
- }
- }
- return super.getCommand(request);
- }
-
- @Override
- protected Command getSemanticCommand(IEditCommandRequest request) {
- IEditCommandRequest completedRequest = completeRequest(request);
- Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- if (completedRequest instanceof DestroyRequest) {
- DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
- return shouldProceed(destroyRequest) ? semanticCommand : null;
- }
- return semanticCommand;
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy#completeRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
- *
- * @param request
- * @return
- */
- @Override
- protected IEditCommandRequest completeRequest(IEditCommandRequest request) {
- IEditCommandRequest result = super.completeRequest(request);
- if (result instanceof DestroyReferenceRequest) {
- if (null == ((IGraphicalEditPart) getHost()).resolveSemanticElement()) {
- if (getHost() instanceof ConnectionEditPart) {
- ConnectionEditPart ep = (ConnectionEditPart) getHost();
- if (ep.isSemanticConnection()) {
- Object model = ep.getModel();
- if (model instanceof Connector) {
- String type = ((Connector) model).getType();
- if (type != null) {
- result.setParameter(RequestParameterConstants.VIEW_VISUAL_ID, type);
- }
- }
- }
- }
- }
- }
- return result;
- }
-
- protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
- if (req instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) req);
- } else if (req instanceof CreateElementRequest) {
- return getCreateCommand((CreateElementRequest) req);
- } else if (req instanceof ConfigureRequest) {
- return getConfigureCommand((ConfigureRequest) req);
- } else if (req instanceof DestroyElementRequest) {
- return getDestroyElementCommand((DestroyElementRequest) req);
- } else if (req instanceof DestroyReferenceRequest) {
- return getDestroyReferenceCommand((DestroyReferenceRequest) req);
- } else if (req instanceof DuplicateElementsRequest) {
- return getDuplicateCommand((DuplicateElementsRequest) req);
- } else if (req instanceof GetEditContextRequest) {
- return getEditContextCommand((GetEditContextRequest) req);
- } else if (req instanceof MoveRequest) {
- return getMoveCommand((MoveRequest) req);
- } else if (req instanceof ReorientReferenceRelationshipRequest) {
- return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
- } else if (req instanceof ReorientRelationshipRequest) {
- return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
- } else if (req instanceof SetRequest) {
- return getSetCommand((SetRequest) req);
- }
- return null;
- }
-
-
- protected Command getConfigureCommand(ConfigureRequest req) {
- return null;
- }
-
-
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- return getDefaultSemanticCommand(req, req.getElementType());
- }
-
-
- protected Command getCreateCommand(CreateElementRequest req) {
- if (req.getElementType().getEClass() == null) {
- return getDefaultSemanticCommand(req, req.getElementType());
- } else {
- return getDefaultSemanticCommand(req);
- }
- }
-
-
- protected Command getSetCommand(SetRequest req) {
- return null;
- }
-
-
- protected Command getEditContextCommand(GetEditContextRequest req) {
- return null;
- }
-
-
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return getDefaultSemanticCommand(req);
- }
-
-
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getDestroyReferenceCommand(req, req.getContainer());
- }
-
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req, Object context) {
- return getDefaultSemanticCommand(req, context);
- }
-
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- return null;
- }
-
-
- protected Command getMoveCommand(MoveRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
-
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- EObject context = req.getReferenceOwner();
- return getDefaultSemanticCommand(req, context);
- }
-
-
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (commandService == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Add new graphical end in request parameters
- View newView = (View) getHost().getModel();
- req.setParameter(RequestParameterConstants.EDGE_REORIENT_REQUEST_END_VIEW, newView);
-
- ICommand semanticCommand = commandService.getEditCommand(req);
-
- if ((semanticCommand != null) && (semanticCommand.canExecute())) {
- return getGEFWrapper(semanticCommand);
- }
- return UnexecutableCommand.INSTANCE;
- }
-
-
- protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
- }
-
- /**
- * Returns editing domain from the host edit part.
- *
- */
- protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).getEditingDomain();
- }
-
- private Command getDefaultSemanticCommand(IEditCommandRequest req) {
- return getDefaultSemanticCommand(req, null);
- }
-
- private Command getDefaultSemanticCommand(IEditCommandRequest req, Object context) {
- IElementEditService commandService;
- if (context != null) {
- commandService = ElementEditServiceUtils.getCommandProvider(context);
- } else {
- commandService = ElementEditServiceUtils.getCommandProvider(((IGraphicalEditPart) getHost()).resolveSemanticElement());
- }
-
- if (commandService == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- ICommand semanticCommand = commandService.getEditCommand(req);
-
- if ((semanticCommand != null) && (semanticCommand.canExecute())) {
- return getGEFWrapper(semanticCommand);
- }
- return UnexecutableCommand.INSTANCE;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011 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
+ * Vincent Lorenzo - bug 492522
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
+
+/**
+ * Non diagram-specific class replacing UMLBaseItemSemanticEditPolicy generated
+ * by GMF Tooling.
+ */
+public class DefaultSemanticEditPolicy extends SemanticEditPolicy {
+
+ public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
+
+ /**
+ * Extended request data key to hold editpart visual id.
+ * Add visual id of edited editpart to extended data of the request
+ * so command switch can decide what kind of diagram element is being edited.
+ * It is done in those cases when it's not possible to deduce diagram
+ * element kind from domain element.
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Command getCommand(Request request) {
+ if (request instanceof ReconnectRequest) {
+ Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
+ if (view instanceof View) {
+ request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
+ }
+ }
+ return super.getCommand(request);
+ }
+
+ @Override
+ protected Command getSemanticCommand(IEditCommandRequest request) {
+ IEditCommandRequest completedRequest = completeRequest(request);
+ Command semanticCommand = getSemanticCommandSwitch(completedRequest);
+ if (completedRequest instanceof DestroyRequest) {
+ DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
+ return shouldProceed(destroyRequest) ? semanticCommand : null;
+ }
+ return semanticCommand;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy#completeRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected IEditCommandRequest completeRequest(IEditCommandRequest request) {
+ IEditCommandRequest result = super.completeRequest(request);
+ if (result instanceof DestroyReferenceRequest) {
+ if (null == ((IGraphicalEditPart) getHost()).resolveSemanticElement()) {
+ if (getHost() instanceof ConnectionEditPart) {
+ ConnectionEditPart ep = (ConnectionEditPart) getHost();
+ if (ep.isSemanticConnection()) {
+ Object model = ep.getModel();
+ if (model instanceof Connector) {
+ String type = ((Connector) model).getType();
+ if (type != null) {
+ result.setParameter(RequestParameterConstants.VIEW_VISUAL_ID, type);
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
+ if (req instanceof CreateRelationshipRequest) {
+ return getCreateRelationshipCommand((CreateRelationshipRequest) req);
+ } else if (req instanceof CreateElementRequest) {
+ return getCreateCommand((CreateElementRequest) req);
+ } else if (req instanceof ConfigureRequest) {
+ return getConfigureCommand((ConfigureRequest) req);
+ } else if (req instanceof DestroyElementRequest) {
+ return getDestroyElementCommand((DestroyElementRequest) req);
+ } else if (req instanceof DestroyReferenceRequest) {
+ return getDestroyReferenceCommand((DestroyReferenceRequest) req);
+ } else if (req instanceof DuplicateElementsRequest) {
+ return getDuplicateCommand((DuplicateElementsRequest) req);
+ } else if (req instanceof GetEditContextRequest) {
+ return getEditContextCommand((GetEditContextRequest) req);
+ } else if (req instanceof MoveRequest) {
+ return getMoveCommand((MoveRequest) req);
+ } else if (req instanceof ReorientReferenceRelationshipRequest) {
+ return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
+ } else if (req instanceof ReorientRelationshipRequest) {
+ return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
+ } else if (req instanceof SetRequest) {
+ return getSetCommand((SetRequest) req);
+ }
+ return null;
+ }
+
+
+ protected Command getConfigureCommand(ConfigureRequest req) {
+ return null;
+ }
+
+
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ return getDefaultSemanticCommand(req, req.getElementType());
+ }
+
+
+ protected Command getCreateCommand(CreateElementRequest req) {
+ if (req.getElementType().getEClass() == null) {
+ return getDefaultSemanticCommand(req, req.getElementType());
+ } else {
+ return getDefaultSemanticCommand(req);
+ }
+ }
+
+
+ protected Command getSetCommand(SetRequest req) {
+ return null;
+ }
+
+
+ protected Command getEditContextCommand(GetEditContextRequest req) {
+ return null;
+ }
+
+
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ return getDefaultSemanticCommand(req);
+ }
+
+
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
+ return getDestroyReferenceCommand(req, req.getContainer());
+ }
+
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req, Object context) {
+ return getDefaultSemanticCommand(req, context);
+ }
+
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ return null;
+ }
+
+
+ protected Command getMoveCommand(MoveRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ EObject context = req.getReferenceOwner();
+ return getDefaultSemanticCommand(req, context);
+ }
+
+
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (commandService == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Add new graphical end in request parameters
+ View newView = (View) getHost().getModel();
+ req.setParameter(RequestParameterConstants.EDGE_REORIENT_REQUEST_END_VIEW, newView);
+
+ ICommand semanticCommand = commandService.getEditCommand(req);
+
+ if ((semanticCommand != null) && (semanticCommand.canExecute())) {
+ return getGEFWrapper(semanticCommand);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+
+ protected final Command getGEFWrapper(ICommand cmd) {
+ return new ICommandProxy(cmd);
+ }
+
+ /**
+ * Returns editing domain from the host edit part.
+ *
+ * @generated
+ */
+ protected TransactionalEditingDomain getEditingDomain() {
+ return ((IGraphicalEditPart) getHost()).getEditingDomain();
+ }
+
+ private Command getDefaultSemanticCommand(IEditCommandRequest req) {
+ return getDefaultSemanticCommand(req, null);
+ }
+
+ private Command getDefaultSemanticCommand(IEditCommandRequest req, Object context) {
+ try {
+ IClientContext clientContext = TypeContext.getContext(getEditingDomain());
+
+ IElementEditService commandService;
+ if (context != null) {
+ commandService = ElementEditServiceUtils.getCommandProvider(context, clientContext);
+ } else {
+ commandService = ElementEditServiceUtils.getCommandProvider(((IGraphicalEditPart) getHost()).resolveSemanticElement(), clientContext);
+ }
+
+ if (commandService != null) {
+ ICommand semanticCommand = commandService.getEditCommand(req);
+ if ((semanticCommand != null) && (semanticCommand.canExecute())) {
+ return getGEFWrapper(semanticCommand);
+ }
+ }
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java
index 3b1ea95de7d..133e63a9eaf 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java
@@ -21,7 +21,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
import org.eclipse.papyrus.infra.viewpoints.policy.DynamicContribution;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
@@ -59,8 +59,8 @@ public class DynamicDiagramsMenuContribution extends DynamicContribution {
// build a list of all the available prototypes
List<ViewPrototype> data = new ArrayList<ViewPrototype>();
- for (final ViewPrototype proto : PolicyChecker.getCurrent().getPrototypesFor(selection)) {
- if (!(proto.getConfiguration() instanceof PapyrusDiagram)) {
+ for (final ViewPrototype proto : PolicyChecker.getFor(selection).getPrototypesFor(selection)) {
+ if (!(proto.getRepresentationKind() instanceof PapyrusDiagram)) {
continue;
}
data.add(proto);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
index 02a8eb82dde..c72496a6e3c 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
@@ -1,139 +1,145 @@
-/*****************************************************************************
- * Copyright (c) 2013 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:
- * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.helper;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.commands.Activator;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-
-/**
- * Represents a prototype of GMF diagram for the viewpoints infrastructure
- *
- * @author Laurent Wouters
- */
-public class DiagramPrototype extends ViewPrototype {
- protected final String category;
- protected final AbstractPapyrusGmfCreateDiagramCommandHandler command;
-
- public DiagramPrototype(PapyrusView configuration, String category, AbstractPapyrusGmfCreateDiagramCommandHandler command) {
- super(configuration);
- this.category = category;
- this.command = command;
- }
-
- @Override
- public boolean instantiateOn(EObject owner) {
- return instantiateOn(owner, null);
- }
-
- @Override
- public boolean instantiateOn(EObject owner, String name) {
- ServicesRegistry registry;
- try {
- registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(owner);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return false;
- }
- ModelSet modelSet;
- try {
- modelSet = registry.getService(ModelSet.class);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return false;
- }
- Object result = command.createDiagram(modelSet, owner, owner, this, name);
- return (result != null);
- }
-
- @Override
- public boolean isOwnerReassignable() {
- // Users can always move diagrams that are part of their viewpoint
- return true;
- }
-
- @Override
- public Command getCommandChangeOwner(EObject view, final EObject target) {
- final Diagram diagram = (Diagram) view;
- final EObject previous = DiagramUtils.getOwner(diagram);
- return new AbstractCommand("Change diagram owner") {
- @Override
- public void execute() {
- DiagramUtils.setOwner(diagram, target);
- }
-
- @Override
- public void undo() {
- DiagramUtils.setOwner(diagram, previous);
- }
-
- @Override
- public void redo() {
- DiagramUtils.setOwner(diagram, target);
- }
-
- @Override
- protected boolean prepare() {
- return true;
- }
- };
- }
-
- @Override
- public Command getCommandChangeRoot(EObject view, final EObject target) {
- final Diagram diagram = (Diagram) view;
- final EObject previous = diagram.getElement();
- return new AbstractCommand("Change diagram root element") {
- @Override
- public void execute() {
- diagram.setElement(target);
- }
-
- @Override
- public void undo() {
- diagram.setElement(previous);
- }
-
- @Override
- public void redo() {
- diagram.setElement(target);
- }
-
- @Override
- protected boolean prepare() {
- return true;
- }
- };
- }
-
- @Override
- public EObject getOwnerOf(EObject view) {
- return DiagramUtils.getOwner((Diagram) view);
- }
-
- @Override
- public EObject getRootOf(EObject view) {
- return ((Diagram) view).getElement();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.commands.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents a prototype of GMF diagram for the viewpoints infrastructure
+ *
+ * @author Laurent Wouters
+ */
+public class DiagramPrototype extends ViewPrototype {
+ protected final String category;
+ protected final AbstractPapyrusGmfCreateDiagramCommandHandler command;
+
+ public DiagramPrototype(PapyrusDiagram configuration, String category, AbstractPapyrusGmfCreateDiagramCommandHandler command) {
+ super(configuration);
+ this.category = category;
+ this.command = command;
+ }
+
+ @Override
+ public boolean instantiateOn(EObject owner) {
+ return instantiateOn(owner, null);
+ }
+
+ @Override
+ public boolean instantiateOn(EObject owner, String name) {
+ ServicesRegistry registry;
+ try {
+ registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(owner);
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ return false;
+ }
+ ModelSet modelSet;
+ try {
+ modelSet = registry.getService(ModelSet.class);
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ return false;
+ }
+ Object result = command.createDiagram(modelSet, owner, owner, this, name);
+ return (result != null);
+ }
+
+ @Override
+ public boolean isOwnerReassignable() {
+ // Users can always move diagrams that are part of their viewpoint
+ return true;
+ }
+
+ @Override
+ public Command getCommandChangeOwner(EObject view, final EObject target) {
+ final Diagram diagram = (Diagram) view;
+ final EObject previous = DiagramUtils.getOwner(diagram);
+ return new AbstractCommand("Change diagram owner") {
+ @Override
+ public void execute() {
+ DiagramUtils.setOwner(diagram, target);
+ }
+
+ @Override
+ public void undo() {
+ DiagramUtils.setOwner(diagram, previous);
+ }
+
+ @Override
+ public void redo() {
+ DiagramUtils.setOwner(diagram, target);
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+ };
+ }
+
+ @Override
+ public Command getCommandChangeRoot(EObject view, final EObject target) {
+ final Diagram diagram = (Diagram) view;
+ final EObject previous = diagram.getElement();
+ return new AbstractCommand("Change diagram root element") {
+ @Override
+ public void execute() {
+ diagram.setElement(target);
+ }
+
+ @Override
+ public void undo() {
+ diagram.setElement(previous);
+ }
+
+ @Override
+ public void redo() {
+ diagram.setElement(target);
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+ };
+ }
+
+ @Override
+ public EObject getOwnerOf(EObject view) {
+ return DiagramUtils.getOwner((Diagram) view);
+ }
+
+ @Override
+ public EObject getRootOf(EObject view) {
+ return ((Diagram) view).getElement();
+ }
+
+ @Override
+ public PapyrusDiagram getRepresentationKind() {
+ return (PapyrusDiagram) representationKind;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
index 09901c33f95..da27db3b9b6 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
@@ -1,186 +1,100 @@
-/*****************************************************************************
- * Copyright (c) 2013 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:
- * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.helper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
-import org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-
-/**
- * Represents the dynamic contribution of a policy to menus
- *
- * @author Laurent Wouters
- */
-public class GMFDiagramViewTypeHelper implements IViewTypeHelper {
- /**
- * ID of the extension point for Papyrus diagrams
- */
- private static final String EXTENSION_PAPYRUS_DIAGRAM = "org.eclipse.papyrus.infra.ui.papyrusDiagram";
-
- private static class NakedViewPrototype extends DiagramPrototype {
- private final String label;
- private final String icon;
-
- public NakedViewPrototype(PapyrusView configuration, String category, AbstractPapyrusGmfCreateDiagramCommandHandler command, String label, String icon) {
- super(configuration, category, command);
- this.label = label;
- this.icon = icon;
- }
-
- @Override
- public String getLabel() {
- return label;
- }
-
- @Override
- public String getIconURI() {
- return icon;
- }
- }
-
- private static class Implementation {
- public final String name;
- public final String icon;
- public final String language;
- public final AbstractPapyrusGmfCreateDiagramCommandHandler command;
-
- public Implementation(String name, String icon, String language, AbstractPapyrusGmfCreateDiagramCommandHandler command) {
- this.name = name;
- this.icon = icon;
- this.language = language;
- this.command = command;
- }
- }
-
-
- /**
- * The cache of prototypes
- */
- private Map<PapyrusView, DiagramPrototype> cache;
-
- /**
- * The cache of implementations
- */
- private Map<String, Implementation> implementations;
-
- /**
- * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EClass)
- */
- @Override
- public boolean isSupported(EClass type) {
- return EcoreUtil.equals(type, ConfigurationPackage.eINSTANCE.getPapyrusDiagram());
- }
-
- /**
- * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EObject)
- */
- @Override
- public boolean isSupported(EObject view) {
- return (view instanceof Diagram);
- }
-
- /**
- * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeFor(org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView)
- */
- @Override
- public ViewPrototype getPrototypeFor(PapyrusView configuration) {
- if (!(configuration instanceof PapyrusDiagram)) {
- return null;
- }
- if (implementations == null) {
- buildImplementationCache();
- }
- if (cache == null) {
- cache = new HashMap<PapyrusView, DiagramPrototype>();
- }
- if (cache.containsKey(configuration)) {
- return cache.get(configuration);
- }
- if (!implementations.containsKey(configuration.getImplementationID())) {
- return null;
- }
- Implementation impl = implementations.get(configuration.getImplementationID());
- if (ViewPrototype.isNatural(configuration)) {
- NakedViewPrototype proto = new NakedViewPrototype(configuration, impl.language, impl.command, impl.name, impl.icon);
- cache.put(configuration, proto);
- return proto;
- } else {
- DiagramPrototype proto = new DiagramPrototype(configuration, impl.language, impl.command);
- cache.put(configuration, proto);
- return proto;
- }
- }
-
- /**
- * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeOf(org.eclipse.emf.ecore.EObject)
- */
- @Override
- public ViewPrototype getPrototypeOf(EObject view) {
- if (!(view instanceof Diagram)) {
- return null;
- }
- return DiagramUtils.getPrototype((Diagram) view);
- }
-
- /**
- * Builds the cache of metadata
- */
- private void buildImplementationCache() {
- implementations = new HashMap<String, Implementation>();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint(EXTENSION_PAPYRUS_DIAGRAM);
- IExtension[] extensions = point.getExtensions();
- for (int i = 0; i != extensions.length; i++) {
- IConfigurationElement[] elements = extensions[i].getConfigurationElements();
- for (int j = 0; j != elements.length; j++) {
- if (elements[j].getName().equals("creationCommand")) {
- try {
- Object obj = elements[j].createExecutableExtension("creationCommandClass");
- if (obj instanceof AbstractPapyrusGmfCreateDiagramCommandHandler) {
- AbstractPapyrusGmfCreateDiagramCommandHandler command = (AbstractPapyrusGmfCreateDiagramCommandHandler) obj;
- String label = elements[j].getAttribute("label");
- String icon = elements[j].getAttribute("icon");
- String language = elements[j].getAttribute("language");
- String implID = command.getCreatedDiagramType();
- if (!icon.startsWith("platform:/")) {
- icon = "platform:/plugin/" + extensions[i].getContributor().getName() + "/" + icon;
- }
- if (!implementations.containsKey(implID)) {
- implementations.put(implID, new Implementation(label, icon, language, command));
- }
- }
- } catch (CoreException e) {
- }
- }
- }
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents the dynamic contribution of a policy to menus
+ *
+ * @author Laurent Wouters
+ */
+public class GMFDiagramViewTypeHelper implements IViewTypeHelper {
+
+ /**
+ * The cache of prototypes
+ */
+ private Map<PapyrusDiagram, DiagramPrototype> cache;
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EClass)
+ */
+ @Override
+ public boolean isSupported(EClass type) {
+ return EcoreUtil.equals(type, RepresentationPackage.eINSTANCE.getPapyrusDiagram());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public boolean isSupported(EObject view) {
+ return (view instanceof Diagram);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeFor(org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusRepresentationKind)
+ */
+ @Override
+ public ViewPrototype getPrototypeFor(PapyrusRepresentationKind kind) {
+ if (!(kind instanceof PapyrusDiagram)) {
+ return null;
+ }
+ PapyrusDiagram diagramKind = (PapyrusDiagram) kind;
+ if (cache == null) {
+ cache = new HashMap<PapyrusDiagram, DiagramPrototype>();
+ }
+ if (cache.containsKey(diagramKind)) {
+ return cache.get(diagramKind);
+ }
+ String language = diagramKind.getLanguage().getId();
+ AbstractPapyrusGmfCreateDiagramCommandHandler command;
+ try {
+ Class<?> creationCommandClass = diagramKind.getCreationCommandClass();
+ command = (AbstractPapyrusGmfCreateDiagramCommandHandler) creationCommandClass.newInstance();
+ } catch (Exception e) {
+ Activator.log.error(e);
+ return null;
+ }
+ DiagramPrototype proto = new DiagramPrototype(diagramKind, language, command);
+ cache.put(diagramKind, proto);
+ return proto;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeOf(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public ViewPrototype getPrototypeOf(EObject view) {
+ if (!isSupported(view)) {
+ return null;
+ }
+ return DiagramUtils.getPrototype((Diagram) view);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/MaskLabelHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/MaskLabelHelper.java
index a4b53b02d0a..00fcbffe959 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/MaskLabelHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/MaskLabelHelper.java
@@ -1,76 +1,76 @@
-/*****************************************************************************
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.helper;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.NamedStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomStringStyleObservableList;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
-
-
-public class MaskLabelHelper {
-
-
- /**
- * Return the current mask values, or null if undefined
- *
- * @param view
- * @return
- */
- public static Collection<String> getMaskValues(View view) {
- EList<String> maskLabel = NotationUtils.getStringListValue(view, VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL, null);
- if (maskLabel != null) {
- CustomStringStyleObservableList values = new CustomStringStyleObservableList(view, EMFHelper.resolveEditingDomain(view), VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL);
- Set<String> result = new HashSet<String>(values);
- values.dispose();
- return result;
- }
- return null;
- }
-
- public static void setMaskValues(View view, Collection<String> masks) {
- CustomStringStyleObservableList values = new CustomStringStyleObservableList(view, EMFHelper.resolveEditingDomain(view), VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL);
- if (!values.isEmpty()) {
- values.clear();
- }
- values.addAll(masks);
- values.commit(null);
- values.dispose();
- }
-
- public static void unsetMaskValues(final View view) {
- final NamedStyle style = view.getNamedStyle(NotationPackage.eINSTANCE.getStringListValueStyle(), VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL);
- if (style == null) {
- return;
- }
-
- TransactionalEditingDomain editingDomain = (TransactionalEditingDomain) EMFHelper.resolveEditingDomain(view);
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain, "Restore default label configuration") {
-
- @Override
- protected void doExecute() {
- view.getStyles().remove(style);
- }
- });
- }
-
-}
+/*****************************************************************************
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomStringStyleObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+
+
+public class MaskLabelHelper {
+
+
+ /**
+ * Return the current mask values, or null if undefined
+ *
+ * @param view
+ * @return
+ */
+ public static Collection<String> getMaskValues(View view) {
+ EList<String> maskLabel = NotationUtils.getStringListValue(view, VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL, null);
+ if (maskLabel != null) {
+ CustomStringStyleObservableList values = new CustomStringStyleObservableList(view, EMFHelper.resolveEditingDomain(view), VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL);
+ Set<String> result = new HashSet<String>(values);
+ values.dispose();
+ return result;
+ }
+ return null;
+ }
+
+ public static void setMaskValues(View view, Collection<String> masks) {
+ CustomStringStyleObservableList values = new CustomStringStyleObservableList(view, EMFHelper.resolveEditingDomain(view), VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL);
+ if (!values.isEmpty()) {
+ values.clear();
+ }
+ values.addAll(masks);
+ values.commit(null);
+ values.dispose();
+ }
+
+ public static void unsetMaskValues(final View view) {
+ final NamedStyle style = view.getNamedStyle(NotationPackage.eINSTANCE.getStringListValueStyle(), VisualInformationPapyrusConstants.CUSTOM_MASK_LABEL);
+ if (style == null) {
+ return;
+ }
+
+ TransactionalEditingDomain editingDomain = (TransactionalEditingDomain) EMFHelper.resolveEditingDomain(view);
+ editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain, "Restore default label ") {
+
+ @Override
+ protected void doExecute() {
+ view.getStyles().remove(style);
+ }
+ });
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
index 6d66607296a..4c22e2b8f97 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
@@ -42,8 +42,8 @@ import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers;
-import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
/**
* Utilities method to manage notation models. Should be moved in a more
@@ -191,8 +191,8 @@ public class NotationUtils {
if (DiagramUtils.getOwner(diagram) == owner) {
return diagram;
}
- } else if (diagOrViewStyle instanceof PapyrusViewStyle) {
- PapyrusViewStyle viewStyle = (PapyrusViewStyle) diagOrViewStyle;
+ } else if (diagOrViewStyle instanceof PapyrusDiagramStyle) {
+ PapyrusDiagramStyle viewStyle = (PapyrusDiagramStyle) diagOrViewStyle;
if (viewStyle.getOwner() == owner) {
if (viewStyle.eContainer() instanceof Diagram) {
return (Diagram) viewStyle.eContainer();
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler_1_3_0.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler_1_3_0.java
new file mode 100644
index 00000000000..aa264d747a9
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramReconciler_1_3_0.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * 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:
+ * Maged Elaasar - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.reconciler;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.style.StyleFactory;
+import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
+
+/**
+ * Diagram reconciler form 1.2.0 to 1.3.0 that replaces the old PapyrusViewStyle
+ * by the new PapyrusDiagramStyle
+ */
+public abstract class DiagramReconciler_1_3_0 extends DiagramReconciler {
+
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ PapyrusViewStyle oldStyle = null;
+ for(Object obj : new ArrayList<Style>(diagram.getStyles())) {
+ if (obj instanceof PapyrusViewStyle) {
+ oldStyle = (PapyrusViewStyle) obj;
+ }
+ }
+
+ PapyrusDiagram diagramKind = getDiagramKind(diagram, oldStyle);
+
+ PapyrusDiagramStyle newStyle = null;
+ for(Object obj : new ArrayList<Style>(diagram.getStyles())) {
+ if (obj instanceof PapyrusDiagramStyle) {
+ newStyle = (PapyrusDiagramStyle) obj;
+ }
+ }
+
+ if (newStyle == null && diagramKind != null) {
+ newStyle = StyleFactory.eINSTANCE.createPapyrusDiagramStyle();
+ if (oldStyle != null)
+ newStyle.setOwner(oldStyle.getOwner());
+ else
+ newStyle.setOwner(diagram.getElement());
+ newStyle.setDiagramKind(diagramKind);
+ return new ReplacePapyrusViewStyleCommand(diagram, oldStyle, newStyle);
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the new diagram kind that based on the given diagram and its old PapyrusViewStyle
+ *
+ * @param diagram
+ * @param oldStyle
+ * @return
+ */
+ protected abstract PapyrusDiagram getDiagramKind(Diagram diagram, PapyrusViewStyle oldStyle);
+
+ /**
+ * A command to replace the old PapyrusViewStyle with the new PapyrusDiagramStyle
+ */
+ protected class ReplacePapyrusViewStyleCommand extends AbstractCommand {
+
+ private Diagram diagram;
+ private PapyrusViewStyle oldStyle;
+ private PapyrusDiagramStyle newStyle;
+
+ public ReplacePapyrusViewStyleCommand(Diagram diagram, PapyrusViewStyle oldStyle, PapyrusDiagramStyle newStyle) {
+ super("Replace the papyrus view style from 1.2.0 to 1.3.0");
+ this.diagram = diagram;
+ this.oldStyle = oldStyle;
+ this.newStyle = newStyle;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ int index = diagram.getStyles().indexOf(oldStyle);
+ if (index > -1) {
+ diagram.getStyles().remove(index);
+ diagram.getStyles().add(index, newStyle);
+ } else
+ diagram.getStyles().add(newStyle);
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public boolean canRedo() {
+ return false;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canRedo false"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canUndo false"); //$NON-NLS-1$
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramVersioningUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramVersioningUtils.java
index 4b29ab0c9bd..86b52d919ad 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramVersioningUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/DiagramVersioningUtils.java
@@ -1,200 +1,200 @@
-/*****************************************************************************
- * Copyright (c) 2011 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.common.reconciler;
-
-import java.util.StringTokenizer;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.StringValueStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
-
-/**
- * This class provide several convenience methods to tag a diagram with a version number
- * in a notation style, or retrieve this version number.
- */
-public class DiagramVersioningUtils {
-
- /**
- * Returns the "current" diagram version. Diagrams with this version don't require the reconciliation until the Papyrus version updates in such a
- * way that some diagram needs reconciliation.
- * <p/>
- * The current value returned by this method is "1.2.0".
- * <p/>
- * The value itself, howewer, should NOT be used outside of this package to avoid weird dependency issues. Instead, external code should use {@link DiagramVersioningUtils#stampCurrentVersion(Diagram)} and
- * {@link DiagramVersioningUtils#createStampCurrentVersionCommand(Diagram)}.
- * <p/>
- * This method is intentinally NOT a constant but indeed the method. This method is intentionally private and should NOT be made public.
- */
- private static String CURRENT_DIAGRAM_VERSION() {
- return "1.2.0"; //$NON-NLS-1$
- }
-
- /**
- * Directly marks the given diagram as either created with "current" Papyrus version or already reconciled to the "current" Papyrus version.
- * <p/>
- * It is guaranteed that {@link DiagramVersioningUtils#isOfCurrentPapyrusVersion(Diagram)} returns true immediately after the call to this method.
- *
- * @param diagram
- * diagram to stamp as "current"
- */
- public static void stampCurrentVersion(Diagram diagram) {
- setCompatibilityVersion(diagram, CURRENT_DIAGRAM_VERSION());
- }
-
- /**
- * Returns the command that will mark the given diagram as either created with "current" Papyrus version or already reconciled to the "current"
- * Papyrus version.
- * <p/>
- * It is guaranteed that {@link DiagramVersioningUtils#isOfCurrentPapyrusVersion(Diagram)} will returns true immediately after the execution of the command.
- *
- * @param diagram
- * @return the command that is guaranteed to be not null and executable
- */
- public static ICommand createStampCurrentVersionCommand(Diagram diagram) {
- StringValueStyle style = findOrCreateCompatibilityStyle(diagram);
- if (style.eContainer() == null) {
- style.setStringValue(CURRENT_DIAGRAM_VERSION());
- return new SetValueCommand(new SetRequest(diagram, NotationPackage.eINSTANCE.getView_Styles(), style));
- } else {
- return new SetValueCommand(new SetRequest(style, NotationPackage.eINSTANCE.getStringValueStyle_StringValue(), CURRENT_DIAGRAM_VERSION()));
- }
- }
-
- /**
- * The name of the {@link StringValueStyle} that defines actual diagram version.
- * <p/>
- * The value for this constant is "diagram_compatibility_version", it is intentionally the same as been used for SysML diagrams versioning.
- */
- public static final String COMPATIBILITY_VERSION = "diagram_compatibility_version";//$NON-NLS-1$
-
- /**
- * The version constant for the diagrams that does not have a {@link DiagramVersioningUtils#COMPATIBILITY_VERSION} style.
- * It may be assumed that these diagrams had been created before Papyrus 1.0.
- */
- public static final String UNDEFINED_VERSION = "undefined";//$NON-NLS-1$
-
- private static final String DELIM_VERSION = ".";//$NON-NLS-1$
-
- /**
- * Get the diagram compatibility version.
- *
- * @param view
- * the diagram
- * @return the compatibility version or {@link DiagramVersioningUtils#UNDEFINED_VERSION} if none stored. Never returns <code>null</code>.
- */
- public static String getCompatibilityVersion(View view) {
- StringValueStyle semanticStyle = (StringValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), COMPATIBILITY_VERSION);
- return semanticStyle == null ? UNDEFINED_VERSION : semanticStyle.getStringValue();
- }
-
- /**
- * Set the diagram compatibility version.
- *
- * @param diagram
- * the diagram
- * @param version
- * the compatibility version
- */
- @SuppressWarnings("unchecked")
- public static void setCompatibilityVersion(View view, String version) {
- StringValueStyle style = findOrCreateCompatibilityStyle(view);
- style.setStringValue(version);
- if (style.eContainer() == null) {
- view.getStyles().add(style);
- }
- }
-
- /**
- * Finds the existing style with {@link DiagramVersioningUtils#COMPATIBILITY_VERSION} name or creates a new one if none existing found.
- * Does NOT attach the new style to the instance, it is left as a caller responsibility.
- *
- * @param view
- * @return the existing or a new not-attached style with {@link DiagramVersioningUtils#COMPATIBILITY_VERSION} name. Called can determine the case
- * by checking {@link EObject#eContainer()} which is guaranteed to be null in case if new object had been created
- */
- private static StringValueStyle findOrCreateCompatibilityStyle(View view) {
- StringValueStyle style = (StringValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), COMPATIBILITY_VERSION);
- if (style == null) {
- style = NotationFactory.eINSTANCE.createStringValueStyle();
- style.setName(COMPATIBILITY_VERSION);
- }
- return style;
- }
-
- /**
- * Checks whether the diagram is of "current", last released type.
- */
- public static boolean isOfCurrentPapyrusVersion(Diagram diagram) {
- return isCurrentPapyrusVersion(getCompatibilityVersion(diagram));
- }
-
- /**
- * Checks whether the given string represent the current papyrus version without telling explicitly what the current version is.
- *
- * @param version
- * version to check
- * @return
- */
- public static boolean isCurrentPapyrusVersion(String version) {
- return CURRENT_DIAGRAM_VERSION().equals(version);
- }
-
- /**
- * Compare to version number.
- * The test is done only on the first 2 segments of a version.
- * The two String should have the same number of segments (i.e: 0.9.2 and 1.1.0).
- *
- * @param referenceVersion
- * Version that is the reference for the test
- * @param testedVersion
- * the version that is compare to the reference.
- * @return true if the tested Version is before the reference Version .
- * false by default.
- */
- public static boolean isBeforeVersion(String referenceVersion, String testedVersion) {
- boolean before = false;
-
- StringTokenizer targetVersionTokenizer = new StringTokenizer(referenceVersion, DELIM_VERSION);
- StringTokenizer sourceVersionTokenizer = new StringTokenizer(testedVersion, DELIM_VERSION);
- try {
- if (targetVersionTokenizer.countTokens() == sourceVersionTokenizer.countTokens()) {// Check if the format is the same for the 2 Strings
- int targetMainVersion = Integer.parseInt(targetVersionTokenizer.nextToken());// get the first number
- int sourceMainVersion = Integer.parseInt(sourceVersionTokenizer.nextToken());
- if (targetMainVersion == sourceMainVersion) {// if main versions are the same check the intermediate version
- int targetIntermediateVersion = Integer.parseInt(targetVersionTokenizer.nextToken());// get the second number
- int sourceIntermediateVersion = Integer.parseInt(sourceVersionTokenizer.nextToken());
- before = (targetIntermediateVersion > sourceIntermediateVersion);
-
-
- } else {
- before = (targetMainVersion > sourceMainVersion);
- }
- }
-
- } catch (NumberFormatException e) {
- Activator.log.error(e);
- }
-
- return before;
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011 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.common.reconciler;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+
+/**
+ * This class provide several convenience methods to tag a diagram with a version number
+ * in a notation style, or retrieve this version number.
+ */
+public class DiagramVersioningUtils {
+
+ /**
+ * Returns the "current" diagram version. Diagrams with this version don't require the reconciliation until the Papyrus version updates in such a
+ * way that some diagram needs reconciliation.
+ * <p/>
+ * The current value returned by this method is "1.3.0".
+ * <p/>
+ * The value itself, howewer, should NOT be used outside of this package to avoid weird dependency issues. Instead, external code should use {@link DiagramVersioningUtils#stampCurrentVersion(Diagram)} and
+ * {@link DiagramVersioningUtils#createStampCurrentVersionCommand(Diagram)}.
+ * <p/>
+ * This method is intentinally NOT a constant but indeed the method. This method is intentionally private and should NOT be made public.
+ */
+ private static String CURRENT_DIAGRAM_VERSION() {
+ return "1.3.0"; //$NON-NLS-1$
+ }
+
+ /**
+ * Directly marks the given diagram as either created with "current" Papyrus version or already reconciled to the "current" Papyrus version.
+ * <p/>
+ * It is guaranteed that {@link DiagramVersioningUtils#isOfCurrentPapyrusVersion(Diagram)} returns true immediately after the call to this method.
+ *
+ * @param diagram
+ * diagram to stamp as "current"
+ */
+ public static void stampCurrentVersion(Diagram diagram) {
+ setCompatibilityVersion(diagram, CURRENT_DIAGRAM_VERSION());
+ }
+
+ /**
+ * Returns the command that will mark the given diagram as either created with "current" Papyrus version or already reconciled to the "current"
+ * Papyrus version.
+ * <p/>
+ * It is guaranteed that {@link DiagramVersioningUtils#isOfCurrentPapyrusVersion(Diagram)} will returns true immediately after the execution of the command.
+ *
+ * @param diagram
+ * @return the command that is guaranteed to be not null and executable
+ */
+ public static ICommand createStampCurrentVersionCommand(Diagram diagram) {
+ StringValueStyle style = findOrCreateCompatibilityStyle(diagram);
+ if (style.eContainer() == null) {
+ style.setStringValue(CURRENT_DIAGRAM_VERSION());
+ return new SetValueCommand(new SetRequest(diagram, NotationPackage.eINSTANCE.getView_Styles(), style));
+ } else {
+ return new SetValueCommand(new SetRequest(style, NotationPackage.eINSTANCE.getStringValueStyle_StringValue(), CURRENT_DIAGRAM_VERSION()));
+ }
+ }
+
+ /**
+ * The name of the {@link StringValueStyle} that defines actual diagram version.
+ * <p/>
+ * The value for this constant is "diagram_compatibility_version", it is intentionally the same as been used for SysML diagrams versioning.
+ */
+ public static final String COMPATIBILITY_VERSION = "diagram_compatibility_version";//$NON-NLS-1$
+
+ /**
+ * The version constant for the diagrams that does not have a {@link DiagramVersioningUtils#COMPATIBILITY_VERSION} style.
+ * It may be assumed that these diagrams had been created before Papyrus 1.0.
+ */
+ public static final String UNDEFINED_VERSION = "undefined";//$NON-NLS-1$
+
+ private static final String DELIM_VERSION = ".";//$NON-NLS-1$
+
+ /**
+ * Get the diagram compatibility version.
+ *
+ * @param view
+ * the diagram
+ * @return the compatibility version or {@link DiagramVersioningUtils#UNDEFINED_VERSION} if none stored. Never returns <code>null</code>.
+ */
+ public static String getCompatibilityVersion(View view) {
+ StringValueStyle semanticStyle = (StringValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), COMPATIBILITY_VERSION);
+ return semanticStyle == null ? UNDEFINED_VERSION : semanticStyle.getStringValue();
+ }
+
+ /**
+ * Set the diagram compatibility version.
+ *
+ * @param diagram
+ * the diagram
+ * @param version
+ * the compatibility version
+ */
+ @SuppressWarnings("unchecked")
+ public static void setCompatibilityVersion(View view, String version) {
+ StringValueStyle style = findOrCreateCompatibilityStyle(view);
+ style.setStringValue(version);
+ if (style.eContainer() == null) {
+ view.getStyles().add(style);
+ }
+ }
+
+ /**
+ * Finds the existing style with {@link DiagramVersioningUtils#COMPATIBILITY_VERSION} name or creates a new one if none existing found.
+ * Does NOT attach the new style to the instance, it is left as a caller responsibility.
+ *
+ * @param view
+ * @return the existing or a new not-attached style with {@link DiagramVersioningUtils#COMPATIBILITY_VERSION} name. Called can determine the case
+ * by checking {@link EObject#eContainer()} which is guaranteed to be null in case if new object had been created
+ */
+ private static StringValueStyle findOrCreateCompatibilityStyle(View view) {
+ StringValueStyle style = (StringValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), COMPATIBILITY_VERSION);
+ if (style == null) {
+ style = NotationFactory.eINSTANCE.createStringValueStyle();
+ style.setName(COMPATIBILITY_VERSION);
+ }
+ return style;
+ }
+
+ /**
+ * Checks whether the diagram is of "current", last released type.
+ */
+ public static boolean isOfCurrentPapyrusVersion(Diagram diagram) {
+ return isCurrentPapyrusVersion(getCompatibilityVersion(diagram));
+ }
+
+ /**
+ * Checks whether the given string represent the current papyrus version without telling explicitly what the current version is.
+ *
+ * @param version
+ * version to check
+ * @return
+ */
+ public static boolean isCurrentPapyrusVersion(String version) {
+ return CURRENT_DIAGRAM_VERSION().equals(version);
+ }
+
+ /**
+ * Compare to version number.
+ * The test is done only on the first 2 segments of a version.
+ * The two String should have the same number of segments (i.e: 0.9.2 and 1.1.0).
+ *
+ * @param referenceVersion
+ * Version that is the reference for the test
+ * @param testedVersion
+ * the version that is compare to the reference.
+ * @return true if the tested Version is before the reference Version .
+ * false by default.
+ */
+ public static boolean isBeforeVersion(String referenceVersion, String testedVersion) {
+ boolean before = false;
+
+ StringTokenizer targetVersionTokenizer = new StringTokenizer(referenceVersion, DELIM_VERSION);
+ StringTokenizer sourceVersionTokenizer = new StringTokenizer(testedVersion, DELIM_VERSION);
+ try {
+ if (targetVersionTokenizer.countTokens() == sourceVersionTokenizer.countTokens()) {// Check if the format is the same for the 2 Strings
+ int targetMainVersion = Integer.parseInt(targetVersionTokenizer.nextToken());// get the first number
+ int sourceMainVersion = Integer.parseInt(sourceVersionTokenizer.nextToken());
+ if (targetMainVersion == sourceMainVersion) {// if main versions are the same check the intermediate version
+ int targetIntermediateVersion = Integer.parseInt(targetVersionTokenizer.nextToken());// get the second number
+ int sourceIntermediateVersion = Integer.parseInt(sourceVersionTokenizer.nextToken());
+ before = (targetIntermediateVersion > sourceIntermediateVersion);
+
+
+ } else {
+ before = (targetMainVersion > sourceMainVersion);
+ }
+ }
+
+ } catch (NumberFormatException e) {
+ Activator.log.error(e);
+ }
+
+ return before;
+ }
+
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java
index addfeb98d2b..1a4797f0b71 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java
@@ -18,7 +18,6 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -26,14 +25,16 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Style;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureViewpoint;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramPrototype;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
-import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
-import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
/**
* Utilities for the management of configuration-related data on views and diagrams
@@ -80,7 +81,7 @@ public class DiagramUtils {
* @return The diagram's owner
*/
public static EObject getOwner(Diagram diagram) {
- PapyrusViewStyle pvs = getPapyrusViewStyle(diagram);
+ PapyrusDiagramStyle pvs = getPapyrusDiagramStyle(diagram);
if (pvs != null) {
EObject value = pvs.getOwner();
if (value != null) {
@@ -100,25 +101,25 @@ public class DiagramUtils {
* The new diagram's owner
*/
public static void setOwner(Diagram diagram, EObject owner) {
- PapyrusViewStyle pvs = getPapyrusViewStyle(diagram);
+ PapyrusDiagramStyle pvs = getPapyrusDiagramStyle(diagram);
if (pvs != null) {
pvs.setOwner(owner);
} else {
- pvs = (PapyrusViewStyle) diagram.createStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ pvs = (PapyrusDiagramStyle) diagram.createStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
pvs.setOwner(owner);
}
}
/**
- * Returns the PapyrusViewStyle owned by this diagram (if any)
+ * Returns the PapyrusRepresentationStyle owned by this diagram (if any)
*
* @param diagram
* @return
*/
- public static final PapyrusViewStyle getPapyrusViewStyle(Diagram diagram) {
+ public static final PapyrusDiagramStyle getPapyrusDiagramStyle(Diagram diagram) {
for (Style ownedStyle : (List<Style>) diagram.getStyles()) { // Access all styles directly to avoid CSS computation, and use instanceof (Rather than reflexive EMF)
- if (ownedStyle instanceof PapyrusViewStyle) {
- return (PapyrusViewStyle) ownedStyle;
+ if (ownedStyle instanceof PapyrusDiagramStyle) {
+ return (PapyrusDiagramStyle) ownedStyle;
}
}
return null;
@@ -136,19 +137,21 @@ public class DiagramUtils {
* @return The diagram's prototype
*/
public static ViewPrototype getPrototype(Diagram diagram) {
- PapyrusViewStyle pvs = getPapyrusViewStyle(diagram);
- if (pvs != null) {
- PapyrusView diagramConfig = pvs.getConfiguration();
+ PolicyChecker checker = PolicyChecker.getFor(diagram);
+ PapyrusDiagramStyle pvs = getPapyrusDiagramStyle(diagram);
+ if (pvs != null) {
+ PapyrusRepresentationKind repKind = pvs.getDiagramKind();
// Check if the selected viewpoint contains the diagram model kind
- if (diagramConfig != null) {
- if (PolicyChecker.getCurrent().isInViewpoint(diagramConfig)) {
- return ViewPrototype.get(diagramConfig);
+ if (repKind != null) {
+
+ if (checker.isInViewpoint(repKind)) {
+ return ViewPrototype.get(repKind);
}
// Check if the selected viewpoint contains an ancestor of the diagram model kind
- PapyrusView diagramParentView = diagramConfig.getParent();
- while (diagramParentView != null && !PolicyChecker.getCurrent().isInViewpoint(diagramParentView)) {
+ PapyrusRepresentationKind diagramParentView = repKind.getParent();
+ while (diagramParentView != null && !checker.isInViewpoint(diagramParentView)) {
diagramParentView = diagramParentView.getParent();
}
if (diagramParentView != null) {
@@ -156,58 +159,51 @@ public class DiagramUtils {
}
// Check if the selected viewpoint contains a descendant of the diagram model kind
- String diagramConfigName = diagramConfig.getName();
+ String diagramConfigName = repKind.getName();
if (diagramConfigName != null) { // the model kind name is used as a "semantic" key to test equality
- EList<ModelKind> modelKinds = PolicyChecker.getCurrent().getViewpoint().getModelKinds();
- for (ModelKind modelKind : modelKinds) {
- if (modelKind instanceof PapyrusView) {
- PapyrusView papyrusView = (PapyrusView) modelKind;
-
- if (diagramConfigName.equals(papyrusView.getName())) {
- ViewPrototype.get(papyrusView);
- }
-
- PapyrusView parentPapyrusView = papyrusView.getParent();
- while (parentPapyrusView != null && !diagramConfigName.equals(parentPapyrusView.getName())) {
- parentPapyrusView = parentPapyrusView.getParent();
- }
- if (parentPapyrusView != null) {
- return ViewPrototype.get(papyrusView);
+ for (MergedArchitectureViewpoint viewpoint : checker.getViewpoints()) {
+ for (RepresentationKind representationKind : viewpoint.getRepresentationKinds()) {
+ if (representationKind instanceof PapyrusRepresentationKind) {
+ PapyrusRepresentationKind papyrusRepresentationKind = (PapyrusRepresentationKind) representationKind;
+
+ if (diagramConfigName.equals(papyrusRepresentationKind.getName())) {
+ ViewPrototype.get(papyrusRepresentationKind);
+ }
+
+ PapyrusRepresentationKind parentPapyrusRepresentationKind = papyrusRepresentationKind.getParent();
+ while (parentPapyrusRepresentationKind != null && !diagramConfigName.equals(parentPapyrusRepresentationKind.getName())) {
+ parentPapyrusRepresentationKind = parentPapyrusRepresentationKind.getParent();
+ }
+ if (parentPapyrusRepresentationKind != null) {
+ return ViewPrototype.get(papyrusRepresentationKind);
+ }
}
}
}
}
}
-
- return ViewPrototype.get(diagram.getType(), pvs.getOwner(), diagram.getElement());
- }
- // This is the legacy fallback for old diagrams
- if ("Package".equals(diagram.getType())) {
- for (ViewPrototype prototype : PolicyChecker.getCurrent().getAllPrototypes()) {
- if ("UML Package Diagram".equals(prototype.getLabel())) {
- return prototype;
- }
- }
+ return ViewPrototype.get(checker, diagram.getType(), pvs.getOwner(), diagram.getElement());
+ } else {
+ return ViewPrototype.get(checker, diagram.getType(), diagram.getElement(), diagram.getElement());
}
- return ViewPrototype.get(diagram.getType(), diagram.getElement(), diagram.getElement());
}
-
+
/**
* Sets the prototype of a diagram
*
* @param diagram
* A diagram
- * @param configuration
+ * @param prototype
* The new diagram's prototype
*/
- public static void setPrototype(Diagram diagram, ViewPrototype prototype) {
- PapyrusViewStyle pvs = getPapyrusViewStyle(diagram);
+ public static void setPrototype(Diagram diagram, DiagramPrototype prototype) {
+ PapyrusDiagramStyle pvs = getPapyrusDiagramStyle(diagram);
if (pvs != null) {
- pvs.setConfiguration(prototype.getConfiguration());
+ pvs.setDiagramKind(prototype.getRepresentationKind());
} else {
- pvs = (PapyrusViewStyle) diagram.createStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
- pvs.setConfiguration(prototype.getConfiguration());
+ pvs = (PapyrusDiagramStyle) diagram.createStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
+ pvs.setDiagramKind(prototype.getRepresentationKind());
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF
index 35c570d064d..1aea47c3fbc 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/META-INF/MANIFEST.MF
@@ -4,7 +4,9 @@ Require-Bundle: org.eclipse.papyrus.infra.hyperlink;bundle-version="[3.0.0,4.0.0
org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable.representation;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.hyperlink,
org.eclipse.papyrus.infra.gmfdiag.hyperlink.editpolicies,
org.eclipse.papyrus.infra.gmfdiag.hyperlink.helper,
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperlinkNavigationMenuEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperlinkNavigationMenuEditPolicy.java
index 5d2401622c4..e3b7764f7a6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperlinkNavigationMenuEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink/src/org/eclipse/papyrus/infra/gmfdiag/hyperlink/editpolicies/HyperlinkNavigationMenuEditPolicy.java
@@ -47,6 +47,8 @@ import org.eclipse.papyrus.infra.gmfdiag.hyperlink.Activator;
import org.eclipse.papyrus.infra.gmfdiag.hyperlink.messages.Messages;
import org.eclipse.papyrus.infra.gmfdiag.navigation.editpolicy.NavigationEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.navigation.menu.button.HyperlinkButton;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
import org.eclipse.papyrus.infra.hyperlink.helper.AbstractHyperLinkHelper;
import org.eclipse.papyrus.infra.hyperlink.helper.HyperLinkHelperFactory;
import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkDocument;
@@ -56,16 +58,14 @@ import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkWeb;
import org.eclipse.papyrus.infra.hyperlink.ui.HyperLinkManagerShell;
import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkException;
import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkHelpersRegistrationUtil;
+import org.eclipse.papyrus.infra.nattable.representation.PapyrusSyncTable;
+import org.eclipse.papyrus.infra.nattable.representation.PapyrusTable;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.ui.editorsfactory.IPageIconsRegistry;
import org.eclipse.papyrus.infra.ui.editorsfactory.PageIconsRegistry;
import org.eclipse.papyrus.infra.ui.util.EditorHelper;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -251,10 +251,10 @@ public class HyperlinkNavigationMenuEditPolicy extends NavigationEditPolicy {
List<ViewPrototype> diagramPrototypes = new ArrayList<ViewPrototype>();
List<ViewPrototype> tablePrototypes = new ArrayList<ViewPrototype>();
- for (final ViewPrototype proto : PolicyChecker.getCurrent().getPrototypesFor(selection)) {
- if (proto.getConfiguration() instanceof PapyrusDiagram) {
+ for (final ViewPrototype proto : PolicyChecker.getFor(selection).getPrototypesFor(selection)) {
+ if (proto.getRepresentationKind() instanceof PapyrusDiagram) {
diagramPrototypes.add(proto);
- } else if (proto.getConfiguration() instanceof PapyrusTable || proto.getConfiguration() instanceof PapyrusSyncTable) {
+ } else if (proto.getRepresentationKind() instanceof PapyrusTable || proto.getRepresentationKind() instanceof PapyrusSyncTable) {
tablePrototypes.add(proto);
}
}
@@ -337,9 +337,9 @@ public class HyperlinkNavigationMenuEditPolicy extends NavigationEditPolicy {
// Gets the container
EObject container = null;
for (EObject createdObject : usagesAfter) {
- if (createdObject instanceof PapyrusViewStyle) {
+ if (createdObject instanceof PapyrusDiagramStyle) {
// Add it to hyperLink
- PapyrusViewStyle viewStyle = (PapyrusViewStyle) createdObject;
+ PapyrusDiagramStyle viewStyle = (PapyrusDiagramStyle) createdObject;
container = viewStyle.eContainer();
} else if (null == container) {
container = createdObject;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/plugin.xml
index afdc08c6f1d..cefdde03711 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/plugin.xml
@@ -52,6 +52,10 @@
<menuContribution
allPopups="false"
locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?before=newelements">
+ <separator
+ name="navigat"
+ visible="true">
+ </separator>
<menu
id="org.eclipse.papyrus.infra.services.navigation.ui.popup.navigate"
label="Navigate"
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
index 76b8f339ba2..575dc5bd3d9 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Require-Bundle: org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3
org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.papyrus.infra.internationalization;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.papyrus.infra.internationalization;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="1.0.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.papyrus.infra.gmfdiag.properties.constraint"
Bundle-Version: 3.0.0.qualifier
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt
index db294948335..107e12ea6aa 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt
@@ -12,7 +12,7 @@
</Composite.layout>
<ppe:StringEditor input="{Binding}" property="notation:Diagram:name"></ppe:StringEditor>
<ppe:StringEditor input="{Binding}" property="notation:Diagram:label"></ppe:StringEditor>
- <ppe:ReferenceLabel input="{Binding}" property="notation:View:prototype" readOnly="true" customLabel="View Type"></ppe:ReferenceLabel>
+ <ppe:ReferenceLabel input="{Binding}" property="notation:View:prototype" readOnly="true" customLabel="Diagram Kind"></ppe:ReferenceLabel>
<ppe:ReferenceDialog input="{Binding}" property="notation:View:owner" customLabel="Owner"></ppe:ReferenceDialog>
<ppe:ReferenceDialog input="{Binding}" property="notation:View:element" customLabel="Root element"></ppe:ReferenceDialog>
</Composite>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java
index 4d4cefbddf0..e330f098c10 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java
@@ -39,12 +39,12 @@ import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.DiagramLabelObse
import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.GradientObservableValue;
import org.eclipse.papyrus.infra.gmfdiag.properties.provider.ModelContentProvider;
import org.eclipse.papyrus.infra.gmfdiag.properties.util.LegacyOwnerObservable;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
import org.eclipse.papyrus.infra.internationalization.utils.utils.InternationalizationConstants;
import org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.swt.graphics.Image;
@@ -102,18 +102,18 @@ public class GMFModelElement extends EMFModelElement {
return new DiagramLabelObservableValue(diagram, getDomain());
}else if (propertyPath.endsWith("owner")) {
Diagram diagram = (Diagram) source;
- Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
if (style != null) {
- return new GMFObservableValue(style, StylePackage.Literals.PAPYRUS_VIEW_STYLE__OWNER, domain);
+ return new GMFObservableValue(style, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, domain);
}
- return new LegacyOwnerObservable(diagram, StylePackage.Literals.PAPYRUS_VIEW_STYLE__OWNER, domain);
+ return new LegacyOwnerObservable(diagram, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, domain);
} else if (propertyPath.endsWith("prototype")) {
Diagram diagram = (Diagram) source;
- Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
if (style != null) {
- return new GMFObservableValue(style, StylePackage.Literals.PAPYRUS_VIEW_STYLE__CONFIGURATION, domain);
+ return new GMFObservableValue(style, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND, domain);
}
- return new LegacyOwnerObservable(diagram, StylePackage.Literals.PAPYRUS_VIEW_STYLE__CONFIGURATION, domain);
+ return new LegacyOwnerObservable(diagram, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND, domain);
}
FeaturePath featurePath = getFeaturePath(propertyPath);
@@ -191,7 +191,7 @@ public class GMFModelElement extends EMFModelElement {
@Override
protected boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype) {
- return PolicyChecker.getCurrent().canHaveNewView(selection, DiagramUtils.getOwner(diagram), prototype);
+ return PolicyChecker.getFor(diagram).canHaveNewView(selection, DiagramUtils.getOwner(diagram), prototype);
}
};
} else {
@@ -203,7 +203,7 @@ public class GMFModelElement extends EMFModelElement {
@Override
protected boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype) {
- return (PolicyChecker.getCurrent().getOwningRuleFor(prototype, selection) != null);
+ return (PolicyChecker.getFor(diagram).getOwningRuleFor(prototype, selection) != null);
}
};
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java
index 355f8ca0f3d..90236947f3c 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java
@@ -1,89 +1,89 @@
-/*****************************************************************************
- * Copyright (c) 2013 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:
- * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.properties.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ui.ECoreModelContentProvider;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
-import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
-
-/**
- * Represents a simple ECore model content provider for the selection of a diagram's root model element
- *
- * @author Laurent Wouters
- */
-public abstract class ModelContentProvider extends ECoreModelContentProvider implements IStaticContentProvider, IHierarchicContentProvider {
-
- /**
- * The diagram
- */
- private Diagram diagram;
-
- /**
- * Initializes the provider with the given root
- *
- * @param diagram
- * The diagram for which a root model element is to be provided
- * @param root
- * The root object
- */
- public ModelContentProvider(Diagram diagram, EObject root) {
- super(root);
- this.diagram = diagram;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider#getElements()
- */
- public Object[] getElements() {
- return getElements(null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider#isValidValue(java.lang.Object)
- */
- public boolean isValidValue(Object element) {
- if (element == null) {
- return false;
- }
- if (!(element instanceof EObject)) {
- return false;
- }
- ViewPrototype prototype = DiagramUtils.getPrototype(diagram);
- if (prototype == null) {
- return false;
- }
- return isValid((EObject) element, diagram, prototype);
- }
-
- /**
- * Determines whether the selection is valid
- *
- * @param selection
- * The selection
- * @param diagram
- * The diagram
- * @param prototype
- * The diagram's prototype
- * @return <code>true</code> if the selection is valid
- */
- protected abstract boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype);
-}
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.properties.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.ui.emf.utils.EcoreModelContentProvider;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * Represents a simple ECore model content provider for the selection of a diagram's root model element
+ *
+ * @author Laurent Wouters
+ */
+public abstract class ModelContentProvider extends EcoreModelContentProvider implements IStaticContentProvider, IHierarchicContentProvider {
+
+ /**
+ * The diagram
+ */
+ private Diagram diagram;
+
+ /**
+ * Initializes the provider with the given root
+ *
+ * @param diagram
+ * The diagram for which a root model element is to be provided
+ * @param root
+ * The root object
+ */
+ public ModelContentProvider(Diagram diagram, EObject root) {
+ super(root);
+ this.diagram = diagram;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider#getElements()
+ */
+ public Object[] getElements() {
+ return getElements(null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider#isValidValue(java.lang.Object)
+ */
+ public boolean isValidValue(Object element) {
+ if (element == null) {
+ return false;
+ }
+ if (!(element instanceof EObject)) {
+ return false;
+ }
+ ViewPrototype prototype = DiagramUtils.getPrototype(diagram);
+ if (prototype == null) {
+ return false;
+ }
+ return isValid((EObject) element, diagram, prototype);
+ }
+
+ /**
+ * Determines whether the selection is valid
+ *
+ * @param selection
+ * The selection
+ * @param diagram
+ * The diagram
+ * @param prototype
+ * The diagram's prototype
+ * @return <code>true</code> if the selection is valid
+ */
+ protected abstract boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype);
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java
index 6457df798b8..5ebc400a727 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java
@@ -29,8 +29,8 @@ import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.Style;
import org.eclipse.papyrus.infra.gmfdiag.common.databinding.GMFObservableValue;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
import org.eclipse.papyrus.infra.services.edit.ui.databinding.PapyrusObservableValue;
-import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
/**
* Represents the observable value of a diagram's owner in the case where the diagram does not yet have the viewpoints-compatible style for holding the value itself
@@ -85,7 +85,7 @@ public class LegacyOwnerObservable extends AbstractObservableValue {
if (valueListener != null) {
return;
}
- Style style = LegacyOwnerObservable.this.diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ Style style = LegacyOwnerObservable.this.diagram.getStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
if (style != null) {
buildValueListener(style);
}
@@ -159,7 +159,7 @@ public class LegacyOwnerObservable extends AbstractObservableValue {
@Override
public void execute() {
- Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
createStyle = (style == null);
DiagramUtils.setOwner(diagram, newValue);
}
@@ -172,7 +172,7 @@ public class LegacyOwnerObservable extends AbstractObservableValue {
@Override
public void undo() {
if (createStyle) {
- Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE);
diagram.getStyles().remove(style);
} else {
DiagramUtils.setOwner(diagram, oldValue);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.classpath
new file mode 100644
index 00000000000..2534a1484b3
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <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="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.project
new file mode 100644
index 00000000000..c943d83aff9
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.representation.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..c50a4993065
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.representation.edit;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.representation.provider.RepresentationEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.representation.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.gmfdiag.representation;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.architecture;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.architecture.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.types;visibility:=reexport,
+ org.eclipse.papyrus.infra.types.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.architecture.representation;visibility:=reexport,
+ org.eclipse.papyrus.infra.architecture.representation.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/about.html
new file mode 100755
index 00000000000..6e189dc4483
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/build.properties
new file mode 100644
index 00000000000..d28fe0d0f2e
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/build.properties
@@ -0,0 +1,21 @@
+# 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
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Maged Elaasar - Initial API and implementation
+#
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/,\
+ src/
+output.. = bin/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateArchitectureDescriptionLanguage_representationKinds_PapyrusDiagram.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateArchitectureDescriptionLanguage_representationKinds_PapyrusDiagram.gif
new file mode 100644
index 00000000000..e81c185d38b
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateArchitectureDescriptionLanguage_representationKinds_PapyrusDiagram.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.gif
new file mode 100644
index 00000000000..a6fdabb17b6
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_assistantRules_AssistantRule.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_assistantRules_AssistantRule.gif
new file mode 100644
index 00000000000..7786614d63c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_assistantRules_AssistantRule.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.gif
new file mode 100644
index 00000000000..c4ab84666a9
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.gif
new file mode 100644
index 00000000000..07f63f9f843
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/AssistantRule.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/AssistantRule.gif
new file mode 100644
index 00000000000..dbad2213d36
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/AssistantRule.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/ChildRule.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/ChildRule.gif
new file mode 100644
index 00000000000..e5f7f2715b7
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/ChildRule.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PaletteRule.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PaletteRule.gif
new file mode 100644
index 00000000000..701d962b191
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PaletteRule.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PapyrusDiagram.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PapyrusDiagram.gif
new file mode 100644
index 00000000000..861fddb5f4a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PapyrusDiagram.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PathElement.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PathElement.gif
new file mode 100644
index 00000000000..c4295364c97
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/icons/full/obj16/PathElement.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.properties
new file mode 100644
index 00000000000..a5ff4549eeb
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.properties
@@ -0,0 +1,50 @@
+# 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
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Maged Elaasar - Initial API and implementation
+#
+#
+
+pluginName = GMF Representation Edit Support
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_PapyrusDiagram_type = Papyrus Diagram
+_UI_ChildRule_type = Child Rule
+_UI_PaletteRule_type = Palette Rule
+_UI_PathElement_type = Path Element
+_UI_AssistantRule_type = Assistant Rule
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_PapyrusDiagram_customPalette_feature = Custom Palette
+_UI_PapyrusDiagram_customStyle_feature = Custom Style
+_UI_PapyrusDiagram_childRules_feature = Child Rules
+_UI_PapyrusDiagram_paletteRules_feature = Palette Rules
+_UI_PapyrusDiagram_assistantRules_feature = Assistant Rules
+_UI_PapyrusDiagram_creationCommandClass_feature = Creation Command Class
+_UI_ChildRule_element_feature = Element
+_UI_ChildRule_stereotypes_feature = Stereotypes
+_UI_ChildRule_origin_feature = Origin
+_UI_ChildRule_insertionPath_feature = Insertion Path
+_UI_PaletteRule_element_feature = Element
+_UI_PathElement_feature_feature = Feature
+_UI_PathElement_origin_feature = Origin
+_UI_PathElement_target_feature = Target
+_UI_AssistantRule_elementTypeID_feature = Element Type ID
+_UI_Unknown_feature = Unspecified
+
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.xml
new file mode 100644
index 00000000000..26b4de7be30
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ 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
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Maged Elaasar - Initial API and implementation
+
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated Representation -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/infra/gmfdiag/representation"
+ class="org.eclipse.papyrus.infra.gmfdiag.representation.provider.RepresentationItemProviderAdapterFactory"
+ 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>
+
+ <extension point="org.eclipse.emf.edit.childCreationExtenders">
+ <!-- @generated Representation -->
+ <extender
+ uri="http://www.eclipse.org/papyrus/infra/core/architecture"
+ class="org.eclipse.papyrus.infra.gmfdiag.representation.provider.RepresentationItemProviderAdapterFactory$ArchitectureChildCreationExtender"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/pom.xml
new file mode 100755
index 00000000000..83e6ef962b1
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.representation.edit</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <description>Papyrus fork of org.eclipse.gmf.tooling.runtime to remain in the release train</description>
+</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/AssistantRuleItemProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/AssistantRuleItemProvider.java
new file mode 100644
index 00000000000..553aa01bd06
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/AssistantRuleItemProvider.java
@@ -0,0 +1,159 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.architecture.representation.provider.RuleItemProvider;
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AssistantRuleItemProvider extends RuleItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AssistantRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementTypeIDPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element Type ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementTypeIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AssistantRule_elementTypeID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AssistantRule_elementTypeID_feature", "_UI_AssistantRule_type"),
+ RepresentationPackage.Literals.ASSISTANT_RULE__ELEMENT_TYPE_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns AssistantRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AssistantRule"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ AssistantRule rule = (AssistantRule) object;
+ String pattern = rule.getElementTypeID();
+ if ((pattern == null) || pattern.isEmpty()) {
+ pattern = "*";
+ }
+ String permit = rule.isPermit() ? getString("_UI_allow") : getString("_UI_deny");
+ return getString("_UI_AssistantRule_label", new Object[] { pattern, permit });
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(AssistantRule.class)) {
+ case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return RepresentationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/ChildRuleItemProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/ChildRuleItemProvider.java
new file mode 100644
index 00000000000..ae8e5d75af3
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/ChildRuleItemProvider.java
@@ -0,0 +1,250 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.architecture.representation.provider.EClassPropertyDescriptor;
+import org.eclipse.papyrus.infra.architecture.representation.provider.RuleItemProvider;
+import org.eclipse.papyrus.infra.architecture.representation.provider.StereotypePropertyDescriptor;
+import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ChildRuleItemProvider extends RuleItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChildRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementPropertyDescriptor(object);
+ addStereotypesPropertyDescriptor(object);
+ addOriginPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new EClassPropertyDescriptor
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_element_feature", "_UI_ChildRule_type"),
+ RepresentationPackage.Literals.CHILD_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Stereotypes feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ protected void addStereotypesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new StereotypePropertyDescriptor
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_stereotypes_feature", "_UI_ChildRule_type"),
+ RepresentationPackage.Literals.CHILD_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Origin feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ protected void addOriginPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new EClassPropertyDescriptor
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_origin_feature", "_UI_ChildRule_type"),
+ RepresentationPackage.Literals.CHILD_RULE__ORIGIN,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(RepresentationPackage.Literals.CHILD_RULE__INSERTION_PATH);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ChildRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ChildRule"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ ChildRule rule = (ChildRule) object;
+ StringBuilder builder = new StringBuilder("[");
+ builder.append(rule.getOrigin() != null ? rule.getOrigin().getName() : "#");
+ builder.append("] add: ");
+ if (!rule.getStereotypes().isEmpty()) {
+ builder.append("<<");
+ for (int i = 0; i != rule.getStereotypes().size(); i++) {
+ if (i != 0) {
+ builder.append(",");
+ }
+ builder.append(rule.getStereotypes().get(i).getName());
+ }
+ builder.append(">> ");
+ }
+ builder.append(rule.getElement() != null ? rule.getElement().getName() : "#");
+ builder.append(" => ");
+ builder.append(rule.isPermit() ? "allow" : "deny");
+ return builder.toString();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ChildRule.class)) {
+ case RepresentationPackage.CHILD_RULE__INSERTION_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (RepresentationPackage.Literals.CHILD_RULE__INSERTION_PATH,
+ RepresentationFactory.eINSTANCE.createPathElement()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return RepresentationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PaletteRuleItemProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PaletteRuleItemProvider.java
new file mode 100644
index 00000000000..43f19b90f9a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PaletteRuleItemProvider.java
@@ -0,0 +1,156 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.architecture.representation.provider.RuleItemProvider;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PaletteRuleItemProvider extends RuleItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PaletteRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PaletteRule_element_feature", "_UI_PaletteRule_type"),
+ RepresentationPackage.Literals.PALETTE_RULE__ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PaletteRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PaletteRule"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ PaletteRule rule = (PaletteRule) object;
+ String data = "*";
+ if (rule.getElement() != null && !rule.getElement().isEmpty()) {
+ data = rule.getElement();
+ }
+ return "Palette: " + data + " => " + (rule.isPermit() ? "allow" : "deny");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PaletteRule.class)) {
+ case RepresentationPackage.PALETTE_RULE__ELEMENT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return RepresentationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PapyrusDiagramItemProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PapyrusDiagramItemProvider.java
new file mode 100644
index 00000000000..0353561aa46
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PapyrusDiagramItemProvider.java
@@ -0,0 +1,255 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.architecture.representation.provider.PapyrusRepresentationKindItemProvider;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusDiagramItemProvider extends PapyrusRepresentationKindItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagramItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCustomPalettePropertyDescriptor(object);
+ addCustomStylePropertyDescriptor(object);
+ addCreationCommandClassPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Custom Palette feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCustomPalettePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_customPalette_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customPalette_feature", "_UI_PapyrusDiagram_type"),
+ RepresentationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_PALETTE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Custom Style feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCustomStylePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_customStyle_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customStyle_feature", "_UI_PapyrusDiagram_type"),
+ RepresentationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_STYLE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Creation Command Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCreationCommandClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_creationCommandClass_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_creationCommandClass_feature", "_UI_PapyrusDiagram_type"),
+ RepresentationPackage.Literals.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(RepresentationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES);
+ childrenFeatures.add(RepresentationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES);
+ childrenFeatures.add(RepresentationPackage.Literals.PAPYRUS_DIAGRAM__ASSISTANT_RULES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PapyrusDiagram.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusDiagram"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return getTextFor((PapyrusDiagram) object);
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PapyrusDiagram.class)) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ case RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (RepresentationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES,
+ RepresentationFactory.eINSTANCE.createChildRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (RepresentationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES,
+ RepresentationFactory.eINSTANCE.createPaletteRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (RepresentationPackage.Literals.PAPYRUS_DIAGRAM__ASSISTANT_RULES,
+ RepresentationFactory.eINSTANCE.createAssistantRule()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return RepresentationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PathElementItemProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PathElementItemProvider.java
new file mode 100644
index 00000000000..6b9f2c42267
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/PathElementItemProvider.java
@@ -0,0 +1,211 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PathElementItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PathElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFeaturePropertyDescriptor(object);
+ addOriginPropertyDescriptor(object);
+ addTargetPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ protected void addFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new EReferencePropertyDescriptor
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_feature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_feature_feature", "_UI_PathElement_type"),
+ RepresentationPackage.Literals.PATH_ELEMENT__FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Origin feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addOriginPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_origin_feature", "_UI_PathElement_type"),
+ RepresentationPackage.Literals.PATH_ELEMENT__ORIGIN,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Target feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTargetPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_target_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_target_feature", "_UI_PathElement_type"),
+ RepresentationPackage.Literals.PATH_ELEMENT__TARGET,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PathElement.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PathElement"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ PathElement path = (PathElement) object;
+ StringBuilder builder = new StringBuilder();
+ EClass origin = path.getOrigin();
+ EReference feature = path.getFeature();
+ EClass target = path.getTarget();
+ builder.append(origin != null ? origin.getName() : "?");
+ builder.append(".");
+ builder.append(feature != null ? feature.getName() : "?");
+ builder.append(" => ");
+ builder.append(target != null ? target.getName() : "?");
+ return builder.toString();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return RepresentationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationEditPlugin.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationEditPlugin.java
new file mode 100644
index 00000000000..ed568fb99e8
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationEditPlugin.java
@@ -0,0 +1,110 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.papyrus.infra.constraints.provider.ConstraintsEditPlugin;
+
+import org.eclipse.papyrus.infra.core.architecture.provider.ArchitectureEditPlugin;
+
+import org.eclipse.papyrus.infra.types.provider.TypesConfigurationsEditPlugin;
+
+/**
+ * This is the central singleton for the Representation edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class RepresentationEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final RepresentationEditPlugin INSTANCE = new RepresentationEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ ArchitectureEditPlugin.INSTANCE,
+ ConstraintsEditPlugin.INSTANCE,
+ TypesConfigurationsEditPlugin.INSTANCE,
+ org.eclipse.papyrus.infra.architecture.representation.provider.RepresentationEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationItemProviderAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..952ebc72adf
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/provider/RepresentationItemProviderAdapterFactory.java
@@ -0,0 +1,400 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.infra.core.architecture.ArchitectureDescriptionLanguage;
+import org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage;
+import org.eclipse.papyrus.infra.core.architecture.util.ArchitectureSwitch;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.representation.util.RepresentationAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RepresentationItemProviderAdapterFactory extends RepresentationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramItemProvider papyrusDiagramItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusDiagramAdapter() {
+ if (papyrusDiagramItemProvider == null) {
+ papyrusDiagramItemProvider = new PapyrusDiagramItemProvider(this);
+ }
+
+ return papyrusDiagramItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildRuleItemProvider childRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createChildRuleAdapter() {
+ if (childRuleItemProvider == null) {
+ childRuleItemProvider = new ChildRuleItemProvider(this);
+ }
+
+ return childRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteRuleItemProvider paletteRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPaletteRuleAdapter() {
+ if (paletteRuleItemProvider == null) {
+ paletteRuleItemProvider = new PaletteRuleItemProvider(this);
+ }
+
+ return paletteRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PathElementItemProvider pathElementItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPathElementAdapter() {
+ if (pathElementItemProvider == null) {
+ pathElementItemProvider = new PathElementItemProvider(this);
+ }
+
+ return pathElementItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AssistantRuleItemProvider assistantRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAssistantRuleAdapter() {
+ if (assistantRuleItemProvider == null) {
+ assistantRuleItemProvider = new AssistantRuleItemProvider(this);
+ }
+
+ return assistantRuleItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (papyrusDiagramItemProvider != null) papyrusDiagramItemProvider.dispose();
+ if (childRuleItemProvider != null) childRuleItemProvider.dispose();
+ if (paletteRuleItemProvider != null) paletteRuleItemProvider.dispose();
+ if (pathElementItemProvider != null) pathElementItemProvider.dispose();
+ if (assistantRuleItemProvider != null) assistantRuleItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link ArchitecturePackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class ArchitectureChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends ArchitectureSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseArchitectureDescriptionLanguage(ArchitectureDescriptionLanguage object) {
+ newChildDescriptors.add
+ (createChildParameter
+ (ArchitecturePackage.Literals.ARCHITECTURE_DESCRIPTION_LANGUAGE__REPRESENTATION_KINDS,
+ RepresentationFactory.eINSTANCE.createPapyrusDiagram()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject)object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return RepresentationEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src/org/eclipse/papyrus/infra/gmfdiag/representation/provider/EReferencePropertyDescriptor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src/org/eclipse/papyrus/infra/gmfdiag/representation/provider/EReferencePropertyDescriptor.java
new file mode 100644
index 00000000000..56db6755691
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src/org/eclipse/papyrus/infra/gmfdiag/representation/provider/EReferencePropertyDescriptor.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.representation.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.papyrus.infra.core.architecture.provider.SurrogateItemPropertyDescriptor;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+
+/**
+ * Represents a descriptor for properties of type EReference
+ *
+ * @author Laurent Wouters
+ */
+public class EReferencePropertyDescriptor extends SurrogateItemPropertyDescriptor {
+ private static final Collection<?> empty = new ArrayList<EReference>();
+
+ public EReferencePropertyDescriptor(IItemPropertyDescriptor inner) {
+ super(inner);
+ }
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object object) {
+ if (object instanceof PathElement) {
+ PathElement pe = (PathElement) object;
+ EClass origin = pe.getOrigin();
+ if (origin == null) {
+ return empty;
+ }
+ return origin.getEAllReferences();
+ }
+ return empty;
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.classpath
new file mode 100644
index 00000000000..2534a1484b3
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <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="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.project
new file mode 100644
index 00000000000..9a3cbe0a1ca
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.representation</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..9ae204e9cbf
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.representation;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.representation,
+ org.eclipse.papyrus.infra.gmfdiag.representation.impl,
+ org.eclipse.papyrus.infra.gmfdiag.representation.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.architecture;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints;visibility:=reexport,
+ org.eclipse.papyrus.infra.types;visibility:=reexport,
+ org.eclipse.papyrus.infra.architecture.representation;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/about.html
new file mode 100755
index 00000000000..6e189dc4483
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/build.properties
new file mode 100644
index 00000000000..9c8bb397136
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/build.properties
@@ -0,0 +1,21 @@
+# 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
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Maged Elaasar - Initial API and implementation
+#
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/,\
+ src/
+output.. = bin/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.ecore b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.ecore
new file mode 100755
index 00000000000..db0a46e3490
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.ecore
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="representation" nsURI="http://www.eclipse.org/papyrus/infra/gmfdiag/representation"
+ nsPrefix="gmfdiagrepresentation">
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusDiagram" eSuperTypes="../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.ecore#//PapyrusRepresentationKind">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customPalette" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customStyle" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="childRules" upperBound="-1"
+ eType="#//ChildRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which model elements can be added as child of the origin through this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="paletteRules" upperBound="-1"
+ eType="#//PaletteRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which palette elements should be available for this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="assistantRules" upperBound="-1"
+ eType="#//AssistantRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which modeling assistants should be presented in this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationCommandClass" lowerBound="1">
+ <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ChildRule" eSuperTypes="../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.ecore#//Rule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stereotypes" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="origin" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="insertionPath" upperBound="-1"
+ eType="#//PathElement" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PaletteRule" eSuperTypes="../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.ecore#//Rule">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="element" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PathElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="feature" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="origin" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AssistantRule" eSuperTypes="../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.ecore#//Rule">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A rule that permits or forbids one or more modeling assistants by element type ID."/>
+ </eAnnotations>
+ <eOperations name="matches" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Queries whether I match a given &lt;tt>elementType&lt;/tt>."/>
+ </eAnnotations>
+ <eParameters name="elementType" lowerBound="1" eType="#//ElementType"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="elementTypeID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="&lt;p>&#xA;Modeling assistants are identified by the ID of the element type that they create.&#xA;This element type ID supports very simple wildcard patterns: an asterisk (&lt;tt>*&lt;/tt>)&#xA;may be used to match any substring, including the empty substring. This is&#xA;particularly useful to match an entire family of related element types by namespace&#xA;prefix, using a terminal asterisk.&#xA;&lt;/p>&lt;p>&#xA;If the element type ID is omitted, then the rule applies to all element types&#xA;(universal wildcard).&#xA;&lt;/p>"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="ElementType" instanceClassName="org.eclipse.gmf.runtime.emf.type.core.IElementType"/>
+</ecore:EPackage>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.genmodel b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.genmodel
new file mode 100644
index 00000000000..f9e316def3f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/model/GmfDiagRepresentation.genmodel
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2017 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; Maged Elaasar - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen" editDirectory="/org.eclipse.papyrus.infra.gmfdiag.representation.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.infra.gmfdiag.representation.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.infra.gmfdiag.representation" modelName="Representation"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="/org.eclipse.papyrus.infra.gmfdiag.representation.tests/src-gen"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
+ editPluginID="org.eclipse.papyrus.infra.gmfdiag.representation.edit" editorPluginID="org.eclipse.papyrus.infra.gmfdiag.representation.editor"
+ usedGenPackages="../../org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel#//architecture ../../org.eclipse.papyrus.infra.constraints/Model/Constraints.genmodel#//constraints ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.genmodel#//types ../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.genmodel#//representation"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>GmfDiagRepresentation.ecore</foreignModel>
+ <genPackages prefix="Representation" basePackage="org.eclipse.papyrus.infra.gmfdiag"
+ disposableProviderFactory="true" childCreationExtenders="true" ecorePackage="GmfDiagRepresentation.ecore#/">
+ <genDataTypes ecoreDataType="GmfDiagRepresentation.ecore#//ElementType"/>
+ <genClasses ecoreClass="GmfDiagRepresentation.ecore#//PapyrusDiagram">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute GmfDiagRepresentation.ecore#//PapyrusDiagram/customPalette"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute GmfDiagRepresentation.ecore#//PapyrusDiagram/customStyle"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//PapyrusDiagram/childRules"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//PapyrusDiagram/paletteRules"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//PapyrusDiagram/assistantRules"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute GmfDiagRepresentation.ecore#//PapyrusDiagram/creationCommandClass"/>
+ </genClasses>
+ <genClasses ecoreClass="GmfDiagRepresentation.ecore#//ChildRule">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//ChildRule/element"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//ChildRule/stereotypes"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//ChildRule/origin"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//ChildRule/insertionPath"/>
+ </genClasses>
+ <genClasses ecoreClass="GmfDiagRepresentation.ecore#//PaletteRule">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute GmfDiagRepresentation.ecore#//PaletteRule/element"/>
+ </genClasses>
+ <genClasses ecoreClass="GmfDiagRepresentation.ecore#//PathElement">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//PathElement/feature"/>
+ <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//PathElement/origin"/>
+ <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference GmfDiagRepresentation.ecore#//PathElement/target"/>
+ </genClasses>
+ <genClasses ecoreClass="GmfDiagRepresentation.ecore#//AssistantRule">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute GmfDiagRepresentation.ecore#//AssistantRule/elementTypeID"/>
+ <genOperations ecoreOperation="GmfDiagRepresentation.ecore#//AssistantRule/matches">
+ <genParameters ecoreParameter="GmfDiagRepresentation.ecore#//AssistantRule/matches/elementType"/>
+ </genOperations>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.properties
new file mode 100644
index 00000000000..a9fce49926f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.properties
@@ -0,0 +1,14 @@
+# 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
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Maged Elaasar - Initial API and implementation
+#
+#
+
+pluginName = GMF Representation Model
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.xml
new file mode 100644
index 00000000000..8db0a40082c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/plugin.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ 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
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Maged Elaasar - Initial API and implementation
+
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated Representation -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/gmfdiag/representation"
+ class="org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage"
+ genModel="model/GmfDiagRepresentation.genmodel"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.factory_override">
+ <factory
+ uri="http://www.eclipse.org/papyrus/infra/gmfdiag/representation"
+ class="org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationFactoryCustomImpl">
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/pom.xml
new file mode 100755
index 00000000000..1024ce67b32
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.representation</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <description>Papyrus fork of org.eclipse.gmf.tooling.runtime to remain in the release train</description>
+</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/AssistantRule.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/AssistantRule.java
new file mode 100644
index 00000000000..4cb0fde881d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/AssistantRule.java
@@ -0,0 +1,86 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+import org.eclipse.papyrus.infra.architecture.representation.Rule;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Assistant Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * A rule that permits or forbids one or more modeling assistants by element type ID.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule#getElementTypeID <em>Element Type ID</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getAssistantRule()
+ * @model
+ * @generated
+ */
+public interface AssistantRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * <p>
+ * Modeling assistants are identified by the ID of the element type that they create.
+ * This element type ID supports very simple wildcard patterns: an asterisk (<tt>*</tt>)
+ * may be used to match any substring, including the empty substring. This is
+ * particularly useful to match an entire family of related element types by namespace
+ * prefix, using a terminal asterisk.
+ * </p><p>
+ * If the element type ID is omitted, then the rule applies to all element types
+ * (universal wildcard).
+ * </p>
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Element Type ID</em>' attribute.
+ * @see #setElementTypeID(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getAssistantRule_ElementTypeID()
+ * @model
+ * @generated
+ */
+ String getElementTypeID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule#getElementTypeID <em>Element Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element Type ID</em>' attribute.
+ * @see #getElementTypeID()
+ * @generated
+ */
+ void setElementTypeID(String value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Queries whether I match a given <tt>elementType</tt>.
+ * <!-- end-model-doc -->
+ * @model required="true" elementTypeDataType="org.eclipse.papyrus.infra.gmfdiag.representation.ElementType" elementTypeRequired="true"
+ * @generated
+ */
+ boolean matches(IElementType elementType);
+
+} // AssistantRule
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/ChildRule.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/ChildRule.java
new file mode 100644
index 00000000000..b1ee340f9ec
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/ChildRule.java
@@ -0,0 +1,126 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.papyrus.infra.architecture.representation.Rule;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Child Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getInsertionPath <em>Insertion Path</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getChildRule()
+ * @model
+ * @generated
+ */
+public interface ChildRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' reference.
+ * @see #setElement(EClass)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getChildRule_Element()
+ * @model
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getElement <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' reference.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Stereotypes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.EClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stereotypes</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stereotypes</em>' reference list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getChildRule_Stereotypes()
+ * @model
+ * @generated
+ */
+ EList<EClass> getStereotypes();
+
+ /**
+ * Returns the value of the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Origin</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Origin</em>' reference.
+ * @see #setOrigin(EClass)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getChildRule_Origin()
+ * @model
+ * @generated
+ */
+ EClass getOrigin();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getOrigin <em>Origin</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Origin</em>' reference.
+ * @see #getOrigin()
+ * @generated
+ */
+ void setOrigin(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Insertion Path</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Insertion Path</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>Insertion Path</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getChildRule_InsertionPath()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PathElement> getInsertionPath();
+
+} // ChildRule
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PaletteRule.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PaletteRule.java
new file mode 100644
index 00000000000..a0531e7db50
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PaletteRule.java
@@ -0,0 +1,61 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.papyrus.infra.architecture.representation.Rule;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Palette Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule#getElement <em>Element</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPaletteRule()
+ * @model
+ * @generated
+ */
+public interface PaletteRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' attribute.
+ * @see #setElement(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPaletteRule_Element()
+ * @model
+ * @generated
+ */
+ String getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule#getElement <em>Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' attribute.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(String value);
+
+} // PaletteRule
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java
new file mode 100644
index 00000000000..5fcbaf71c45
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java
@@ -0,0 +1,165 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Diagram</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getChildRules <em>Child Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPaletteRules <em>Palette Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getAssistantRules <em>Assistant Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCreationCommandClass <em>Creation Command Class</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram()
+ * @model
+ * @generated
+ */
+public interface PapyrusDiagram extends PapyrusRepresentationKind {
+ /**
+ * Returns the value of the '<em><b>Custom Palette</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Custom Palette</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Custom Palette</em>' attribute.
+ * @see #setCustomPalette(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_CustomPalette()
+ * @model
+ * @generated
+ */
+ String getCustomPalette();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Custom Palette</em>' attribute.
+ * @see #getCustomPalette()
+ * @generated
+ */
+ void setCustomPalette(String value);
+
+ /**
+ * Returns the value of the '<em><b>Custom Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Custom Style</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Custom Style</em>' attribute.
+ * @see #setCustomStyle(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_CustomStyle()
+ * @model
+ * @generated
+ */
+ String getCustomStyle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Custom Style</em>' attribute.
+ * @see #getCustomStyle()
+ * @generated
+ */
+ void setCustomStyle(String value);
+
+ /**
+ * Returns the value of the '<em><b>Child Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which model elements can be added as child of the origin through this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Child Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_ChildRules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ChildRule> getChildRules();
+
+ /**
+ * Returns the value of the '<em><b>Palette Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which palette elements should be available for this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Palette Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_PaletteRules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PaletteRule> getPaletteRules();
+
+ /**
+ * Returns the value of the '<em><b>Assistant Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which modeling assistants should be presented in this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Assistant Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_AssistantRules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AssistantRule> getAssistantRules();
+
+ /**
+ * Returns the value of the '<em><b>Creation Command Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Creation Command Class</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Creation Command Class</em>' attribute.
+ * @see #setCreationCommandClass(Class)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_CreationCommandClass()
+ * @model required="true"
+ * @generated
+ */
+ Class<?> getCreationCommandClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCreationCommandClass <em>Creation Command Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Creation Command Class</em>' attribute.
+ * @see #getCreationCommandClass()
+ * @generated
+ */
+ void setCreationCommandClass(Class<?> value);
+
+} // PapyrusDiagram
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PathElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PathElement.java
new file mode 100644
index 00000000000..15dafaaea3d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PathElement.java
@@ -0,0 +1,95 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Path Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getTarget <em>Target</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPathElement()
+ * @model
+ * @generated
+ */
+public interface PathElement extends EObject {
+ /**
+ * Returns the value of the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Feature</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Feature</em>' reference.
+ * @see #setFeature(EReference)
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPathElement_Feature()
+ * @model required="true"
+ * @generated
+ */
+ EReference getFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getFeature <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Feature</em>' reference.
+ * @see #getFeature()
+ * @generated
+ */
+ void setFeature(EReference value);
+
+ /**
+ * Returns the value of the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Origin</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Origin</em>' reference.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPathElement_Origin()
+ * @model required="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EClass getOrigin();
+
+ /**
+ * Returns the value of the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target</em>' reference.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPathElement_Target()
+ * @model required="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EClass getTarget();
+
+} // PathElement
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationFactory.java
new file mode 100644
index 00000000000..dab240c8c32
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationFactory.java
@@ -0,0 +1,89 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage
+ * @generated
+ */
+public interface RepresentationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ RepresentationFactory eINSTANCE = org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Diagram</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Diagram</em>'.
+ * @generated
+ */
+ PapyrusDiagram createPapyrusDiagram();
+
+ /**
+ * Returns a new object of class '<em>Child Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Child Rule</em>'.
+ * @generated
+ */
+ ChildRule createChildRule();
+
+ /**
+ * Returns a new object of class '<em>Palette Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Palette Rule</em>'.
+ * @generated
+ */
+ PaletteRule createPaletteRule();
+
+ /**
+ * Returns a new object of class '<em>Path Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Path Element</em>'.
+ * @generated
+ */
+ PathElement createPathElement();
+
+ /**
+ * Returns a new object of class '<em>Assistant Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Assistant Rule</em>'.
+ * @generated
+ */
+ AssistantRule createAssistantRule();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ RepresentationPackage getRepresentationPackage();
+
+} //RepresentationFactory
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java
new file mode 100644
index 00000000000..ea9b14d2316
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java
@@ -0,0 +1,933 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface RepresentationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "representation";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/gmfdiag/representation";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "gmfdiagrepresentation";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ RepresentationPackage eINSTANCE = org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl <em>Papyrus Diagram</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getPapyrusDiagram()
+ * @generated
+ */
+ int PAPYRUS_DIAGRAM = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__NAME = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__NAME;
+
+ /**
+ * The feature id for the '<em><b>Desciption</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__DESCIPTION = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__DESCIPTION;
+
+ /**
+ * The feature id for the '<em><b>Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__QUALIFIED_NAME = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__QUALIFIED_NAME;
+
+ /**
+ * The feature id for the '<em><b>Language</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__LANGUAGE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__LANGUAGE;
+
+ /**
+ * The feature id for the '<em><b>Concerns</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CONCERNS = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__CONCERNS;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__ICON = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__ICON;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__PARENT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Model Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__MODEL_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__MODEL_RULES;
+
+ /**
+ * The feature id for the '<em><b>Owning Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__OWNING_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__OWNING_RULES;
+
+ /**
+ * The feature id for the '<em><b>Implementation ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__IMPLEMENTATION_ID = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__IMPLEMENTATION_ID;
+
+ /**
+ * The feature id for the '<em><b>Custom Palette</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CUSTOM_PALETTE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Custom Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CUSTOM_STYLE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Child Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CHILD_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Palette Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__PALETTE_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Assistant Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__ASSISTANT_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Creation Command Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Diagram</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_FEATURE_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 6;
+
+ /**
+ * The number of operations of the '<em>Papyrus Diagram</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_OPERATION_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl <em>Child Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getChildRule()
+ * @generated
+ */
+ int CHILD_RULE = 1;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__PERMIT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__ELEMENT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Stereotypes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__STEREOTYPES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__ORIGIN = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Insertion Path</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__INSERTION_PATH = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Child Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE_FEATURE_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of operations of the '<em>Child Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE_OPERATION_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PaletteRuleImpl <em>Palette Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.PaletteRuleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getPaletteRule()
+ * @generated
+ */
+ int PALETTE_RULE = 2;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE__PERMIT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE__ELEMENT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Palette Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE_FEATURE_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Palette Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE_OPERATION_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl <em>Path Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getPathElement()
+ * @generated
+ */
+ int PATH_ELEMENT = 3;
+
+ /**
+ * The feature id for the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT__FEATURE = 0;
+
+ /**
+ * The feature id for the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT__ORIGIN = 1;
+
+ /**
+ * The feature id for the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT__TARGET = 2;
+
+ /**
+ * The number of structural features of the '<em>Path Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Path Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl <em>Assistant Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getAssistantRule()
+ * @generated
+ */
+ int ASSISTANT_RULE = 4;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE__PERMIT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE__ELEMENT_TYPE_ID = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Assistant Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE_FEATURE_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The operation id for the '<em>Matches</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE___MATCHES__IELEMENTTYPE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Assistant Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE_OPERATION_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.RULE_OPERATION_COUNT + 1;
+
+ /**
+ * The meta object id for the '<em>Element Type</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.runtime.emf.type.core.IElementType
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getElementType()
+ * @generated
+ */
+ int ELEMENT_TYPE = 5;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram <em>Papyrus Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Diagram</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram
+ * @generated
+ */
+ EClass getPapyrusDiagram();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Custom Palette</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EAttribute getPapyrusDiagram_CustomPalette();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Custom Style</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomStyle()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EAttribute getPapyrusDiagram_CustomStyle();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getChildRules <em>Child Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Child Rules</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getChildRules()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_ChildRules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPaletteRules <em>Palette Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Palette Rules</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPaletteRules()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_PaletteRules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getAssistantRules <em>Assistant Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Assistant Rules</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getAssistantRules()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_AssistantRules();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCreationCommandClass <em>Creation Command Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Creation Command Class</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCreationCommandClass()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EAttribute getPapyrusDiagram_CreationCommandClass();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule <em>Child Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Child Rule</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule
+ * @generated
+ */
+ EClass getChildRule();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getElement()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_Element();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getStereotypes <em>Stereotypes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stereotypes</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getStereotypes()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_Stereotypes();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getOrigin <em>Origin</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Origin</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getOrigin()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_Origin();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getInsertionPath <em>Insertion Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Insertion Path</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule#getInsertionPath()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_InsertionPath();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule <em>Palette Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Palette Rule</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule
+ * @generated
+ */
+ EClass getPaletteRule();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule#getElement()
+ * @see #getPaletteRule()
+ * @generated
+ */
+ EAttribute getPaletteRule_Element();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement <em>Path Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Path Element</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PathElement
+ * @generated
+ */
+ EClass getPathElement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getFeature <em>Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Feature</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getFeature()
+ * @see #getPathElement()
+ * @generated
+ */
+ EReference getPathElement_Feature();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getOrigin <em>Origin</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Origin</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getOrigin()
+ * @see #getPathElement()
+ * @generated
+ */
+ EReference getPathElement_Origin();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getTarget <em>Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Target</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PathElement#getTarget()
+ * @see #getPathElement()
+ * @generated
+ */
+ EReference getPathElement_Target();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule <em>Assistant Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Assistant Rule</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule
+ * @generated
+ */
+ EClass getAssistantRule();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule#getElementTypeID <em>Element Type ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Element Type ID</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule#getElementTypeID()
+ * @see #getAssistantRule()
+ * @generated
+ */
+ EAttribute getAssistantRule_ElementTypeID();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule#matches(org.eclipse.gmf.runtime.emf.type.core.IElementType) <em>Matches</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Matches</em>' operation.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule#matches(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ * @generated
+ */
+ EOperation getAssistantRule__Matches__IElementType();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.gmf.runtime.emf.type.core.IElementType <em>Element Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Element Type</em>'.
+ * @see org.eclipse.gmf.runtime.emf.type.core.IElementType
+ * @model instanceClass="org.eclipse.gmf.runtime.emf.type.core.IElementType"
+ * @generated
+ */
+ EDataType getElementType();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ RepresentationFactory getRepresentationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl <em>Papyrus Diagram</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getPapyrusDiagram()
+ * @generated
+ */
+ EClass PAPYRUS_DIAGRAM = eINSTANCE.getPapyrusDiagram();
+
+ /**
+ * The meta object literal for the '<em><b>Custom Palette</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_DIAGRAM__CUSTOM_PALETTE = eINSTANCE.getPapyrusDiagram_CustomPalette();
+
+ /**
+ * The meta object literal for the '<em><b>Custom Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_DIAGRAM__CUSTOM_STYLE = eINSTANCE.getPapyrusDiagram_CustomStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Child Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__CHILD_RULES = eINSTANCE.getPapyrusDiagram_ChildRules();
+
+ /**
+ * The meta object literal for the '<em><b>Palette Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__PALETTE_RULES = eINSTANCE.getPapyrusDiagram_PaletteRules();
+
+ /**
+ * The meta object literal for the '<em><b>Assistant Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__ASSISTANT_RULES = eINSTANCE.getPapyrusDiagram_AssistantRules();
+
+ /**
+ * The meta object literal for the '<em><b>Creation Command Class</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS = eINSTANCE.getPapyrusDiagram_CreationCommandClass();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl <em>Child Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getChildRule()
+ * @generated
+ */
+ EClass CHILD_RULE = eINSTANCE.getChildRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__ELEMENT = eINSTANCE.getChildRule_Element();
+
+ /**
+ * The meta object literal for the '<em><b>Stereotypes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__STEREOTYPES = eINSTANCE.getChildRule_Stereotypes();
+
+ /**
+ * The meta object literal for the '<em><b>Origin</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__ORIGIN = eINSTANCE.getChildRule_Origin();
+
+ /**
+ * The meta object literal for the '<em><b>Insertion Path</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__INSERTION_PATH = eINSTANCE.getChildRule_InsertionPath();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PaletteRuleImpl <em>Palette Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.PaletteRuleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getPaletteRule()
+ * @generated
+ */
+ EClass PALETTE_RULE = eINSTANCE.getPaletteRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PALETTE_RULE__ELEMENT = eINSTANCE.getPaletteRule_Element();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl <em>Path Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getPathElement()
+ * @generated
+ */
+ EClass PATH_ELEMENT = eINSTANCE.getPathElement();
+
+ /**
+ * The meta object literal for the '<em><b>Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PATH_ELEMENT__FEATURE = eINSTANCE.getPathElement_Feature();
+
+ /**
+ * The meta object literal for the '<em><b>Origin</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PATH_ELEMENT__ORIGIN = eINSTANCE.getPathElement_Origin();
+
+ /**
+ * The meta object literal for the '<em><b>Target</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PATH_ELEMENT__TARGET = eINSTANCE.getPathElement_Target();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl <em>Assistant Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getAssistantRule()
+ * @generated
+ */
+ EClass ASSISTANT_RULE = eINSTANCE.getAssistantRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element Type ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ASSISTANT_RULE__ELEMENT_TYPE_ID = eINSTANCE.getAssistantRule_ElementTypeID();
+
+ /**
+ * The meta object literal for the '<em><b>Matches</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation ASSISTANT_RULE___MATCHES__IELEMENTTYPE = eINSTANCE.getAssistantRule__Matches__IElementType();
+
+ /**
+ * The meta object literal for the '<em>Element Type</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.runtime.emf.type.core.IElementType
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.impl.RepresentationPackageImpl#getElementType()
+ * @generated
+ */
+ EDataType ELEMENT_TYPE = eINSTANCE.getElementType();
+
+ }
+
+} //RepresentationPackage
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java
new file mode 100644
index 00000000000..ad91294f957
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleImpl.java
@@ -0,0 +1,206 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+import org.eclipse.papyrus.infra.architecture.representation.impl.RuleImpl;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Assistant Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl#getElementTypeID <em>Element Type ID</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class AssistantRuleImpl extends RuleImpl implements AssistantRule {
+ /**
+ * The default value of the '{@link #getElementTypeID() <em>Element Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElementTypeID()
+ * @generated
+ * @ordered
+ */
+ protected static final String ELEMENT_TYPE_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getElementTypeID() <em>Element Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElementTypeID()
+ * @generated
+ * @ordered
+ */
+ protected String elementTypeID = ELEMENT_TYPE_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AssistantRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepresentationPackage.Literals.ASSISTANT_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getElementTypeID() {
+ return elementTypeID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElementTypeID(String newElementTypeID) {
+ String oldElementTypeID = elementTypeID;
+ elementTypeID = newElementTypeID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID, oldElementTypeID, elementTypeID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean matches(IElementType elementType) {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ return getElementTypeID();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ setElementTypeID((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ setElementTypeID(ELEMENT_TYPE_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ return ELEMENT_TYPE_ID_EDEFAULT == null ? elementTypeID != null : !ELEMENT_TYPE_ID_EDEFAULT.equals(elementTypeID);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RepresentationPackage.ASSISTANT_RULE___MATCHES__IELEMENTTYPE:
+ return matches((IElementType)arguments.get(0));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (elementTypeID: ");
+ result.append(elementTypeID);
+ result.append(')');
+ return result.toString();
+ }
+
+} //AssistantRuleImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/ChildRuleImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/ChildRuleImpl.java
new file mode 100644
index 00000000000..f4ce8a08818
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/ChildRuleImpl.java
@@ -0,0 +1,321 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.architecture.representation.impl.RuleImpl;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Child Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl#getInsertionPath <em>Insertion Path</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class ChildRuleImpl extends RuleImpl implements ChildRule {
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected EClass element;
+
+ /**
+ * The cached value of the '{@link #getStereotypes() <em>Stereotypes</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStereotypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<EClass> stereotypes;
+
+ /**
+ * The cached value of the '{@link #getOrigin() <em>Origin</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrigin()
+ * @generated
+ * @ordered
+ */
+ protected EClass origin;
+
+ /**
+ * The cached value of the '{@link #getInsertionPath() <em>Insertion Path</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInsertionPath()
+ * @generated
+ * @ordered
+ */
+ protected EList<PathElement> insertionPath;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepresentationPackage.Literals.CHILD_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElement() {
+ if (element != null && element.eIsProxy()) {
+ InternalEObject oldElement = (InternalEObject)element;
+ element = (EClass)eResolveProxy(oldElement);
+ if (element != oldElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RepresentationPackage.CHILD_RULE__ELEMENT, oldElement, element));
+ }
+ }
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(EClass newElement) {
+ EClass oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.CHILD_RULE__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EClass> getStereotypes() {
+ if (stereotypes == null) {
+ stereotypes = new EObjectResolvingEList<EClass>(EClass.class, this, RepresentationPackage.CHILD_RULE__STEREOTYPES);
+ }
+ return stereotypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrigin() {
+ if (origin != null && origin.eIsProxy()) {
+ InternalEObject oldOrigin = (InternalEObject)origin;
+ origin = (EClass)eResolveProxy(oldOrigin);
+ if (origin != oldOrigin) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RepresentationPackage.CHILD_RULE__ORIGIN, oldOrigin, origin));
+ }
+ }
+ return origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetOrigin() {
+ return origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrigin(EClass newOrigin) {
+ EClass oldOrigin = origin;
+ origin = newOrigin;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.CHILD_RULE__ORIGIN, oldOrigin, origin));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PathElement> getInsertionPath() {
+ if (insertionPath == null) {
+ insertionPath = new EObjectContainmentEList<PathElement>(PathElement.class, this, RepresentationPackage.CHILD_RULE__INSERTION_PATH);
+ }
+ return insertionPath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case RepresentationPackage.CHILD_RULE__INSERTION_PATH:
+ return ((InternalEList<?>)getInsertionPath()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepresentationPackage.CHILD_RULE__ELEMENT:
+ if (resolve) return getElement();
+ return basicGetElement();
+ case RepresentationPackage.CHILD_RULE__STEREOTYPES:
+ return getStereotypes();
+ case RepresentationPackage.CHILD_RULE__ORIGIN:
+ if (resolve) return getOrigin();
+ return basicGetOrigin();
+ case RepresentationPackage.CHILD_RULE__INSERTION_PATH:
+ return getInsertionPath();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepresentationPackage.CHILD_RULE__ELEMENT:
+ setElement((EClass)newValue);
+ return;
+ case RepresentationPackage.CHILD_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>)newValue);
+ return;
+ case RepresentationPackage.CHILD_RULE__ORIGIN:
+ setOrigin((EClass)newValue);
+ return;
+ case RepresentationPackage.CHILD_RULE__INSERTION_PATH:
+ getInsertionPath().clear();
+ getInsertionPath().addAll((Collection<? extends PathElement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.CHILD_RULE__ELEMENT:
+ setElement((EClass)null);
+ return;
+ case RepresentationPackage.CHILD_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case RepresentationPackage.CHILD_RULE__ORIGIN:
+ setOrigin((EClass)null);
+ return;
+ case RepresentationPackage.CHILD_RULE__INSERTION_PATH:
+ getInsertionPath().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.CHILD_RULE__ELEMENT:
+ return element != null;
+ case RepresentationPackage.CHILD_RULE__STEREOTYPES:
+ return stereotypes != null && !stereotypes.isEmpty();
+ case RepresentationPackage.CHILD_RULE__ORIGIN:
+ return origin != null;
+ case RepresentationPackage.CHILD_RULE__INSERTION_PATH:
+ return insertionPath != null && !insertionPath.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ChildRuleImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PaletteRuleImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PaletteRuleImpl.java
new file mode 100644
index 00000000000..6d1cd726ba9
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PaletteRuleImpl.java
@@ -0,0 +1,175 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.papyrus.infra.architecture.representation.impl.RuleImpl;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Palette Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PaletteRuleImpl#getElement <em>Element</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
+ /**
+ * The default value of the '{@link #getElement() <em>Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected static final String ELEMENT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected String element = ELEMENT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepresentationPackage.Literals.PALETTE_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(String newElement) {
+ String oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.PALETTE_RULE__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepresentationPackage.PALETTE_RULE__ELEMENT:
+ return getElement();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepresentationPackage.PALETTE_RULE__ELEMENT:
+ setElement((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.PALETTE_RULE__ELEMENT:
+ setElement(ELEMENT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.PALETTE_RULE__ELEMENT:
+ return ELEMENT_EDEFAULT == null ? element != null : !ELEMENT_EDEFAULT.equals(element);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (element: ");
+ result.append(element);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PaletteRuleImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java
new file mode 100644
index 00000000000..81a111279a2
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java
@@ -0,0 +1,406 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.architecture.representation.impl.PapyrusRepresentationKindImpl;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Diagram</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getCustomPalette <em>Custom Palette</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getCustomStyle <em>Custom Style</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getChildRules <em>Child Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getPaletteRules <em>Palette Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getAssistantRules <em>Assistant Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getCreationCommandClass <em>Creation Command Class</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements PapyrusDiagram {
+ /**
+ * The default value of the '{@link #getCustomPalette() <em>Custom Palette</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomPalette()
+ * @generated
+ * @ordered
+ */
+ protected static final String CUSTOM_PALETTE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCustomPalette() <em>Custom Palette</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomPalette()
+ * @generated
+ * @ordered
+ */
+ protected String customPalette = CUSTOM_PALETTE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCustomStyle() <em>Custom Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomStyle()
+ * @generated
+ * @ordered
+ */
+ protected static final String CUSTOM_STYLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCustomStyle() <em>Custom Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomStyle()
+ * @generated
+ * @ordered
+ */
+ protected String customStyle = CUSTOM_STYLE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getChildRules() <em>Child Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChildRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<ChildRule> childRules;
+
+ /**
+ * The cached value of the '{@link #getPaletteRules() <em>Palette Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPaletteRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<PaletteRule> paletteRules;
+
+ /**
+ * The cached value of the '{@link #getAssistantRules() <em>Assistant Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAssistantRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<AssistantRule> assistantRules;
+
+ /**
+ * The cached value of the '{@link #getCreationCommandClass() <em>Creation Command Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreationCommandClass()
+ * @generated
+ * @ordered
+ */
+ protected Class<?> creationCommandClass;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepresentationPackage.Literals.PAPYRUS_DIAGRAM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCustomPalette() {
+ return customPalette;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCustomPalette(String newCustomPalette) {
+ String oldCustomPalette = customPalette;
+ customPalette = newCustomPalette;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE, oldCustomPalette, customPalette));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCustomStyle() {
+ return customStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCustomStyle(String newCustomStyle) {
+ String oldCustomStyle = customStyle;
+ customStyle = newCustomStyle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE, oldCustomStyle, customStyle));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ChildRule> getChildRules() {
+ if (childRules == null) {
+ childRules = new EObjectContainmentEList<ChildRule>(ChildRule.class, this, RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES);
+ }
+ return childRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PaletteRule> getPaletteRules() {
+ if (paletteRules == null) {
+ paletteRules = new EObjectContainmentEList<PaletteRule>(PaletteRule.class, this, RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES);
+ }
+ return paletteRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<AssistantRule> getAssistantRules() {
+ if (assistantRules == null) {
+ assistantRules = new EObjectContainmentEList<AssistantRule>(AssistantRule.class, this, RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES);
+ }
+ return assistantRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Class<?> getCreationCommandClass() {
+ return creationCommandClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCreationCommandClass(Class<?> newCreationCommandClass) {
+ Class<?> oldCreationCommandClass = creationCommandClass;
+ creationCommandClass = newCreationCommandClass;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS, oldCreationCommandClass, creationCommandClass));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return ((InternalEList<?>)getChildRules()).basicRemove(otherEnd, msgs);
+ case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return ((InternalEList<?>)getPaletteRules()).basicRemove(otherEnd, msgs);
+ case RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ return ((InternalEList<?>)getAssistantRules()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ return getCustomPalette();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ return getCustomStyle();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return getChildRules();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return getPaletteRules();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ return getAssistantRules();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS:
+ return getCreationCommandClass();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ setCustomPalette((String)newValue);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ setCustomStyle((String)newValue);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ getChildRules().clear();
+ getChildRules().addAll((Collection<? extends ChildRule>)newValue);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ getPaletteRules().clear();
+ getPaletteRules().addAll((Collection<? extends PaletteRule>)newValue);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ getAssistantRules().clear();
+ getAssistantRules().addAll((Collection<? extends AssistantRule>)newValue);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS:
+ setCreationCommandClass((Class<?>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ setCustomPalette(CUSTOM_PALETTE_EDEFAULT);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ setCustomStyle(CUSTOM_STYLE_EDEFAULT);
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ getChildRules().clear();
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ getPaletteRules().clear();
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ getAssistantRules().clear();
+ return;
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS:
+ setCreationCommandClass((Class<?>)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ return CUSTOM_PALETTE_EDEFAULT == null ? customPalette != null : !CUSTOM_PALETTE_EDEFAULT.equals(customPalette);
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ return CUSTOM_STYLE_EDEFAULT == null ? customStyle != null : !CUSTOM_STYLE_EDEFAULT.equals(customStyle);
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return childRules != null && !childRules.isEmpty();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return paletteRules != null && !paletteRules.isEmpty();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ return assistantRules != null && !assistantRules.isEmpty();
+ case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS:
+ return creationCommandClass != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (customPalette: ");
+ result.append(customPalette);
+ result.append(", customStyle: ");
+ result.append(customStyle);
+ result.append(", creationCommandClass: ");
+ result.append(creationCommandClass);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusDiagramImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementImpl.java
new file mode 100644
index 00000000000..c369750ee0c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementImpl.java
@@ -0,0 +1,224 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Path Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PathElementImpl#getTarget <em>Target</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PathElementImpl extends MinimalEObjectImpl.Container implements PathElement {
+ /**
+ * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFeature()
+ * @generated
+ * @ordered
+ */
+ protected EReference feature;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PathElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepresentationPackage.Literals.PATH_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFeature() {
+ if (feature != null && feature.eIsProxy()) {
+ InternalEObject oldFeature = (InternalEObject)feature;
+ feature = (EReference)eResolveProxy(oldFeature);
+ if (feature != oldFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RepresentationPackage.PATH_ELEMENT__FEATURE, oldFeature, feature));
+ }
+ }
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference basicGetFeature() {
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFeature(EReference newFeature) {
+ EReference oldFeature = feature;
+ feature = newFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.PATH_ELEMENT__FEATURE, oldFeature, feature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrigin() {
+ EClass origin = basicGetOrigin();
+ return origin != null && origin.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)origin) : origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetOrigin() {
+ // TODO: implement this method to return the 'Origin' reference
+ // -> do not perform proxy resolution
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTarget() {
+ EClass target = basicGetTarget();
+ return target != null && target.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)target) : target;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetTarget() {
+ // TODO: implement this method to return the 'Target' reference
+ // -> do not perform proxy resolution
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepresentationPackage.PATH_ELEMENT__FEATURE:
+ if (resolve) return getFeature();
+ return basicGetFeature();
+ case RepresentationPackage.PATH_ELEMENT__ORIGIN:
+ if (resolve) return getOrigin();
+ return basicGetOrigin();
+ case RepresentationPackage.PATH_ELEMENT__TARGET:
+ if (resolve) return getTarget();
+ return basicGetTarget();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RepresentationPackage.PATH_ELEMENT__FEATURE:
+ setFeature((EReference)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.PATH_ELEMENT__FEATURE:
+ setFeature((EReference)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.PATH_ELEMENT__FEATURE:
+ return feature != null;
+ case RepresentationPackage.PATH_ELEMENT__ORIGIN:
+ return basicGetOrigin() != null;
+ case RepresentationPackage.PATH_ELEMENT__TARGET:
+ return basicGetTarget() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PathElementImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryImpl.java
new file mode 100644
index 00000000000..86bdee11d04
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryImpl.java
@@ -0,0 +1,201 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RepresentationFactoryImpl extends EFactoryImpl implements RepresentationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static RepresentationFactory init() {
+ try {
+ RepresentationFactory theRepresentationFactory = (RepresentationFactory)EPackage.Registry.INSTANCE.getEFactory(RepresentationPackage.eNS_URI);
+ if (theRepresentationFactory != null) {
+ return theRepresentationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new RepresentationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM: return createPapyrusDiagram();
+ case RepresentationPackage.CHILD_RULE: return createChildRule();
+ case RepresentationPackage.PALETTE_RULE: return createPaletteRule();
+ case RepresentationPackage.PATH_ELEMENT: return createPathElement();
+ case RepresentationPackage.ASSISTANT_RULE: return createAssistantRule();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case RepresentationPackage.ELEMENT_TYPE:
+ return createElementTypeFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case RepresentationPackage.ELEMENT_TYPE:
+ return convertElementTypeToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagram createPapyrusDiagram() {
+ PapyrusDiagramImpl papyrusDiagram = new PapyrusDiagramImpl();
+ return papyrusDiagram;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChildRule createChildRule() {
+ ChildRuleImpl childRule = new ChildRuleImpl();
+ return childRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteRule createPaletteRule() {
+ PaletteRuleImpl paletteRule = new PaletteRuleImpl();
+ return paletteRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PathElement createPathElement() {
+ PathElementImpl pathElement = new PathElementImpl();
+ return pathElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AssistantRule createAssistantRule() {
+ AssistantRuleImpl assistantRule = new AssistantRuleImpl();
+ return assistantRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IElementType createElementTypeFromString(EDataType eDataType, String initialValue) {
+ return (IElementType)super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertElementTypeToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationPackage getRepresentationPackage() {
+ return (RepresentationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static RepresentationPackage getPackage() {
+ return RepresentationPackage.eINSTANCE;
+ }
+
+} //RepresentationFactoryImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java
new file mode 100644
index 00000000000..e3fe7adaa9d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java
@@ -0,0 +1,480 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RepresentationPackageImpl extends EPackageImpl implements RepresentationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusDiagramEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass childRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paletteRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pathElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass assistantRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType elementTypeEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private RepresentationPackageImpl() {
+ super(eNS_URI, RepresentationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link RepresentationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static RepresentationPackage init() {
+ if (isInited) return (RepresentationPackage)EPackage.Registry.INSTANCE.getEPackage(RepresentationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ RepresentationPackageImpl theRepresentationPackage = (RepresentationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RepresentationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RepresentationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theRepresentationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theRepresentationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theRepresentationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(RepresentationPackage.eNS_URI, theRepresentationPackage);
+ return theRepresentationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusDiagram() {
+ return papyrusDiagramEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusDiagram_CustomPalette() {
+ return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusDiagram_CustomStyle() {
+ return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_ChildRules() {
+ return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_PaletteRules() {
+ return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_AssistantRules() {
+ return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusDiagram_CreationCommandClass() {
+ return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getChildRule() {
+ return childRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_Element() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_Stereotypes() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_Origin() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_InsertionPath() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPaletteRule() {
+ return paletteRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPaletteRule_Element() {
+ return (EAttribute)paletteRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPathElement() {
+ return pathElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPathElement_Feature() {
+ return (EReference)pathElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPathElement_Origin() {
+ return (EReference)pathElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPathElement_Target() {
+ return (EReference)pathElementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAssistantRule() {
+ return assistantRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAssistantRule_ElementTypeID() {
+ return (EAttribute)assistantRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getAssistantRule__Matches__IElementType() {
+ return assistantRuleEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getElementType() {
+ return elementTypeEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationFactory getRepresentationFactory() {
+ return (RepresentationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusDiagramEClass = createEClass(PAPYRUS_DIAGRAM);
+ createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_PALETTE);
+ createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_STYLE);
+ createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CHILD_RULES);
+ createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__PALETTE_RULES);
+ createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__ASSISTANT_RULES);
+ createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS);
+
+ childRuleEClass = createEClass(CHILD_RULE);
+ createEReference(childRuleEClass, CHILD_RULE__ELEMENT);
+ createEReference(childRuleEClass, CHILD_RULE__STEREOTYPES);
+ createEReference(childRuleEClass, CHILD_RULE__ORIGIN);
+ createEReference(childRuleEClass, CHILD_RULE__INSERTION_PATH);
+
+ paletteRuleEClass = createEClass(PALETTE_RULE);
+ createEAttribute(paletteRuleEClass, PALETTE_RULE__ELEMENT);
+
+ pathElementEClass = createEClass(PATH_ELEMENT);
+ createEReference(pathElementEClass, PATH_ELEMENT__FEATURE);
+ createEReference(pathElementEClass, PATH_ELEMENT__ORIGIN);
+ createEReference(pathElementEClass, PATH_ELEMENT__TARGET);
+
+ assistantRuleEClass = createEClass(ASSISTANT_RULE);
+ createEAttribute(assistantRuleEClass, ASSISTANT_RULE__ELEMENT_TYPE_ID);
+ createEOperation(assistantRuleEClass, ASSISTANT_RULE___MATCHES__IELEMENTTYPE);
+
+ // Create data types
+ elementTypeEDataType = createEDataType(ELEMENT_TYPE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage theRepresentationPackage_1 = (org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage)EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusDiagramEClass.getESuperTypes().add(theRepresentationPackage_1.getPapyrusRepresentationKind());
+ childRuleEClass.getESuperTypes().add(theRepresentationPackage_1.getRule());
+ paletteRuleEClass.getESuperTypes().add(theRepresentationPackage_1.getRule());
+ assistantRuleEClass.getESuperTypes().add(theRepresentationPackage_1.getRule());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(papyrusDiagramEClass, PapyrusDiagram.class, "PapyrusDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPapyrusDiagram_CustomPalette(), ecorePackage.getEString(), "customPalette", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPapyrusDiagram_CustomStyle(), ecorePackage.getEString(), "customStyle", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagram_ChildRules(), this.getChildRule(), null, "childRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagram_PaletteRules(), this.getPaletteRule(), null, "paletteRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagram_AssistantRules(), this.getAssistantRule(), null, "assistantRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ EGenericType g1 = createEGenericType(ecorePackage.getEJavaClass());
+ EGenericType g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEAttribute(getPapyrusDiagram_CreationCommandClass(), g1, "creationCommandClass", null, 1, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(childRuleEClass, ChildRule.class, "ChildRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getChildRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getChildRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getChildRule_Origin(), ecorePackage.getEClass(), null, "origin", null, 0, 1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getChildRule_InsertionPath(), this.getPathElement(), null, "insertionPath", null, 0, -1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(paletteRuleEClass, PaletteRule.class, "PaletteRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPaletteRule_Element(), ecorePackage.getEString(), "element", null, 0, 1, PaletteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pathElementEClass, PathElement.class, "PathElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPathElement_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, PathElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPathElement_Origin(), ecorePackage.getEClass(), null, "origin", null, 1, 1, PathElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getPathElement_Target(), ecorePackage.getEClass(), null, "target", null, 1, 1, PathElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(assistantRuleEClass, AssistantRule.class, "AssistantRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAssistantRule_ElementTypeID(), ecorePackage.getEString(), "elementTypeID", null, 0, 1, AssistantRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = initEOperation(getAssistantRule__Matches__IElementType(), ecorePackage.getEBoolean(), "matches", 1, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getElementType(), "elementType", 1, 1, IS_UNIQUE, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(elementTypeEDataType, IElementType.class, "ElementType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //RepresentationPackageImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java
new file mode 100644
index 00000000000..280bef9953f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java
@@ -0,0 +1,281 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.util;
+
+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.core.architecture.ADElement;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.architecture.representation.Rule;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage
+ * @generated
+ */
+public class RepresentationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static RepresentationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = RepresentationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RepresentationSwitch<Adapter> modelSwitch =
+ new RepresentationSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusDiagram(PapyrusDiagram object) {
+ return createPapyrusDiagramAdapter();
+ }
+ @Override
+ public Adapter caseChildRule(ChildRule object) {
+ return createChildRuleAdapter();
+ }
+ @Override
+ public Adapter casePaletteRule(PaletteRule object) {
+ return createPaletteRuleAdapter();
+ }
+ @Override
+ public Adapter casePathElement(PathElement object) {
+ return createPathElementAdapter();
+ }
+ @Override
+ public Adapter caseAssistantRule(AssistantRule object) {
+ return createAssistantRuleAdapter();
+ }
+ @Override
+ public Adapter caseADElement(ADElement object) {
+ return createADElementAdapter();
+ }
+ @Override
+ public Adapter caseRepresentationKind(RepresentationKind object) {
+ return createRepresentationKindAdapter();
+ }
+ @Override
+ public Adapter casePapyrusRepresentationKind(PapyrusRepresentationKind object) {
+ return createPapyrusRepresentationKindAdapter();
+ }
+ @Override
+ public Adapter caseRule(Rule object) {
+ return createRuleAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram <em>Papyrus Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram
+ * @generated
+ */
+ public Adapter createPapyrusDiagramAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule <em>Child Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule
+ * @generated
+ */
+ public Adapter createChildRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule <em>Palette Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule
+ * @generated
+ */
+ public Adapter createPaletteRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PathElement <em>Path Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.PathElement
+ * @generated
+ */
+ public Adapter createPathElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule <em>Assistant Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule
+ * @generated
+ */
+ public Adapter createAssistantRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.core.architecture.ADElement <em>AD Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.core.architecture.ADElement
+ * @generated
+ */
+ public Adapter createADElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.core.architecture.RepresentationKind <em>Representation Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.core.architecture.RepresentationKind
+ * @generated
+ */
+ public Adapter createRepresentationKindAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind <em>Papyrus Representation Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind
+ * @generated
+ */
+ public Adapter createPapyrusRepresentationKindAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.architecture.representation.Rule <em>Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.architecture.representation.Rule
+ * @generated
+ */
+ public Adapter createRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //RepresentationAdapterFactory
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationSwitch.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationSwitch.java
new file mode 100644
index 00000000000..aae8826a227
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationSwitch.java
@@ -0,0 +1,277 @@
+/**
+ * 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.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.core.architecture.ADElement;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.architecture.representation.Rule;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage
+ * @generated
+ */
+public class RepresentationSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static RepresentationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = RepresentationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM: {
+ PapyrusDiagram papyrusDiagram = (PapyrusDiagram)theEObject;
+ T result = casePapyrusDiagram(papyrusDiagram);
+ if (result == null) result = casePapyrusRepresentationKind(papyrusDiagram);
+ if (result == null) result = caseRepresentationKind(papyrusDiagram);
+ if (result == null) result = caseADElement(papyrusDiagram);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RepresentationPackage.CHILD_RULE: {
+ ChildRule childRule = (ChildRule)theEObject;
+ T result = caseChildRule(childRule);
+ if (result == null) result = caseRule(childRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RepresentationPackage.PALETTE_RULE: {
+ PaletteRule paletteRule = (PaletteRule)theEObject;
+ T result = casePaletteRule(paletteRule);
+ if (result == null) result = caseRule(paletteRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RepresentationPackage.PATH_ELEMENT: {
+ PathElement pathElement = (PathElement)theEObject;
+ T result = casePathElement(pathElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RepresentationPackage.ASSISTANT_RULE: {
+ AssistantRule assistantRule = (AssistantRule)theEObject;
+ T result = caseAssistantRule(assistantRule);
+ if (result == null) result = caseRule(assistantRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Diagram</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Diagram</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusDiagram(PapyrusDiagram object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Child Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Child Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseChildRule(ChildRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Palette Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Palette Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePaletteRule(PaletteRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Path Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Path Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePathElement(PathElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Assistant Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Assistant Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAssistantRule(AssistantRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AD Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AD Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseADElement(ADElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Representation Kind</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Representation Kind</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRepresentationKind(RepresentationKind object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Representation Kind</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Representation Kind</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusRepresentationKind(PapyrusRepresentationKind object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRule(Rule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //RepresentationSwitch
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleCustomImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleCustomImpl.java
new file mode 100644
index 00000000000..0a399f263f0
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/AssistantRuleCustomImpl.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.impl.AssistantRuleImpl;
+
+/**
+ * Implementation of derived features and operations for the {@link AssistantRule} model class.
+ */
+public class AssistantRuleCustomImpl extends AssistantRuleImpl {
+
+ // A pattern that cannot match any string
+ private static final Pattern IMPOSSIBLE_PATTERN = Pattern.compile("^(?<=x)$"); //$NON-NLS-1$
+
+ // A pattern that matches any string
+ private static final Pattern WILDCARD_PATTERN = Pattern.compile(".*"); //$NON-NLS-1$
+
+ private Pattern elementTypeIDPattern;
+
+ protected AssistantRuleCustomImpl() {
+ super();
+ }
+
+ @Override
+ public boolean matches(IElementType elementType) {
+ String actualID = elementType.getId();
+ return (actualID != null) && getElementTypeIDPattern().matcher(actualID).matches();
+ }
+
+ Pattern getElementTypeIDPattern() {
+ if (elementTypeIDPattern == null) {
+ try {
+ String elementTypeID = getElementTypeID();
+ elementTypeIDPattern = (elementTypeID == null) ? WILDCARD_PATTERN : Pattern.compile(asRegex(elementTypeID));
+ } catch (PatternSyntaxException e) {
+ elementTypeIDPattern = IMPOSSIBLE_PATTERN;
+ }
+ }
+
+ return elementTypeIDPattern;
+ }
+
+ @Override
+ public void setElementTypeID(String newElementTypeID) {
+ // Forget the regex, to recompute it when next needed
+ elementTypeIDPattern = null;
+ super.setElementTypeID(newElementTypeID);
+ }
+
+ static String asRegex(String elementTypeIDPattern) {
+ StringBuilder result = new StringBuilder(elementTypeIDPattern);
+
+ for (int i = 0; i < result.length(); i++) {
+ char ch = result.charAt(i);
+ switch (ch) {
+ case '.':
+ case '?':
+ case '[':
+ case ']':
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '^':
+ case '$':
+ if (!escaped(result, i)) {
+ result.insert(i, '\\');
+ i++;
+ }
+ break;
+ case '*':
+ if (!escaped(result, i)) {
+ result.insert(i, '.');
+ i++;
+ }
+ break;
+ }
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * Is the character at an {@code offset} of a sequence escaped?
+ */
+ private static boolean escaped(CharSequence chars, int offset) {
+ boolean result = (offset > 0) && (chars.charAt(offset - 1) == '\\');
+
+ if (result) {
+ // make sure the escape character isn't, itself, escaped
+ for (int i = offset - 2; (i >= 0) && (chars.charAt(i) == '\\'); i--) {
+ result = !result;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementCustomImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementCustomImpl.java
new file mode 100644
index 00000000000..21d0ac1706c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PathElementCustomImpl.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) 2015 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:
+ * Benoit Maggi benoit.maggi@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+
+/**
+ * Implementation of derived features and operations for the {@link PathElement} model class.
+ */
+public class PathElementCustomImpl extends PathElementImpl implements PathElement {
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.architecture.representation.impl.PathElementImpl#basicGetOrigin()
+ *
+ * @return
+ */
+ @Override
+ public EClass basicGetOrigin() {
+ ChildRule rule = (ChildRule) this.eContainer();
+ return basicGetOriginFrom(rule.getInsertionPath(), rule.getOrigin());
+ }
+
+ private EClass basicGetOriginFrom(EList<PathElement> list, EClass from) {
+ EClass current = from;
+ int index = 0;
+ while ((current != null) && list.get(index) != this) {
+ EReference feature = list.get(index).getFeature();
+ if (!current.getEAllReferences().contains(feature))
+ return null;
+ current = feature.getEReferenceType();
+ index++;
+ }
+ return current;
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.architecture.representation.impl.PathElementImpl#basicGetTarget()
+ *
+ * @return
+ */
+ @Override
+ public EClass basicGetTarget() {
+ EReference feature = this.getFeature();
+ if (feature == null)
+ return null;
+ EClass origin = basicGetOrigin();
+ if (origin == null)
+ return null;
+ if (!origin.getEAllReferences().contains(feature))
+ return null;
+ return feature.getEReferenceType();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryCustomImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryCustomImpl.java
new file mode 100644
index 00000000000..23f1f944479
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationFactoryCustomImpl.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi benoit.maggi@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.impl;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+
+/**
+ * Override for the generated {@link RepresentationFactory} class to instantiate custom classes
+ */
+public class RepresentationFactoryCustomImpl extends RepresentationFactoryImpl implements RepresentationFactory {
+
+ public static RepresentationFactory init() {
+ try {
+ RepresentationFactory theRepresentationFactory = (RepresentationFactory) EPackage.Registry.INSTANCE.getEFactory(RepresentationPackage.eNS_URI);
+ if (theRepresentationFactory != null) {
+ return theRepresentationFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new RepresentationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepresentationFactoryCustomImpl() {
+ super();
+ }
+
+ @Override
+ public PathElement createPathElement() {
+ PathElementImpl pathElement = new PathElementCustomImpl();
+ return pathElement;
+ }
+
+ @Override
+ public AssistantRule createAssistantRule() {
+ AssistantRuleImpl assistantRule = new AssistantRuleCustomImpl();
+ return assistantRule;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.classpath
new file mode 100644
index 00000000000..858bac421b8
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <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="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.project
new file mode 100644
index 00000000000..3d6d9ee9e2d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.style.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..087168f2cb8
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.style.edit;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.style.provider.StyleEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.style.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.gmfdiag.style;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.architecture;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.architecture.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.types;visibility:=reexport,
+ org.eclipse.papyrus.infra.types.edit;visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;visibility:=reexport,
+ org.eclipse.gmf.runtime.notation.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.architecture.representation;visibility:=reexport,
+ org.eclipse.papyrus.infra.architecture.representation.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.representation;visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.representation.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/about.html
new file mode 100755
index 00000000000..6e189dc4483
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/build.properties
new file mode 100644
index 00000000000..7379028b912
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/build.properties
@@ -0,0 +1,20 @@
+# Copyright (c) 2013 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:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+#
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/icons/full/obj16/PapyrusDiagramStyle.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/icons/full/obj16/PapyrusDiagramStyle.gif
new file mode 100644
index 00000000000..2124f3e3ab2
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/icons/full/obj16/PapyrusDiagramStyle.gif
Binary files differ
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.properties
new file mode 100644
index 00000000000..765edf79725
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.properties
@@ -0,0 +1,33 @@
+# Copyright (c) 2013 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:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+#
+#
+
+pluginName = GMF Style Edit Support
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_PapyrusDiagramStyle_type = Papyrus Diagram Style
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_PapyrusDiagramStyle_owner_feature = Owner
+_UI_PapyrusDiagramStyle_diagramKind_feature = Diagram Kind
+_UI_Unknown_feature = Unspecified
+
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.xml
new file mode 100644
index 00000000000..2f646b161aa
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/plugin.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2013 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:
+ Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated style -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/infra/gmfdiag/style"
+ class="org.eclipse.papyrus.infra.gmfdiag.style.provider.StyleItemProviderAdapterFactory"
+ 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/org.eclipse.papyrus.infra.gmfdiag.style.edit/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/pom.xml
new file mode 100755
index 00000000000..c83b3b30d96
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.style.edit</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <description>Papyrus fork of org.eclipse.gmf.tooling.runtime to remain in the release train</description>
+</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/PapyrusDiagramStyleItemProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/PapyrusDiagramStyleItemProvider.java
new file mode 100644
index 00000000000..fa3f8f036dd
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/PapyrusDiagramStyleItemProvider.java
@@ -0,0 +1,180 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusDiagramStyleItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagramStyleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addOwnerPropertyDescriptor(object);
+ addDiagramKindPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Owner feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addOwnerPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagramStyle_owner_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagramStyle_owner_feature", "_UI_PapyrusDiagramStyle_type"),
+ StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Diagram Kind feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDiagramKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagramStyle_diagramKind_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagramStyle_diagramKind_feature", "_UI_PapyrusDiagramStyle_type"),
+ StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PapyrusDiagramStyle.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusDiagramStyle"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_PapyrusDiagramStyle_type");
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return StyleEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleEditPlugin.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleEditPlugin.java
new file mode 100644
index 00000000000..6d3ba4e1c37
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleEditPlugin.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+import org.eclipse.gmf.runtime.notation.NotationEditPlugin;
+import org.eclipse.papyrus.infra.architecture.representation.provider.RepresentationEditPlugin;
+import org.eclipse.papyrus.infra.constraints.provider.ConstraintsEditPlugin;
+
+import org.eclipse.papyrus.infra.core.architecture.provider.ArchitectureEditPlugin;
+import org.eclipse.papyrus.infra.types.provider.TypesConfigurationsEditPlugin;
+
+/**
+ * This is the central singleton for the Style edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class StyleEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final StyleEditPlugin INSTANCE = new StyleEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ ArchitectureEditPlugin.INSTANCE,
+ ConstraintsEditPlugin.INSTANCE,
+ EcoreEditPlugin.INSTANCE,
+ TypesConfigurationsEditPlugin.INSTANCE,
+ NotationEditPlugin.INSTANCE,
+ RepresentationEditPlugin.INSTANCE,
+ org.eclipse.papyrus.infra.gmfdiag.representation.provider.RepresentationEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleItemProviderAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..1b1b91ea184
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/provider/StyleItemProviderAdapterFactory.java
@@ -0,0 +1,210 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.gmfdiag.style.util.StyleAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StyleItemProviderAdapterFactory extends StyleAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramStyleItemProvider papyrusDiagramStyleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusDiagramStyleAdapter() {
+ if (papyrusDiagramStyleItemProvider == null) {
+ papyrusDiagramStyleItemProvider = new PapyrusDiagramStyleItemProvider(this);
+ }
+
+ return papyrusDiagramStyleItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (papyrusDiagramStyleItemProvider != null) papyrusDiagramStyleItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.classpath
new file mode 100644
index 00000000000..26e67d64ad0
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.classpath
@@ -0,0 +1,7 @@
+<?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.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.project
new file mode 100644
index 00000000000..f4d831a590c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.style</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..a698e59674f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..5361a31cfdc
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.style;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.style,
+ org.eclipse.papyrus.infra.gmfdiag.style.impl,
+ org.eclipse.papyrus.infra.gmfdiag.style.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.architecture;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints;visibility:=reexport,
+ org.eclipse.papyrus.infra.types;visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;visibility:=reexport,
+ org.eclipse.papyrus.infra.architecture.representation;visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.representation;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/about.html
new file mode 100755
index 00000000000..6e189dc4483
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 1, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/build.properties
new file mode 100644
index 00000000000..68a9505209f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/build.properties
@@ -0,0 +1,20 @@
+# Copyright (c) 2013 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:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+#
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.ecore b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.ecore
new file mode 100755
index 00000000000..d01f3e9ca29
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.ecore
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="style" nsURI="http://www.eclipse.org/papyrus/infra/gmfdiag/style"
+ nsPrefix="style">
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusDiagramStyle" eSuperTypes="../../org.eclipse.gmf.runtime.notation/model/notation.ecore#//Style">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagramKind" eType="ecore:EClass ../../org.eclipse.papyrus.infra.gmfdiag.representation/model/Representation.ecore#//PapyrusDiagram"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.genmodel b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.genmodel
new file mode 100755
index 00000000000..6aadfc98292
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/model/style.genmodel
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.infra.gmfdiag.style/src-gen" editDirectory="/org.eclipse.papyrus.infra.gmfdiag.style.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.infra.gmfdiag.style.editor/src-gen" modelPluginID="org.eclipse.papyrus.infra.gmfdiag.style"
+ modelName="Style" editPluginClass="org.eclipse.papyrus.infra.gmfdiag.style.provider.StyleEditPlugin"
+ editorPluginClass="org.eclipse.papyrus.infra.gmfdiag.style.presentation.StyleEditorPlugin"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="/org.eclipse.papyrus.infra.gmfdiag.style.tests/src-gen"
+ testSuiteClass="org.eclipse.papyrus.infra.gmfdiag.style.tests.StyleAllTests" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false" language="" usedGenPackages="../../org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel#//architecture ../../org.eclipse.papyrus.infra.constraints/Model/Constraints.genmodel#//constraints platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.genmodel#//types ../../org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation ../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.genmodel#//representation ../../org.eclipse.papyrus.infra.gmfdiag.representation/model/Representation.genmodel#//representation"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>style.ecore</foreignModel>
+ <genPackages prefix="Style" basePackage="org.eclipse.papyrus.infra.gmfdiag" resource="XMI"
+ disposableProviderFactory="true" ecorePackage="style.ecore#/">
+ <genClasses ecoreClass="style.ecore#//PapyrusDiagramStyle">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference style.ecore#//PapyrusDiagramStyle/owner"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference style.ecore#//PapyrusDiagramStyle/diagramKind"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.properties
new file mode 100644
index 00000000000..3af47a8e84a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2013 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:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+#
+#
+
+pluginName = GMF Style Model
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.xml
new file mode 100644
index 00000000000..c9dcf0cd3de
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/plugin.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2013 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:
+ Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated style -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/gmfdiag/style"
+ class="org.eclipse.papyrus.infra.gmfdiag.style.StylePackage"
+ genModel="model/style.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <!-- @generated style -->
+ <parser
+ type="style"
+ class="org.eclipse.papyrus.infra.gmfdiag.style.util.StyleResourceFactoryImpl"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/pom.xml
new file mode 100755
index 00000000000..76ebabf6aef
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.gmfdiag.style</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <description>Papyrus fork of org.eclipse.gmf.tooling.runtime to remain in the release train</description>
+</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/PapyrusDiagramStyle.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/PapyrusDiagramStyle.java
new file mode 100644
index 00000000000..c83263f1147
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/PapyrusDiagramStyle.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gmf.runtime.notation.Style;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Diagram Style</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getDiagramKind <em>Diagram Kind</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage#getPapyrusDiagramStyle()
+ * @model
+ * @generated
+ */
+public interface PapyrusDiagramStyle extends Style {
+ /**
+ * Returns the value of the '<em><b>Owner</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Owner</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Owner</em>' reference.
+ * @see #setOwner(EObject)
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage#getPapyrusDiagramStyle_Owner()
+ * @model required="true"
+ * @generated
+ */
+ EObject getOwner();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getOwner <em>Owner</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Owner</em>' reference.
+ * @see #getOwner()
+ * @generated
+ */
+ void setOwner(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Diagram Kind</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Diagram Kind</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Diagram Kind</em>' reference.
+ * @see #setDiagramKind(PapyrusDiagram)
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage#getPapyrusDiagramStyle_DiagramKind()
+ * @model
+ * @generated
+ */
+ PapyrusDiagram getDiagramKind();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getDiagramKind <em>Diagram Kind</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Diagram Kind</em>' reference.
+ * @see #getDiagramKind()
+ * @generated
+ */
+ void setDiagramKind(PapyrusDiagram value);
+
+} // PapyrusDiagramStyle
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StyleFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StyleFactory.java
new file mode 100644
index 00000000000..4c19799e218
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StyleFactory.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage
+ * @generated
+ */
+public interface StyleFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ StyleFactory eINSTANCE = org.eclipse.papyrus.infra.gmfdiag.style.impl.StyleFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Diagram Style</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Diagram Style</em>'.
+ * @generated
+ */
+ PapyrusDiagramStyle createPapyrusDiagramStyle();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ StylePackage getStylePackage();
+
+} //StyleFactory
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StylePackage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StylePackage.java
new file mode 100644
index 00000000000..7915e85d260
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/StylePackage.java
@@ -0,0 +1,201 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StyleFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface StylePackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "style";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/gmfdiag/style";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "style";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ StylePackage eINSTANCE = org.eclipse.papyrus.infra.gmfdiag.style.impl.StylePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.style.impl.PapyrusDiagramStyleImpl <em>Papyrus Diagram Style</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.impl.PapyrusDiagramStyleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.impl.StylePackageImpl#getPapyrusDiagramStyle()
+ * @generated
+ */
+ int PAPYRUS_DIAGRAM_STYLE = 0;
+
+ /**
+ * The feature id for the '<em><b>Owner</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_STYLE__OWNER = NotationPackage.STYLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Diagram Kind</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND = NotationPackage.STYLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Diagram Style</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_STYLE_FEATURE_COUNT = NotationPackage.STYLE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Papyrus Diagram Style</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_STYLE_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle <em>Papyrus Diagram Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Diagram Style</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle
+ * @generated
+ */
+ EClass getPapyrusDiagramStyle();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getOwner <em>Owner</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Owner</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getOwner()
+ * @see #getPapyrusDiagramStyle()
+ * @generated
+ */
+ EReference getPapyrusDiagramStyle_Owner();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getDiagramKind <em>Diagram Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Diagram Kind</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle#getDiagramKind()
+ * @see #getPapyrusDiagramStyle()
+ * @generated
+ */
+ EReference getPapyrusDiagramStyle_DiagramKind();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ StyleFactory getStyleFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.style.impl.PapyrusDiagramStyleImpl <em>Papyrus Diagram Style</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.impl.PapyrusDiagramStyleImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.impl.StylePackageImpl#getPapyrusDiagramStyle()
+ * @generated
+ */
+ EClass PAPYRUS_DIAGRAM_STYLE = eINSTANCE.getPapyrusDiagramStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Owner</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM_STYLE__OWNER = eINSTANCE.getPapyrusDiagramStyle_Owner();
+
+ /**
+ * The meta object literal for the '<em><b>Diagram Kind</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND = eINSTANCE.getPapyrusDiagramStyle_DiagramKind();
+
+ }
+
+} //StylePackage
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/PapyrusDiagramStyleImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/PapyrusDiagramStyleImpl.java
new file mode 100644
index 00000000000..a28294a5a8f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/PapyrusDiagramStyleImpl.java
@@ -0,0 +1,229 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Diagram Style</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.impl.PapyrusDiagramStyleImpl#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.impl.PapyrusDiagramStyleImpl#getDiagramKind <em>Diagram Kind</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PapyrusDiagramStyleImpl extends MinimalEObjectImpl.Container implements PapyrusDiagramStyle {
+ /**
+ * The cached value of the '{@link #getOwner() <em>Owner</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOwner()
+ * @generated
+ * @ordered
+ */
+ protected EObject owner;
+
+ /**
+ * The cached value of the '{@link #getDiagramKind() <em>Diagram Kind</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDiagramKind()
+ * @generated
+ * @ordered
+ */
+ protected PapyrusDiagram diagramKind;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramStyleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getOwner() {
+ if (owner != null && owner.eIsProxy()) {
+ InternalEObject oldOwner = (InternalEObject)owner;
+ owner = eResolveProxy(oldOwner);
+ if (owner != oldOwner) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, oldOwner, owner));
+ }
+ }
+ return owner;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetOwner() {
+ return owner;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOwner(EObject newOwner) {
+ EObject oldOwner = owner;
+ owner = newOwner;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, oldOwner, owner));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagram getDiagramKind() {
+ if (diagramKind != null && diagramKind.eIsProxy()) {
+ InternalEObject oldDiagramKind = (InternalEObject)diagramKind;
+ diagramKind = (PapyrusDiagram)eResolveProxy(oldDiagramKind);
+ if (diagramKind != oldDiagramKind) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND, oldDiagramKind, diagramKind));
+ }
+ }
+ return diagramKind;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagram basicGetDiagramKind() {
+ return diagramKind;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDiagramKind(PapyrusDiagram newDiagramKind) {
+ PapyrusDiagram oldDiagramKind = diagramKind;
+ diagramKind = newDiagramKind;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND, oldDiagramKind, diagramKind));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ if (resolve) return getOwner();
+ return basicGetOwner();
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND:
+ if (resolve) return getDiagramKind();
+ return basicGetDiagramKind();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ setOwner((EObject)newValue);
+ return;
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND:
+ setDiagramKind((PapyrusDiagram)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ setOwner((EObject)null);
+ return;
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND:
+ setDiagramKind((PapyrusDiagram)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER:
+ return owner != null;
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND:
+ return diagramKind != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PapyrusDiagramStyleImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StyleFactoryImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StyleFactoryImpl.java
new file mode 100644
index 00000000000..ea04a6f7fcb
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StyleFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.gmfdiag.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StyleFactoryImpl extends EFactoryImpl implements StyleFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static StyleFactory init() {
+ try {
+ StyleFactory theStyleFactory = (StyleFactory)EPackage.Registry.INSTANCE.getEFactory(StylePackage.eNS_URI);
+ if (theStyleFactory != null) {
+ return theStyleFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new StyleFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE: return createPapyrusDiagramStyle();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagramStyle createPapyrusDiagramStyle() {
+ PapyrusDiagramStyleImpl papyrusDiagramStyle = new PapyrusDiagramStyleImpl();
+ return papyrusDiagramStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StylePackage getStylePackage() {
+ return (StylePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static StylePackage getPackage() {
+ return StylePackage.eINSTANCE;
+ }
+
+} //StyleFactoryImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StylePackageImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StylePackageImpl.java
new file mode 100644
index 00000000000..05a2b21db9a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/impl/StylePackageImpl.java
@@ -0,0 +1,213 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.style.StyleFactory;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StylePackageImpl extends EPackageImpl implements StylePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusDiagramStyleEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private StylePackageImpl() {
+ super(eNS_URI, StyleFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link StylePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static StylePackage init() {
+ if (isInited) return (StylePackage)EPackage.Registry.INSTANCE.getEPackage(StylePackage.eNS_URI);
+
+ // Obtain or create and register package
+ StylePackageImpl theStylePackage = (StylePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StylePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StylePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ NotationPackage.eINSTANCE.eClass();
+ RepresentationPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theStylePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theStylePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theStylePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(StylePackage.eNS_URI, theStylePackage);
+ return theStylePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusDiagramStyle() {
+ return papyrusDiagramStyleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagramStyle_Owner() {
+ return (EReference)papyrusDiagramStyleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagramStyle_DiagramKind() {
+ return (EReference)papyrusDiagramStyleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleFactory getStyleFactory() {
+ return (StyleFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusDiagramStyleEClass = createEClass(PAPYRUS_DIAGRAM_STYLE);
+ createEReference(papyrusDiagramStyleEClass, PAPYRUS_DIAGRAM_STYLE__OWNER);
+ createEReference(papyrusDiagramStyleEClass, PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ NotationPackage theNotationPackage = (NotationPackage)EPackage.Registry.INSTANCE.getEPackage(NotationPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ RepresentationPackage theRepresentationPackage = (RepresentationPackage)EPackage.Registry.INSTANCE.getEPackage(RepresentationPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusDiagramStyleEClass.getESuperTypes().add(theNotationPackage.getStyle());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(papyrusDiagramStyleEClass, PapyrusDiagramStyle.class, "PapyrusDiagramStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPapyrusDiagramStyle_Owner(), theEcorePackage.getEObject(), null, "owner", null, 1, 1, PapyrusDiagramStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagramStyle_DiagramKind(), theRepresentationPackage.getPapyrusDiagram(), null, "diagramKind", null, 0, 1, PapyrusDiagramStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //StylePackageImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleAdapterFactory.java
new file mode 100644
index 00000000000..8f64e5cb68c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleAdapterFactory.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.util;
+
+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.gmf.runtime.notation.Style;
+import org.eclipse.papyrus.infra.gmfdiag.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage
+ * @generated
+ */
+public class StyleAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static StylePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = StylePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StyleSwitch<Adapter> modelSwitch =
+ new StyleSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusDiagramStyle(PapyrusDiagramStyle object) {
+ return createPapyrusDiagramStyleAdapter();
+ }
+ @Override
+ public Adapter caseStyle(Style object) {
+ return createStyleAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle <em>Papyrus Diagram Style</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle
+ * @generated
+ */
+ public Adapter createPapyrusDiagramStyleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.runtime.notation.Style <em>Style</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.runtime.notation.Style
+ * @generated
+ */
+ public Adapter createStyleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //StyleAdapterFactory
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceFactoryImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceFactoryImpl.java
new file mode 100644
index 00000000000..eeb1e9dba4a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceFactoryImpl.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.util.StyleResourceImpl
+ * @generated
+ */
+public class StyleResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new StyleResourceImpl(uri);
+ return result;
+ }
+
+} //StyleResourceFactoryImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceImpl.java
new file mode 100644
index 00000000000..a7a1598232d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleResourceImpl.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.util.StyleResourceFactoryImpl
+ * @generated
+ */
+public class StyleResourceImpl extends XMIResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public StyleResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * @generated NOT - use UUIDs rather than positions
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+} //StyleResourceImpl
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleSwitch.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleSwitch.java
new file mode 100644
index 00000000000..b0009c5c2d6
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.style/src-gen/org/eclipse/papyrus/infra/gmfdiag/style/util/StyleSwitch.java
@@ -0,0 +1,138 @@
+/**
+ * Copyright (c) 2013 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.style.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.papyrus.infra.gmfdiag.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.style.StylePackage
+ * @generated
+ */
+public class StyleSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static StylePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleSwitch() {
+ if (modelPackage == null) {
+ modelPackage = StylePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case StylePackage.PAPYRUS_DIAGRAM_STYLE: {
+ PapyrusDiagramStyle papyrusDiagramStyle = (PapyrusDiagramStyle)theEObject;
+ T result = casePapyrusDiagramStyle(papyrusDiagramStyle);
+ if (result == null) result = caseStyle(papyrusDiagramStyle);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Diagram Style</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Diagram Style</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusDiagramStyle(PapyrusDiagramStyle object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Style</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Style</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStyle(Style object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //StyleSwitch
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/plugin.xml
index 2097a231bae..e83cbca1ad3 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/plugin.xml
@@ -3,7 +3,7 @@
<plugin>
<extension-point id="ocl_tracker_factory" name="GMF-Tooling OCL Tracker Factory" schema="schema/ocl_tracker_factory.exsd"/>
- <extension point="org.eclipse.gmf.tooling.runtime.ocl_tracker_factory">
+ <extension point="org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.ocl_tracker_factory">
<oclTrackerFactory
class="org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.impl.ocl.tracker.activeocl.ActiveOclTrackerFactory"
default="false"/>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java
index 577901f1026..e7bc13ee032 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome/src/org/eclipse/papyrus/infra/gmfdiag/welcome/internal/widgets/CreateNewNotationButton.java
@@ -126,7 +126,7 @@ public class CreateNewNotationButton extends Composite {
EObject object = EMFHelper.getEObject(element);
if (object != null) {
// build a list of all the available prototypes
- for (final ViewPrototype proto : PolicyChecker.getCurrent().getPrototypesFor(object)) {
+ for (final ViewPrototype proto : PolicyChecker.getFor(object).getPrototypesFor(object)) {
availablePrototypes.add(proto);
}
}
diff --git a/plugins/infra/gmfdiag/pom.xml b/plugins/infra/gmfdiag/pom.xml
index 6a68dbc8863..e5b9819f1aa 100644
--- a/plugins/infra/gmfdiag/pom.xml
+++ b/plugins/infra/gmfdiag/pom.xml
@@ -33,6 +33,10 @@
<module>org.eclipse.papyrus.infra.gmfdiag.welcome</module>
<module>org.eclipse.papyrus.infra.gmfdiag.widgets</module>
<module>org.eclipse.papyrus.infra.gmfdiag.tooling.runtime</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.representation</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.representation.edit</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.style</module>
+ <module>org.eclipse.papyrus.infra.gmfdiag.style.edit</module>
<module>assistant</module>
<module>css</module>
<module>expansion</module>

Back to the top