Bug 577691: [SiriusDiagram] Move Papyrus Sirius code from org.eclipse.papyrus.git to org.eclipse.papyrus-sirius.git
- this contribution just move all code from papyrus git to the papyrus-sirius git without any changes
- the required pom.xml files for the compilation of the code will be added in the next contribution
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Change-Id: I6d88448442217e8d89fbf657d8e7167887ac9e92
diff --git a/features/org.eclipse.papyrus.infra.siriusdiag.feature/.project b/features/org.eclipse.papyrus.infra.siriusdiag.feature/.project
new file mode 100755
index 0000000..6591e0d
--- /dev/null
+++ b/features/org.eclipse.papyrus.infra.siriusdiag.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.infra.siriusdiag.feature/build.properties b/features/org.eclipse.papyrus.infra.siriusdiag.feature/build.properties
new file mode 100755
index 0000000..b3a611b
--- /dev/null
+++ b/features/org.eclipse.papyrus.infra.siriusdiag.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
diff --git a/features/org.eclipse.papyrus.infra.siriusdiag.feature/feature.properties b/features/org.eclipse.papyrus.infra.siriusdiag.feature/feature.properties
new file mode 100755
index 0000000..81322e3
--- /dev/null
+++ b/features/org.eclipse.papyrus.infra.siriusdiag.feature/feature.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2021 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+###############################################################################
+
+# "featureName" property - name of the feature
+featureName=Papyrus Infra Sirius Diagram Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# description property - text of the "Feature Description"
+description=Contains all the plugins providing the Papyrus integration for Sirius Diagram
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2021 CEA LIST.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License 2.0\n\
+which accompanies this distribution, and is available at\n\
+https://www.eclipse.org/legal/epl-2.0/\n\
+\n\
+SPDX-License-Identifier: EPL-2.0\n
+################ end of copyright property ####################################
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.infra.siriusdiag.feature/feature.xml b/features/org.eclipse.papyrus.infra.siriusdiag.feature/feature.xml
new file mode 100755
index 0000000..a7da3db
--- /dev/null
+++ b/features/org.eclipse.papyrus.infra.siriusdiag.feature/feature.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.infra.siriusdiag.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Modeling Project"
+ license-feature="org.eclipse.license"
+ license-feature-version="2.0.2">
+
+ <description url="https://eclipse.org/papyrus/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.sirius.properties.feature" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.runtime" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.runtime.ide.ui" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.runtime.ide.xtext" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.aql" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.interpreter.feature" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.runtime.ocl" version="6.4.2"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.representation.architecture"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.sirius"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.representation.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.properties"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.modelexplorer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.siriusdiag.representation"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.infra.siriusdiag.feature/pom.xml b/features/org.eclipse.papyrus.infra.siriusdiag.feature/pom.xml
new file mode 100755
index 0000000..aa88865
--- /dev/null
+++ b/features/org.eclipse.papyrus.infra.siriusdiag.feature/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/.project b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/.project
new file mode 100755
index 0000000..b5a81c5
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.tests.uml.siriusdiag.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/build.properties b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/build.properties
new file mode 100755
index 0000000..b3a611b
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
diff --git a/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/feature.properties b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/feature.properties
new file mode 100755
index 0000000..c1c57ca
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/feature.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2021 CEA LIST, Artal Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+###############################################################################
+
+# "featureName" property - name of the feature
+featureName=Tests Sirius Diagram Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# description property - text of the "Feature Description"
+description=Tests on the Papyrus Sirius Diagram plug-ins.
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2021 CEA LIST, Artal Technologies and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License 2.0\n\
+which accompanies this distribution, and is available at\n\
+https://www.eclipse.org/legal/epl-2.0/\n\
+\n\
+SPDX-License-Identifier: EPL-2.0\n
+################ end of copyright property ####################################
diff --git a/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/feature.xml b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/feature.xml
new file mode 100755
index 0000000..2eb7b5f
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/feature.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.tests.uml.siriusdiag.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="2.0.2">
+
+ <description url="https://eclipse.org/papyrus/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.papyrus.uml.siriusdiag.feature"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.siriusdiag.clazz.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.siriusdiag.sequence.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.siriusdiag.statemachine.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.siriusdiag.junit.utils"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/pom.xml b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/pom.xml
new file mode 100755
index 0000000..1576f1b
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.uml.siriusdiag.feature/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../../../releng/tests</relativePath>
+ </parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.tests.uml.siriusdiag.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.toolsmiths.sirius.feature/.project b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/.project
new file mode 100755
index 0000000..040c926
--- /dev/null
+++ b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.toolsmiths.sirius.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.toolsmiths.sirius.feature/build.properties b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/build.properties
new file mode 100755
index 0000000..b3a611b
--- /dev/null
+++ b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
diff --git a/features/org.eclipse.papyrus.toolsmiths.sirius.feature/feature.properties b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/feature.properties
new file mode 100755
index 0000000..569e333
--- /dev/null
+++ b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/feature.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2021 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+###############################################################################
+
+# "featureName" property - name of the feature
+featureName=Papyrus Sirius Toolsmiths Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# description property - text of the "Feature Description"
+description=Contains the toolsmiths plugins for the (Papyrus) Sirius diagrams integration plugins.
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2021 CEA LIST.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License 2.0\n\
+which accompanies this distribution, and is available at\n\
+https://www.eclipse.org/legal/epl-2.0/\n\
+\n\
+SPDX-License-Identifier: EPL-2.0\n
+################ end of copyright property ####################################
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.toolsmiths.sirius.feature/feature.xml b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/feature.xml
new file mode 100755
index 0000000..5668ce9
--- /dev/null
+++ b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/feature.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.toolsmiths.sirius.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Modeling Project"
+ license-feature="org.eclipse.license"
+ license-feature-version="2.0.2">
+
+ <description url="https://eclipse.org/papyrus/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.papyrus.infra.siriusdiag.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.uml.siriusdiag.feature"
+ version="0.0.0"/>
+
+ <requires>
+ <import feature="org.eclipse.sirius.specifier" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.specifier.properties.feature" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.doc.feature" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.runtime.acceleo" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.runtime.ide.ui.acceleo" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.specifier.ide.ui.acceleo" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.specifier.ide.ui.aql" version="6.4.2"/>
+ <import feature="org.eclipse.sirius.specifier.ide.ui" version="6.4.2"/>
+ <import feature="org.eclipse.acceleo" version="3.7.0"/>
+ </requires>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.toolsmiths.sirius.feature/pom.xml b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/pom.xml
new file mode 100755
index 0000000..ebddf68
--- /dev/null
+++ b/features/org.eclipse.papyrus.toolsmiths.sirius.feature/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.toolsmiths.features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.toolsmiths.sirius.feature</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.uml.siriusdiag.feature/.project b/features/org.eclipse.papyrus.uml.siriusdiag.feature/.project
new file mode 100755
index 0000000..fc9b873
--- /dev/null
+++ b/features/org.eclipse.papyrus.uml.siriusdiag.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.siriusdiag.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.uml.siriusdiag.feature/build.properties b/features/org.eclipse.papyrus.uml.siriusdiag.feature/build.properties
new file mode 100755
index 0000000..b3a611b
--- /dev/null
+++ b/features/org.eclipse.papyrus.uml.siriusdiag.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
diff --git a/features/org.eclipse.papyrus.uml.siriusdiag.feature/feature.properties b/features/org.eclipse.papyrus.uml.siriusdiag.feature/feature.properties
new file mode 100755
index 0000000..cdfccb7
--- /dev/null
+++ b/features/org.eclipse.papyrus.uml.siriusdiag.feature/feature.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2021 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+###############################################################################
+
+# "featureName" property - name of the feature
+featureName=Papyrus UML Sirius Diagram Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# description property - text of the "Feature Description"
+description=Contains all the plugins for UML Diagrams based on Sirius for Papyrus
+################ end of description property ##################################
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2021 CEA LIST.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License 2.0\n\
+which accompanies this distribution, and is available at\n\
+https://www.eclipse.org/legal/epl-2.0/\n\
+\n\
+SPDX-License-Identifier: EPL-2.0\n
+################ end of copyright property ####################################
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.uml.siriusdiag.feature/feature.xml b/features/org.eclipse.papyrus.uml.siriusdiag.feature/feature.xml
new file mode 100755
index 0000000..02d9a3b
--- /dev/null
+++ b/features/org.eclipse.papyrus.uml.siriusdiag.feature/feature.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.uml.siriusdiag.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Modeling Project"
+ license-feature="org.eclipse.license"
+ license-feature-version="2.0.2">
+
+ <description url="https://eclipse.org/papyrus/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.papyrus.infra.siriusdiag.feature"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.sirius.clazz.diagram"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.sirius.diagram.architecture"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.sirius.common.diagram"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.sirius.sequence.diagram"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.sirius.statemachine.diagram"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.sirius.xtext.integration.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.uml.siriusdiag.feature/pom.xml b/features/org.eclipse.papyrus.uml.siriusdiag.feature/pom.xml
new file mode 100755
index 0000000..0c23db1
--- /dev/null
+++ b/features/org.eclipse.papyrus.uml.siriusdiag.feature/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.classpath b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.classpath
new file mode 100755
index 0000000..e801ebf
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.project b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.project
new file mode 100755
index 0000000..7e92426
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.siriusdiag.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.core.resources.prefs b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..65419f7
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/site/mediawiki/siriusdiag-devDoc.html=UTF-8
+encoding//src/site/mediawiki/siriusdiag-userDoc.html=UTF-8
+encoding/<project>=UTF-8
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.core.runtime.prefs b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.jdt.core.prefs b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.jdt.ui.prefs b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..1a3bd02
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.m2e.core.prefs b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.m2e.core.prefs
new file mode 100755
index 0000000..f897a7f
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.pde.api.tools.prefs b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/META-INF/MANIFEST.MF b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..5a7122c
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.papyrus.siriusdiag.doc;singleton:=true
+Automatic-Module-Name: org.eclipse.papyrus.siriusdiag.doc
+Require-Bundle: org.eclipse.help;bundle-version="[3.8.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/README b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/README
new file mode 100755
index 0000000..85aee25
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/README
@@ -0,0 +1,2 @@
+The file siriusdiag-main-toc.xml defines the structure of the documentation for SiriusDiag.
+It is referenced by the plugin.xml.
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/about.html b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/about.html
new file mode 100755
index 0000000..ef2872f
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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/doc/org.eclipse.papyrus.siriusdiag.doc/build.properties b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/build.properties
new file mode 100755
index 0000000..619f22f
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/build.properties
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2019 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+#
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ target/site/generated-eclipse-help/**,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/1_ViewCreation.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/1_ViewCreation.png
new file mode 100755
index 0000000..e95eeba
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/1_ViewCreation.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/2_LoadViewpoint.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/2_LoadViewpoint.png
new file mode 100755
index 0000000..519bdc1
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/2_LoadViewpoint.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/2_SelectOdesign.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/2_SelectOdesign.png
new file mode 100755
index 0000000..8fb7a7b
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/2_SelectOdesign.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/3_ModelExplorer.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/3_ModelExplorer.png
new file mode 100755
index 0000000..cffcd0e
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/3_ModelExplorer.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/3_RegisterRepresentation.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/3_RegisterRepresentation.png
new file mode 100755
index 0000000..142619e
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/3_RegisterRepresentation.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/4_AddRespresentation.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/4_AddRespresentation.png
new file mode 100755
index 0000000..e50523d
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/4_AddRespresentation.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/5_DefineRepresentation.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/5_DefineRepresentation.png
new file mode 100755
index 0000000..f65aee7
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/5_DefineRepresentation.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/6_SiriusTabbar.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/6_SiriusTabbar.png
new file mode 100755
index 0000000..9edb6ca
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/dev/6_SiriusTabbar.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/10_Xtext.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/10_Xtext.png
new file mode 100755
index 0000000..98e578a
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/10_Xtext.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_Hyperlink.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_Hyperlink.png
new file mode 100755
index 0000000..7b0a1f6
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_Hyperlink.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_HyperlinkNavigation.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_HyperlinkNavigation.png
new file mode 100755
index 0000000..e8d94c5
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_HyperlinkNavigation.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_HyperlinkShortcut.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_HyperlinkShortcut.png
new file mode 100755
index 0000000..0ba09cd
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/1_HyperlinkShortcut.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/2_NotationView.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/2_NotationView.png
new file mode 100755
index 0000000..1839fe6
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/2_NotationView.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/3_ModelExplorer.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/3_ModelExplorer.png
new file mode 100755
index 0000000..cffcd0e
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/3_ModelExplorer.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/4_Filters.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/4_Filters.png
new file mode 100755
index 0000000..74f6511
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/4_Filters.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/4_Layer.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/4_Layer.png
new file mode 100755
index 0000000..12a2e46
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/4_Layer.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/5_Palette.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/5_Palette.png
new file mode 100755
index 0000000..7334604
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/5_Palette.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/5_ShowHide.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/5_ShowHide.png
new file mode 100755
index 0000000..24256ff
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/5_ShowHide.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/8_Connect.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/8_Connect.png
new file mode 100755
index 0000000..213d300
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/8_Connect.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/8_ObservationPoint.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/8_ObservationPoint.png
new file mode 100755
index 0000000..e3d9534
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/8_ObservationPoint.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/9_NewSiriusDiagram.png b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/9_NewSiriusDiagram.png
new file mode 100755
index 0000000..eff3097
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/image/user/9_NewSiriusDiagram.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/plugin.properties b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/plugin.properties
new file mode 100755
index 0000000..165fba0
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/plugin.properties
@@ -0,0 +1,15 @@
+#
+# Copyright (c) 2021 CEA LIST, Artal Technologies and others
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier aurelien.didier51@gmail.com - Initial API and implementation
+#
+pluginName = Papyrus-SiriusDiag - Documentation plugin (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/plugin.xml b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/plugin.xml
new file mode 100755
index 0000000..6fc6212
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ category="org.eclipse.papyrus-siriusdiag"
+ file="src/site/mediawiki/siriusdiag-main-toc.xml"
+ primary="true">
+ </toc>
+ </extension>
+
+</plugin>
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/pom.xml b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/pom.xml
new file mode 100755
index 0000000..855a354
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <artifactId>org.eclipse.papyrus.plugins-doc</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.siriusdiag.doc</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <name>Papyrus-Sirius Diagram Doc</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.maven</artifactId>
+ <configuration>
+ <sourceFolder>resource</sourceFolder>
+ <outputFolder>${project.build.directory}/generated-eclipse-help</outputFolder>
+ <!-- copyrightNotice>${help.copyrightNotice}</copyrightNotice> <title>${help.documentTitle}</title -->
+ <multipleOutputFiles>false</multipleOutputFiles>
+ <navigationImages>true</navigationImages>
+ <formatOutput>true</formatOutput>
+ <htmlFilenameFormat>$1.html</htmlFilenameFormat>
+ <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
+ <helpPrefix>target/generated-eclipse-help</helpPrefix>
+ <!-- stylesheetUrls> <param>styles/main.css</param> </stylesheetUrls -->
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>eclipse-help</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.mediawiki</artifactId>
+ <version>${mylyn.wikitext.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-devDoc.html b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-devDoc.html
new file mode 100755
index 0000000..741aa22
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-devDoc.html
@@ -0,0 +1,207 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ </head>
+ <body>
+ <h1 id="Architecture_of_Papyrus-SiriusDiag">Architecture of Papyrus-SiriusDiag</h1>
+ <p>This framework has been developed to be used only when a sirius diagram is opened.</p>
+ <h2 id="Git_Architecture">Git Architecture</h2>
+ <ul>
+ <li>
+ <b>plugins/infra/siriusdiag</b>
+ <ul>
+ <li>
+ <b>modelexplorer</b>:contains code allowing to display and use sirius diagram in the papyrus model explorer
+ </li>
+ <li>
+ <b>properties</b>: contains code to visualize the properties of sirius diagrams
+ </li>
+ <li>
+ <b>representation</b>: contains the code to create sirius diagram views
+ </li>
+ <li>
+ <b>representation.architecture</b>: contains the code to create specific sirius diagram
+ </li>
+ <li>
+ <b>representation.edit</b>: plugin defining sirius diagram prototype
+ </li>
+ <li>
+ <b>sirius</b>: plugin containing sirius services to handle session
+ </li>
+ <li>
+ <b>siriusdiag.ui</b>: plugin handling sirius diagram views and session management
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <ul>
+ <li>
+ <b>plugins\uml\sirius</b>
+ <ul>
+ <li>
+ <b>clazz.diagram</b>: contains class diagram description and services
+ </li>
+ <li>
+ <b>common.diagram</b>: contains all the common services that can be used by all diagrams
+ </li>
+ <li>
+ <b>diagram.architecture</b>: contains all the common services that can be used by all diagrams
+ </li>
+ <li>
+ <b>sequence.diagram</b>: contains sequence diagram description and services
+ </li>
+ <li>
+ <b>statemachine.diagram</b>: contains statemachine diagram description and services
+ </li>
+ <li>
+ <b>xtext.integration.ui</b>: contains customization to add xtext on label edition
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <h1 id="Sirius_viewpoint">Sirius viewpoint</h1>
+ <p>Each new diagram contribution is added in a new plugin, which contains the description of the mapping, the filters and the tools available for this diagram.</p>
+ <p>For more information about viewpoint description, you can have a look at the sirius documentation available here:
+
+ <a href="https://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html">https://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html</a>
+ </p>
+ <p>Note that each viewpoint shall reuse:</p>
+ <ul>
+ <li>The common layer which is a mandatory layer defining the common concept of all diagrams (Hyperlink and Benpoint).</li>
+ <li>The common tool, for navigation, deletion, etc.</li>
+ <li>Common and specific java services. </li>
+ </ul>
+ <h1 id="Adding_a_new_diagram_to_the_architecture_file">Adding a new diagram to the architecture file</h1>
+ <p>The editor provided to edit the DocumentStructureTemplate metamodel is not exactly the version generated by EMF. We customized it in order to use a TransactionalEditingDomain (to ease the Papyrus integration). </p>
+ <p>When we add a new Sirius diagram, we shall create a new Sirius diagram prototype:</p>
+ <p>
+ <img border="0" src="../../../image/dev/1_ViewCreation.png"/>
+ </p>
+ <p>Once the Sirius Diagram Prototype has been created, it shall be defined as in the following picture:</p>
+ <p>
+ <img border="0" src="../../../image/dev/5_DefineRepresentation.png"/>
+ </p>
+ <p>To be able to reference the corresponding Diagram Description, it shall first be loaded in order to reference it. This can be done as in the following image:</p>
+ <p>
+ <img border="0" src="../../../image/dev/2_LoadViewpoint.png"/>
+ </p>
+ <p>And select the corresponding *.odesign file using the Browse Workspace:</p>
+ <p>
+ <img border="0" src="../../../image/dev/2_SelectOdesign.png"/>
+ </p>
+ <p>Once the Sirius Diagram Prototype has been created. We shall select on which viewpoint this representation shall be allowed. To do this, select the viewpoint and add a Representation Kinds:</p>
+ <p>
+ <img border="0" src="../../../image/dev/4_AddRespresentation.png"/>
+ </p>
+ <p>And simply select the diagram prototype that was created on the previous step.</p>
+ <p>
+ <img border="0" src="../../../image/dev/3_RegisterRepresentation.png"/>
+ </p>
+ <p>This shall be done for both Analysis and Design viewpoint.</p>
+ <h2 id="Adding_the_creation_command">Adding the creation command</h2>
+ <p>In the org.eclipse.papyrus.infra.siriusdiag.representation.architecture plugin, a new class extending the AbstractCreateSiriusDiagramEditorCommand shall be created. This class will manage the condition of the creation of the diagram and the action to execute before creating it depending on the context.</p>
+ <p>For example, a sequence diagram can be created directly under an interaction without prior action, but if we want to create it under a Model, an interaction shall be created before and defined as the root of the diagram.</p>
+ <h1 id="Sirius_session_management">Sirius session management</h1>
+ <p>To use the same transactional editing domain than other papyrus services, we had to override the default sirius session and creation. This is done by the PapyrusSessionFactory which allows to create PapyrusSession (which are just sirius session with the right TransactionalEditingDomain).</p>
+ <p>For new services using session, it is recommanded to use the SessionService provided in the org.eclipse.papyrus.infra.siriusdiag.ui plugin. </p>
+ <h1 id="Common_Diagram">Common Diagram</h1>
+ <h2 id="Common_concepts">Common concepts</h2>
+ <h3 id="Bendpoints">Bendpoints</h3>
+ <p>Benpoints mapping is used to draw a Benpoint node at the intersection of edges when the Benpoints filter is activated.</p>
+ <h3 id="Hyperlink">Hyperlink</h3>
+ <p>Hyperlink node is used to add a node in the diagram that allows to navigate to other representation.</p>
+ <h3 id="Refresh_provider">Refresh provider</h3>
+ <p>In some sirius diagrams, for several purpose (region management, bendpoints and sequence diagram reorder), the post refresh behavior of sirius diagrams have been overriden.</p>
+ <p>To override this behavior, we have used the following extension point org.eclipse.sirius.refreshExtensionProvider.</p>
+ <h3 id="Common_services">Common services</h3>
+ <ul>
+ <li>PapyrusSiriusTabbarContributor allows to enable or deactivate tools in the sirius tabbar.</li>
+ </ul>
+ <p>
+ <img border="0" src="../../../image/dev/6_SiriusTabbar.png"/>
+ </p>
+ <ul>
+ <li>AbstractDiagramServices is used to manage Label node label, node creation and node drag and drop tools.</li>
+ </ul>
+ <ul>
+ <li>AddElementToDiagramServices handles precondition for creation tool.</li>
+ </ul>
+ <ul>
+ <li>LabelServices handles direct edition of labels.</li>
+ </ul>
+ <ul>
+ <li>TooltipServices helps to provide a tooltip for each tools of the palette.</li>
+ </ul>
+ <ul>
+ <li>DeleteFromModelHandler handles the deletion of semantic element.</li>
+ </ul>
+ <ul>
+ <li>Hyperlink and Shortcut services handles navigation, creation of hyperlink and shortcut.</li>
+ </ul>
+ <h1 id="Class_Diagram">Class Diagram</h1>
+ <p>The class diagram code is located in the
+ org.eclipse.papyrus.uml.sirius.clazz.diagram plugin.</p>
+ <h2 id="Services">Services</h2>
+ <ul>
+ <li>ClassDiagramServices handles services used by tools of the class diagram for creation, reconnection, etc.</li>
+ </ul>
+ <h2 id="Description">Description</h2>
+ <p>The diagram description is located in the papyrus_class.odesign:</p>
+ <p>The Class layer defines all the mapping and tools specific to the class diagram:</p>
+ <ul>
+ <li>NodeContainer, Node, Edge and BorderedNode mapping.</li>
+ <li>The style of each node</li>
+ <li>The Nodes tool section define the Nodes palette tools behavior, which are mostly creation tools.</li>
+ <li>The Edges tool section define the Edges palette tools behavior, which are mostly creation tools.</li>
+ <li>The Features tool section define the drag and drop from model and from representations, tools for the label edition and tools for deletion. </li>
+ <li>The Relationships tool section define the reconnection tools and some deletion tools.</li>
+ </ul>
+ <h1 id="State_Machine_Diagram">State Machine Diagram</h1>
+ <p>The State Machine diagram code is located in the
+ org.eclipse.papyrus.uml.sirius.statemachine.diagram plugin.</p>
+ <h2 id="Services_2">Services</h2>
+ <p>To handle the specific behavior of Region, since both VerticalStack or HorizontalStack children presentations could not handle the mixed behavior of region (sometimes vertical and sometimes horizontal). Hence, the Freeform children presentation is used combined to a manageRegionPresentation and setChildRepresentation method that allows to chose between either horizontal and vertical.</p>
+ <h2 id="Description_2">Description</h2>
+ <p>The diagram description is located in the papyrus_statemachine.odesign:</p>
+ <p>The State Machine layer defines all the mapping and tools specific to the state machine diagram:</p>
+ <ul>
+ <li>NodeContainer, Node, Edge and BorderedNode mapping.</li>
+ <li>The style of each node.</li>
+ <li>The Nodes tool section define the Nodes palette tools behavior (mostly creation tools), drag and drop from model or from representation tools, label edition tools and deletion tools.</li>
+ <li>The Edges tool section define the Edges palette tools behavior (mostly creation tools) and reconnection tools.</li>
+ </ul>
+ <h1 id="Sequence_Diagram">Sequence Diagram</h1>
+ <p>The Sequence diagram code is located in the
+ org.eclipse.papyrus.uml.sirius.sequence.diagram plugin.</p>
+ <h2 id="Services_3">Services</h2>
+ <ul>
+ <li>Each services available in org.eclipse.papyrus.uml.sirius.sequence.diagram.services refers to one kind of element and handles the creation, reconnection and precondition for tools linked to this element.</li>
+ </ul>
+ <ul>
+ <li>ReorderSequenceRegistry, ReorderService and RefreshSequenceExtensionProvider are used to handle the reordering of all the diagram when moving elements.</li>
+ </ul>
+ <h2 id="Description_3">Description</h2>
+ <p>The diagram description is located in the papyrus_sequence.odesign:</p>
+ <p>The Sequence layer defines all the mapping and tools specific to the Sequence diagram:</p>
+ <ul>
+ <li>InstanceRole, NodeContainer, Node, Edge, BorederedNode, Execution, State, CombinedFragment, InteractionUse and ObservationPoint mapping.</li>
+ <li>The style of each mapping.</li>
+ <li>The Nodes tool section define the Nodes palette tools behavior (mostly creation tools) and label edition tools.</li>
+ <li>The Edges tool section define the Edges palette tools behavior (mostly creation tools).</li>
+ <li>The Tools tool section define reconnection tools, reodering tools, label edition tools and deletion tools.</li>
+ </ul>
+ <h1 id="Xtext_integration">Xtext integration</h1>
+ <p>Code in org.eclipse.papyrus.uml.sirius.xtext.integration.ui override classic editpart to add an xtext parser on each label edition.</p>
+ <h1 id="Test_coverage">Test coverage</h1>
+ <p>The common method to create new tests for sirius diagram is located in org.eclipse.papyrus.siriusdiag.junit.utils. In this plugin, the SiriusDiagramEditorFixture provide all the method to load model, ope session, tests tools that will be used in the several test case.</p>
+ <p>Each specific diagram is tested in a specific plugin. Those tests include:</p>
+ <ul>
+ <li>Diagram creation</li>
+ <li>Diagram deletion</li>
+ <li>Creation tools tests</li>
+ <li>Drag and Drop tools tests</li>
+ <li>Deletion</li>
+ </ul>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-devDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-devDoc.mediawiki
new file mode 100755
index 0000000..8c850f7
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-devDoc.mediawiki
@@ -0,0 +1,188 @@
+= Architecture of Papyrus-SiriusDiag =
+This framework has been developed to be used only when a sirius diagram is opened.
+
+==Git Architecture==
+*'''plugins/infra/siriusdiag'''
+**'''modelexplorer''':contains code allowing to display and use sirius diagram in the papyrus model explorer
+**'''properties''': contains code to visualize the properties of sirius diagrams
+**'''representation''': contains the code to create sirius diagram views
+**'''representation.architecture''': contains the code to create specific sirius diagram
+**'''representation.edit''': plugin defining sirius diagram prototype
+**'''sirius''': plugin containing sirius services to handle session
+**'''siriusdiag.ui''': plugin handling sirius diagram views and session management
+
+*'''plugins\uml\sirius'''
+**'''clazz.diagram''': contains class diagram description and services
+**'''common.diagram''': contains all the common services that can be used by all diagrams
+**'''diagram.architecture''': contains all the common services that can be used by all diagrams
+**'''sequence.diagram''': contains sequence diagram description and services
+**'''statemachine.diagram''': contains statemachine diagram description and services
+**'''xtext.integration.ui''': contains customization to add xtext on label edition
+
+
+= Sirius viewpoint =
+
+Each new diagram contribution is added in a new plugin, which contains the description of the mapping, the filters and the tools available for this diagram.
+
+For more information about viewpoint description, you can have a look at the sirius documentation available here:
+https://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html
+
+Note that each viewpoint shall reuse:
+* The common layer which is a mandatory layer defining the common concept of all diagrams (Hyperlink and Benpoint).
+* The common tool, for navigation, deletion, etc.
+* Common and specific java services.
+
+= Adding a new diagram to the architecture file =
+
+The editor provided to edit the DocumentStructureTemplate metamodel is not exactly the version generated by EMF. We customized it in order to use a TransactionalEditingDomain (to ease the Papyrus integration).
+
+When we add a new Sirius diagram, we shall create a new Sirius diagram prototype:
+
+[[File:../../../image/dev/1_ViewCreation.png]]
+
+Once the Sirius Diagram Prototype has been created, it shall be defined as in the following picture:
+
+[[File:../../../image/dev/5_DefineRepresentation.png]]
+
+To be able to reference the corresponding Diagram Description, it shall first be loaded in order to reference it. This can be done as in the following image:
+
+[[File:../../../image/dev/2_LoadViewpoint.png]]
+
+And select the corresponding *.odesign file using the Browse Workspace:
+
+[[File:../../../image/dev/2_SelectOdesign.png]]
+
+Once the Sirius Diagram Prototype has been created. We shall select on which viewpoint this representation shall be allowed. To do this, select the viewpoint and add a Representation Kinds:
+
+[[File:../../../image/dev/4_AddRespresentation.png]]
+
+And simply select the diagram prototype that was created on the previous step.
+
+[[File:../../../image/dev/3_RegisterRepresentation.png]]
+
+This shall be done for both Analysis and Design viewpoint.
+
+== Adding the creation command==
+
+In the org.eclipse.papyrus.infra.siriusdiag.representation.architecture plugin, a new class extending the AbstractCreateSiriusDiagramEditorCommand shall be created. This class will manage the condition of the creation of the diagram and the action to execute before creating it depending on the context.
+
+For example, a sequence diagram can be created directly under an interaction without prior action, but if we want to create it under a Model, an interaction shall be created before and defined as the root of the diagram.
+
+= Sirius session management =
+
+To use the same transactional editing domain than other papyrus services, we had to override the default sirius session and creation. This is done by the PapyrusSessionFactory which allows to create PapyrusSession (which are just sirius session with the right TransactionalEditingDomain).
+
+For new services using session, it is recommanded to use the SessionService provided in the org.eclipse.papyrus.infra.siriusdiag.ui plugin.
+
+= Common Diagram =
+
+== Common concepts ==
+
+=== Bendpoints ===
+
+Benpoints mapping is used to draw a Benpoint node at the intersection of edges when the Benpoints filter is activated.
+
+=== Hyperlink ===
+
+Hyperlink node is used to add a node in the diagram that allows to navigate to other representation.
+
+=== Refresh provider ===
+
+In some sirius diagrams, for several purpose (region management, bendpoints and sequence diagram reorder), the post refresh behavior of sirius diagrams have been overriden.
+
+To override this behavior, we have used the following extension point org.eclipse.sirius.refreshExtensionProvider.
+
+=== Common services ===
+
+* PapyrusSiriusTabbarContributor allows to enable or deactivate tools in the sirius tabbar.
+
+[[File:../../../image/dev/6_SiriusTabbar.png]]
+
+* AbstractDiagramServices is used to manage Label node label, node creation and node drag and drop tools.
+
+* AddElementToDiagramServices handles precondition for creation tool.
+
+* LabelServices handles direct edition of labels.
+
+* TooltipServices helps to provide a tooltip for each tools of the palette.
+
+* DeleteFromModelHandler handles the deletion of semantic element.
+
+* Hyperlink and Shortcut services handles navigation, creation of hyperlink and shortcut.
+
+= Class Diagram =
+
+The class diagram code is located in the
+org.eclipse.papyrus.uml.sirius.clazz.diagram plugin.
+
+== Services==
+
+* ClassDiagramServices handles services used by tools of the class diagram for creation, reconnection, etc.
+
+== Description ==
+
+The diagram description is located in the papyrus_class.odesign:
+
+The Class layer defines all the mapping and tools specific to the class diagram:
+* NodeContainer, Node, Edge and BorderedNode mapping.
+* The style of each node
+* The Nodes tool section define the Nodes palette tools behavior, which are mostly creation tools.
+* The Edges tool section define the Edges palette tools behavior, which are mostly creation tools.
+* The Features tool section define the drag and drop from model and from representations, tools for the label edition and tools for deletion.
+* The Relationships tool section define the reconnection tools and some deletion tools.
+
+= State Machine Diagram =
+
+The State Machine diagram code is located in the
+org.eclipse.papyrus.uml.sirius.statemachine.diagram plugin.
+
+== Services ==
+
+To handle the specific behavior of Region, since both VerticalStack or HorizontalStack children presentations could not handle the mixed behavior of region (sometimes vertical and sometimes horizontal). Hence, the Freeform children presentation is used combined to a manageRegionPresentation and setChildRepresentation method that allows to chose between either horizontal and vertical.
+
+== Description ==
+
+The diagram description is located in the papyrus_statemachine.odesign:
+
+The State Machine layer defines all the mapping and tools specific to the state machine diagram:
+* NodeContainer, Node, Edge and BorderedNode mapping.
+* The style of each node.
+* The Nodes tool section define the Nodes palette tools behavior (mostly creation tools), drag and drop from model or from representation tools, label edition tools and deletion tools.
+* The Edges tool section define the Edges palette tools behavior (mostly creation tools) and reconnection tools.
+
+= Sequence Diagram =
+
+The Sequence diagram code is located in the
+org.eclipse.papyrus.uml.sirius.sequence.diagram plugin.
+
+== Services ==
+
+* Each services available in org.eclipse.papyrus.uml.sirius.sequence.diagram.services refers to one kind of element and handles the creation, reconnection and precondition for tools linked to this element.
+
+* ReorderSequenceRegistry, ReorderService and RefreshSequenceExtensionProvider are used to handle the reordering of all the diagram when moving elements.
+
+== Description ==
+
+The diagram description is located in the papyrus_sequence.odesign:
+
+The Sequence layer defines all the mapping and tools specific to the Sequence diagram:
+* InstanceRole, NodeContainer, Node, Edge, BorederedNode, Execution, State, CombinedFragment, InteractionUse and ObservationPoint mapping.
+* The style of each mapping.
+* The Nodes tool section define the Nodes palette tools behavior (mostly creation tools) and label edition tools.
+* The Edges tool section define the Edges palette tools behavior (mostly creation tools).
+* The Tools tool section define reconnection tools, reodering tools, label edition tools and deletion tools.
+
+= Xtext integration =
+
+Code in org.eclipse.papyrus.uml.sirius.xtext.integration.ui override classic editpart to add an xtext parser on each label edition.
+
+= Test coverage =
+
+The common method to create new tests for sirius diagram is located in org.eclipse.papyrus.siriusdiag.junit.utils. In this plugin, the SiriusDiagramEditorFixture provide all the method to load model, ope session, tests tools that will be used in the several test case.
+
+Each specific diagram is tested in a specific plugin. Those tests include:
+* Diagram creation
+* Diagram deletion
+* Creation tools tests
+* Drag and Drop tools tests
+* Deletion
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-main-toc.xml b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-main-toc.xml
new file mode 100755
index 0000000..e651984
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-main-toc.xml
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Papyrus-SiriusDiag">
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html" label="Sirius Diagram Developer Documentation">
+ <anchor id="Papyrus-SiriusDiag-DevDocAnchor"/>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Architecture_of_Papyrus-SiriusDiag" label="Architecture of Papyrus - Sirius Diagram">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Sirius_viewpoint" label="Sirius viewpoint">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Adding_a_new_diagram_to_the_architecture_file" label="Adding a new diagram to the architecture file">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Sirius_session_management" label="Sirius session management">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Common_diagram" label="Common diagram">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Class_Diagram" label="Class diagram">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#State_Machine_Diagram" label="State Machine diagram">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Sequence_Diagram" label="Sequence diagram">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Xtext_integration" label="Xtext integration">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-devDoc.html#Test_coverage" label="Test coverage">
+ </topic>
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-userDoc.html" label="Sirius Diagram User Documentation">
+ <anchor id="Papyrus-SiriusDiag-UserDocAnchor"/>
+ <topic href="src/site/mediawiki/siriusdiag-userDoc.html#Papyrus-SiriusDiag_Integration_Introduction" label="Papyrus Sirius Diagram Integration Introduction">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-userDoc.html#How_to_create_a_new_Sirius_Diagram_in_my_UML_model" label="How to create a new Sirius Diagram in my UML model">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-userDoc.html#How_to_use_sirius_diagram" label="How to use sirius diagram">
+ </topic>
+ <topic href="src/site/mediawiki/siriusdiag-userDoc.html#Common" label="Common">
+ </topic>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-userDoc.html b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-userDoc.html
new file mode 100755
index 0000000..30b3d22
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-userDoc.html
@@ -0,0 +1,101 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ </head>
+ <body>
+ <h1 id="Papyrus-SiriusDiag_Integration_Introduction">Papyrus-SiriusDiag Integration Introduction</h1>
+ <p>This part of the documentation deals with features provided by the integration to Papyrus. </p>
+ <p>For a better experience, you should activate the Papyrus Perspective before reading this documentation.</p>
+ <h1 id="How_to_create_a_new_Sirius_Diagram_in_my_UML_model">How to create a new Sirius Diagram in my UML model</h1>
+ <p>Once a UML model is created, go into the
+ <i>Model Explorer</i>, select a UML element from which to start the document, then
+ <i>Right-Click</i>->
+ <i>New Class Diagram</i>.
+ </p>
+ <p>
+ <img border="0" src="../../../image/user/9_NewSiriusDiagram.png"/>
+ </p>
+ <p>The corresponding sirius diagram is opened inside Papyrus.</p>
+ <p>Or from the View Explorer, click on the create view, select the root element and finally the view to create.</p>
+ <p>
+ <img border="0" src="../../../image/user/2_NotationView.png"/>
+ </p>
+ <h1 id="How_to_show.2Fhide_Sirius_Diagram_in_the_ModelExplorer">How to show/hide Sirius Diagram in the ModelExplorer</h1>
+ <p>The created DSemanticDiagram are displayed in the ModelExplorer as children of the element .
+ This customization is not loaded by default.</p>
+ <p>Open the
+ <i>Model Explorer</i> view and use the customize model explorer to load the
+ <i>Sirius Diagram</i> customization:
+ </p>
+ <p>
+ <img border="0" src="../../../image/user/3_ModelExplorer.png"/>
+ </p>
+ <h1 id="How_to_use_sirius_diagram">How to use sirius diagram</h1>
+ <h2 id="Sirius_diagram">Sirius diagram</h2>
+ <p>To have a global overview of sirius diagram. You can have a look at the sirius diagram documentation.
+ See
+ <a href="https://www.eclipse.org/sirius/doc/user/diagrams/Diagrams.html">https://www.eclipse.org/sirius/doc/user/diagrams/Diagrams.html</a>
+ </p>
+ <p>While most part is similar to the former GMF diagram. There are some small differences between both.</p>
+ <h3 id="Filters">Filters</h3>
+ <p>While using sirius diagram, you can enable or disable filters on the representation. For exemple filters can show or hide some kind of view, or change the label of elements.
+ This was used to replace Benpoints preference and to customize the displayed label with or without stereotype. </p>
+ <p>
+ <img border="0" src="../../../image/user/4_Filters.png"/>
+ </p>
+ <h3 id="Layers">Layers</h3>
+ <p>Layers can be defined to hide or show several mapping and/or several tools in the palette in a diagram.
+ This functionality is only used for comment at that moment.</p>
+ <p>
+ <img border="0" src="../../../image/user/4_Layer.png"/>
+ </p>
+ <h1 id="Common">Common</h1>
+ <h2 id="Palette_tools">Palette tools</h2>
+ <p>Palette tools is divided in two categories, one for the creation of element represented has nodes and the other for the creation of edge elements.</p>
+ <p>
+ <img border="0" src="../../../image/user/5_Palette.png"/>
+ </p>
+ <h2 id="Drag_and_drop_from_explorer">Drag and drop from explorer</h2>
+ <p>Drag and drop tools have been implemented to allow to create views for existing element that are not represented yet in the diagram.</p>
+ <h2 id="Drag_and_drop_inside_diagram">Drag and drop inside diagram</h2>
+ <p>Drag and drop inside diagram is also available, but depending of the kind of element that is drag and drop, the behavior can be different.</p>
+ <h2 id="Deletion_.28from_diagram_or_model.29">Deletion (from diagram or model)</h2>
+ <p>Deletion of graphical element (only the view, not the semantic element) can be done using the shortcut (SHITF + DEL)</p>
+ <p>Deletion from the model can be done using a simple delete with DEL key.</p>
+ <h2 id="Show_.2F_Hide">Show / Hide</h2>
+ <p>Using the shortcut CTRL + H, you can simply show or hide and element from the diagram.</p>
+ <p>
+ <img border="0" src="../../../image/user/5_ShowHide.png"/>
+ </p>
+ <h2 id="Pin_.2F_Unpin">Pin / Unpin</h2>
+ <p>Pinning an element makes it protected from any action which can modify the position of this element in the diagram, such as arrange all.</p>
+ <h2 id="Hyperlink">Hyperlink</h2>
+ <p>Hyperlink can be created on any diagram elements. Once referenced as default hyperlink, a view can be opened by double click.</p>
+ <p>
+ <img border="0" src="../../../image/user/1_Hyperlink.png"/>
+ </p>
+ <p>
+ <img border="0" src="../../../image/user/1_HyperlinkNavigation.png"/>
+ </p>
+ <p>Shortcuts can be created by drag and dropping representations. Once added in the diagram, the view can be opened by double click.</p>
+ <p>
+ <img border="0" src="../../../image/user/1_HyperlinkShortcut.png"/>
+ </p>
+ <h2 id="Xtext">Xtext</h2>
+ <p>Xtext autocompletion is available when renaming an element using direct edition with F2 shortcut. When using Ctrl + Space key, the auto completion tool propose a list of label to use.</p>
+ <p>
+ <img border="0" src="../../../image/user/10_Xtext.png"/>
+ </p>
+ <h2 id="Sequence_diagram_specificity">Sequence diagram specificity</h2>
+ <p>Sequence diagram have some specificity, like the kind of element that can be represented.
+ See
+ <a href="https://www.eclipse.org/sirius/doc/user/sequences/Sequence%20Diagrams.html">https://www.eclipse.org/sirius/doc/user/sequences/Sequence%20Diagrams.html</a>
+ </p>
+ <h3 id="Show_Observation_Point">Show Observation Point</h3>
+ <p>To have a better view and simplify the correction of problems in sequence diagrams, it is possible to make observation points visible.</p>
+ <p>
+ <img border="0" src="../../../image/user/8_ObservationPoint.png"/>
+ </p>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-userDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-userDoc.mediawiki
new file mode 100755
index 0000000..ec06d35
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.siriusdiag.doc/src/site/mediawiki/siriusdiag-userDoc.mediawiki
@@ -0,0 +1,110 @@
+=Papyrus-SiriusDiag Integration Introduction=
+This part of the documentation deals with features provided by the integration to Papyrus.
+
+For a better experience, you should activate the Papyrus Perspective before reading this documentation.
+
+=How to create a new Sirius Diagram in my UML model=
+
+Once a UML model is created, go into the ''Model Explorer'', select a UML element from which to start the document, then ''Right-Click''->''New Class Diagram''.
+
+[[File:../../../image/user/9_NewSiriusDiagram.png]]
+
+The corresponding sirius diagram is opened inside Papyrus.
+
+Or from the View Explorer, click on the create view, select the root element and finally the view to create.
+
+[[File:../../../image/user/2_NotationView.png]]
+
+=How to show/hide Sirius Diagram in the ModelExplorer=
+
+The created DSemanticDiagram are displayed in the ModelExplorer as children of the element .
+This customization is not loaded by default.
+
+Open the ''Model Explorer'' view and use the customize model explorer to load the ''Sirius Diagram'' customization:
+
+[[File:../../../image/user/3_ModelExplorer.png]]
+
+= How to use sirius diagram =
+
+== Sirius diagram ==
+
+To have a global overview of sirius diagram. You can have a look at the sirius diagram documentation.
+See https://www.eclipse.org/sirius/doc/user/diagrams/Diagrams.html
+
+While most part is similar to the former GMF diagram. There are some small differences between both.
+
+=== Filters ===
+
+While using sirius diagram, you can enable or disable filters on the representation. For exemple filters can show or hide some kind of view, or change the label of elements.
+This was used to replace Benpoints preference and to customize the displayed label with or without stereotype.
+
+[[File:../../../image/user/4_Filters.png]]
+
+=== Layers ===
+
+Layers can be defined to hide or show several mapping and/or several tools in the palette in a diagram.
+This functionality is only used for comment at that moment.
+
+[[File:../../../image/user/4_Layer.png]]
+
+= Common =
+
+== Palette tools ==
+
+Palette tools is divided in two categories, one for the creation of element represented has nodes and the other for the creation of edge elements.
+
+[[File:../../../image/user/5_Palette.png]]
+
+== Drag and drop from explorer ==
+
+Drag and drop tools have been implemented to allow to create views for existing element that are not represented yet in the diagram.
+
+== Drag and drop inside diagram ==
+
+Drag and drop inside diagram is also available, but depending of the kind of element that is drag and drop, the behavior can be different.
+
+== Deletion (from diagram or model)==
+
+Deletion of graphical element (only the view, not the semantic element) can be done using the shortcut (SHITF + DEL)
+
+Deletion from the model can be done using a simple delete with DEL key.
+
+== Show / Hide ==
+
+Using the shortcut CTRL + H, you can simply show or hide and element from the diagram.
+
+[[File:../../../image/user/5_ShowHide.png]]
+
+== Pin / Unpin ==
+
+Pinning an element makes it protected from any action which can modify the position of this element in the diagram, such as arrange all.
+
+== Hyperlink ==
+
+Hyperlink can be created on any diagram elements. Once referenced as default hyperlink, a view can be opened by double click.
+
+[[File:../../../image/user/1_Hyperlink.png]]
+
+[[File:../../../image/user/1_HyperlinkNavigation.png]]
+
+Shortcuts can be created by drag and dropping representations. Once added in the diagram, the view can be opened by double click.
+
+[[File:../../../image/user/1_HyperlinkShortcut.png]]
+
+== Xtext ==
+
+Xtext autocompletion is available when renaming an element using direct edition with F2 shortcut. When using Ctrl + Space key, the auto completion tool propose a list of label to use.
+
+[[File:../../../image/user/10_Xtext.png]]
+
+= Sequence diagram specificity =
+
+Sequence diagram have some specificity, like the kind of element that can be represented.
+See https://www.eclipse.org/sirius/doc/user/sequences/Sequence%20Diagrams.html
+
+=== Show Observation Point ===
+
+To have a better view and simplify the correction of problems in sequence diagrams, it is possible to make observation points visible.
+
+[[File:../../../image/user/8_ObservationPoint.png]]
+
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.classpath
new file mode 100755
index 0000000..e801ebf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.project
new file mode 100755
index 0000000..c190c29
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.modelexplorer</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..0813ae7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/META-INF/MANIFEST.MF
@@ -0,0 +1,43 @@
+Manifest-Version: 1.0
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.modelexplorer
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.modelexplorer;singleton:=true
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.118.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.papyrus.emf.facet.efacet.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.emf.facet.query.java.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.jface;bundle-version="[3.22.0,4.0.0)",
+ org.eclipse.papyrus.infra.architecture;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.gmf.runtime.common.ui.services;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.gef;bundle-version="[3.11.0,4.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.emf.facet.efacet.metamodel;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.emf.facet.query.java.metamodel;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)"
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.siriusdiag.modelexplorer.Activator
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.actions;x-internal:=true,
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.commands;x-internal:=true,
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.directeditor;x-internal:=true,
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers;x-internal:=true,
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;x-internal:=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/build.properties
new file mode 100755
index 0000000..a8caad2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ resources/,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/plugin.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/plugin.properties
new file mode 100755
index 0000000..69447b9
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/plugin.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+
+pluginName = Papyrus-SiriusDiagram - Sirius Diagram Model Explorer
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/plugin.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/plugin.xml
new file mode 100755
index 0000000..6ca7324
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/plugin.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<!--
+ Copyright (c) 2021 CEA LIST, Artal Technologies
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+-->
+
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
+ <modeldeclaration
+ file="resources/SiriusDiagram.custom"></modeldeclaration>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers.RenameSiriusDiagramHandler"
+ commandId="org.eclipse.ui.edit.rename">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.sirius.diagram.DSemanticDiagram">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers.SiriusDiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingUpperCaseCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.sirius.diagram.DSemanticDiagram">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers.SiriusDiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingLowerCaseCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.sirius.diagram.DSemanticDiagram">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers.SiriusDiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingSwitchSpace2UnderscoreCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.sirius.diagram.DSemanticDiagram">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers.SiriusDiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingCapitalizeFirstLetterCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.sirius.diagram.DSemanticDiagram">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers.SiriusDiagramQuickFormatHandler"
+ commandId="org.eclipse.papyrus.infra.ui.menu.commands.QuickFormattingRemoveSpaceCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.sirius.diagram.DSemanticDiagram">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.DirectEditor">
+ <DirectEditor
+ contributor="Eclipse Modeling Project"
+ language="Sirius Diagram Direct Editor"
+ objectToEdit="org.eclipse.sirius.diagram.DSemanticDiagram"
+ superType="true">
+ <popupeditor
+ editorConfiguration="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.directeditor.SiriusDiagramDirectEditorConfiguration">
+ </popupeditor>
+ <Priority
+ name="Medium">
+ </Priority>
+ </DirectEditor>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.directeditor.SiriusDiagramDirectEditorPreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/pom.xml
new file mode 100755
index 0000000..c483c2b
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.modelexplorer</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/resources/SiriusDiagram.custom b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/resources/SiriusDiagram.custom
new file mode 100755
index 0000000..7758944
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/resources/SiriusDiagram.custom
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<custom:Customization xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet" xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery" xmlns:query="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet/query" name="Sirius Diagram" documentation="Display contained sirius diagram" mustBeLoadedByDefault="true" rank="-1000">
+ <eClassifiers xsi:type="custom:EClassCustomization" name="Diagram" documentation="Representation of document in model explorer">
+ <extendedMetaclass href="http://www.eclipse.org/sirius/diagram/1.1.0#//DSemanticDiagram"/>
+ <facetOperations name="getDocumentLabel">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters name="eStructuralFeature">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query.GetSiriusDiagramLabelQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations name="getDSemanticDiagramIcon" documentation="Return the path to the icon of the corresponding document template">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom_primitive_types#//Image"/>
+ <eParameters name="eObject">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eParameters>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query.GetSiriusDiagramIconQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
+ </facetOperations>
+ <facetOperations name="getVisibleReferences" upperBound="-1">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query.GetVisibleReferencesQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <facetOperations name="getSiriusDiagramParent">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eParameters name="eStructuralFeature">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query.GetSiriusDiagramParentQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/parent"/>
+ </facetOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="efacet:Facet" name="DSemanticDiagramContainer" documentation="this is a container of DSemanticDiagram" conformanceTypedElement="//DSemanticDiagramContainer/isSiriusDiagramContainer">
+ <extendedMetaclass href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <facetOperations name="isSiriusDiagramContainer" documentation="test if it references DSemanticDiagram">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query.IsSiriusDiagramContainerQuery"/>
+ </facetOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="custom:FacetCustomization" name="DSemanticDiagramContainer" documentation="representation of a container of DSemanticDiagram" extendedFacets="//DSemanticDiagramContainer" customizedFacet="//DSemanticDiagramContainer">
+ <facetElements xsi:type="efacet:FacetReference" name="DSemanticDiagrams" upperBound="-1" defaultValueLiteral="" derived="true">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/sirius/diagram/1.1.0#//DSemanticDiagram"/>
+ <query xsi:type="query:OperationCallQuery" operation="//DSemanticDiagramContainer.1/getContainedDSemanticDiagrams"/>
+ </facetElements>
+ <facetOperations name="getContainedDSemanticDiagrams" upperBound="-1" documentation="Get the collection of all contained DSemanticDiagrams">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/sirius/diagram/1.1.0#//DSemanticDiagram"/>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query.GetContainedSiriusDiagram"/>
+ </facetOperations>
+ </eClassifiers>
+</custom:Customization>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/Activator.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/Activator.java
new file mode 100755
index 0000000..3e28fbc
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/Activator.java
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer;
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.siriusdiag.modelexplorer"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ // The log service
+ public static LogHelper log;
+
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(plugin);
+
+ // Activation of the preferences of this plug-in to initialize this.
+ DefaultScope.INSTANCE.getNode(PLUGIN_ID);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/actions/SiriusDiagramQuickFormatAction.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/actions/SiriusDiagramQuickFormatAction.java
new file mode 100755
index 0000000..d6d3cd5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/actions/SiriusDiagramQuickFormatAction.java
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.actions;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.commands.SiriusDiagramNameNormalizationCommand;
+import org.eclipse.papyrus.infra.ui.menu.AbstractEMFParametricOnSelectedElementsAction;
+import org.eclipse.papyrus.infra.ui.menu.NameNormalizationCommand;
+
+/**
+ * This class provides Sirius Diagram name quick format action.
+ *
+ */
+public class SiriusDiagramQuickFormatAction extends AbstractEMFParametricOnSelectedElementsAction {
+
+ /**
+ * Constructor.
+ *
+ * @param parameter
+ * @param selectedElement
+ */
+ public SiriusDiagramQuickFormatAction(String parameter, List<EObject> selectedElement) {
+ super(parameter, selectedElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getBuildedCommand() {
+ CompoundCommand cc = new CompoundCommand(NameNormalizationCommand.NAME_ACTION);
+ for (EObject element : getSelection()) {
+ final TransactionalEditingDomain domain = getEditingDomain();
+ SiriusDiagramNameNormalizationCommand myCmd = new SiriusDiagramNameNormalizationCommand(domain, element, parameter);
+ cc.append(myCmd);
+ }
+
+ if (!cc.isEmpty() && cc.canExecute()) {
+ return cc;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/commands/RenameSiriusDiagramLabelCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/commands/RenameSiriusDiagramLabelCommand.java
new file mode 100755
index 0000000..7dc884b
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/commands/RenameSiriusDiagramLabelCommand.java
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
+import org.eclipse.papyrus.views.modelexplorer.commands.RenameLabelCommand;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+public class RenameSiriusDiagramLabelCommand extends RenameLabelCommand {
+
+ /**
+ * Default constructor.
+ *
+ * @param editingDomain
+ * The editing domain
+ * @param commandLabel
+ * The command label
+ * @param element
+ * The element whose label is renamed
+ * @param elementLabel
+ * The element label
+ * @param dialogTitle
+ * The dialog title
+ */
+ public RenameSiriusDiagramLabelCommand(TransactionalEditingDomain editingDomain, String commandLabel, EObject element, String currentElementLabel, String dialogTitle) {
+ super(editingDomain, commandLabel, element, currentElementLabel, dialogTitle);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.views.modelexplorer.commands.RenameLabelCommand#renameLabel(org.eclipse.emf.ecore.EObject, java.lang.String)
+ *
+ * @param element
+ * @param newLabel
+ */
+ @Override
+ protected void renameLabel(EObject element, String newLabel) {
+ if (element instanceof DSemanticDiagram) {
+ LabelInternationalizationUtils.setLabel(element, newLabel, null);
+ }
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/commands/SiriusDiagramNameNormalizationCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/commands/SiriusDiagramNameNormalizationCommand.java
new file mode 100755
index 0000000..8dbfc3b
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/commands/SiriusDiagramNameNormalizationCommand.java
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.ui.menu.NameNormalizationCommand;
+import org.eclipse.sirius.business.api.query.DRepresentationQuery;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.viewpoint.DRepresentationDescriptor;
+
+/**
+ * This class provides Sirius Diagram name normalization command.
+ *
+ */
+public class SiriusDiagramNameNormalizationCommand extends NameNormalizationCommand {
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain
+ * @param siriusDiagram
+ * the edited Sirius Diagram template
+ * @param normalization
+ * the parameter defining the kind of normalization
+ */
+ public SiriusDiagramNameNormalizationCommand(final TransactionalEditingDomain domain, final EObject siriusDiagram, final String normalization) {
+ super(domain, siriusDiagram, normalization);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doExecute() {
+ if (this.source instanceof DSemanticDiagram) {
+ final DSemanticDiagram doc = (DSemanticDiagram) this.source;
+ final String newName = normalizeName(doc.getName(), parameter);
+ DRepresentationDescriptor representationDescriptor = new DRepresentationQuery(doc).getRepresentationDescriptor();
+ if (representationDescriptor != null) {
+ representationDescriptor.setName(newName);
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorConfiguration.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorConfiguration.java
new file mode 100755
index 0000000..d7f53b2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorConfiguration.java
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.directeditor;
+
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.AbstractBasicDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * This class provides a Specific direct editor configuration to rename the Sirius Diagram.
+ *
+ */
+public class SiriusDiagramDirectEditorConfiguration extends AbstractBasicDirectEditorConfiguration {
+
+
+ /**
+ * This allows to determinate if the label is set and can be modified.
+ *
+ * @param objectToEdit
+ * The object to edit.
+ * @return <code>true</code> if this is a label modification, <code>false</code> otherwise.
+ */
+ public boolean isLabelSet(final Object objectToEdit) {
+ boolean result = false;
+ if (objectToEdit instanceof DSemanticDiagram) {
+ final String sirusDiagramlabel = LabelInternationalizationUtils.getLabelWithoutSubstract(((DSemanticDiagram) objectToEdit), true);
+ result = null != sirusDiagramlabel && LabelInternationalizationPreferencesUtils.getInternationalizationPreference(((DSemanticDiagram) objectToEdit));
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getTextToEdit(final Object objectToEdit) {
+ String result = null;
+ if (objectToEdit instanceof DSemanticDiagram) {
+ final String sirusDiagramlabel = LabelInternationalizationUtils.getLabelWithoutSubstract(((DSemanticDiagram) objectToEdit), true);
+ if (null != sirusDiagramlabel && LabelInternationalizationPreferencesUtils.getInternationalizationPreference(((DSemanticDiagram) objectToEdit))) {
+ result = sirusDiagramlabel;
+ } else {
+ result = ((DSemanticDiagram) objectToEdit).getName();
+ }
+ }
+
+ return null != result ? result : super.getTextToEdit(objectToEdit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParser createDirectEditorParser() {
+ return new SiriusDiagramDirectEditorParser(getTextToEdit(this.objectToEdit), isLabelSet(this.objectToEdit));
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorParser.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorParser.java
new file mode 100755
index 0000000..f27587b
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorParser.java
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.directeditor;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
+//import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
+import org.eclipse.sirius.business.api.query.DRepresentationQuery;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.viewpoint.DRepresentation;
+import org.eclipse.sirius.viewpoint.DRepresentationDescriptor;
+
+/**
+ * Specific Parser for the Sirius Diagram Direct Editor.
+ */
+public class SiriusDiagramDirectEditorParser implements IParser {
+
+ /**
+ * Name of the current Sirius Diagram.
+ */
+ private String textToEdit;
+
+ /**
+ * Determinate if this is a label modification.
+ */
+ private boolean isLabelModification;
+
+ /**
+ * Constructor.
+ *
+ * @param textToEdit
+ * The text to edit.
+ * @param isLabelModification
+ * Determinate if this is a label modification.
+ */
+ public SiriusDiagramDirectEditorParser(final String textToEdit, final boolean isLabelModification) {
+ this.textToEdit = textToEdit;
+ this.isLabelModification = isLabelModification;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+ return textToEdit;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(final IAdaptable element, final String newString, final int flags) {
+ CompositeCommand result = new CompositeCommand("Rename"); //$NON-NLS-1$
+ final EObject eObjectElement = element.getAdapter(EObject.class);
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(eObjectElement);
+
+ AbstractTransactionalCommand cmd = new AbstractTransactionalCommand(editingDomain, "RenameCommand", null) { //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if ((eObjectElement instanceof DSemanticDiagram) && (null != newString && !newString.isEmpty())) {
+ if (isLabelModification) {
+ LabelInternationalizationUtils.setLabel((eObjectElement), newString, null);
+ } else {
+ DRepresentationDescriptor representationDescriptor = new DRepresentationQuery((DRepresentation) eObjectElement).getRepresentationDescriptor();
+ if (representationDescriptor != null) {
+ representationDescriptor.setName(newString);
+ }
+ }
+ return CommandResult.newOKCommandResult();
+ }
+
+ return CommandResult.newCancelledCommandResult();
+ }
+ };
+
+ result.add(cmd);
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ return textToEdit;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
+ // Not used
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+ // Not used
+ return null;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorPreferenceInitializer.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorPreferenceInitializer.java
new file mode 100755
index 0000000..116549c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/directeditor/SiriusDiagramDirectEditorPreferenceInitializer.java
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.directeditor;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * This preference initializer initializes the preferences for the direct editor of Sirius Diagram.
+ *
+ */
+public class SiriusDiagramDirectEditorPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /**
+ * Prefix 'papyrus.editors' to store preferences.
+ */
+ private static final String PREFIX_PAPYRUS_EDITOR = IDirectEditorsIds.EDITOR_FOR_ELEMENT;
+
+ /**
+ * The Value for the objects 'Papyrus Sirius Diagram'.
+ */
+ private static final String EDITOR_NAME = "Papyrus Sirius Diagram (DSemanticDiagram) Direct Editor"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public SiriusDiagramDirectEditorPreferenceInitializer() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ // required to get the good preference store
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator.getDefault().getPreferenceStore();
+ store.setDefault(PREFIX_PAPYRUS_EDITOR + DSemanticDiagram.class.getName(), EDITOR_NAME);
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/AbstractSiriusDiagramCommandHandler.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/AbstractSiriusDiagramCommandHandler.java
new file mode 100755
index 0000000..575fe69
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/AbstractSiriusDiagramCommandHandler.java
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.ui.command.AbstractCommandHandler;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * This abstract handler provides the method to select Sirius Diagram.
+ *
+ */
+public abstract class AbstractSiriusDiagramCommandHandler extends AbstractCommandHandler {
+
+ /**
+ * Get the list of selected Sirius Diagram.
+ *
+ * @return the list of Sirius Diagram
+ */
+ public List<DSemanticDiagram> getSelectedDSemanticDiagrams() {
+ final List<DSemanticDiagram> siriusDiagrams = new ArrayList<>();
+
+ // Get first element if the selection is an IStructuredSelection
+ final Iterator<?> iterator = getSelectedElements().iterator();
+
+ while (iterator.hasNext()) {
+ Object current = iterator.next();
+ // Get the sirius diagram template object (Facet Element) by IAdaptable mechanism
+ EObject diagram = EMFHelper.getEObject(current);
+ if (diagram instanceof DSemanticDiagram) {
+ siriusDiagrams.add((DSemanticDiagram) diagram);
+ }
+ }
+
+ return siriusDiagrams;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/RenameSiriusDiagramHandler.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/RenameSiriusDiagramHandler.java
new file mode 100755
index 0000000..a8e7330
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/RenameSiriusDiagramHandler.java
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
+import org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.commands.RenameSiriusDiagramLabelCommand;
+import org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.messages.Messages;
+import org.eclipse.papyrus.views.modelexplorer.commands.RenameElementCommand;
+import org.eclipse.papyrus.views.modelexplorer.util.ModelExplorerEditionUtil;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+
+/**
+ * This handler provides the method to rename a Sirius Diagram.
+ *
+ */
+public class RenameSiriusDiagramHandler extends AbstractSiriusDiagramCommandHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCommand(IEvaluationContext context) {
+ TransactionalEditingDomain editingDomain = getEditingDomain(context);
+ List<DSemanticDiagram> siriusDiagrams = getSelectedDSemanticDiagrams();
+ if (editingDomain != null && siriusDiagrams.size() == 1) {
+
+ final DSemanticDiagram siriusDiagram = siriusDiagrams.get(0);
+
+ final String siriusDiagramLabel = LabelInternationalizationUtils.getLabelWithoutSubstract(siriusDiagram, true);
+ if (null != siriusDiagramLabel && LabelInternationalizationPreferencesUtils.getInternationalizationPreference(siriusDiagram)) {
+ AbstractTransactionalCommand cmd = new RenameSiriusDiagramLabelCommand(editingDomain, "ChangeDSemanticDiagramLabelCommand", siriusDiagram, siriusDiagramLabel, Messages.RenameSiriusDiagramHandler_Label_DialogTitle); //$NON-NLS-1$
+ return new GMFtoEMFCommandWrapper(cmd);
+ } else {
+ final String currentName = siriusDiagram.getName();
+ if (null != currentName) {
+ EStructuralFeature nameFeature = ViewpointPackage.eINSTANCE.getDRepresentation_Name();
+ return new RenameElementCommand(editingDomain, "RenameSiriusDiagramCommand", siriusDiagram, currentName, nameFeature, Messages.RenameSiriusDiagramHandler_RenameAnExistingDSemanticDiagram, Messages.RenameSiriusDiagramHandler_NewName); //$NON-NLS-1$
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean computeEnabled(final IEvaluationContext context) {
+ boolean computeEnabled = super.computeEnabled(context);
+ if (computeEnabled) {
+ List<EObject> selectedElements = getSelectedElements();
+ EObject selection = selectedElements.get(0);
+ computeEnabled = !EMFHelper.isReadOnly(selection);
+ }
+ return computeEnabled;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Overridden to inline edit a sirius Diagram if it is handled by direct editor.
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ EObject selectedSiriusDiagram = getSelectedElement();
+
+ // If the selected seirius Diagram could be handled by direct editor
+ if (ModelExplorerEditionUtil.isHandledByDirectEditor(selectedSiriusDiagram)) {
+ // Call the edit element method from the model explorer to trigger DirectEditor
+ ModelExplorerEditionUtil.editElement(selectedSiriusDiagram);
+ } else {
+ // Otherwise, show the model dialog to get user input
+ super.execute(event);
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/SiriusDiagramQuickFormatHandler.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/SiriusDiagramQuickFormatHandler.java
new file mode 100755
index 0000000..e6e4a2c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/handlers/SiriusDiagramQuickFormatHandler.java
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.handlers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.actions.SiriusDiagramQuickFormatAction;
+import org.eclipse.papyrus.infra.ui.menu.NameNormalizationCommand;
+import org.eclipse.papyrus.infra.ui.menu.NamePropertyTester;
+
+/**
+ * The handler for the {@link SiriusDiagramQuickFormatAction}.
+ *
+ */
+public class SiriusDiagramQuickFormatHandler extends AbstractSiriusDiagramCommandHandler {
+
+ /**
+ * Constructor.
+ *
+ */
+ public SiriusDiagramQuickFormatHandler() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCommand(ExecutionEvent event) {
+ String parameter = event.getParameter(NamePropertyTester.PARAMETER_ID);
+
+ SiriusDiagramQuickFormatAction action = new SiriusDiagramQuickFormatAction(parameter, new ArrayList<EObject>(getSelectedDSemanticDiagrams()));
+ setBaseEnabled(action.isEnabled());
+ if (action.isEnabled()) {
+ return action.getCommand();
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ super.setEnabled(evaluationContext);
+ SiriusDiagramQuickFormatAction action = new SiriusDiagramQuickFormatAction(NameNormalizationCommand.DEFAULT_ACTION, getSelectedElements());
+ setBaseEnabled(action.isEnabled());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCommand(IEvaluationContext context) {
+ // not used
+ return null;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean computeEnabled(IEvaluationContext context) {
+ return !getSelectedDSemanticDiagrams().isEmpty();
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/messages/Messages.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/messages/Messages.java
new file mode 100755
index 0000000..4cc2b4e
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/messages/Messages.java
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This class provides messages.
+ *
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.messages.messages"; //$NON-NLS-1$
+
+ public static String RenameSiriusDiagramHandler_NewName;
+
+ public static String RenameSiriusDiagramHandler_RenameAnExistingDSemanticDiagram;
+
+ public static String RenameSiriusDiagramHandler_Label_DialogTitle;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Constructor.
+ *
+ */
+ private Messages() {
+ // to avoid instantiation
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/messages/messages.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/messages/messages.properties
new file mode 100755
index 0000000..ff68e13
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/messages/messages.properties
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+#-------------------------------------------------------------------------------
+RenameSiriusDiagramHandler_NewName=New name:
+RenameSiriusDiagramHandler_RenameAnExistingDSemanticDiagram=Rename an existing Sirius Diagram
+RenameSiriusDiagramHandler_Label_DialogTitle=Rename Sirius Diagram label...
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetContainedSiriusDiagram.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetContainedSiriusDiagram.java
new file mode 100755
index 0000000..6bf8a5c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetContainedSiriusDiagram.java
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Query to retrieve the collection of all contained Sirius Diagram.
+ *
+ */
+public class GetContainedSiriusDiagram implements IJavaQuery2<EObject, Collection<DSemanticDiagram>> {
+
+ /**
+ * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager)
+ *
+ * @param source
+ * @param parameterValues
+ * @param facetManager
+ * @return
+ * the collection of all contained Sirius Diagram.
+ * @throws DerivedTypedElementException
+ */
+ @Override
+ public Collection<DSemanticDiagram> evaluate(EObject source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ List<DSemanticDiagram> siriusDiagrams = new ArrayList<>();
+
+ Collection<Setting> settings = EMFHelper.getUsages(source);
+ if (settings != null) {
+ for (Setting setting : settings) {
+ EObject usingElement = setting.getEObject();
+ if (usingElement instanceof DSemanticDiagram) {
+ DSemanticDiagram siriusDiagram = (DSemanticDiagram) usingElement;
+ if (null != siriusDiagram.getTarget() && siriusDiagram.getTarget() == source && !siriusDiagrams.contains(siriusDiagram)) {
+ siriusDiagrams.add(siriusDiagram);
+ }
+ }
+ }
+ }
+ return siriusDiagrams;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramIconQuery.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramIconQuery.java
new file mode 100755
index 0000000..7046c77
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramIconQuery.java
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;
+
+import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage;
+import org.eclipse.papyrus.emf.facet.custom.ui.ImageUtils;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Query to retrieve the path to the icon of the corresponding Sirius Diagram.
+ *
+ */
+public class GetSiriusDiagramIconQuery implements IJavaQuery2<DSemanticDiagram, IImage> {
+
+ /**
+ * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager)
+ *
+ * @param context
+ * @param parameterValues
+ * @param facetManager
+ * @return
+ * the icon
+ * @throws DerivedTypedElementException
+ */
+ @Override
+ public IImage evaluate(final DSemanticDiagram context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException {
+ ViewPrototype prototype = ViewPrototype.get(context);
+ return (prototype != null) ? ImageUtils.wrap(prototype.getIconURI()) : null;
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramLabelQuery.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramLabelQuery.java
new file mode 100755
index 0000000..734e2ae
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramLabelQuery.java
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;
+
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalizationUtils;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Query to retrieve the label of the corresponding Sirius Diagram.
+ *
+ */
+public class GetSiriusDiagramLabelQuery implements IJavaQuery2<DSemanticDiagram, String> {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String evaluate(final DSemanticDiagram context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException {
+ String label = context.getName();
+
+ if (null != context.eResource() && LabelInternationalizationPreferencesUtils.getInternationalizationPreference(context)) {
+ label = LabelInternationalizationUtils.getLabelWithoutSubstract(context, true);
+ label = null != label ? label : context.getName();
+ }
+
+ return context.getName();
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramParentQuery.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramParentQuery.java
new file mode 100755
index 0000000..7be5721
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetSiriusDiagramParentQuery.java
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Query to retrieve the graphical container of the corresponding Sirius Diagram.
+ *
+ */
+public class GetSiriusDiagramParentQuery implements IJavaQuery2<DSemanticDiagram, EObject> {
+
+ /**
+ * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager)
+ *
+ * @param context
+ * @param parameterValues
+ * @param facetManager
+ * @return
+ * the graphical container of a Table. If no such container exists, the semantic element of the Sirius Diagram is returned.
+ * @throws DerivedTypedElementException
+ */
+ @Override
+ public EObject evaluate(final DSemanticDiagram context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException {
+ return context.getTarget();
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetVisibleReferencesQuery.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetVisibleReferencesQuery.java
new file mode 100755
index 0000000..0092ab0
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/GetVisibleReferencesQuery.java
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Query to retrieve the visible references of corresponding Sirius Diagram.
+ *
+ */
+public class GetVisibleReferencesQuery implements IJavaQuery2<DSemanticDiagram, List<Object>> {
+ /**
+ * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager)
+ *
+ * @param context
+ * @param parameterValues
+ * @param facetManager
+ * @return
+ * return empty list of visible references.
+ * @throws DerivedTypedElementException
+ */
+ @Override
+ public List<Object> evaluate(final DSemanticDiagram context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException {
+ return Collections.emptyList();
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/IsSiriusDiagramContainerQuery.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/IsSiriusDiagramContainerQuery.java
new file mode 100755
index 0000000..9a91345
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src/org/eclipse/papyrus/infra/siriusdiag/modelexplorer/internal/query/IsSiriusDiagramContainerQuery.java
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.modelexplorer.internal.query;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Query to test if the selected element is a Sirius Diagram container.
+ *
+ */
+public class IsSiriusDiagramContainerQuery implements IJavaQuery2<EObject, Boolean> {
+ /**
+ * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager)
+ *
+ * @param context
+ * @param parameterValues
+ * @param facetManager
+ * @return
+ * <code>true</code> if the selection is a Sirius Diagram container
+ * @throws DerivedTypedElementException
+ */
+ @Override
+ public Boolean evaluate(final EObject context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException {
+ Collection<Setting> settings = EMFHelper.getUsages(context);
+ if (settings != null) {
+ for (Setting setting : settings) {
+ EObject usingElement = setting.getEObject();
+ if (usingElement instanceof DSemanticDiagram) {
+ final DSemanticDiagram siriusDiagram = (DSemanticDiagram) usingElement;
+ final EObject container = siriusDiagram.getTarget();
+ if (container == context) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/usecases.md b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/usecases.md
new file mode 100755
index 0000000..db99c4d
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.modelexplorer/usecases.md
@@ -0,0 +1,19 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+#-------------------------------------------------------------------------------
+#This plugins provides:
+##The facets, custom, and queries required for the ModelExplorer in order to be able to display the SiriusDiagram
+##The handlers for:
+###the rename action
+###the actions on the name (Uppercase, lowercase, capitalize,...)
+##The configuration of the direct editor (F2)
+##The preference for the direct editor
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.classpath
new file mode 100755
index 0000000..e801ebf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.project
new file mode 100755
index 0000000..6d6d1d8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.properties</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..ed897e1
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.properties;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.properties
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.122.0,4.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.9.0,4.0.0)",
+ org.eclipse.emf.edit.ui;bundle-version="[2.19.0,3.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.osgi;bundle-version="[3.16.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.emf.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.1.0,5.0.0)"
+Bundle-Activator: org.eclipse.papyrus.infra.siriusdiag.properties.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/OSGI-INF/l10n/bundle.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..5050398
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+#Properties file for org.eclipse.papyrus.infra.siriusdiag.properties
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus-SiriusDiagram - SiriusDiagram Properties
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/build.properties
new file mode 100755
index 0000000..6acf718
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/build.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ OSGI-INF/
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/plugin.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/plugin.xml
new file mode 100755
index 0000000..5a7cd20
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="TreeOutlinePage">
+ <propertySection
+ class="org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf.SiriusDiagramPropertySection"
+ filter="org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf.SiriusDiagramPackageSectionFilter"
+ id="org.eclipse.papyrus.infra.siriusdiag.properties.propertySection"
+ tab="advanced">
+ <input
+ type="java.lang.Object">
+ </input>
+ </propertySection>
+ </propertySections>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/pom.xml
new file mode 100755
index 0000000..50c1f08
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.properties</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/Activator.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/Activator.java
new file mode 100755
index 0000000..92f9068
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/Activator.java
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.properties;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.siriusdiag.properties"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/AbstractEObjectAdvancedPropertySection.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/AbstractEObjectAdvancedPropertySection.java
new file mode 100755
index 0000000..f8cf680
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/AbstractEObjectAdvancedPropertySection.java
@@ -0,0 +1,109 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory.Descriptor;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory.Descriptor.Registry;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection;
+
+/**
+ * Property Section used to contribute to Papyrus Advanced Property View for EObject selection
+ */
+public abstract class AbstractEObjectAdvancedPropertySection extends AdvancedPropertySection {
+
+ /**
+ * Constructor.
+ *
+ */
+ public AbstractEObjectAdvancedPropertySection() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ *
+ * @param part
+ * @param selection
+ */
+ @Override
+ public final void setInput(final IWorkbenchPart part, ISelection selection) {
+ if (selection instanceof IStructuredSelection) {
+ // ensure the selection represents an EObject
+ final Object first = ((IStructuredSelection) selection).getFirstElement();
+ final EObject eobject = EMFHelper.getEObject(first);
+ if (eobject != null) {
+ selection = new StructuredSelection(eobject);
+ }
+ }
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).getFirstElement() instanceof EObject) {
+ final EObject selectedElement = (EObject) ((IStructuredSelection) selection).getFirstElement();
+ final Registry registry = ComposedAdapterFactory.Descriptor.Registry.INSTANCE;
+ final Collection<Object> types = new ArrayList<>();
+ types.add(selectedElement.eClass().getEPackage());
+ types.add(IItemPropertySource.class);
+
+
+ // we look for the adapter factory registered for the metamodel of the object we want to edit
+ final Descriptor descriptor = registry.getDescriptor(types);
+ final AdapterFactory adapterFactory = descriptor.createAdapterFactory();
+ this.page.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory) {
+
+ /**
+ * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#createPropertySource(java.lang.Object, org.eclipse.emf.edit.provider.IItemPropertySource)
+ *
+ * @param object
+ * @param itemPropertySource
+ * @return
+ */
+ @Override
+ protected IPropertySource createPropertySource(final Object object, final IItemPropertySource itemPropertySource) {
+ return AbstractEObjectAdvancedPropertySection.this.createPropertySource(object, itemPropertySource);
+ }
+ });
+ } else {
+ this.page.setPropertySourceProvider(null);
+ }
+
+ super.setInput(part, selection);
+ }
+
+
+ /**
+ *
+ * @param object
+ * an object
+ * @param itemPropertySource
+ * the item property source
+ * @return
+ * the created {@link IPropertySource}
+ */
+ public abstract IPropertySource createPropertySource(final Object object, final IItemPropertySource itemPropertySource);
+
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/CustomPropertyDescriptor.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/CustomPropertyDescriptor.java
new file mode 100755
index 0000000..ae071bd
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/CustomPropertyDescriptor.java
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf;
+
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.ui.provider.PropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.emf.ui.editor.factories.AbstractEStructuralFeatureDialogEditorFactory;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Property Descriptor used to contribute to the Papyrus Advanced Property View
+ */
+public class CustomPropertyDescriptor extends PropertyDescriptor {
+
+ /**
+ * the factory to use to edit the property
+ */
+ private final AbstractEStructuralFeatureDialogEditorFactory factory;
+
+ /**
+ * Constructor.
+ *
+ * @param object
+ * @param itemPropertyDescriptor
+ */
+ public CustomPropertyDescriptor(final Object object, final IItemPropertyDescriptor itemPropertyDescriptor, final AbstractEStructuralFeatureDialogEditorFactory factory) {
+ super(object, itemPropertyDescriptor);
+ this.factory = factory;
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.ui.provider.PropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite)
+ *
+ * @param composite
+ * @return
+ */
+ @Override
+ public final CellEditor createPropertyEditor(final Composite composite) {
+ return this.factory.createEditor(this.object, this.itemPropertyDescriptor, composite);
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.ui.provider.PropertyDescriptor#getLabelProvider()
+ *
+ * @return
+ */
+ @Override
+ public final ILabelProvider getLabelProvider() {
+ return this.factory.getOrCreateLabelProvider();
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramPackageSectionFilter.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramPackageSectionFilter.java
new file mode 100755
index 0000000..60425fa
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramPackageSectionFilter.java
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.diagram.DiagramPackage;
+
+/**
+ * Property section dedicated to element coming from Sirius DiagramPackage
+ */
+public class SiriusDiagramPackageSectionFilter implements IFilter {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public SiriusDiagramPackageSectionFilter() {
+ // nothing to do
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ *
+ * @param toTest
+ * @return
+ */
+ @Override
+ public boolean select(final Object toTest) {
+ final EObject eobject = org.eclipse.papyrus.infra.emf.utils.EMFHelper.getEObject(toTest);
+ if (false == eobject instanceof EObject) {
+ return false;
+ }
+ final EPackage epackage = eobject.eClass().getEPackage();
+ return epackage == DiagramPackage.eINSTANCE;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramPropertySection.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramPropertySection.java
new file mode 100755
index 0000000..5541ea6
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramPropertySection.java
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf;
+
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * This class provides the section for the elements coming from Sirius DiagramPackage metamodel
+ */
+public class SiriusDiagramPropertySection extends AbstractEObjectAdvancedPropertySection {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public SiriusDiagramPropertySection() {
+ super();
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf.AbstractEObjectAdvancedPropertySection#createPropertySource(java.lang.Object, org.eclipse.emf.edit.provider.IItemPropertySource)
+ *
+ * @param object
+ * @param itemPropertySource
+ * @return
+ */
+ @Override
+ public IPropertySource createPropertySource(Object object, IItemPropertySource itemPropertySource) {
+ return new SiriusDiagramStructurePropertySource(object, itemPropertySource);
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramStructurePropertySource.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramStructurePropertySource.java
new file mode 100755
index 0000000..fd849ef
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.properties/src/org/eclipse/papyrus/infra/siriusdiag/properties/internal/emf/SiriusDiagramStructurePropertySource.java
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.properties.internal.emf;
+
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.ui.provider.PropertySource;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * The {@link PropertySource} used to provide a better edition way for some properties of the Sirius DiagramPackage metamodel
+ */
+public class SiriusDiagramStructurePropertySource extends PropertySource {
+
+ /**
+ * Constructor.
+ *
+ * @param object
+ * @param itemPropertySource
+ */
+ public SiriusDiagramStructurePropertySource(final Object object, final IItemPropertySource itemPropertySource) {
+ super(object, itemPropertySource);
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.ui.provider.PropertySource#createPropertyDescriptor(org.eclipse.emf.edit.provider.IItemPropertyDescriptor)
+ *
+ * @param itemPropertyDescriptor
+ * @return
+ */
+ @Override
+ protected IPropertyDescriptor createPropertyDescriptor(final IItemPropertyDescriptor itemPropertyDescriptor) {
+ // we don't provide specific customization for the property view
+ return super.createPropertyDescriptor(itemPropertyDescriptor);
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.classpath
new file mode 100755
index 0000000..b1592a8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.classpath
@@ -0,0 +1,8 @@
+<?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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="api"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.project
new file mode 100755
index 0000000..20f2856
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.representation.architecture</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..d0f02e8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.representation.architecture
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.siriusdiag.representation.architecture.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.papyrus.emf.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.ui;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.sirius.ui;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.sirius;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="[4.1.0,5.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.representation.architecture
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.infra.siriusdiag.representation.architecture,
+ org.eclipse.papyrus.infra.siriusdiag.representation.architecture.commands
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/OSGI-INF/l10n/bundle.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..7be5c3d
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,13 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus-SiriusDiagram - Integration Architecture
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/architecture/internal/messages/Messages.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/architecture/internal/messages/Messages.java
new file mode 100755
index 0000000..f97fe13
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/architecture/internal/messages/Messages.java
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.architecture.internal.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.siriusdiag.architecture.internal.messages.messages"; //$NON-NLS-1$
+ public static String AbstractCreateSiriusDiagramEditorCommand_DialogMessage;
+ public static String CreatePapyrusSiriusDiagramEditorCommand_CreateSiriusDiagramDialogTitle;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/architecture/internal/messages/messages.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/architecture/internal/messages/messages.properties
new file mode 100755
index 0000000..a1ea8da
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/architecture/internal/messages/messages.properties
@@ -0,0 +1,13 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+AbstractCreateSiriusDiagramEditorCommand_DialogMessage=Enter the name for the new diagram
+CreatePapyrusSiriusDiagramEditorCommand_CreateSiriusDiagramDialogTitle=Sirius Diagram Creation
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/AbstractCreateSiriusDiagramEditorCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/AbstractCreateSiriusDiagramEditorCommand.java
new file mode 100755
index 0000000..0ed0da5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/AbstractCreateSiriusDiagramEditorCommand.java
@@ -0,0 +1,215 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.emf.ui.providers.labelproviders.DelegatingToEMFLabelProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.siriusdiag.architecture.internal.messages.Messages;
+import org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.representation.architecture.commands.CreateSiriusDiagramEditorViewCommand;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * This class provides useful method to create a new Sirius Diagram and open its editor
+ */
+public abstract class AbstractCreateSiriusDiagramEditorCommand implements ICreateSiriusDiagramEditorCommand {
+
+ /**
+ *
+ * @param dialogTitle
+ * the dialog title
+ * @param proposedName
+ * the proposed name
+ * @return
+ * the name entered by the user, or <code>null</code> in case of cancel
+ */
+ protected String askDiagramName(final String dialogTitle, final String proposedName) {
+ final InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(), dialogTitle, Messages.AbstractCreateSiriusDiagramEditorCommand_DialogMessage, proposedName, null);
+ if (dialog.open() == Window.OK) {
+ return dialog.getValue();
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param diagramTemplatePrototype
+ * the diagram template prototype used to create the {@link diagram}
+ * @param diagramName
+ * the name of the created diagram
+ * @param semanticContext
+ * the semantic context used for the creation of the {@link diagram}
+ * @param openAfterCreation
+ * if <code>true</code> the editor will be opened after the creation
+ * @return
+ * the created {@link diagram}
+ */
+ protected DSemanticDiagram execute(final SiriusDiagramPrototype diagramTemplatePrototype, final String diagramName, final EObject semanticContext, final boolean openAfterCreation, final String id) {
+ return execute(diagramTemplatePrototype, diagramName, semanticContext, semanticContext, openAfterCreation, id);
+ }
+
+ /**
+ *
+ * @param diagram
+ * the diagram template prototype used to create the {@link diagram}
+ * @param diagramName
+ * the name of the created diagram
+ * @param semanticContext
+ * the semantic context used for the creation of the {@link diagram}
+ * @param graphicalContext
+ * the graphical context used for the creation of the {@link diagram}
+ * @param openAfterCreation
+ * if <code>true</code> the editor will be opened after the creation
+ * @return
+ * the created {@link diagram}
+ */
+ public DSemanticDiagram execute(final SiriusDiagramPrototype diagram, final String diagramName, final EObject semanticContext, final EObject graphicalContext, final boolean openAfterCreation, final String id) {
+ final Resource res = semanticContext.eResource();
+ final URI semanticURI = res.getURI();
+ if (semanticURI.isPlatformPlugin()) {
+ Activator.log.error(new UnsupportedOperationException("Diagram for element stored as platform plugin is not yet supported")); //$NON-NLS-1$
+ return null;
+ }
+
+ final TransactionalEditingDomain domain = getEditingDomain(semanticContext);
+ if (null == domain) {
+ return null;
+ }
+ final String siriusDiagramMainTitle = getSiriusDiagramMainTitle(semanticContext);
+
+ final CreateSiriusDiagramEditorViewCommand command = createDSemanticDiagramEditorCreationCommand(domain, diagram, diagramName, siriusDiagramMainTitle, semanticContext, openAfterCreation, id);
+
+ domain.getCommandStack().execute(command);
+
+ return command.getCreatedEditorView();
+ }
+
+
+ /**
+ *
+ * @param editingDomain
+ * the editing domain to use for the command
+ * @param diagramPrototype
+ * * the diagram template prototype used to create the {@link diagram}
+ * @param diagramName
+ * the name of the created diagram
+ * @param diagramMainTitle
+ * the main title of the diagram
+ * @param semanticContext
+ * the semantic context used for the creation of the {@link diagram}
+ * @param graphicalContext
+ * the graphical context used for the creation of the {@link diagram}
+ * @param openAfterCreation
+ * if <code>true</code> the editor will be opened after the creation
+ * @return
+ * the created {@link diagram}
+ */
+ public CreateSiriusDiagramEditorViewCommand createDSemanticDiagramEditorCreationCommand(final TransactionalEditingDomain editingDomain,
+ final SiriusDiagramPrototype diagramPrototype,
+ final String diagramName,
+ final String diagramMainTitle,
+ final EObject semanticContext,
+ final EObject graphicalContext,
+ final boolean openAfterCreation,
+ final String diagramId) {
+ return new CreateSiriusDiagramEditorViewCommand(editingDomain, diagramPrototype, diagramName, diagramMainTitle, semanticContext, graphicalContext, openAfterCreation, diagramId);
+ }
+
+ /**
+ *
+ * @param editingDomain
+ * the editing domain to use for the command
+ * @param diagramPrototype
+ * * the diagram template prototype used to create the {@link diagram}
+ * @param diagramName
+ * the name of the created diagram
+ * @param diagramMainTitle
+ * the main title of the diagram
+ * @param semanticContext
+ * the semantic context used for the creation of the {@link diagram}
+ * @param openAfterCreation
+ * if <code>true</code> the editor will be opened after the creation
+ * @return
+ * the created {@link diagram}
+ */
+ public CreateSiriusDiagramEditorViewCommand createDSemanticDiagramEditorCreationCommand(final TransactionalEditingDomain editingDomain,
+ final SiriusDiagramPrototype diagramPrototype,
+ final String diagramName,
+ final String diagramMainTitle,
+ final EObject semanticContext,
+ final boolean openAfterCreation,
+ final String diagramId) {
+ return new CreateSiriusDiagramEditorViewCommand(editingDomain, diagramPrototype, diagramName, diagramMainTitle, semanticContext, openAfterCreation, diagramId);
+ }
+
+ /**
+ *
+ * @param modelElement
+ * an element of the edited model
+ * @return
+ * the service registry or <code>null</code> if not found
+ */
+ protected final ServicesRegistry getServiceRegistry(final EObject modelElement) {
+ try {
+ return ServiceUtilsForEObject.getInstance().getServiceRegistry(modelElement);
+ } catch (ServiceException e) {
+ Activator.log.error("ServicesRegistry not found", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param modelElement
+ * an element of the edited model
+ * @return
+ * the editing domain or <code>null</code> if not found
+ */
+ protected final TransactionalEditingDomain getEditingDomain(final EObject modelElement) {
+ final ServicesRegistry servicesRegistry = getServiceRegistry(modelElement);
+ if (null == servicesRegistry) {
+ return null;
+ }
+ try {
+ return ServiceUtils.getInstance().getTransactionalEditingDomain(servicesRegistry);
+ } catch (ServiceException e) {
+ Activator.log.error("EditingDomain not found", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param semanticContext
+ * the semantic context for the create DSemanticDiagram
+ * @return
+ * the label to use as main title for the generated diagram
+ */
+ protected String getSiriusDiagramMainTitle(final EObject semanticContext) {
+ return DelegatingToEMFLabelProvider.INSTANCE.getText(semanticContext);
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusClassDiagramEditorCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusClassDiagramEditorCommand.java
new file mode 100755
index 0000000..cc50b15
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusClassDiagramEditorCommand.java
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.core.utils.EditorNameInitializer;
+import org.eclipse.papyrus.infra.siriusdiag.architecture.internal.messages.Messages;
+import org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.SiriusDiagramViewPrototype;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+
+/**
+ * This class allows to create new Sirius Diagram instance and open the papyrus editor for it
+ */
+public class CreatePapyrusSiriusClassDiagramEditorCommand extends AbstractCreateSiriusDiagramEditorCommand implements ICreateSiriusDiagramEditorCommand {
+
+ /**
+ * Prompts the user the future diagram's name
+ *
+ * @return The name, or <code>null</code> if the user cancelled the creation
+ */
+ private String askName(final ViewPrototype prototype, final EObject semanticContext) {
+ final String defaultName = getDefaultName(prototype, semanticContext);
+ return askDiagramName(Messages.CreatePapyrusSiriusDiagramEditorCommand_CreateSiriusDiagramDialogTitle, defaultName);
+ }
+
+ /**
+ *
+ * @param prototype
+ * the ViewPrototype
+ * @param semanticContext
+ * the semantic context for the created DSemanticDiagram
+ * @return
+ * the default name to use
+ */
+ private String getDefaultName(final ViewPrototype prototype, final EObject semanticContext) {
+ final StringBuilder nameBuilder = new StringBuilder(prototype.getLabel().replaceAll(" ", "")); //$NON-NLS-1$ //$NON-NLS-2$
+ final String nameWithIncrement = EditorNameInitializer.getNameWithIncrement(DiagramPackage.eINSTANCE.getDDiagram(), ViewpointPackage.eINSTANCE.getDRepresentationDescriptor_Name(), nameBuilder.toString(),
+ semanticContext);
+ return nameWithIncrement;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.ui.internal.ICreateSiriusDiagramEditorCommand.ICreateDSemanticDiagramEditorCommand#execute(org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.PapyrusDSemanticDiagramViewPrototype,
+ * org.eclipse.emf.ecore.EObject, java.lang.String)
+ *
+ * @param prototype
+ * @param name
+ * @param semanticContext
+ * @param openAfterCreation
+ * @return
+ */
+ @Override
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, final EObject semanticContext, final boolean openAfterCreation) {
+ return execute(prototype, name, semanticContext, semanticContext, openAfterCreation);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand.ICreateDSemanticDiagramEditorCommand#execute(org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype, java.lang.String,
+ * org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, boolean)
+ *
+ * @param prototype
+ * @param name
+ * @param semanticContext
+ * @param graphicalContext
+ * @param openAfterCreation
+ * @return
+ */
+ @Override
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, final EObject semanticContext, final EObject graphicalContext, boolean openAfterCreation) {
+ if (prototype instanceof SiriusDiagramViewPrototype) {
+ final PapyrusRepresentationKind representation = prototype.getRepresentationKind();
+ Assert.isTrue(representation instanceof SiriusDiagramPrototype, "The representation associated to the SiriusDiagramViewPrototype must be an instanceof SiriusDiagramPrototype."); //$NON-NLS-1$
+ SiriusDiagramPrototype docProto = (SiriusDiagramPrototype) representation;
+
+ final String diagramName = (name == null || name.isEmpty()) ? askName(prototype, semanticContext) : name;
+ if (null == diagramName) {
+ return null; // the creation is cancelled
+ }
+
+ return super.execute(docProto, diagramName, graphicalContext, semanticContext, openAfterCreation, docProto.getImplementationID());
+ }
+ return null;
+ };
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusSequenceDiagramEditorCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusSequenceDiagramEditorCommand.java
new file mode 100755
index 0000000..21a5195
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusSequenceDiagramEditorCommand.java
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.EditorNameInitializer;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.infra.siriusdiag.architecture.internal.messages.Messages;
+import org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.SiriusDiagramViewPrototype;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * This class allows to create new Sirius Diagram instance and open the papyrus editor for it
+ * TODO : VL : This can must be moved in another plugin. Here we can't get UML dependencies
+ * TODO : VL Remove UML dependencies from this plugin
+ */
+public class CreatePapyrusSiriusSequenceDiagramEditorCommand extends AbstractCreateSiriusDiagramEditorCommand implements ICreateSiriusDiagramEditorCommand {
+
+ /**
+ * Prompts the user the future diagram's name
+ *
+ * @return The name, or <code>null</code> if the user cancelled the creation
+ */
+ private String askName(final ViewPrototype prototype, final EObject semanticContext) {
+ final String defaultName = getDefaultName(prototype, semanticContext);
+ return askDiagramName(Messages.CreatePapyrusSiriusDiagramEditorCommand_CreateSiriusDiagramDialogTitle, defaultName);
+ }
+
+ /**
+ *
+ * @param prototype
+ * the ViewPrototype
+ * @param semanticContext
+ * the semantic context for the created DSemanticDiagram
+ * @return
+ * the default name to use
+ */
+ private String getDefaultName(final ViewPrototype prototype, final EObject semanticContext) {
+ final StringBuilder nameBuilder = new StringBuilder(prototype.getLabel().replaceAll(" ", "")); //$NON-NLS-1$ //$NON-NLS-2$
+ final String nameWithIncrement = EditorNameInitializer.getNameWithIncrement(DiagramPackage.eINSTANCE.getDDiagram(), ViewpointPackage.eINSTANCE.getDRepresentationDescriptor_Name(), nameBuilder.toString(),
+ semanticContext);
+ return nameWithIncrement;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.ui.internal.ICreateSiriusDiagramEditorCommand.ICreateDSemanticDiagramEditorCommand#execute(org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.PapyrusDSemanticDiagramViewPrototype,
+ * org.eclipse.emf.ecore.EObject, java.lang.String)
+ *
+ * @param prototype
+ * @param name
+ * @param semanticContext
+ * @param openAfterCreation
+ * @return
+ */
+ @Override
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, final EObject semanticContext, final boolean openAfterCreation) {
+ return execute(prototype, name, semanticContext, semanticContext, openAfterCreation);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand.ICreateDSemanticDiagramEditorCommand#execute(org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype, java.lang.String,
+ * org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, boolean)
+ *
+ * @param prototype
+ * @param name
+ * @param semanticContext
+ * @param graphicalContext
+ * @param openAfterCreation
+ * @return
+ */
+ @Override
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, EObject semanticContext, final EObject graphicalContext, boolean openAfterCreation) {
+ if (prototype instanceof SiriusDiagramViewPrototype) {
+ final PapyrusRepresentationKind representation = prototype.getRepresentationKind();
+ Assert.isTrue(representation instanceof SiriusDiagramPrototype, "The representation associated to the PapyrusDSemanticDiagramViewPrototype must be an instanceof SiriusDiagramPrototype."); //$NON-NLS-1$
+ SiriusDiagramPrototype docProto = (SiriusDiagramPrototype) representation;
+
+ final String diagramName = (name == null || name.isEmpty()) ? askName(prototype, semanticContext) : name;
+ if (null == diagramName) {
+ return null; // the creation is cancelled
+ }
+ if (semanticContext instanceof Model) {
+ Model model = (Model) semanticContext;
+ Interaction interaction = UMLFactory.eINSTANCE.createInteraction();
+ try {
+
+ ServicesRegistry serviceRegistry = ServiceUtilsForResourceSet.getInstance().getServiceRegistry(model.eResource().getResourceSet());
+
+ TransactionalEditingDomain ted = serviceRegistry.getService(TransactionalEditingDomain.class);
+
+ ted.getCommandStack().execute(new RecordingCommand(ted) {
+
+ @Override
+ protected void doExecute() {
+
+ model.getPackagedElements().add(interaction);
+ }
+ });
+ return super.execute(docProto, diagramName, interaction, interaction, openAfterCreation, docProto.getImplementationID());
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ }
+ return super.execute(docProto, diagramName, graphicalContext, semanticContext, openAfterCreation, docProto.getImplementationID());
+ }
+ return null;
+ };
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusStateMachineDiagramEditorCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusStateMachineDiagramEditorCommand.java
new file mode 100755
index 0000000..50e3aaf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/CreatePapyrusSiriusStateMachineDiagramEditorCommand.java
@@ -0,0 +1,297 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.EditorNameInitializer;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.infra.siriusdiag.architecture.internal.messages.Messages;
+import org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.SiriusDiagramViewPrototype;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.sirius.diagram.ContainerLayout;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DiagramFactory;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.diagram.business.api.helper.SiriusDiagramHelper;
+import org.eclipse.sirius.diagram.business.api.helper.graphicalfilters.HideFilterHelper;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+import org.eclipse.uml2.uml.BehavioredClassifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * This class allows to create new Sirius Diagram instance and open the papyrus editor for it
+ */
+public class CreatePapyrusSiriusStateMachineDiagramEditorCommand extends AbstractCreateSiriusDiagramEditorCommand implements ICreateSiriusDiagramEditorCommand {
+
+
+ public static final int defaultX = 30;
+ public static final int defaultY = 30;
+ public static final int defaultWidth = 700;
+ public static final int defaultHeight = 300;
+ // Bug 513267: The initial header must be defined to 20 because when it is smaller, a first internal resize increase it automatically to 20 (CustomStateMachineResizeCommand).
+ public static final int defaultHeader = 20;
+
+ /**
+ * Prompts the user the future document's name
+ *
+ * @return The name, or <code>null</code> if the user cancelled the creation
+ */
+ private String askName(final ViewPrototype prototype, final EObject semanticContext) {
+ final String defaultName = getDefaultName(prototype, semanticContext);
+ return askDiagramName(Messages.CreatePapyrusSiriusDiagramEditorCommand_CreateSiriusDiagramDialogTitle, defaultName);
+ }
+
+ /**
+ *
+ * @param prototype
+ * the ViewPrototype
+ * @param semanticContext
+ * the semantic context for the created DSemanticDiagram
+ * @return
+ * the default name to use
+ */
+ private String getDefaultName(final ViewPrototype prototype, final EObject semanticContext) {
+ final StringBuilder nameBuilder = new StringBuilder(prototype.getLabel().replaceAll(" ", "")); //$NON-NLS-1$ //$NON-NLS-2$
+ final String nameWithIncrement = EditorNameInitializer.getNameWithIncrement(DiagramPackage.eINSTANCE.getDDiagram(), ViewpointPackage.eINSTANCE.getDRepresentationDescriptor_Name(), nameBuilder.toString(),
+ semanticContext);
+ return nameWithIncrement;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.ui.internal.ICreateSiriusDiagramEditorCommand.ICreateDSemanticDiagramEditorCommand#execute(org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.PapyrusDSemanticDiagramViewPrototype,
+ * org.eclipse.emf.ecore.EObject, java.lang.String)
+ *
+ * @param prototype
+ * @param name
+ * @param semanticContext
+ * @param openAfterCreation
+ * @return
+ */
+ @Override
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, final EObject semanticContext, final boolean openAfterCreation) {
+ return execute(prototype, name, semanticContext, semanticContext, openAfterCreation);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand.ICreateDSemanticDiagramEditorCommand#execute(org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype, java.lang.String,
+ * org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, boolean)
+ *
+ * @param prototype
+ * @param name
+ * @param semanticContext
+ * @param graphicalContext
+ * @param openAfterCreation
+ * @return
+ */
+ @Override
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, EObject semanticContext, final EObject graphicalContext, boolean openAfterCreation) {
+ if (prototype instanceof SiriusDiagramViewPrototype) {
+ final PapyrusRepresentationKind representation = prototype.getRepresentationKind();
+ Assert.isTrue(representation instanceof SiriusDiagramPrototype, "The representation associated to the PapyrusDSemanticDiagramViewPrototype must be an instanceof SiriusDiagramPrototype."); //$NON-NLS-1$
+ SiriusDiagramPrototype docProto = (SiriusDiagramPrototype) representation;
+
+ final String diagramName = (name == null || name.isEmpty()) ? askName(prototype, semanticContext) : name;
+ if (null == diagramName) {
+ return null; // the creation is cancelled
+ }
+
+
+ // if (semanticContext instanceof Model) {
+ // Model model = (Model) semanticContext;
+ // StateMachine sm = UMLFactory.eINSTANCE.createStateMachine();
+ // sm.setName("StateMachine1");
+ // semanticContext = sm;
+ // sm.createRegion("Region1");
+ try {
+
+ ServicesRegistry serviceRegistry = ServiceUtilsForResourceSet.getInstance().getServiceRegistry(semanticContext.eResource().getResourceSet());
+ TransactionalEditingDomain ted = serviceRegistry.getService(TransactionalEditingDomain.class);
+ DSemanticDiagram[] result = new DSemanticDiagram[1];
+ ted.getCommandStack().execute(new RecordingCommand(ted) {
+
+ @Override
+ protected void doExecute() {
+ Element sm = initializeModel(semanticContext);
+ DSemanticDiagram ddiagram = CreatePapyrusSiriusStateMachineDiagramEditorCommand.super.execute(docProto, diagramName, sm, graphicalContext, openAfterCreation, docProto.getImplementationID());
+ DiagramDescription desc = ddiagram.getDescription();
+ initializeDiagram(ddiagram, desc, sm);
+ result[0] = ddiagram;
+ }
+ });
+ return result[0];
+ } catch (ServiceException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ // return super.execute(docProto, diagramName, graphicalContext, semanticContext, openAfterCreation, docProto.getImplementationID());
+ // }
+ return null;
+ };
+
+
+
+ protected Element initializeModel(EObject owner) {
+ if (owner instanceof StateMachine) {
+ StateMachine sm = (StateMachine) owner;
+ initDefaultRegion(sm);
+ return sm;
+ } else if (owner instanceof State) {
+ State state = (State) owner;
+
+ EList<Region> regions = state.getRegions();
+ if (regions.isEmpty()) {
+ Region region = UMLFactory.eINSTANCE.createRegion();
+ regions.add(region);
+ region.setName(NamedElementUtil.getDefaultNameWithIncrement(region, regions));
+ }
+ return state;
+ } else {
+ StateMachine stateMachine = UMLFactory.eINSTANCE.createStateMachine();
+ if (owner instanceof BehavioredClassifier) {
+ BehavioredClassifier behaviorClassifier = (BehavioredClassifier) owner;
+ behaviorClassifier.getOwnedBehaviors().add(stateMachine);
+ } else if (owner instanceof Package) {
+ org.eclipse.uml2.uml.Package pack = (org.eclipse.uml2.uml.Package) owner;
+ pack.getPackagedElements().add(stateMachine);
+ }
+ init_StateMachine_Shape(stateMachine);
+ initDefaultRegion(stateMachine);
+ return stateMachine;
+ }
+ }
+
+ /**
+ * @param sm
+ */
+ private void initDefaultRegion(StateMachine sm) {
+ EList<Region> regions = sm.getRegions();
+ Region region;
+ if (regions.isEmpty()) {
+ region = UMLFactory.eINSTANCE.createRegion();
+ regions.add(region);
+ region.setName(NamedElementUtil.getDefaultNameWithIncrement(region, regions));
+ }
+ }
+
+
+
+ /**
+ * @generated
+ */
+ public void init_StateMachine_Shape(StateMachine instance) {
+ try {
+ Object value_0 = name_StateMachine_Shape(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0);
+ }
+ Region newInstance_1_0 = UMLFactory.eINSTANCE.createRegion();
+ instance.getRegions()
+ .add(newInstance_1_0);
+ Object value_1_0_0 = name_region_StateMachine_Shape(newInstance_1_0);
+ if (value_1_0_0 != null) {
+ newInstance_1_0.setName(
+ (String) value_1_0_0);
+ }
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ /**
+ * @generated
+ */
+ private String name_StateMachine_Shape(StateMachine it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Region_Shape(Region it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_region_StateMachine_Shape(Region it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+
+
+ protected void initializeDiagram(DDiagram diagram, DiagramDescription desc, Element sm) {
+ Region region = null;
+ var regionMapping = "Region";
+ if (sm instanceof StateMachine) {
+ StateMachine stateMachine = (StateMachine) sm;
+ region = stateMachine.getRegions().get(0);
+ // IAdaptable regionAdaptable = new SemanticAdapter(region, null);
+ // String semanticHint = ((IHintedType) UMLElementTypes.Region_Shape).getSemanticHint();
+ // if (compartmentView != null) {
+ // Node regionNode = ViewService.getInstance().createNode(regionAdaptable, compartmentView, semanticHint, -1, getPreferenceHint());
+ // if (regionNode.getLayoutConstraint() == null) {
+ // regionNode.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ // }
+ // // add region specifics
+ // Zone.createRegionDefaultAnnotation(regionNode);
+ // Zone.setWidth(regionNode, defaultWidth);
+ // Zone.setHeight(regionNode, defaultHeight - defaultHeader);
+ // }
+ } else if (sm instanceof State) {
+ regionMapping = "Region";
+ State state = (State) sm;
+ region = state.getRegions().get(0);
+
+ }
+ if (region != null) {
+ DNodeContainer compartment = (DNodeContainer) diagram.getOwnedDiagramElements().get(0);
+ final DNodeContainer newNode = DiagramFactory.eINSTANCE.createDNodeContainer();
+ HideFilterHelper.INSTANCE.hideLabel(newNode);
+ newNode.setTarget(region);
+ final var selector = regionMapping;
+ final var anyMatch = compartment.getActualMapping().getReusedContainerMappings().stream().filter(m -> selector.equals(m.getName())).findFirst();
+ newNode.setActualMapping(anyMatch.get());
+ newNode.setChildrenPresentation(ContainerLayout.FREE_FORM);
+ SiriusDiagramHelper.addNodeInContainer(compartment, false, newNode);
+ }
+ }
+
+
+
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/commands/AbstractCreatePapyrusEditorViewCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/commands/AbstractCreatePapyrusEditorViewCommand.java
new file mode 100755
index 0000000..7cb2a54
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/commands/AbstractCreatePapyrusEditorViewCommand.java
@@ -0,0 +1,229 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture.commands;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.siriusdiag.representation.architecture.Activator;
+import org.eclipse.papyrus.infra.siriusdiag.ui.modelresource.SiriusDiagramModel;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Abstract Command allowing to create a {@link diagram}
+ */
+public abstract class AbstractCreatePapyrusEditorViewCommand<T extends EObject> extends RecordingCommand {
+
+ /**
+ * the semantic context of the created view
+ */
+ protected final EObject semanticContext;
+
+ /**
+ * the graphical context of the created view
+ */
+ protected final EObject graphicalContext;
+
+ /**
+ * if <code>true</code>, we open the created editor after the creation
+ */
+ protected final boolean openAfterCreation;
+
+ /**
+ * the editor name
+ */
+ protected final String editorViewName;
+
+ /**
+ * the editor name
+ */
+ protected final String diagramId;
+
+ /**
+ * The created editor view
+ */
+ protected T createdEditorView;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain in which the command will be executed
+ * @param label
+ * the label of the command
+ * @param editorViewName
+ * the name of the created editor representation
+ * @param semanticContext
+ * the semantic context for the created editor view
+ * @param graphicalContext
+ * the graphical context for the editor (used to display it in the ModelExplorer)
+ * @param openAfterCreation
+ * if <code>true</code> the created editor will be opened after its creation
+ */
+ public AbstractCreatePapyrusEditorViewCommand(final TransactionalEditingDomain domain, final String label, final String editorViewName, final EObject semanticContext, final EObject graphicalContext, final boolean openAfterCreation, final String id) {
+ super(domain, label);
+ this.semanticContext = semanticContext;
+ this.graphicalContext = graphicalContext != null ? graphicalContext : semanticContext;
+ this.openAfterCreation = openAfterCreation;
+ this.editorViewName = editorViewName;
+ this.diagramId = id;
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain in which the command will be executed
+ * @param label
+ * the label of the command
+ * @param editorViewName
+ * the name of the created editor representation
+ * @param semanticContext
+ * the semantic context for the created editor view
+ * @param openAfterCreation
+ * if <code>true</code> the created editor will be opened after its creation
+ */
+ public AbstractCreatePapyrusEditorViewCommand(final TransactionalEditingDomain domain, final String label, final String editorViewName, final EObject semanticContext, final boolean openAfterCreation, final String diagramId) {
+ this(domain, label, editorViewName, semanticContext, null, openAfterCreation, diagramId);
+ }
+
+
+ /**
+ *
+ * @return
+ * the created editor view
+ */
+ public final T getCreatedEditorView() {
+ return this.createdEditorView;
+ }
+
+ /**
+ *
+ * @param modelElement
+ * an element of the edited model
+ * @param diagram
+ * the document template to save
+ */
+ protected final void attachToResource(final EObject modelElement, final DSemanticDiagram diagram) {
+ final ServicesRegistry sReg = getServiceRegistry(modelElement);
+ if (sReg == null) {
+ return;
+ }
+ final ModelSet modelSet = getModelSet(sReg);
+ if (null == modelSet) {
+ return;
+ }
+
+ SiriusDiagramModel model = null;
+ try {
+ model = (SiriusDiagramModel) modelSet.getModelChecked(SiriusDiagramModel.SIRIUS_DIAGRAM_MODEL_ID);
+ } catch (NotFoundException e) {
+ Activator.log.error("SiriusDiagramModel not found", e); //$NON-NLS-1$
+ return;
+ }
+ model.addDiagram(diagram, modelElement);
+ }
+
+ /**
+ *
+ * @param modelElement
+ * an element of the edited model
+ * @return
+ * the service registry or <code>null</code> if not found
+ */
+ protected final ServicesRegistry getServiceRegistry(final EObject modelElement) {
+ try {
+ return ServiceUtilsForEObject.getInstance().getServiceRegistry(modelElement);
+ } catch (ServiceException e) {
+ Activator.log.error("ServicesRegistry not found", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param servicesRegistry
+ * @return
+ * the ModelSet, or <code>null</code> if not found
+ */
+ private ModelSet getModelSet(final ServicesRegistry servicesRegistry) {
+ try {
+ return ServiceUtils.getInstance().getModelSet(servicesRegistry);
+ } catch (ServiceException e) {
+ Activator.log.error("ModelSet not found", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param servicesRegistry
+ * the servicesRegistry
+ * @return
+ * the page manager or <code>null</code> if not found
+ */
+ private IPageManager getPageManager(final ServicesRegistry servicesRegistry) {
+ try {
+ return ServiceUtils.getInstance().getService(IPageManager.class, servicesRegistry);
+ } catch (ServiceException e) {
+ Activator.log.error("IPageManager not found", e); //$NON-NLS-1$
+ }
+ return null;
+
+ }
+
+ /**
+ * Open the editor for the diagram
+ *
+ * @param proto
+ * the diagram
+ */
+ protected final void openEditor(final DSemanticDiagram proto) {
+ final ServicesRegistry sReg = getServiceRegistry(proto.getTarget());
+ if (null == sReg) {
+ return;
+ }
+ final IPageManager pageManager = getPageManager(sReg);
+ if (null == pageManager) {
+ return;
+ }
+ pageManager.openPage(proto);
+ }
+
+ /**
+ * @see org.eclipse.emf.common.command.AbstractCommand#getResult()
+ *
+ * @return
+ */
+ @Override
+ public Collection<?> getResult() {
+ if (this.createdEditorView != null) {
+ return Collections.singleton(this.createdEditorView);
+ }
+ return Collections.emptyList();
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/commands/CreateSiriusDiagramEditorViewCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/commands/CreateSiriusDiagramEditorViewCommand.java
new file mode 100755
index 0000000..41d5a99
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/commands/CreateSiriusDiagramEditorViewCommand.java
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture.commands;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramConstants;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.representation.architecture.Activator;
+import org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService;
+import org.eclipse.sirius.business.api.dialect.DialectManager;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.internal.session.SessionTransientAttachment;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+import org.eclipse.sirius.viewpoint.description.DAnnotation;
+import org.eclipse.sirius.viewpoint.description.DescriptionFactory;
+
+/**
+ * Create a DSemanticDiagram Editor view
+ */
+public class CreateSiriusDiagramEditorViewCommand extends AbstractCreatePapyrusEditorViewCommand<DSemanticDiagram> {
+
+ /**
+ * the {@link SiriusDiagramPrototype} used to create the {@link diagram} model and its editor view
+ */
+ private final SiriusDiagramPrototype prototype;
+
+ private DSemanticDiagram diagram;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * @param diagramTemplatePrototype
+ * @param diagramName
+ * @param diagramMainTitle
+ * @param semanticContext
+ * @param graphicalContext
+ * @param openAfterCreation
+ */
+ public CreateSiriusDiagramEditorViewCommand(final TransactionalEditingDomain domain, final SiriusDiagramPrototype diagramTemplatePrototype, final String diagramName, final String diagramMainTitle, final EObject semanticContext,
+ final EObject graphicalContext, final boolean openAfterCreation, final String diagramId) {
+ super(domain, "Create new Sirius Diagram", diagramName, semanticContext, graphicalContext, openAfterCreation, diagramId); //$NON-NLS-1$
+ this.prototype = diagramTemplatePrototype;
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * @param diagramTemplatePrototype
+ * @param diagramName
+ * @param diagramMainTitle
+ * @param semanticContext
+ * @param openAfterCreation
+ */
+ public CreateSiriusDiagramEditorViewCommand(final TransactionalEditingDomain domain, final SiriusDiagramPrototype diagramTemplatePrototype, final String diagramName, final String diagramMainTitle, final EObject semanticContext,
+ final boolean openAfterCreation, final String diagramId) {
+ this(domain, diagramTemplatePrototype, diagramName, diagramMainTitle, semanticContext, null, openAfterCreation, diagramId);
+ }
+
+ /**
+ *
+ * @return
+ * the {@link ISiriusSessionService} to use or <code>null</code> if not found
+ */
+ private ISiriusSessionService getSiriusSessionService() {
+ final ServicesRegistry servReg = getServiceRegistry(this.semanticContext);
+ try {
+ return (ISiriusSessionService) servReg.getService(ISiriusSessionService.SERVICE_ID);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ final ISiriusSessionService sessionService = getSiriusSessionService();
+ if (sessionService == null || this.prototype == null) {
+ return;
+ }
+ final DiagramDescription diagramDescription = sessionService.getSiriusDiagramDescriptionFromPapyrusPrototype(this.prototype, this.semanticContext);
+ if (diagramDescription == null) {
+ return;
+ }
+ final Session session = sessionService.getSiriusSession();
+
+ if (DialectManager.INSTANCE.canCreate(this.semanticContext, diagramDescription)) {
+
+ // required to be able to create the diagram
+ this.semanticContext.eAdapters().add(new SessionTransientAttachment(session));
+ // TODO : find a better way for that
+ // this annotation is used to retrieve the ViewPrototype for a given diagram
+ // TODO try to create a dialect manager
+ // TODO : write that in the documentation
+ this.diagram = (DSemanticDiagram) DialectManager.INSTANCE.createRepresentation(this.editorViewName, this.semanticContext, diagramDescription, session, new NullProgressMonitor());
+ DAnnotation annotation = DescriptionFactory.eINSTANCE.createDAnnotation();
+ annotation.setSource(SiriusDiagramConstants.PAPYRUS_SIRIUS_DIAGRAM_IMPLEMENTATION_DANNOTATION_SOURCE);
+ annotation.getDetails().put(SiriusDiagramConstants.PAPYRUS_SIRIUS_DIAGRAM_IMPLEMENTATION_DANNOTATION_KEY, this.prototype.getId());
+
+ this.diagram.getEAnnotations().add(annotation);
+
+ attachToResource(semanticContext, diagram);
+
+
+ if (this.openAfterCreation) {
+ openEditor(diagram);
+ }
+ if (diagram.eResource() != null) {
+ // we suppose all is ok
+ this.createdEditorView = diagram;
+ }
+ }
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/build.properties
new file mode 100755
index 0000000..f3625c6
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/build.properties
@@ -0,0 +1,8 @@
+source.. = src/,\
+ api/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/pom.xml
new file mode 100755
index 0000000..2eaf600
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.representation.architecture</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/src/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/Activator.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/src/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/Activator.java
new file mode 100755
index 0000000..9fa718a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.architecture/src/org/eclipse/papyrus/infra/siriusdiag/representation/architecture/Activator.java
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.representation.architecture;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.siriusdiag.representation.architecture"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.classpath
new file mode 100755
index 0000000..e9c6eaf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.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-11"/>
+ <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/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.project
new file mode 100755
index 0000000..6229acb
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.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/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..4254538
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.representation.edit;singleton:=true
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.representation.edit
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.siriusdiag.representation.provider.SiriusDiagramRepresentationEditPlugin$Implementation$Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Export-Package: org.eclipse.papyrus.infra.siriusdiag.representation.provider
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)";resolution:=optional;x-installation:=greedy,
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.emf.edit;bundle-version="[2.16.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.architecture.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.constraints;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.constraints.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.emf.ecore.edit;bundle-version="[2.13.0,3.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.infra.types.edit;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation.edit;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf.expressions;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf.expressions.edit;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.ui;bundle-version="[6.4.2,7.0.0)"
+Import-Package: org.osgi.framework;version="[1.10.0,2.0.0)"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/build.properties
new file mode 100755
index 0000000..119e9de
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/build.properties
@@ -0,0 +1,22 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/icons/full/obj16/SiriusDiagramPrototype.gif b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/icons/full/obj16/SiriusDiagramPrototype.gif
new file mode 100755
index 0000000..0218fae
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/icons/full/obj16/SiriusDiagramPrototype.gif
Binary files differ
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/plugin.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/plugin.properties
new file mode 100755
index 0000000..8fcb787
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/plugin.properties
@@ -0,0 +1,35 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+
+pluginName = Papyrus-SiriusDiagram - Sirius Diagram 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_SiriusDiagramPrototype_type = Sirius Diagram Prototype
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_SiriusDiagramPrototype_diagramDescription_feature = Diagram Description
+_UI_SiriusDiagramPrototype_creationCommandClass_feature = Creation Command Class
+_UI_Unknown_feature = Unspecified
+
+_UI_Session_type = Session
+_UI_SiriusDiagramPrototype_session_feature = Session
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/plugin.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/plugin.xml
new file mode 100755
index 0000000..3748de1
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2021 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated siriusdiagramRepresentation -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/sirius/integration/1.0.0/emf/siriusdiagram/representation"
+ class="org.eclipse.papyrus.infra.siriusdiag.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 siriusdiagramRepresentation -->
+ <extender
+ uri="http://www.eclipse.org/papyrus/infra/core/architecture"
+ class="org.eclipse.papyrus.infra.siriusdiag.representation.provider.RepresentationItemProviderAdapterFactory$ArchitectureChildCreationExtender"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/pom.xml
new file mode 100755
index 0000000..6100fef
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.representation.edit</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/RepresentationItemProviderAdapterFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/RepresentationItemProviderAdapterFactory.java
new file mode 100755
index 0000000..03bc6ed
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/RepresentationItemProviderAdapterFactory.java
@@ -0,0 +1,382 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.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.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+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.siriusdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.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, IChildCreationExtender {
+ /**
+ * 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 helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(SiriusDiagramRepresentationEditPlugin.INSTANCE, RepresentationPackage.eNS_URI);
+
+ /**
+ * 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<>();
+
+ /**
+ * 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.siriusdiag.representation.SiriusDiagramPrototype} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SiriusDiagramPrototypeItemProvider siriusDiagramPrototypeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSiriusDiagramPrototypeAdapter() {
+ if (siriusDiagramPrototypeItemProvider == null) {
+ siriusDiagramPrototypeItemProvider = new SiriusDiagramPrototypeItemProvider(this);
+ }
+
+ return siriusDiagramPrototypeItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public void dispose() {
+ if (siriusDiagramPrototypeItemProvider != null) {
+ siriusDiagramPrototypeItemProvider.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.createSiriusDiagramPrototype()));
+
+ 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
+ */
+ @Override
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SiriusDiagramRepresentationEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/SiriusDiagramPrototypeItemProvider.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/SiriusDiagramPrototypeItemProvider.java
new file mode 100755
index 0000000..d8c15cc
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/SiriusDiagramPrototypeItemProvider.java
@@ -0,0 +1,202 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.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.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.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class SiriusDiagramPrototypeItemProvider extends PapyrusRepresentationKindItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SiriusDiagramPrototypeItemProvider(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);
+
+ addDiagramDescriptionPropertyDescriptor(object);
+ addCreationCommandClassPropertyDescriptor(object);
+ addSessionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Diagram Description feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDiagramDescriptionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_SiriusDiagramPrototype_diagramDescription_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_SiriusDiagramPrototype_diagramDescription_feature", "_UI_SiriusDiagramPrototype_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ RepresentationPackage.Literals.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION,
+ true,
+ false,
+ true,
+ null,
+ 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_SiriusDiagramPrototype_creationCommandClass_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_SiriusDiagramPrototype_creationCommandClass_feature", "_UI_SiriusDiagramPrototype_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ RepresentationPackage.Literals.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Session feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSessionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_SiriusDiagramPrototype_session_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_SiriusDiagramPrototype_session_feature", "_UI_SiriusDiagramPrototype_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ RepresentationPackage.Literals.SIRIUS_DIAGRAM_PROTOTYPE__SESSION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns SiriusDiagramPrototype.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/SiriusDiagramPrototype")); //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((SiriusDiagramPrototype) object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_SiriusDiagramPrototype_type") : //$NON-NLS-1$
+ getString("_UI_SiriusDiagramPrototype_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+ /**
+ * 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(SiriusDiagramPrototype.class)) {
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS:
+ 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);
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/SiriusDiagramRepresentationEditPlugin.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/SiriusDiagramRepresentationEditPlugin.java
new file mode 100755
index 0000000..3f5d445
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/provider/SiriusDiagramRepresentationEditPlugin.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.papyrus.infra.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;
+import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
+import org.eclipse.sirius.viewpoint.provider.SiriusEditPlugin;
+import org.osgi.framework.BundleActivator;
+
+/**
+ * This is the central singleton for the SiriusDiagramRepresentation edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class SiriusDiagramRepresentationEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final SiriusDiagramRepresentationEditPlugin INSTANCE = new SiriusDiagramRepresentationEditPlugin();
+
+ /**
+ * 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 SiriusDiagramRepresentationEditPlugin() {
+ super(new ResourceLocator[] {
+ ArchitectureEditPlugin.INSTANCE,
+ ConstraintsEditPlugin.INSTANCE,
+ DiagramUIPlugin.INSTANCE,
+ EcoreEditPlugin.INSTANCE,
+ TypesConfigurationsEditPlugin.INSTANCE,
+ RepresentationEditPlugin.INSTANCE,
+ SiriusEditPlugin.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;
+ }
+
+ /**
+ * The actual implementation of the purely OSGi-compatible <b>Bundle Activator</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final class Activator extends EMFPlugin.OSGiDelegatingBundleActivator {
+ @Override
+ protected BundleActivator createBundle() {
+ return new Implementation();
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.classpath
new file mode 100755
index 0000000..83c6388
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.classpath
@@ -0,0 +1,9 @@
+<?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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="api"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.project
new file mode 100755
index 0000000..f5b5b3c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..18c5e4a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.representation;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.representation
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Export-Package: org.eclipse.papyrus.infra.siriusdiag.representation,
+ org.eclipse.papyrus.infra.siriusdiag.representation.impl,
+ org.eclipse.papyrus.infra.siriusdiag.representation.util
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)";x-installation:=greedy;resolution:=optional,
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.constraints;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.sirius;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.emf.expressions;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/api/org/eclipse/papyrus/infra/siriusdiag/representation/ICreateSiriusDiagramEditorCommand.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/api/org/eclipse/papyrus/infra/siriusdiag/representation/ICreateSiriusDiagramEditorCommand.java
new file mode 100755
index 0000000..01f60b7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/api/org/eclipse/papyrus/infra/siriusdiag/representation/ICreateSiriusDiagramEditorCommand.java
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+
+/**
+ *
+ * This interface must be implemented by the creation command registered in the architecture framework, to be able to create new Sirius Diagram
+ *
+ */
+public interface ICreateSiriusDiagramEditorCommand {
+
+ /**
+ *
+ * @param prototype
+ * a view prototype (should be a PapyrusDSemanticDiagramViewPrototype)
+ * @param name
+ * the name of the new Sirius Diagram to create
+ * @param semanticContext
+ * the semantic context
+ * @param open
+ * open after creation
+ * @return
+ * the created Sirius Diagram
+ */
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, final EObject semanticContext, boolean open);
+
+ /**
+ *
+ * @param prototype
+ * a view prototype (should be a PapyrusDSemanticDiagramViewPrototype)
+ * @param name
+ * the name of the new Sirius Diagram to create
+ * @param semanticContext
+ * the semantic context
+ * @param graphicalContext
+ * the graphical context
+ * @param open
+ * open after creation
+ * @return
+ * the created Sirius Diagram
+ */
+ public DSemanticDiagram execute(final ViewPrototype prototype, final String name, final EObject semanticContext, final EObject graphicalContext, final boolean open);
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/api/org/eclipse/papyrus/infra/siriusdiag/representation/SiriusDiagramConstants.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/api/org/eclipse/papyrus/infra/siriusdiag/representation/SiriusDiagramConstants.java
new file mode 100755
index 0000000..1223c81
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/api/org/eclipse/papyrus/infra/siriusdiag/representation/SiriusDiagramConstants.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation;
+
+import org.eclipse.sirius.viewpoint.description.DAnnotation;
+
+/**
+ * Constants used by Papyrus Sirius - Diagram
+ */
+public class SiriusDiagramConstants {
+
+ private SiriusDiagramConstants() {
+ // to prevent instantiation
+ }
+
+ /**
+ * source used in a {@link DAnnotation} to identify a Sirius Diagram created with Papyrus
+ */
+ public static final String PAPYRUS_SIRIUS_DIAGRAM_IMPLEMENTATION_DANNOTATION_SOURCE = "Papyrus-SiriusDiagram"; //$NON-NLS-1$
+
+ /**
+ * key used in a {@link DAnnotation} to get the ImplementationId value defined in the Papyrus architecture framework for the current diagram
+ */
+ public static final String PAPYRUS_SIRIUS_DIAGRAM_IMPLEMENTATION_DANNOTATION_KEY = "Papyrus-SiriusDiagram-ImplementationId"; //$NON-NLS-1$
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/build.properties
new file mode 100755
index 0000000..4f593e9
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/build.properties
@@ -0,0 +1,24 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src-gen/,\
+ api/,\
+ src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/model/SiriusDiagramRepresentation.ecore b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/model/SiriusDiagramRepresentation.ecore
new file mode 100755
index 0000000..b996ca4
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/model/SiriusDiagramRepresentation.ecore
@@ -0,0 +1,44 @@
+<?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/sirius/integration/1.0.0/emf/siriusdiagram/representation"
+ nsPrefix="representation">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This package contains the elements allowing to integrate the DDiagram metamodel into the Papyrus ArchitectureFramework"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="SiriusDiagramPrototype" eSuperTypes="../../org.eclipse.papyrus.infra.architecture.representation/model/Representation.ecore#//PapyrusRepresentationKind">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This class allows to reference the SiriusDiagramPrototype to use to create a new SiriusDiagram"/>
+ </eAnnotations>
+ <eOperations name="isValidClass" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="this methid is used by the emf validation framework"/>
+ </eAnnotations>
+ <eParameters name="chain" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
+ <eParameters name="context">
+ <eGenericType eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EMap">
+ <eTypeArguments eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ <eTypeArguments eClassifier="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagramDescription" lowerBound="1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.sirius.diagram/model/diagram.ecore#//description/DiagramDescription">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This feature references the Sirius DiagramDescription to use to create a new SiriusDiagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationCommandClass" lowerBound="1"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This feature allows to define the class to use to create the new Sirius Diagram The class must implements ICreateSiriusDiagramEditorCommand."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="session" eType="#//Session">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This feature allows to reference the Sirius Session associated to this prototype at runtime."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Session" instanceClassName="org.eclipse.sirius.business.api.session.Session"
+ abstract="true" interface="true"/>
+</ecore:EPackage>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/model/SiriusDiagramRepresentation.genmodel b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/model/SiriusDiagramRepresentation.genmodel
new file mode 100755
index 0000000..80d0cc2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/model/SiriusDiagramRepresentation.genmodel
@@ -0,0 +1,28 @@
+<?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) 2021 CEA LIST, Artal Technologies

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:
 Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen"
+ creationIcons="false" editDirectory="/org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.infra.siriusdiag.representation.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.infra.siriusdiag.representation" modelName="SiriusDiagramRepresentation"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ codeFormatting="true" commentFormatting="true" testsDirectory="/org.eclipse.papyrus.infra.siriusdiag.representation.tests/src-gen"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
+ testsPluginID="org.eclipse.papyrus.infra.siriusdiag.representation.tests" usedGenPackages="platform:/plugin/org.eclipse.papyrus.infra.core.architecture/model/Architecture.genmodel#//architecture platform:/plugin/org.eclipse.papyrus.infra.constraints/Model/Constraints.genmodel#//constraints platform:/plugin/org.eclipse.sirius.diagram/model/diagram.genmodel#//diagram platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.papyrus.infra.types/model/ElementTypesConfigurations.genmodel#//types platform:/plugin/org.eclipse.papyrus.infra.architecture.representation/model/Representation.genmodel#//representation platform:/plugin/org.eclipse.sirius/model/viewpoint.genmodel#//viewpoint"
+ operationReflection="true" importOrganizing="true" cleanup="true" oSGiCompatible="true">
+ <foreignModel>SiriusDiagramRepresentation.ecore</foreignModel>
+ <genPackages prefix="Representation" basePackage="org.eclipse.papyrus.infra.siriusdiag"
+ disposableProviderFactory="true" multipleEditorPages="false" generateModelWizard="false"
+ extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="SiriusDiagramRepresentation.ecore#/">
+ <genClasses ecoreClass="SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype/diagramDescription"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype/creationCommandClass"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype/session"/>
+ <genOperations ecoreOperation="SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype/isValidClass">
+ <genParameters ecoreParameter="SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype/isValidClass/chain"/>
+ <genParameters ecoreParameter="SiriusDiagramRepresentation.ecore#//SiriusDiagramPrototype/isValidClass/context"/>
+ </genOperations>
+ </genClasses>
+ <genClasses image="false" ecoreClass="SiriusDiagramRepresentation.ecore#//Session"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/plugin.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/plugin.properties
new file mode 100755
index 0000000..f3f0a3f
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/plugin.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+
+pluginName = Papyrus-SiriusDiagram - Sirius Diagram Representation
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/plugin.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/plugin.xml
new file mode 100755
index 0000000..4151117
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/plugin.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2021 CEA LIST, Artal Technologies
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+-->
+
+<plugin>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated siriusdiagramRepresentation -->
+ <package
+ uri="http://www.eclipse.org/papyrus/sirius/integration/1.0.0/emf/siriusdiagram/representation"
+ class="org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage"
+ genModel="model/SiriusDiagramRepresentation.genmodel"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.factory_override">
+ <factory
+ class="org.eclipse.papyrus.infra.siriusdiag.representation.internal.custom.CustomRepresentationFactoryImpl"
+ uri="http://www.eclipse.org/papyrus/sirius/integration/1.0.0/emf/siriusdiagram/representation">
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/pom.xml
new file mode 100755
index 0000000..ef7da8e
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.representation</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/RepresentationFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/RepresentationFactory.java
new file mode 100755
index 0000000..13103e6
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/RepresentationFactory.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.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.siriusdiag.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.siriusdiag.representation.impl.RepresentationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Sirius Diagram Prototype</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Sirius Diagram Prototype</em>'.
+ * @generated
+ */
+ SiriusDiagramPrototype createSiriusDiagramPrototype();
+
+ /**
+ * 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/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/RepresentationPackage.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/RepresentationPackage.java
new file mode 100755
index 0000000..4780ca0
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/RepresentationPackage.java
@@ -0,0 +1,457 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+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 -->
+ * <!-- begin-model-doc -->
+ * This package contains the elements allowing to integrate the DDiagram metamodel into the Papyrus ArchitectureFramework
+ * <!-- end-model-doc -->
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface RepresentationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "representation"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/sirius/integration/1.0.0/emf/siriusdiagram/representation"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "representation"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ RepresentationPackage eINSTANCE = org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl <em>Sirius Diagram Prototype</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationPackageImpl#getSiriusDiagramPrototype()
+ * @generated
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE = 0;
+
+ /**
+ * The feature id for the '<em><b>Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__ID = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__ID;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__NAME = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__NAME;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__DESCRIPTION = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__QUALIFIED_NAME = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__QUALIFIED_NAME;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__ICON = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__ICON;
+
+ /**
+ * The feature id for the '<em><b>Language</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__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 SIRIUS_DIAGRAM_PROTOTYPE__CONCERNS = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__CONCERNS;
+
+ /**
+ * The feature id for the '<em><b>Grayed Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__GRAYED_ICON = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__GRAYED_ICON;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__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 SIRIUS_DIAGRAM_PROTOTYPE__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 SIRIUS_DIAGRAM_PROTOTYPE__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 SIRIUS_DIAGRAM_PROTOTYPE__IMPLEMENTATION_ID = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__IMPLEMENTATION_ID;
+
+ /**
+ * The feature id for the '<em><b>Diagram Description</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Creation Command Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Session</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE__SESSION = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Sirius Diagram Prototype</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE_FEATURE_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 3;
+
+ /**
+ * The operation id for the '<em>Is Valid Class</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE___IS_VALID_CLASS__DIAGNOSTICCHAIN_MAP = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_OPERATION_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Sirius Diagram Prototype</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SIRIUS_DIAGRAM_PROTOTYPE_OPERATION_COUNT = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_OPERATION_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.business.api.session.Session <em>Session</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.sirius.business.api.session.Session
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationPackageImpl#getSession()
+ * @generated
+ */
+ int SESSION = 1;
+
+ /**
+ * The number of structural features of the '<em>Session</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SESSION_FEATURE_COUNT = 0;
+
+ /**
+ * The number of operations of the '<em>Session</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SESSION_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype <em>Sirius Diagram Prototype</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Sirius Diagram Prototype</em>'.
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype
+ * @generated
+ */
+ EClass getSiriusDiagramPrototype();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getDiagramDescription <em>Diagram Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Diagram Description</em>'.
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getDiagramDescription()
+ * @see #getSiriusDiagramPrototype()
+ * @generated
+ */
+ EReference getSiriusDiagramPrototype_DiagramDescription();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#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.siriusdiag.representation.SiriusDiagramPrototype#getCreationCommandClass()
+ * @see #getSiriusDiagramPrototype()
+ * @generated
+ */
+ EAttribute getSiriusDiagramPrototype_CreationCommandClass();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getSession <em>Session</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Session</em>'.
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getSession()
+ * @see #getSiriusDiagramPrototype()
+ * @generated
+ */
+ EReference getSiriusDiagramPrototype_Session();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#isValidClass(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Is Valid Class</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the '<em>Is Valid Class</em>' operation.
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#isValidClass(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ * @generated
+ */
+ EOperation getSiriusDiagramPrototype__IsValidClass__DiagnosticChain_Map();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.sirius.business.api.session.Session <em>Session</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Session</em>'.
+ * @see org.eclipse.sirius.business.api.session.Session
+ * @model instanceClass="org.eclipse.sirius.business.api.session.Session"
+ * @generated
+ */
+ EClass getSession();
+
+ /**
+ * 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.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl <em>Sirius Diagram Prototype</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationPackageImpl#getSiriusDiagramPrototype()
+ * @generated
+ */
+ EClass SIRIUS_DIAGRAM_PROTOTYPE = eINSTANCE.getSiriusDiagramPrototype();
+
+ /**
+ * The meta object literal for the '<em><b>Diagram Description</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION = eINSTANCE.getSiriusDiagramPrototype_DiagramDescription();
+
+ /**
+ * The meta object literal for the '<em><b>Creation Command Class</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS = eINSTANCE.getSiriusDiagramPrototype_CreationCommandClass();
+
+ /**
+ * The meta object literal for the '<em><b>Session</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference SIRIUS_DIAGRAM_PROTOTYPE__SESSION = eINSTANCE.getSiriusDiagramPrototype_Session();
+
+ /**
+ * The meta object literal for the '<em><b>Is Valid Class</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation SIRIUS_DIAGRAM_PROTOTYPE___IS_VALID_CLASS__DIAGNOSTICCHAIN_MAP = eINSTANCE.getSiriusDiagramPrototype__IsValidClass__DiagnosticChain_Map();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.business.api.session.Session <em>Session</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.sirius.business.api.session.Session
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationPackageImpl#getSession()
+ * @generated
+ */
+ EClass SESSION = eINSTANCE.getSession();
+
+ }
+
+} // RepresentationPackage
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/SiriusDiagramPrototype.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/SiriusDiagramPrototype.java
new file mode 100755
index 0000000..06d14dc
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/SiriusDiagramPrototype.java
@@ -0,0 +1,142 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Sirius Diagram Prototype</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This class allows to reference the SiriusDiagramPrototype to use to create a new SiriusDiagram
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getDiagramDescription <em>Diagram Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getCreationCommandClass <em>Creation Command Class</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getSession <em>Session</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage#getSiriusDiagramPrototype()
+ * @model
+ * @generated
+ */
+public interface SiriusDiagramPrototype extends PapyrusRepresentationKind {
+ /**
+ * Returns the value of the '<em><b>Diagram Description</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This feature references the Sirius DiagramDescription to use to create a new SiriusDiagram
+ * <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Diagram Description</em>' reference.
+ * @see #setDiagramDescription(DiagramDescription)
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage#getSiriusDiagramPrototype_DiagramDescription()
+ * @model required="true"
+ * @generated
+ */
+ DiagramDescription getDiagramDescription();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getDiagramDescription <em>Diagram Description</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Diagram Description</em>' reference.
+ * @see #getDiagramDescription()
+ * @generated
+ */
+ void setDiagramDescription(DiagramDescription value);
+
+ /**
+ * Returns the value of the '<em><b>Creation Command Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This feature allows to define the class to use to create the new Sirius Diagram The class must implements ICreateSiriusDiagramEditorCommand.
+ * <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Creation Command Class</em>' attribute.
+ * @see #setCreationCommandClass(String)
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage#getSiriusDiagramPrototype_CreationCommandClass()
+ * @model required="true"
+ * @generated
+ */
+ String getCreationCommandClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#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(String value);
+
+ /**
+ * Returns the value of the '<em><b>Session</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This feature allows to reference the Sirius Session associated to this prototype at runtime.
+ * <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Session</em>' reference.
+ * @see #setSession(Session)
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage#getSiriusDiagramPrototype_Session()
+ * @model type="org.eclipse.papyrus.infra.siriusdiag.representation.Session"
+ * @generated
+ */
+ Session getSession();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype#getSession <em>Session</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Session</em>' reference.
+ * @see #getSession()
+ * @generated
+ */
+ void setSession(Session value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * this methid is used by the emf validation framework
+ * <!-- end-model-doc -->
+ *
+ * @model
+ * @generated
+ */
+ boolean isValidClass(DiagnosticChain chain, Map<Object, Object> context);
+
+} // SiriusDiagramPrototype
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/RepresentationFactoryImpl.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/RepresentationFactoryImpl.java
new file mode 100755
index 0000000..04c9060
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/RepresentationFactoryImpl.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation.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.siriusdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+
+/**
+ * <!-- 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.SIRIUS_DIAGRAM_PROTOTYPE:
+ return createSiriusDiagramPrototype();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public SiriusDiagramPrototype createSiriusDiagramPrototype() {
+ SiriusDiagramPrototypeImpl siriusDiagramPrototype = new SiriusDiagramPrototypeImpl();
+ return siriusDiagramPrototype;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ 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/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/RepresentationPackageImpl.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/RepresentationPackageImpl.java
new file mode 100755
index 0000000..9a75abc
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/RepresentationPackageImpl.java
@@ -0,0 +1,320 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+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.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.infra.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationFactory;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.representation.util.RepresentationValidator;
+import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.diagram.description.DescriptionPackage;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+
+/**
+ * <!-- 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 siriusDiagramPrototypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass sessionEClass = 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.siriusdiag.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
+ Object registeredRepresentationPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ RepresentationPackageImpl theRepresentationPackage = registeredRepresentationPackage instanceof RepresentationPackageImpl ? (RepresentationPackageImpl) registeredRepresentationPackage : new RepresentationPackageImpl();
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ArchitecturePackage.eINSTANCE.eClass();
+ ConstraintsPackage.eINSTANCE.eClass();
+ DiagramPackage.eINSTANCE.eClass();
+ EcorePackage.eINSTANCE.eClass();
+ ElementTypesConfigurationsPackage.eINSTANCE.eClass();
+ org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.eINSTANCE.eClass();
+ ViewpointPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theRepresentationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theRepresentationPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put(theRepresentationPackage,
+ new EValidator.Descriptor() {
+ @Override
+ public EValidator getEValidator() {
+ return RepresentationValidator.INSTANCE;
+ }
+ });
+
+ // 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
+ */
+ @Override
+ public EClass getSiriusDiagramPrototype() {
+ return siriusDiagramPrototypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSiriusDiagramPrototype_DiagramDescription() {
+ return (EReference) siriusDiagramPrototypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSiriusDiagramPrototype_CreationCommandClass() {
+ return (EAttribute) siriusDiagramPrototypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSiriusDiagramPrototype_Session() {
+ return (EReference) siriusDiagramPrototypeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getSiriusDiagramPrototype__IsValidClass__DiagnosticChain_Map() {
+ return siriusDiagramPrototypeEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getSession() {
+ return sessionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ 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
+ siriusDiagramPrototypeEClass = createEClass(SIRIUS_DIAGRAM_PROTOTYPE);
+ createEReference(siriusDiagramPrototypeEClass, SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION);
+ createEAttribute(siriusDiagramPrototypeEClass, SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS);
+ createEReference(siriusDiagramPrototypeEClass, SIRIUS_DIAGRAM_PROTOTYPE__SESSION);
+ createEOperation(siriusDiagramPrototypeEClass, SIRIUS_DIAGRAM_PROTOTYPE___IS_VALID_CLASS__DIAGNOSTICCHAIN_MAP);
+
+ sessionEClass = createEClass(SESSION);
+ }
+
+ /**
+ * <!-- 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);
+ DescriptionPackage theDescriptionPackage = (DescriptionPackage) EPackage.Registry.INSTANCE.getEPackage(DescriptionPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ siriusDiagramPrototypeEClass.getESuperTypes().add(theRepresentationPackage_1.getPapyrusRepresentationKind());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(siriusDiagramPrototypeEClass, SiriusDiagramPrototype.class, "SiriusDiagramPrototype", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getSiriusDiagramPrototype_DiagramDescription(), theDescriptionPackage.getDiagramDescription(), null, "diagramDescription", null, 1, 1, SiriusDiagramPrototype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, //$NON-NLS-1$
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSiriusDiagramPrototype_CreationCommandClass(), theEcorePackage.getEString(), "creationCommandClass", null, 1, 1, SiriusDiagramPrototype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, //$NON-NLS-1$
+ IS_ORDERED);
+ initEReference(getSiriusDiagramPrototype_Session(), this.getSession(), null, "session", null, 0, 1, SiriusDiagramPrototype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, //$NON-NLS-1$
+ IS_ORDERED);
+
+ EOperation op = initEOperation(getSiriusDiagramPrototype__IsValidClass__DiagnosticChain_Map(), theEcorePackage.getEBoolean(), "isValidClass", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, ecorePackage.getEDiagnosticChain(), "chain", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ EGenericType g1 = createEGenericType(theEcorePackage.getEMap());
+ EGenericType g2 = createEGenericType(theEcorePackage.getEJavaObject());
+ g1.getETypeArguments().add(g2);
+ g2 = createEGenericType(theEcorePackage.getEJavaObject());
+ g1.getETypeArguments().add(g2);
+ addEParameter(op, g1, "context", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(sessionEClass, Session.class, "Session", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // RepresentationPackageImpl
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/SiriusDiagramPrototypeImpl.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/SiriusDiagramPrototypeImpl.java
new file mode 100755
index 0000000..741872b
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/impl/SiriusDiagramPrototypeImpl.java
@@ -0,0 +1,382 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.EList;
+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.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.papyrus.infra.architecture.representation.impl.PapyrusRepresentationKindImpl;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.representation.util.RepresentationValidator;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Sirius Diagram Prototype</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl#getDiagramDescription <em>Diagram Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl#getCreationCommandClass <em>Creation Command Class</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl#getSession <em>Session</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class SiriusDiagramPrototypeImpl extends PapyrusRepresentationKindImpl implements SiriusDiagramPrototype {
+ /**
+ * The cached value of the '{@link #getDiagramDescription() <em>Diagram Description</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDiagramDescription()
+ * @generated
+ * @ordered
+ */
+ protected DiagramDescription diagramDescription;
+
+ /**
+ * The default value of the '{@link #getCreationCommandClass() <em>Creation Command Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getCreationCommandClass()
+ * @generated
+ * @ordered
+ */
+ protected static final String CREATION_COMMAND_CLASS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCreationCommandClass() <em>Creation Command Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getCreationCommandClass()
+ * @generated
+ * @ordered
+ */
+ protected String creationCommandClass = CREATION_COMMAND_CLASS_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getSession() <em>Session</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getSession()
+ * @generated
+ * @ordered
+ */
+ protected Session session;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SiriusDiagramPrototypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RepresentationPackage.Literals.SIRIUS_DIAGRAM_PROTOTYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public DiagramDescription getDiagramDescription() {
+ if (diagramDescription != null && diagramDescription.eIsProxy()) {
+ InternalEObject oldDiagramDescription = (InternalEObject) diagramDescription;
+ diagramDescription = (DiagramDescription) eResolveProxy(oldDiagramDescription);
+ if (diagramDescription != oldDiagramDescription) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION, oldDiagramDescription, diagramDescription));
+ }
+ }
+ }
+ return diagramDescription;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DiagramDescription basicGetDiagramDescription() {
+ return diagramDescription;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setDiagramDescription(DiagramDescription newDiagramDescription) {
+ DiagramDescription oldDiagramDescription = diagramDescription;
+ diagramDescription = newDiagramDescription;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION, oldDiagramDescription, diagramDescription));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getCreationCommandClass() {
+ return creationCommandClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setCreationCommandClass(String newCreationCommandClass) {
+ String oldCreationCommandClass = creationCommandClass;
+ creationCommandClass = newCreationCommandClass;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS, oldCreationCommandClass, creationCommandClass));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Session getSession() {
+ if (session != null && ((EObject) session).eIsProxy()) {
+ InternalEObject oldSession = (InternalEObject) session;
+ session = (Session) eResolveProxy(oldSession);
+ if (session != oldSession) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__SESSION, oldSession, session));
+ }
+ }
+ }
+ return session;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Session basicGetSession() {
+ return session;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setSession(Session newSession) {
+ Session oldSession = session;
+ session = newSession;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__SESSION, oldSession, session));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isValidClass(DiagnosticChain chain, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (chain != null) {
+ chain.add(new BasicDiagnostic(Diagnostic.ERROR,
+ RepresentationValidator.DIAGNOSTIC_SOURCE,
+ RepresentationValidator.SIRIUS_DIAGRAM_PROTOTYPE__IS_VALID_CLASS,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "isValidClass", EObjectValidator.getObjectLabel(this, context) }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION:
+ if (resolve) {
+ return getDiagramDescription();
+ }
+ return basicGetDiagramDescription();
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS:
+ return getCreationCommandClass();
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__SESSION:
+ if (resolve) {
+ return getSession();
+ }
+ return basicGetSession();
+ }
+ 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.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION:
+ setDiagramDescription((DiagramDescription) newValue);
+ return;
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS:
+ setCreationCommandClass((String) newValue);
+ return;
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__SESSION:
+ setSession((Session) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION:
+ setDiagramDescription((DiagramDescription) null);
+ return;
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS:
+ setCreationCommandClass(CREATION_COMMAND_CLASS_EDEFAULT);
+ return;
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__SESSION:
+ setSession((Session) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__DIAGRAM_DESCRIPTION:
+ return diagramDescription != null;
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__CREATION_COMMAND_CLASS:
+ return CREATION_COMMAND_CLASS_EDEFAULT == null ? creationCommandClass != null : !CREATION_COMMAND_CLASS_EDEFAULT.equals(creationCommandClass);
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE__SESSION:
+ return session != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE___IS_VALID_CLASS__DIAGNOSTICCHAIN_MAP:
+ return isValidClass((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (creationCommandClass: "); //$NON-NLS-1$
+ result.append(creationCommandClass);
+ result.append(')');
+ return result.toString();
+ }
+
+} // SiriusDiagramPrototypeImpl
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationAdapterFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationAdapterFactory.java
new file mode 100755
index 0000000..186d277
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationAdapterFactory.java
@@ -0,0 +1,222 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.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.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.core.architecture.ADElement;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.sirius.business.api.session.Session;
+
+/**
+ * <!-- 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.siriusdiag.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<>() {
+ @Override
+ public Adapter caseSiriusDiagramPrototype(SiriusDiagramPrototype object) {
+ return createSiriusDiagramPrototypeAdapter();
+ }
+
+ @Override
+ public Adapter caseSession(Session object) {
+ return createSessionAdapter();
+ }
+
+ @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 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.siriusdiag.representation.SiriusDiagramPrototype <em>Sirius Diagram Prototype</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.siriusdiag.representation.SiriusDiagramPrototype
+ * @generated
+ */
+ public Adapter createSiriusDiagramPrototypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.business.api.session.Session <em>Session</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.sirius.business.api.session.Session
+ * @generated
+ */
+ public Adapter createSessionAdapter() {
+ 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 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/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationSwitch.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationSwitch.java
new file mode 100755
index 0000000..0a16167
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationSwitch.java
@@ -0,0 +1,222 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.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.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.core.architecture.ADElement;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.sirius.business.api.session.Session;
+
+/**
+ * <!-- 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.siriusdiag.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.SIRIUS_DIAGRAM_PROTOTYPE: {
+ SiriusDiagramPrototype siriusDiagramPrototype = (SiriusDiagramPrototype) theEObject;
+ T result = caseSiriusDiagramPrototype(siriusDiagramPrototype);
+ if (result == null) {
+ result = casePapyrusRepresentationKind(siriusDiagramPrototype);
+ }
+ if (result == null) {
+ result = caseRepresentationKind(siriusDiagramPrototype);
+ }
+ if (result == null) {
+ result = caseADElement(siriusDiagramPrototype);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RepresentationPackage.SESSION: {
+ Session session = (Session) theEObject;
+ T result = caseSession(session);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Sirius Diagram Prototype</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>Sirius Diagram Prototype</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSiriusDiagramPrototype(SiriusDiagramPrototype object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Session</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>Session</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSession(Session 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>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/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationValidator.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationValidator.java
new file mode 100755
index 0000000..b185836
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src-gen/org/eclipse/papyrus/infra/siriusdiag/representation/util/RepresentationValidator.java
@@ -0,0 +1,199 @@
+/**
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.siriusdiag.representation.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.sirius.business.api.session.Session;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage
+ * @generated
+ */
+public class RepresentationValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final RepresentationValidator INSTANCE = new RepresentationValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.papyrus.infra.siriusdiag.representation"; //$NON-NLS-1$
+
+ /**
+ * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Is Valid Class' of 'Sirius Diagram Prototype'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final int SIRIUS_DIAGRAM_PROTOTYPE__IS_VALID_CLASS = 1;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 1;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RepresentationValidator() {
+ super();
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return RepresentationPackage.eINSTANCE;
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case RepresentationPackage.SIRIUS_DIAGRAM_PROTOTYPE:
+ return validateSiriusDiagramPrototype((SiriusDiagramPrototype) value, diagnostics, context);
+ case RepresentationPackage.SESSION:
+ return validateSession((Session) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateSiriusDiagramPrototype(SiriusDiagramPrototype siriusDiagramPrototype, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(siriusDiagramPrototype, diagnostics, context)) {
+ return false;
+ }
+ boolean result = validate_EveryMultiplicityConforms(siriusDiagramPrototype, diagnostics, context);
+ if (result || diagnostics != null) {
+ result &= validate_EveryDataValueConforms(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryReferenceIsContained(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryBidirectionalReferenceIsPaired(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryProxyResolves(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_UniqueID(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryKeyUnique(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryMapEntryUnique(siriusDiagramPrototype, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validateSiriusDiagramPrototype_isValidClass(siriusDiagramPrototype, diagnostics, context);
+ }
+ return result;
+ }
+
+ /**
+ * Validates the isValidClass constraint of '<em>Sirius Diagram Prototype</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateSiriusDiagramPrototype_isValidClass(SiriusDiagramPrototype siriusDiagramPrototype, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return siriusDiagramPrototype.isValidClass(diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateSession(Session session, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint((EObject) session, diagnostics, context);
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ // TODO
+ // Specialize this to return a resource locator for messages specific to this validator.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return super.getResourceLocator();
+ }
+
+} // RepresentationValidator
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src/org/eclipse/papyrus/infra/siriusdiag/representation/internal/custom/CustomRepresentationFactoryImpl.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src/org/eclipse/papyrus/infra/siriusdiag/representation/internal/custom/CustomRepresentationFactoryImpl.java
new file mode 100755
index 0000000..ee88748
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src/org/eclipse/papyrus/infra/siriusdiag/representation/internal/custom/CustomRepresentationFactoryImpl.java
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.internal.custom;
+
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationFactoryImpl;
+
+/**
+ * Custom factory for to manipulate the representation model
+ */
+public class CustomRepresentationFactoryImpl extends RepresentationFactoryImpl {
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.RepresentationFactoryImpl#createSiriusDiagramPrototype()
+ *
+ * @return
+ */
+ @Override
+ public SiriusDiagramPrototype createSiriusDiagramPrototype() {
+ return new CustomSiriusDiagramPrototypeImpl();
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src/org/eclipse/papyrus/infra/siriusdiag/representation/internal/custom/CustomSiriusDiagramPrototypeImpl.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src/org/eclipse/papyrus/infra/siriusdiag/representation/internal/custom/CustomSiriusDiagramPrototypeImpl.java
new file mode 100755
index 0000000..5a8b4c7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.representation/src/org/eclipse/papyrus/infra/siriusdiag/representation/internal/custom/CustomSiriusDiagramPrototypeImpl.java
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.representation.internal.custom;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.architecture.ArchitectureDescriptionLanguage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage;
+import org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl;
+import org.eclipse.papyrus.infra.siriusdiag.representation.util.RepresentationValidator;
+import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
+import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
+
+/**
+ * Custom implementation for {@link SiriusDiagramPrototypeImpl}
+ */
+public class CustomSiriusDiagramPrototypeImpl extends SiriusDiagramPrototypeImpl {
+
+ // the 2 next field could be in org.eclipse.papyrus.infra.siriusdiag.types, but we want to avoid a dependency between these plugins
+ /**
+ * the name of the required element type
+ */
+ private static final String REQUIRED_ELEMENT_TYPE_NAME = "DSemanticDiagramContext"; //$NON-NLS-1$
+
+ /**
+ * the ID of the required element type
+ */
+ private static final String REQUIRED_ELEMENT_TYPE_IDENTIFIER = "org.eclipse.papyrus.infra.siriusdiag.types.elementTypeSet"; //$NON-NLS-1$
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.representation.impl.SiriusDiagramPrototypeImpl#isValidClass(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ *
+ * @param chain
+ * @param context
+ * @return
+ */
+ @Override
+ public boolean isValidClass(DiagnosticChain chain, Map<Object, Object> context) {
+ final String creationClassName = getCreationCommandClass();
+
+ Class<?> creationClass = ClassLoaderHelper.loadClass(creationClassName);
+ Object newInstance = null;
+ if (creationClass != null) {
+ try {
+ Constructor<?> constructor = creationClass.getDeclaredConstructor(new Class<?>[0]);
+ newInstance = constructor.newInstance(new Object[0]);
+ } catch (NoSuchMethodException | SecurityException e) {
+ // nothing to do
+ } catch (InstantiationException e) {
+ // nothing to do
+ } catch (IllegalAccessException e) {
+ // nothing to do
+ } catch (IllegalArgumentException e) {
+ // nothing to do
+ } catch (InvocationTargetException e) {
+ // nothing to do
+ }
+ }
+ if (newInstance == null) {
+ if (chain != null) {
+ chain.add(createDiagnostic(NLS.bind("The referenced creationClassCommand {0} can't be instanciated", creationClass.getCanonicalName()))); //$NON-NLS-1$
+ }
+ } else {
+ if (!ICreateSiriusDiagramEditorCommand.class.isInstance(newInstance)) {
+ chain.add(createDiagnostic(NLS.bind("The class {0} is not an instance of {1}.", newInstance.getClass().getCanonicalName(), ICreateSiriusDiagramEditorCommand.class.getCanonicalName()))); //$NON-NLS-1$
+ }
+ }
+
+ final ArchitectureDescriptionLanguage language = getLanguage();
+
+ // this test allows to check that the element type used to delete the Sirius Diagram is registered
+ boolean contains = false;
+ final Iterator<ElementTypeSetConfiguration> iter = language.getElementTypes().iterator();
+ while (iter.hasNext() && !contains) {
+ final ElementTypeSetConfiguration type = iter.next();
+ contains = REQUIRED_ELEMENT_TYPE_IDENTIFIER.equals(type.getIdentifier())
+ && REQUIRED_ELEMENT_TYPE_NAME.equals(type.getName());
+
+ }
+ if (!contains) {
+ chain.add(createDiagnostic(NLS.bind("The element type {0} is not registered in your architecture file.", REQUIRED_ELEMENT_TYPE_IDENTIFIER))); //$NON-NLS-1$
+ }
+
+ return super.isValidClass(chain, context);
+ }
+
+ /**
+ *
+ * @param message
+ * @return
+ */
+ private Diagnostic createDiagnostic(final String message) {
+ return new BasicDiagnostic(Diagnostic.ERROR,
+ RepresentationValidator.DIAGNOSTIC_SOURCE,
+ RepresentationValidator.SIRIUS_DIAGRAM_PROTOTYPE__IS_VALID_CLASS,
+ message,
+ new Object[] { this, RepresentationPackage.eINSTANCE.getSiriusDiagramPrototype_CreationCommandClass() });
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.classpath
new file mode 100755
index 0000000..b1592a8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.classpath
@@ -0,0 +1,8 @@
+<?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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="api"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.project
new file mode 100755
index 0000000..ea91036
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.sirius</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..06cc86b
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.sirius;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.ui
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.infra.siriusdiag.sirius
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.osgi;bundle-version="[3.16.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.122.0,4.0.0)"
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/OSGI-INF/l10n/bundle.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..c35ae6a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+#Properties file for org.eclipse.papyrus.infra.siriusdiag.sirius
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus-SiriusDiagram - Sirius Customization
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/api/org/eclipse/papyrus/infra/siriusdiag/sirius/ISiriusSessionService.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/api/org/eclipse/papyrus/infra/siriusdiag/sirius/ISiriusSessionService.java
new file mode 100755
index 0000000..f25bcb4
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/api/org/eclipse/papyrus/infra/siriusdiag/sirius/ISiriusSessionService.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.sirius;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.services.IService;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+
+/**
+ * Interface to use to access to the Sirius Session
+ */
+public interface ISiriusSessionService extends IService {
+
+ /**
+ * The ID of the service. This ID is also used in the plugin.xml to define the service
+ */
+ public static final String SERVICE_ID = "org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService"; //$NON-NLS-1$
+
+ /**
+ *
+ * @return
+ * the Sirius Session associated to the current model
+ */
+ public Session getSiriusSession();
+
+ /**
+ * This method allows to get the DiagramDescription from the current Sirius Session. The shortcut {@link SiriusDiagramPrototype#getDiagramDescription()} is not enough, because
+ * the returned DiagramDescription won't be in the correct ResourceSet, so we won't be able to find it from the Session.
+ *
+ * @param siriusDiagramPrototype
+ * the Papyrus {@link SiriusDiagramPrototype}
+ * @param semanticContext
+ * the context used to create the diagram
+ * @return
+ * the DiagramDescription from the Sirius Session
+ */
+ public DiagramDescription getSiriusDiagramDescriptionFromPapyrusPrototype(final SiriusDiagramPrototype siriusDiagramPrototype, final EObject semanticContext);
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/build.properties
new file mode 100755
index 0000000..6ec5cef
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/build.properties
@@ -0,0 +1,9 @@
+source.. = src/,\
+ api/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ icons/,\
+ OSGI-INF/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/GenerateBranchSubMenuIcon.png b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/GenerateBranchSubMenuIcon.png
new file mode 100755
index 0000000..8069149
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/GenerateBranchSubMenuIcon.png
Binary files differ
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/PapyrusDocument.gif b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/PapyrusDocument.gif
new file mode 100755
index 0000000..2efca85
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/PapyrusDocument.gif
Binary files differ
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/new_document.png b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/new_document.png
new file mode 100755
index 0000000..d59dcaf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/icons/new_document.png
Binary files differ
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/pom.xml
new file mode 100755
index 0000000..db7b722
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.sirius</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/src/org/eclipse/papyrus/infra/siriusdiag/sirius/Activator.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/src/org/eclipse/papyrus/infra/siriusdiag/sirius/Activator.java
new file mode 100755
index 0000000..2c4ecb7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.sirius/src/org/eclipse/papyrus/infra/siriusdiag/sirius/Activator.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.sirius;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.siriusdiag.sirius"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ *
+ * @param context
+ * @throws Exception
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(getDefault());
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ *
+ * @param context
+ * @throws Exception
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.classpath b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.classpath
new file mode 100755
index 0000000..e801ebf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.project b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.project
new file mode 100755
index 0000000..b342ada
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.siriusdiag.ui</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.core.resources.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.core.runtime.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..e00d2a7
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,133 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.push_down_negation=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup.use_unboxing=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=18
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * ${user} - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="modulecomment_context" deleted\="false" description\="Comment for modules" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.modulecomment" name\="modulecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="recordbody_context" deleted\="false" description\="Code in new record type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.recordbody" name\="recordbody">\n</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.pde.api.tools.prefs b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/META-INF/MANIFEST.MF b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..1d5e40c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,53 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.infra.siriusdiag.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.siriusdiag.ui.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.emf.common;bundle-version="[2.22.0,3.0.0)",
+ org.eclipse.emf.ecore.editor;bundle-version="[2.17.0,3.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.emf;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.sirius.ecore.extender;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.infra.internationalization.common;bundle-version="[2.0.0,3.0.0)",
+ com.google.guava;bundle-version="[30.1.0,31.0.0)",
+ org.eclipse.sirius.common;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.sirius.common.ui;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.sirius.ui;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.uml.tools;bundle-version="[5.1.0,6.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.sirius;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[2.0.0,3.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.infra.siriusdiag.ui
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;x-friends:="org.eclipse.papyrus.siriusdiag.junit.utils",
+ org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint,
+ org.eclipse.papyrus.infra.siriusdiag.ui.modelresource
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/OSGI-INF/l10n/bundle.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..2fd85fe
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+#Properties file for org.eclipse.papyrus.infra.siriusdiag.ui
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus-SiriusDiagram - Sirius Diagram Editor Integration UI (Incubation)
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/about.html b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/build.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/build.properties
new file mode 100755
index 0000000..e37d13a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ OSGI-INF/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/icons/PapyrusDocument.gif b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/icons/PapyrusDocument.gif
new file mode 100755
index 0000000..2efca85
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/icons/PapyrusDocument.gif
Binary files differ
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/icons/new_document.png b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/icons/new_document.png
new file mode 100755
index 0000000..d59dcaf
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/icons/new_document.png
Binary files differ
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/plugin.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/plugin.xml
new file mode 100755
index 0000000..bc94f94
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/plugin.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
+ <menu
+ icon="icons/new_document.png"
+ id="org.eclipse.papyrus.infra.siriusdiag.ui.popupmenu.createsiriusdiagram"
+ label="New Sirius Diagram"
+ tooltip="The Sirius Diagram Menu">
+ <dynamic
+ class="org.eclipse.papyrus.infra.siriusdiag.ui.internal.menus.SiriusDiagramDynamicContribution"
+ id="org.eclipse.papyrus.infra.siriusdiag.ui.internal.menus.DSemanticDiagramDynamicContribution">
+ </dynamic>
+ </menu>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.viewType">
+ <helper
+ class="org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.CreateSiriusDiagramViewTypeCommandHelper"
+ priority="0">
+ </helper>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.infra.siriusdiag.ui.actionBarContributor"
+ factoryClass="org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor.SiriusDiagramEditorFactory"
+ icon="icons/new_document.png"
+ order="0">
+ </editorDiagram>
+ <actionBarContributor
+ id="org.eclipse.papyrus.infra.siriusdiag.ui.actionBarContributor"
+ implementingClass="org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor.CustomSiriusDiagramActionBarContributor">
+ </actionBarContributor>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.sirius.diagram.DSemanticDiagram"
+ class="org.eclipse.papyrus.infra.siriusdiag.ui.internal.adapter.SiriusDiagramViewAdapterFactory">
+ <adapter
+ type="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable">
+ </adapter>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.model">
+ <model
+ classname="org.eclipse.papyrus.infra.siriusdiag.ui.modelresource.SiriusDiagramModel"
+ description="Model for Sirius Diagram View editors"
+ fileExtension="aird">
+ </model>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
+ <labelProvider
+ priority="10"
+ provider="org.eclipse.papyrus.infra.siriusdiag.ui.internal.provider.SiriusDiagramLabelProvider">
+ </labelProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.service">
+ <serviceFactory
+ classname="org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.SessionServiceFactory"
+ id="org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService"
+ priority="1"
+ startKind="startup">
+ </serviceFactory>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.service">
+ <serviceFactory
+ classname="org.eclipse.papyrus.infra.siriusdiag.ui.internal.adapter.SemanticServiceFactory"
+ id="org.eclipse.papyrus.infra.emf.utils.ISemanticService"
+ priority="1"
+ startKind="startup">
+ </serviceFactory>
+ </extension>
+ <extension
+ point="org.eclipse.sirius.sessionFactory">
+ <sessionFactory
+ class="org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.PapyrusSessionFactory"
+ override="org.eclipse.sirius.business.internal.session.SessionFactoryImpl">
+ </sessionFactory>
+ </extension>
+</plugin>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/pom.xml b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/pom.xml
new file mode 100755
index 0000000..e8d8d37
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.siriusdiag</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag.ui</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+</project>
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/Activator.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/Activator.java
new file mode 100755
index 0000000..80584da
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/Activator.java
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.siriusdiag.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(getDefault());
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SemanticServiceFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SemanticServiceFactory.java
new file mode 100755
index 0000000..c9b7d2d
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SemanticServiceFactory.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.adapter;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.services.IServiceFactory;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+
+/**
+ * The factory used to create the Sirius Session Service
+ */
+public class SemanticServiceFactory implements IServiceFactory {
+
+ /**
+ * The Papyrus service registry
+ */
+ private ServicesRegistry servReg;
+
+ /**
+ * the created {@link SessionService}
+ */
+ private SiriusSemanticService semanticService;
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IService#init(org.eclipse.papyrus.infra.core.services.ServicesRegistry)
+ *
+ * @param servicesRegistry
+ * @throws ServiceException
+ */
+ @Override
+ public void init(ServicesRegistry servicesRegistry) throws ServiceException {
+ this.servReg = servicesRegistry;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IService#startService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void startService() throws ServiceException {
+ // nothing to do
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IService#disposeService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void disposeService() throws ServiceException {
+ this.servReg = null;
+ if (this.semanticService != null) {
+ this.semanticService.disposeService();
+ }
+ this.semanticService = null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IServiceFactory#createServiceInstance()
+ *
+ * @return
+ * @throws ServiceException
+ */
+ @Override
+ public Object createServiceInstance() throws ServiceException {
+ if (this.servReg == null) {
+ throw new ServiceException(NLS.bind("The service factory {0} seems disposed.", this.getClass().getName())); //$NON-NLS-1$
+ }
+ this.semanticService = new SiriusSemanticService();
+ semanticService.init(this.servReg);
+ semanticService.startService();
+ return semanticService;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SiriusDiagramViewAdapterFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SiriusDiagramViewAdapterFactory.java
new file mode 100755
index 0000000..2c6c46a
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SiriusDiagramViewAdapterFactory.java
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.adapter;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable;
+import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenableWithContainer;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Adapter factory converting Document to IOpenable.
+ *
+ */
+public class SiriusDiagramViewAdapterFactory implements IAdapterFactory {
+
+ /**
+ *
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ *
+ * @param adaptableObject
+ * @param adapterType
+ * @return
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adapterType == IOpenable.class) {
+ if (adaptableObject instanceof DSemanticDiagram) {
+ DSemanticDiagram diagram = (DSemanticDiagram) adaptableObject;
+ return new IOpenableWithContainer.Openable(adaptableObject, diagram.getTarget());
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ *
+ * @return
+ */
+ @Override
+ public Class<?>[] getAdapterList() {
+ return new Class[] { IOpenable.class };
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SiriusSemanticService.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SiriusSemanticService.java
new file mode 100755
index 0000000..b72f729
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/adapter/SiriusSemanticService.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.adapter;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ISemanticService;
+import org.eclipse.sirius.diagram.DDiagramElement;
+
+/**
+ * This service is in charge to get semantic element from sirius element
+ */
+public class SiriusSemanticService implements ISemanticService {
+
+ /**
+ * The service registry associated to this current SiriusSemanticService
+ */
+ private ServicesRegistry servicesRegistry;
+
+ public SiriusSemanticService() {
+ // nothing to do
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.services.IService#init(org.eclipse.papyrus.infra.core.services.ServicesRegistry)
+ *
+ * @param servicesRegistry
+ * the service registry associated to the current model
+ * @throws ServiceException
+ */
+ @Override
+ public void init(final ServicesRegistry servicesRegistry) throws ServiceException {
+ this.servicesRegistry = servicesRegistry;
+ if (this.servicesRegistry == null) {
+ throw new ServiceException(NLS.bind("The service {0} can't be initialized because the ServicesRegistry is not found", ISemanticService.SERVICE_ID));
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.services.IService#startService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void startService() throws ServiceException {
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.services.IService#disposeService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void disposeService() throws ServiceException {
+ this.servicesRegistry = null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.emf.utils.ISemanticService#getSemanticObject()
+ *
+ * @return
+ */
+ @Override
+ public EObject getSemanticObject(EObject obj) {
+ if (obj instanceof DDiagramElement) {
+ return ((DDiagramElement) obj).getTarget();
+ }
+ ;
+ return obj;
+ }
+
+
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/CustomSiriusDiagramActionBarContributor.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/CustomSiriusDiagramActionBarContributor.java
new file mode 100755
index 0000000..e8ef788
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/CustomSiriusDiagramActionBarContributor.java
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor;
+
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.sirius.diagram.ui.part.SiriusDiagramEditor;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * This action bar contributor allows to group expressions creation in a submenu
+ */
+public class CustomSiriusDiagramActionBarContributor extends DiagramActionBarContributor {
+
+ @Override
+ protected Class getEditorClass() {
+ return SiriusDiagramEditor.class;
+ }
+
+ @Override
+ protected String getEditorId() {
+ return "org.eclipse.papyrus.SiriusDiagramEditorID";
+ }
+
+ @Override
+ public void init(IActionBars bars, IWorkbenchPage page) {
+ super.init(bars, page);
+ IMenuManager menuManager = bars.getMenuManager();
+
+ IContributionItem undoAction = bars.getMenuManager().findMenuUsingPath("undoGroup"); //$NON-NLS-1$
+ if (undoAction != null) {
+ menuManager.remove(undoAction);
+ }
+ // print preview
+ IMenuManager fileMenu = bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_FILE);
+ if (null != fileMenu) {
+ fileMenu.remove("pageSetupAction"); //$NON-NLS-1$
+ }
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/NestedSiriusDiagramViewEditor.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/NestedSiriusDiagramViewEditor.java
new file mode 100755
index 0000000..c37ac5c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/NestedSiriusDiagramViewEditor.java
@@ -0,0 +1,755 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProvider;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceSetItemProvider;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.KeyHandler;
+import org.eclipse.gef.KeyStroke;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.DirectEditAction;
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.gef.ui.actions.ZoomInAction;
+import org.eclipse.gef.ui.actions.ZoomOutAction;
+import org.eclipse.gmf.runtime.common.ui.util.IPartSelector;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+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.actions.InsertAction;
+import org.eclipse.gmf.runtime.diagram.ui.internal.actions.PromptingDeleteAction;
+import org.eclipse.gmf.runtime.diagram.ui.internal.actions.PromptingDeleteFromModelAction;
+import org.eclipse.gmf.runtime.diagram.ui.internal.actions.ToggleRouterAction;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiResourceImpl;
+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.internationalization.common.editor.IInternationalizationEditor;
+import org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.SessionPrinter;
+import org.eclipse.papyrus.infra.ui.lifecycleevents.ISaveAndDirtyService;
+import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
+import org.eclipse.papyrus.infra.widgets.util.NavigationTarget;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand;
+import org.eclipse.sirius.business.api.query.FileQuery;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.business.internal.session.SessionTransientAttachment;
+import org.eclipse.sirius.common.tools.api.util.EclipseUtil;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack;
+import org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl;
+import org.eclipse.sirius.ui.business.api.dialect.DialectUI;
+import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager;
+import org.eclipse.sirius.ui.business.api.session.IEditingSession;
+import org.eclipse.sirius.ui.business.api.session.SessionUIManager;
+import org.eclipse.sirius.ui.business.internal.dialect.DialectUIManagerImpl;
+import org.eclipse.sirius.viewpoint.DRepresentation;
+import org.eclipse.sirius.viewpoint.SiriusPlugin;
+import org.eclipse.sirius.viewpoint.description.audit.provider.AuditItemProviderAdapterFactory;
+import org.eclipse.sirius.viewpoint.description.provider.DescriptionItemProviderAdapterFactory;
+import org.eclipse.sirius.viewpoint.description.style.provider.StyleItemProviderAdapterFactory;
+import org.eclipse.sirius.viewpoint.description.tool.provider.ToolItemProviderAdapterFactory;
+import org.eclipse.sirius.viewpoint.description.validation.provider.ValidationItemProviderAdapterFactory;
+import org.eclipse.sirius.viewpoint.provider.ViewpointItemProviderAdapterFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.ActionFactory;
+
+/**
+ * Sirius Diagram Editor.
+ *
+ * This editor is contributed throw the extension point org.eclipse.papyrus.infra.ui.papyrusDiagram.
+ *
+ * In order to get the new child menu, we register the action bar contribution using this same extension point and we use if for this editor.
+ */
+@SuppressWarnings("restriction")
+public class NestedSiriusDiagramViewEditor extends DDiagramEditorImpl implements IEditingDomainProvider, IInternationalizationEditor, IRevealSemanticElement, NavigationTarget {
+
+ /** the service registry */
+ protected ServicesRegistry servicesRegistry;
+
+ private Session session;
+
+ private URI uri;
+
+ private TransactionalEditingDomain editingDomain;
+
+ private ComposedAdapterFactory composedAdapterFactory;
+
+ private DSemanticDiagram diagram;
+
+ private KeyHandler keyHandler;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param servicesRegistry
+ * the Papyrus service registry, it can't be <code>null</code>
+ * @param prototype
+ * the edited element, it can't be <code>null</code>
+ */
+ public NestedSiriusDiagramViewEditor(ServicesRegistry servicesRegistry, DSemanticDiagram diagram) {
+ super();
+ this.servicesRegistry = servicesRegistry;
+
+ ISaveAndDirtyService saveAndDirtyService = null;
+ try {
+ saveAndDirtyService = servicesRegistry.getService(ISaveAndDirtyService.class);
+ } catch (ServiceException e1) {
+ e1.printStackTrace();
+ }
+ saveAndDirtyService.registerIsaveablePart(this);
+
+ this.diagram = diagram;
+ try {
+ this.editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
+ // this.session = (PapyrusSession) PapyrusSessionManager.INSTANCE.getSession(diagram.eResource().getURI(), new NullProgressMonitor(), this.editingDomain);
+ this.session = getCurrentSession();
+ SessionPrinter.print(session, this.getClass().getCanonicalName() + " " + "Constructor");
+
+ this.uri = diagram.eResource().getURI().appendFragment(diagram.eResource().getURIFragment(diagram));
+
+ Assert.isNotNull(this.diagram, "The edited diagram is null. The Diagram Editor creation failed"); //$NON-NLS-1$
+ Assert.isNotNull(this.servicesRegistry, "The papyrus ServicesRegistry is null. The Diagram Editor creation failed."); //$NON-NLS-1$
+ initializeEditingDomain();
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private ISiriusSessionService getSiriusSessionService() {
+ try {
+ return (ISiriusSessionService) this.servicesRegistry.getService(ISiriusSessionService.SERVICE_ID);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ return null;
+ }
+
+ private Session getCurrentSession() {
+ final ISiriusSessionService service = getSiriusSessionService();
+ if (service != null) {
+ return service.getSiriusSession();
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor.CustomDocumentStructureTemplateEditor#initializeEditingDomain()
+ *
+ */
+ public void initializeEditingDomain() {
+ if (this.servicesRegistry == null) {
+ return;
+ }
+ initAdapterFactory();
+ initDomainAndStack();
+ }
+
+
+ /**
+ * this method is in charge to init the Editing Domain and the CommandStack
+ */
+ protected void initDomainAndStack() {
+ // this.editingDomain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain();
+ this.editingDomain.getCommandStack().addCommandStackListener(new CommandStackListener() {
+
+ @Override
+ public void commandStackChanged(final EventObject event) {
+ if (getSite() != null) {// TODO: Tester sans tout ca.
+ getSite().getShell().getDisplay().asyncExec(() -> {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ });
+ }
+ }
+ });
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureDiagramEditDomain() {
+
+ DiagramEditDomain editDomain = new DiagramEditDomain(this);
+ editDomain.setActionManager(createActionManager());
+ setEditDomain(editDomain);
+
+ if (editDomain != null) {
+ final CommandStack stack = editDomain.getCommandStack();
+
+ if (stack != null) {
+ // dispose the old stack
+ stack.dispose();
+ }
+
+ // create and assign the new stack
+ final DiagramCommandStack diagramStack = new DDiagramCommandStack(getDiagramEditDomain());
+ diagramStack.setOperationHistory(getOperationHistory());
+
+ // changes made on the stack can be undone from this editor
+ diagramStack.setUndoContext(getUndoContext());
+
+ editDomain.setCommandStack(diagramStack);
+ }
+
+ }
+
+
+
+ /**
+ * Init the adapter factory
+ */
+ // TODO : VL : probably useless with the Sirius Diagram Editor. In Model2Doc this code was here because it was a Tree Editor and we wanted to overwrite some behaviors
+ protected void initAdapterFactory() {
+
+ final DialectUIManagerImpl manager = new DialectUIManagerImpl();
+ composedAdapterFactory = new ComposedAdapterFactory();
+ if (SiriusPlugin.IS_ECLIPSE_RUNNING) {
+ final List<DialectUI> parsedDialects = EclipseUtil.getExtensionPlugins(DialectUI.class, DialectUIManager.ID, DialectUIManager.CLASS_ATTRIBUTE);
+ for (final DialectUI dialect : parsedDialects) {
+ // manager.enableDialectUI(dialect);
+ composedAdapterFactory.addAdapterFactory(dialect.getServices().createAdapterFactory());
+ }
+ }
+ composedAdapterFactory.addAdapterFactory(new DescriptionItemProviderAdapterFactory());
+ composedAdapterFactory.addAdapterFactory(new ViewpointItemProviderAdapterFactory());
+ composedAdapterFactory.addAdapterFactory(new StyleItemProviderAdapterFactory());
+ composedAdapterFactory.addAdapterFactory(new ToolItemProviderAdapterFactory());
+ composedAdapterFactory.addAdapterFactory(new ValidationItemProviderAdapterFactory());
+ composedAdapterFactory.addAdapterFactory(new AuditItemProviderAdapterFactory());
+
+ }
+
+ /**
+ *
+ * @return
+ * the created ComposedAdapterFactory
+ */
+ protected ComposedAdapterFactory createComposedAdapterFactory() {
+ return new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.presentation.DocumentStructureTemplateEditor#getEditingDomain()
+ *
+ * @return
+ */
+ @Override
+ public TransactionalEditingDomain getEditingDomain() {
+ return this.editingDomain;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.presentation.DocumentStructureTemplateEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+ *
+ * @param site
+ * @param input
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) {// throws PartInitException {
+
+ // Session is closed when we reopen eclipse
+ try {
+ TransactionalEditingDomain ted = this.session.getTransactionalEditingDomain();
+ ServicesRegistry serviceRegistry = ServiceUtilsForEObject.getInstance().getServiceRegistry(this.diagram);
+ ModelSet modelSet = serviceRegistry.getService(ModelSet.class);
+ if (!this.session.isOpen()) {
+ this.session.open(new NullProgressMonitor());
+
+ IEditingSession uiSession = SessionUIManager.INSTANCE.getOrCreateUISession(session);
+ uiSession.open();
+
+ // TODO : done in another place
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ this.session.addSemanticResource(uml.getResourceURI(), new NullProgressMonitor());
+
+ this.diagram.getTarget().eAdapters().add(new SessionTransientAttachment(session));
+ modelSet.getResources().add(session.getSessionResource());
+ }
+ } catch (ServiceException e1) {
+ Activator.log.error(e1);
+ }
+ final SiriusDiagramEditorInput diagramViewEditorInput = new SiriusDiagramEditorInput(this.diagram, uri, session);
+ this.editingDomain.getCommandStack().execute(new RecordingCommand(this.editingDomain) {
+ @Override
+ protected void doExecute() {
+ try {
+ NestedSiriusDiagramViewEditor.super.init(site, diagramViewEditorInput);
+ } catch (PartInitException e) {
+ Activator.log.error(e);
+ }
+ }
+ });
+ }
+
+ @Override
+ public void doSetInput(IEditorInput input, boolean releaseEditorContents) throws CoreException {
+ super.doSetInput(input, releaseEditorContents);
+ }
+
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.presentation.DocumentStructureTemplateEditor#isDirty()
+ *
+ * @return
+ */
+ @Override
+ public boolean isDirty() {
+ // manage by the Papyrus main editor
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.presentation.DocumentStructureTemplateEditor#isSaveAsAllowed()
+ *
+ * @return
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ // manage by the Papyrus main editor
+ return false;
+ }
+
+
+ // /**
+ // * @see org.eclipse.ui.part.MultiPageEditorPart#createSite(org.eclipse.ui.IEditorPart)
+ // *
+ // * @param editor
+ // * @return
+ // */
+ // protected IEditorSite createSite(IEditorPart editor) {
+ // // used to be able to have the error editor part nested in the embedded emf editor
+ // return getEditorSite();
+ // }
+
+ // Need to be add because palette manager is null when closing and reopening a papyrus model
+ @Override
+ public void createPartControl(Composite parent) {
+ try {
+ // recreate session with the good transactional editing domain
+ TransactionalEditingDomain ted = this.session.getTransactionalEditingDomain();
+ ServicesRegistry serviceRegistry = ServiceUtilsForEObject.getInstance().getServiceRegistry(this.diagram);
+ ModelSet modelSet = serviceRegistry.getService(ModelSet.class);
+ // PapyrusSession.setTransactionalEditingDomain(modelSet.getTransactionalEditingDomain());
+ // this.session = PapyrusSessionFactory.INSTANCE.createSession(session.getSessionResource().getURI(), new NullProgressMonitor(), ted);
+ // PapyrusSessionFactory.INSTANCE.setServiceRegistry(serviceRegistry);
+ // PapyrusSessionManager.INSTANCE.add(session);
+ // TODO : VL : we must find a way to remove a UML dependency in this plugin...
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ this.session.addSemanticResource(uml.getResourceURI(), new NullProgressMonitor());
+
+ this.diagram.getTarget().eAdapters().add(new SessionTransientAttachment(session));
+ modelSet.getResources().add(session.getSessionResource());
+ this.session.open(new NullProgressMonitor());
+
+ SessionPrinter.print(session, this.getClass().getCanonicalName() + " " + "createPartControl");
+
+ } catch (ServiceException e1) {
+ Activator.log.error(e1);
+ }
+ super.createPartControl(parent);
+ }
+
+
+ /**
+ *
+ * Custom ResourceItemProviderAdapterFactory to be able to show only the structure of the DSemanticDiagram
+ * and not other elements contained in the file
+ *
+ */
+ private class CustomResourceItemProviderAdapterFactory extends ResourceItemProviderAdapterFactory {
+
+ /**
+ * @see org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory#createResourceSetAdapter()
+ *
+ * @return
+ */
+ @Override
+ public Adapter createResourceSetAdapter() {
+ return new CustomResourceSetItemProvider(this);
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory#createResourceAdapter()
+ *
+ * @return
+ */
+ @Override
+ public Adapter createResourceAdapter() {
+ return new CustomResourceItemProvider(this);
+ }
+ }
+
+
+ /**
+ *
+ * Custom ResourceSetItemProvider used to display only the edited documentemplate and not other file contents
+ *
+ */
+ private class CustomResourceSetItemProvider extends ResourceSetItemProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param adapterFactory
+ */
+ public CustomResourceSetItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+
+ /**
+ * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getElements(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public Collection<?> getElements(Object object) {
+ return Collections.singleton(diagram.eResource());
+ }
+ }
+
+ /**
+ *
+ * Custom ResourceItemProvider to get only the {@link DSemanticDiagram} displayed in the EcoreEditor
+ *
+ */
+ private class CustomResourceItemProvider extends ResourceItemProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param adapterFactory
+ */
+ public CustomResourceItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getElements(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public Collection<?> getElements(Object object) {
+ return super.getElements(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#hasChildren(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ if (object instanceof Resource) {
+ return true;
+ }
+ return super.hasChildren(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.edit.provider.resource.ResourceItemProvider#getParent(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public Object getParent(Object object) {
+ return super.getParent(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.edit.provider.resource.ResourceItemProvider#getChildren(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public Collection<?> getChildren(Object object) {
+ if (object instanceof Resource) {
+ return Collections.singletonList(diagram);
+ }
+ return super.getChildren(object);
+ }
+
+ }
+
+ /**
+ * 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));
+ }
+
+ public Object getSemanticElement(Object wrapper) {
+ if (wrapper instanceof IGraphicalEditPart) {
+ return ((IGraphicalEditPart) wrapper).resolveSemanticElement();
+ }
+ if (wrapper instanceof IAdaptable) {
+ return ((IAdaptable) wrapper).getAdapter(EObject.class);
+ }
+ return null;
+ }
+
+
+ /**
+ * {@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) {
+
+ // 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 = 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;
+ }
+
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.internationalization.common.editor.IInternationalizationEditor#modifyPartName(java.lang.String)
+ *
+ * @param name
+ */
+ @Override
+ public void modifyPartName(final String name) {
+ setPartName(name);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.internationalization.common.editor.IInternationalizationEditor#refreshEditorPart()
+ */
+ @Override
+ public void refreshEditorPart() {
+ if (null == getDiagramEditPart()) {
+ return;// see bug 551530
+ }
+
+ // TODO: Implement a better refresh
+ DRepresentation representation = getRepresentation();
+ if (representation != null) {
+ Session session = SessionManager.INSTANCE.getSession(representation.eContainer());
+ // TODO, FiXME : it seems be a very bad idea to make a refresh command in the command stack...
+ session.getTransactionalEditingDomain().getCommandStack().execute(new RefreshRepresentationsCommand(session.getTransactionalEditingDomain(), new NullProgressMonitor(), representation));
+ }
+ // old version DiagramHelper.forceRefresh(getDiagramEditPart());
+ }
+
+ /**
+ * Returns the KeyHandler with common bindings for both the Outline and
+ * Graphical Views. For example, delete is a common action.
+ *
+ * @return KeyHandler
+ */
+ @Override
+ protected KeyHandler getKeyHandler() {
+ if (keyHandler == null) {
+ keyHandler = new KeyHandler();
+
+ ActionRegistry registry = getActionRegistry();
+ IAction action;
+
+ action = new PromptingDeleteAction(this);
+ action.setText(DiagramUIMessages.DiagramEditor_Delete_from_Diagram);
+ registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+
+ action = new InsertAction(this);
+ action.setText(""); //$NON-NLS-1$ // no text necessary since this is not a visible action
+ registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+
+ PromptingDeleteFromModelAction deleteModelAction = new PromptingDeleteFromModelAction(
+ this);
+ deleteModelAction.init();
+
+ registry.registerAction(deleteModelAction);
+
+ action = new DirectEditAction((IWorkbenchPart) this);
+ registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+
+ action = new ZoomInAction(getZoomManager());
+ action.setText(""); //$NON-NLS-1$ // no text necessary since this is not a visible action
+ registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+
+ action = new ZoomOutAction(getZoomManager());
+ action.setText(""); //$NON-NLS-1$ // no text necessary since this is not a visible action
+ registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+
+ action = new ToggleRouterAction(((IWorkbenchPart) this).getSite().getPage());
+ ((ToggleRouterAction) action).setPartSelector(new IPartSelector() {
+ @Override
+ public boolean selects(IWorkbenchPart part) {
+ return part == this;
+ }
+ });
+ action.setText(""); //$NON-NLS-1$ // no text necessary since this is not a visible action
+ registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+
+ keyHandler.put(KeyStroke.getPressed(SWT.INSERT, 0),
+ getActionRegistry().getAction(InsertAction.ID));
+
+ keyHandler.put(KeyStroke.getPressed(SWT.DEL, 100, SWT.CTRL),
+ getActionRegistry().getAction("deleteFromDiagramAction"));
+ keyHandler.put(KeyStroke.getPressed(SWT.BS, 8, 0),
+ getActionRegistry().getAction(ActionFactory.DELETE.getId()));
+
+ keyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0),
+ getActionRegistry().getAction(
+ ActionIds.ACTION_DELETE_FROM_MODEL));
+ keyHandler.put(/* CTRL + '=' */
+ KeyStroke.getPressed('=', 0x3d, SWT.CTRL),
+ getActionRegistry().getAction(
+ GEFActionConstants.ZOOM_IN));
+ keyHandler.put(/* CTRL + '-' */
+ KeyStroke.getPressed('-', 0x2d, SWT.CTRL),
+ getActionRegistry().getAction(
+ GEFActionConstants.ZOOM_OUT));
+ keyHandler.put(/* CTRL + L */
+ KeyStroke.getPressed((char) 0xC, 108, SWT.CTRL),
+ getActionRegistry().getAction(
+ ActionIds.ACTION_TOGGLE_ROUTER));
+ keyHandler.put(KeyStroke.getPressed(SWT.F2, 0), getActionRegistry()
+ .getAction(GEFActionConstants.DIRECT_EDIT));
+ }
+ return keyHandler;
+ }
+
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/SiriusDiagramEditorFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/SiriusDiagramEditorFactory.java
new file mode 100755
index 0000000..4fa007f
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/SiriusDiagramEditorFactory.java
@@ -0,0 +1,191 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor;
+
+import java.lang.reflect.Constructor;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.AbstractPageModel;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.provider.SiriusDiagramLabelProvider;
+import org.eclipse.papyrus.infra.ui.extension.diagrameditor.AbstractEditorFactory;
+import org.eclipse.papyrus.infra.ui.multidiagram.actionbarcontributor.ActionBarContributorRegistry;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorActionBarContributor;
+
+
+/**
+ * Factory for the DocumentStructureTemplateEditor
+ *
+ */
+public class SiriusDiagramEditorFactory extends AbstractEditorFactory {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param editorClass
+ * the editor class
+ * @param editorType
+ * the type of editor
+ */
+ public SiriusDiagramEditorFactory() {
+ // we don't use the type for the SiriusDiagramModel models
+ super(NestedSiriusDiagramViewEditor.class, ""); //$NON-NLS-1$
+ }
+
+ /**
+ * Create the IPageModel that is used by the SashWindows to manage the editor.
+ *
+ * @see org.eclipse.papyrus.infra.ui.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object)
+ *
+ * @param pageIdentifier
+ * The model pushed in the sashmodel by the creation command
+ * @return A model implementing the IPageModel
+ */
+ @Override
+ public IPageModel createIPageModel(Object pageIdentifier) {
+ ServicesRegistry services = getServiceRegistry();
+ ILabelProvider labels = ServiceUtils.getInstance().tryService(services, LabelProviderService.class)
+ .map(lps -> lps.getLabelProvider(pageIdentifier))
+ .orElseGet(SiriusDiagramLabelProvider::new);
+ return new DiagramViewEditorModel(pageIdentifier, services, labels);
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.editorsfactory.IEditorFactory#isPageModelFactoryFor(java.lang.Object)
+ *
+ * @param pageIdentifier
+ * @return
+ */
+ @Override
+ public boolean isPageModelFactoryFor(Object pageIdentifier) {
+ return pageIdentifier instanceof DSemanticDiagram;
+ }
+
+ /**
+ * IEditorModel used internally by the SashContainer. This model know how to handle IEditor creation.
+ *
+ */
+ private class DiagramViewEditorModel extends AbstractPageModel implements IEditorModel {
+
+
+ /**
+ * The servicesRegistry provided at creation.
+ */
+ private ServicesRegistry servicesRegistry;
+
+ /**
+ * The created editor.
+ */
+ private IEditorPart editor;
+
+ /**
+ * The raw model stored in the SashProvider.
+ */
+ private DSemanticDiagram rawModel;
+
+ /**
+ *
+ * Constructor.
+ */
+ public DiagramViewEditorModel(Object pageIdentifier, ServicesRegistry servicesRegistry, ILabelProvider labels) {
+ super(labels);
+
+ this.rawModel = (DSemanticDiagram) pageIdentifier;
+ this.servicesRegistry = servicesRegistry;
+ }
+
+ /**
+ * Create the IEditor for the diagram.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#createIEditorPart()
+ * @return
+ * @throws PartInitException
+ *
+ */
+ @Override
+ public IEditorPart createIEditorPart() throws PartInitException {
+ try {
+
+ Constructor<?> c = getDiagramClass().getConstructor(ServicesRegistry.class, DSemanticDiagram.class);
+ IEditorPart newEditor = (IEditorPart) c.newInstance(this.servicesRegistry, this.rawModel);
+ this.editor = newEditor;
+ return this.editor;
+
+ } catch (Exception e) {
+ // Lets propagate. This is an implementation problem that should be solved by
+ // programmer.
+ throw new PartInitException("Can't create Sirius Diagram View", e); //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * Get the action bar requested by the Editor.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#getActionBarContributor()
+ * @return
+ *
+ */
+ @Override
+ public EditorActionBarContributor getActionBarContributor() {
+
+ String actionBarId = SiriusDiagramEditorFactory.this.editorDescriptor.getActionBarContributorId();
+
+ // Do nothing if no EditorActionBarContributor is specify.
+ if (actionBarId == null || actionBarId.length() == 0) {
+ return null;
+ }
+
+ // Get ServiceRegistry
+ ActionBarContributorRegistry registry;
+ try {
+ registry = this.servicesRegistry.getService(ActionBarContributorRegistry.class);
+ } catch (ServiceException e) {
+ // Service not found
+ return null;
+ }
+
+ try {
+ return registry.getActionBarContributor(actionBarId);
+ } catch (BackboneException e) {
+ Activator.log.error(e);
+ return null;
+ }
+ }
+
+ /**
+ * Get the underlying RawModel. Return the Document.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getRawModel()
+ * @return
+ *
+ */
+ @Override
+ public Object getRawModel() {
+ return this.rawModel;
+ }
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/SiriusDiagramEditorInput.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/SiriusDiagramEditorInput.java
new file mode 100755
index 0000000..dd679f1
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/editor/SiriusDiagramEditorInput.java
@@ -0,0 +1,218 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.editor;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.messages.Messages;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.ui.business.api.session.IEditingSession;
+import org.eclipse.sirius.ui.business.api.session.SessionEditorInput;
+import org.eclipse.sirius.ui.business.api.session.SessionUIManager;
+import org.eclipse.sirius.viewpoint.provider.SiriusEditPlugin;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * SiriusDiagramEditorInput.
+ *
+ */
+public class SiriusDiagramEditorInput extends SessionEditorInput {
+
+ /** The input for the Document widget */
+ private final DSemanticDiagram diagram;
+
+ private IStatus status;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param siriusDiagram
+ * the diagram to edit
+ */
+ public SiriusDiagramEditorInput(final DSemanticDiagram siriusDiagram, URI uri, Session session) {
+ super(uri, siriusDiagram.getName(), session);
+ this.diagram = siriusDiagram;
+ }
+
+ /**
+ *
+ * @return
+ * the diagram for which we are opening an editor
+ */
+ public DSemanticDiagram getSiriusDiagramPrototype() {
+ return this.diagram;
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.IEditorInput#exists()
+ *
+ * @return
+ */
+ @Override
+ public boolean exists() {
+ return false;// not required in a Papyrus context
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+ *
+ * @return
+ */
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return null; // not required in a Papyrus context
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.IEditorInput#getName()
+ *
+ * @return
+ */
+ @Override
+ public String getName() {
+ final String name = this.diagram.getName();
+ return name == null || name.isEmpty() ? Messages.SiriusDiagramEditorInput_NoName : name;
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.IEditorInput#getPersistable()
+ *
+ * @return
+ */
+ @Override
+ public IPersistableElement getPersistable() {
+ return null;// not required in a Papyrus context
+ }
+
+ /**
+ *
+ * @return
+ * the description
+ */
+ private String getDescription() {
+ final String description = this.diagram.getDocumentation();
+ return description == null || description.isEmpty() ? Messages.SiriusDiagramEditorInput_NoDescription : description;
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.IEditorInput#getToolTipText()
+ *
+ * @return
+ */
+ @Override
+ public String getToolTipText() {
+ return NLS.bind(Messages.SiriusDiagramEditorInput_Tooltip, getName(), getDescription());
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ *
+ * @param adapter
+ * the only supported type are {@link URI} and {@link diagram}
+ * @return
+ * the uri of the file containing the {@link diagram} to edit or the {@link diagram} itself
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == URI.class) {
+ return adapter.cast(this.diagram.eResource().getURI());
+ }
+ if (adapter == DSemanticDiagram.class) {
+ return adapter.cast(this.diagram);
+ }
+ if (adapter == null) {
+ return super.getAdapter(adapter);
+ }
+ return null;
+ }
+
+ /**
+ * Get the session.
+ *
+ * @param sessionModelURI
+ * the Session Resource URI
+ * @param restore
+ * true to restore the session if it is not instantiated
+ * @return the session if it can be found, <code>null</code> otherwise
+ *
+ * @since 0.9.0
+ */
+ public Session getSession(URI sessionModelURI, boolean restore) {
+ Session sessionFromURI;
+ try {
+ sessionFromURI = SessionManager.INSTANCE.getExistingSession(sessionModelURI);
+
+ // A session adds and removes itself from the session manager during
+ // open()/close()
+ // If restore, we try to create a new one and open it only in this
+ // case: the session lifecycle is not safe enough to try to open a
+ // previously closed session.
+ if (sessionFromURI == null && restore) {
+ status = Status.OK_STATUS;
+ }
+ sessionFromURI = openSession(sessionModelURI, restore, sessionFromURI);
+ } catch (OperationCanceledException e) {
+ sessionFromURI = null;
+ status = new Status(IStatus.CANCEL, SiriusEditPlugin.ID, e.getLocalizedMessage(), e); // $NON-NLS-1$
+ // Silent catch: can happen if failing to retrieve the session from
+ // its URI
+ // CHECKSTYLE:OFF
+ } catch (RuntimeException e) {
+ // CHECKSTYLE:ON
+ sessionFromURI = null;
+ status = new Status(IStatus.ERROR, SiriusEditPlugin.ID, e.getLocalizedMessage(), e); // $NON-NLS-1$
+ // Silent catch: can happen if failing to retrieve the session from
+ // its URI
+ }
+ return sessionFromURI;
+ }
+
+ private static Session openSession(URI sessionModelURI, boolean restore, Session sessionFromURI) {
+ Session session = sessionFromURI;
+ if (session == null && restore) {
+ session = SessionManager.INSTANCE.openSession(sessionModelURI, new NullProgressMonitor(), SiriusEditPlugin.getPlugin().getUiCallback(), true);
+ }
+
+ if (session != null && session.isOpen()) {
+ // The SessionUIManager creates and open an IEditingSession when
+ // a session is added to the SessionManager. This
+ // IEditingSession is closed and removed from the ui manager
+ // when the corresponding session is removed from the session
+ // manager (closed).
+ IEditingSession uiSession = SessionUIManager.INSTANCE.getUISession(session);
+ if (uiSession == null && restore) {
+ uiSession = SessionUIManager.INSTANCE.getOrCreateUISession(session);
+ }
+ if (uiSession != null && !uiSession.isOpen()) {
+ uiSession.open();
+ }
+ }
+ return session;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/listeners/SiriusArchitectureDescriptionAdapter.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/listeners/SiriusArchitectureDescriptionAdapter.java
new file mode 100755
index 0000000..aa50666
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/listeners/SiriusArchitectureDescriptionAdapter.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.listeners;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.papyrus.infra.architecture.listeners.AbstractArchitectureDescriptionAdapter;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.ISiriusSessionViewpointUpdater;
+
+/**
+ * This adapter allows to be notified when the Papyrus Architecture changes and allows to update the Sirius Session consequently
+ */
+public class SiriusArchitectureDescriptionAdapter extends AbstractArchitectureDescriptionAdapter {
+
+ /**
+ * the Sirius session viewpoint updater
+ */
+ private final ISiriusSessionViewpointUpdater updater;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param updater
+ * the Sirius session viewpoint updater
+ */
+ public SiriusArchitectureDescriptionAdapter(final ISiriusSessionViewpointUpdater updater) {
+ this.updater = updater;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.architecture.listeners.AbstractArchitectureDescriptionAdapter#fireArchitectureContextChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void fireArchitectureContextChanged(Notification notification) {
+ this.updater.updateAppliedSiriusViewpoints();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.architecture.listeners.AbstractArchitectureDescriptionAdapter#fireArchitectureViewpointsChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void fireArchitectureViewpointsChanged(Notification notification) {
+ this.updater.updateAppliedSiriusViewpoints();
+
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/menus/SiriusDiagramDynamicContribution.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/menus/SiriusDiagramDynamicContribution.java
new file mode 100755
index 0000000..0e7a783
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/menus/SiriusDiagramDynamicContribution.java
@@ -0,0 +1,131 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.menus;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+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.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.SiriusDiagramViewPrototype;
+import org.eclipse.papyrus.infra.viewpoints.policy.DynamicContribution;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+
+
+/**
+ * Represent the dynamic contribution of the Sirius Diagram Template Views menu.
+ *
+ */
+public class SiriusDiagramDynamicContribution extends DynamicContribution {
+
+ /**
+ * Constructor.
+ */
+ public SiriusDiagramDynamicContribution() {
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param id
+ */
+ public SiriusDiagramDynamicContribution(String id) {
+ super(id);
+ }
+
+ public boolean isCompatible(SiriusDiagramViewPrototype proto, EObject selection) {
+ // TODO VL : you can't reference UML elements in this plugin
+ // TODO : you can't check current diagram type in this plugin
+ if (proto.getRepresentationKind().getDiagramDescription().getName().equals("ClassDiagram") && (selection instanceof Model || selection instanceof org.eclipse.uml2.uml.Class)) {
+ return true;
+ } else if (proto.getRepresentationKind().getDiagramDescription().getName().equals("StateMachineDiagram") && (selection instanceof Model || selection instanceof State || selection instanceof StateMachine || selection instanceof Region)) {
+ return true;
+ } else if (proto.getRepresentationKind().getDiagramDescription().getName().equals("SequenceDiagram") && (selection instanceof Model || selection instanceof Interaction)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+ *
+ * @return
+ */
+ @Override
+ protected IContributionItem[] getContributionItems() {
+ final EObject selection = getSelection();
+ if (selection == null) {
+ return new IContributionItem[0];
+ }
+
+ // build a list of all the available prototypes
+ List<ViewPrototype> data = new ArrayList<>();
+ for (final ViewPrototype proto : PolicyChecker.getFor(selection).getPrototypesFor(selection)) {
+ if (!(proto.getRepresentationKind() instanceof SiriusDiagramPrototype)) {
+ continue;
+ }
+ if (isCompatible((SiriusDiagramViewPrototype) proto, selection)) {
+ data.add(proto);
+ }
+ }
+
+ Collections.sort(data, new ViewPrototype.Comp());
+
+ // build the full labels
+ List<String> labels = new ArrayList<>(data.size());
+ String last = null;
+ boolean first = true;
+ for (ViewPrototype item : data) {
+ String label = item.getLabel();
+ if (last != null && last.equals(label)) {
+ // name collision
+ if (first) {
+ labels.set(labels.size() - 1, data.get(labels.size() - 1).getFullLabel());
+ first = false;
+ }
+ labels.add(item.getFullLabel());
+ } else {
+ labels.add(label);
+ last = label;
+ first = true;
+ }
+ }
+
+ // build the menu
+ List<IContributionItem> items = new ArrayList<>(data.size());
+ for (int i = 0; i != data.size(); i++) {
+ final ViewPrototype proto = data.get(i);
+ String label = labels.get(i);
+ items.add(new ActionContributionItem(new Action(label, proto.getIconDescriptor()) {
+ @Override
+ public void run() {
+ proto.instantiateOn(selection);
+ }
+ }));
+ }
+ return items.toArray(new IContributionItem[items.size()]);
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/messages/Messages.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/messages/Messages.java
new file mode 100755
index 0000000..acc51a0
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/messages/Messages.java
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages for the current pluginS
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.siriusdiag.ui.internal.messages.messages"; //$NON-NLS-1$
+ public static String SiriusDiagramEditorInput_NoName;
+ public static String SiriusDiagramEditorInput_NoDescription;
+ public static String SiriusDiagramEditorInput_Tooltip;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/messages/messages.properties b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/messages/messages.properties
new file mode 100755
index 0000000..45e3eda
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/messages/messages.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2021 CEA LIST, Artal Technologies
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+SiriusDiagramEditorInput_NoName=no name
+SiriusDiagramEditorInput_NoDescription=no description
+SiriusDiagramEditorInput_Tooltip=name: {0} \n description: {1}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/provider/SiriusDiagramLabelProvider.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/provider/SiriusDiagramLabelProvider.java
new file mode 100755
index 0000000..867402f
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/provider/SiriusDiagramLabelProvider.java
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototypeLabelProvider;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Label provider for the Sirius Diagram
+ */
+public class SiriusDiagramLabelProvider extends ViewPrototypeLabelProvider implements IFilteredLabelProvider {
+
+ @Override
+ public boolean accept(Object object) {
+ if (object instanceof IStructuredSelection) {
+ return accept((IStructuredSelection) object);
+ }
+ return EMFHelper.getEObject(object) instanceof DSemanticDiagram;
+ }
+
+ /**
+ *
+ * @param selection
+ * a selection
+ * @return
+ * <code>true</code> if all elements in the selection are accepted
+ */
+ protected boolean accept(final IStructuredSelection selection) {
+ for (final Object current : selection.toList()) {
+ if (!accept(current)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototypeLabelProvider#getName(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ protected String getName(final EObject object) {
+ String value = null;
+ if (object instanceof DSemanticDiagram) {
+ value = ((DSemanticDiagram) object).getName(); // TODO internationalization to manage here
+ }
+ return null != value ? value : super.getName(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#getNonCommonIcon(java.lang.Object)
+ *
+ * @param commonObject
+ * @return
+ */
+ @Override
+ protected Image getNonCommonIcon(final Object commonObject) {
+ return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "/icons/PapyrusDocument.gif"); // TODO : change this icon please //$NON-NLS-1$
+ }
+
+
+
+}
+
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/ISiriusSessionViewpointUpdater.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/ISiriusSessionViewpointUpdater.java
new file mode 100755
index 0000000..6149d3f
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/ISiriusSessionViewpointUpdater.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+
+/**
+ * Interface to use to be able to update the Viewpoint applied to the current Sirius Session
+ */
+public interface ISiriusSessionViewpointUpdater {
+
+ /**
+ * Update the applied {@link Viewpoint}
+ */
+ public void updateAppliedSiriusViewpoints();
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusLocalSessionCreationOperation.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusLocalSessionCreationOperation.java
new file mode 100755
index 0000000..5429094
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusLocalSessionCreationOperation.java
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.services.IPapyrusSessionFactory;
+import org.eclipse.sirius.business.api.session.DefaultLocalSessionCreationOperation;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.factory.SessionFactory;
+import org.eclipse.sirius.viewpoint.Messages;
+
+/**
+ * A common operation to create a session and open it.
+ */
+// TODO provide patch to Sirius to get less overriden code
+public class PapyrusLocalSessionCreationOperation extends DefaultLocalSessionCreationOperation {
+
+ private IProgressMonitor monitor;
+
+ private TransactionalEditingDomain transactionalEditingDomain;
+
+ /**
+ * Constructor.
+ *
+ * @param sessionResourceURI
+ * the {@link URI} of the Resource {@link Session} model
+ * @param monitor
+ * {@link IProgressMonitor} to show progression of
+ * {@link Session} creation
+ * @param transactionalEditingDomain
+ * the editing domain to use
+ */
+ public PapyrusLocalSessionCreationOperation(final URI sessionResourceURI, final IProgressMonitor monitor, final TransactionalEditingDomain transactionalEditingDomain) {
+ super(sessionResourceURI, monitor);
+ this.transactionalEditingDomain = transactionalEditingDomain;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.business.api.session.SessionCreationOperation#execute()
+ */
+ @Override
+ public void execute() throws CoreException {
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+ try {
+ monitor.beginTask(Messages.DefaultLocalSessionCreationOperation_createResoureMsg, 3);
+ monitor.subTask(Messages.DefaultLocalSessionCreationOperation_createSessionMsg);
+ final SessionFactory factory = SessionFactory.INSTANCE;
+ if (factory instanceof IPapyrusSessionFactory) {
+ IPapyrusSessionFactory papyrusFactory = (IPapyrusSessionFactory) factory;
+ session = papyrusFactory.createPapyrusSession(sessionResourceURI, SubMonitor.convert(monitor, 1), transactionalEditingDomain);
+
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ NLS.bind("We expected to get the '{0}', so we are not able to create the Sirius Session for Papyrus", IPapyrusSessionFactory.class.getName()))); //$NON-NLS-1$
+ }
+ monitor.subTask(Messages.DefaultLocalSessionCreationOperation_sessionOpenMsg);
+ session.open(SubMonitor.convert(monitor, 1));
+ } finally {
+ monitor.done();
+ }
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusSession.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusSession.java
new file mode 100755
index 0000000..fc2a465
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusSession.java
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl;
+import org.eclipse.sirius.viewpoint.DAnalysis;
+
+/**
+ * Papyrus extension to use session with .
+ *
+ * This custom session doesn't nothing for save. The save action must be managed by Papyrus itself.
+ *
+ */
+@SuppressWarnings("restriction")
+public class PapyrusSession extends DAnalysisSessionImpl {
+
+ /**
+ * Constructor.
+ *
+ * @param mainDAnalysis
+ */
+ public PapyrusSession(final DAnalysis mainDAnalysis, TransactionalEditingDomain transactionalEditingDomain) {
+ super(mainDAnalysis);
+ }
+
+ /**
+ *
+ * @see org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl#save(java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ *
+ * @param options
+ * @param monitor
+ */
+ @Override
+ public void save(Map<?, ?> options, IProgressMonitor monitor) {
+ // do nothing on save, delegate to Papyrus
+ }
+
+ /**
+ * @see org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl#doSave(java.util.Map, org.eclipse.core.runtime.IProgressMonitor, boolean)
+ *
+ * @param options
+ * @param monitor
+ * @param runExclusive
+ */
+ // @Override
+ // protected void doSave(Map<?, ?> options, IProgressMonitor monitor, boolean runExclusive) {
+ // // do nothing on save, delegate to Papyrus
+ // }
+
+ public void papyrusSave(Map<?, ?> options, IProgressMonitor monitor) {
+ super.save(options, monitor);
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusSessionFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusSessionFactory.java
new file mode 100755
index 0000000..c599009
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/PapyrusSessionFactory.java
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.services.IPapyrusSessionFactory;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.internal.session.SessionFactoryImpl;
+import org.eclipse.sirius.viewpoint.DAnalysis;
+import org.eclipse.sirius.viewpoint.description.util.DescriptionResourceImpl;
+
+/**
+ * Papyrus extension of sirius session factory.
+ *
+ */
+public class PapyrusSessionFactory extends SessionFactoryImpl implements IPapyrusSessionFactory {
+
+ @Override
+ public final Session createPapyrusSession(URI sessionResourceURI, TransactionalEditingDomain ted) throws CoreException {
+ return createPapyrusSession(sessionResourceURI, new NullProgressMonitor(), ted);
+ }
+
+ @Override
+ public Session createPapyrusSession(final URI sessionResourceURI, IProgressMonitor monitor, TransactionalEditingDomain ted) throws CoreException {
+ preparePapyrusEditingDomain(sessionResourceURI, ted);
+ boolean alreadyExistingResource = ted.getResourceSet().getURIConverter().exists(sessionResourceURI, null);
+ Session session = null;
+ if (alreadyExistingResource) {
+ session = loadSessionModelResource(sessionResourceURI, ted, monitor);
+ } else {
+ session = createSessionResource(sessionResourceURI, ted, true, monitor);
+ }
+ return session;
+ }
+
+ @Override
+ public Session createDefaultPapyrusSession(URI sessionResourceURI, TransactionalEditingDomain ted) throws CoreException {
+ return createPapyrusSession(sessionResourceURI, new NullProgressMonitor(), ted);
+ }
+
+ /**
+ * This method comes in replacement of SessionImpl#prepareEditingDomain
+ *
+ * @param sessionResourceURI
+ * @param transactionalEditingDomain
+ * @return
+ */
+ protected final TransactionalEditingDomain preparePapyrusEditingDomain(final URI sessionResourceURI, final TransactionalEditingDomain transactionalEditingDomain) {
+ // ResourceSet set = ResourceSetFactory.createFactory().createResourceSet(sessionResourceURI);
+ // final TransactionalEditingDomain transactionalEditingDomain = EditingDomainFactoryService.INSTANCE.getEditingDomainFactory().createEditingDomain(set);
+
+ // Configure the resource set, its is done here and not before the
+ // editing domain creation which could provide its own resource set.
+ ResourceSet set = transactionalEditingDomain.getResourceSet();
+
+ set.getLoadOptions().put(DescriptionResourceImpl.OPTION_USE_URI_FRAGMENT_AS_ID, true);
+
+ configureDomain(transactionalEditingDomain, sessionResourceURI);
+
+ return transactionalEditingDomain;
+ }
+
+ /**
+ * Create a {@link Session} for the given {@link DAnalysis}.
+ *
+ * @param analysis
+ * the main DAnalysis of the {@link Session} to create.
+ * @param transactionalEditingDomain
+ * the editing domain, might be usefull to help subclasses to create their sessions.
+ * @return a {@link Session}
+ */
+ @Override
+ protected Session createSession(DAnalysis analysis, TransactionalEditingDomain transactionalEditingDomain) {
+ if (transactionalEditingDomain.getResourceSet() instanceof ModelSet) {
+ return new PapyrusSession(analysis, transactionalEditingDomain);
+ } else {
+ return super.createSession(analysis, transactionalEditingDomain);
+ }
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionPrinter.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionPrinter.java
new file mode 100755
index 0000000..e68dc05
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionPrinter.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.sirius.business.api.session.Session;
+
+/**
+ *
+ */
+public class SessionPrinter {
+
+
+ public static final void print(Session session, final String ID) {
+ System.out.println(NLS.bind("------------- {0} ----------", ID));
+ System.out.println("session =" + session);
+ if (session != null) {
+ System.out.println("\thashcode =" + session.hashCode());
+ } else {
+ System.out.println("\tsession is null");
+ return;
+ }
+ if (session.getSessionResource() != null) {
+ System.out.println("\tresource hascode = " + session.getSessionResource().hashCode());
+ } else {
+ System.out.println("\tsession resource is null");
+ return;
+ }
+ if (session.getSessionResource().getResourceSet() != null) {
+ System.out.println("\tresourceSet hascode= " + session.getSessionResource().getResourceSet().hashCode());
+ } else {
+ System.out.println("\tsession resource set is null");
+ return;
+ }
+ if (session.getTransactionalEditingDomain() != null) {
+ System.out.println("\teditingDomain hashcode= " + session.getTransactionalEditingDomain().hashCode());
+ } else {
+ System.out.println("\tsession editing domain is null");
+ }
+
+ }
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionService.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionService.java
new file mode 100755
index 0000000..78dcdc0
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionService.java
@@ -0,0 +1,378 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDescriptionUtils;
+import org.eclipse.papyrus.infra.architecture.listeners.ArchitectureDescriptionAdapterUtils;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureViewpoint;
+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.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.gmf.util.GMFUnsafe;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.listeners.SiriusArchitectureDescriptionAdapter;
+import org.eclipse.papyrus.infra.siriusdiag.ui.modelresource.SiriusDiagramModel;
+import org.eclipse.sirius.business.api.dialect.DialectManager;
+import org.eclipse.sirius.business.api.query.FileQuery;
+import org.eclipse.sirius.business.api.session.DefaultLocalSessionCreationOperation;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+import org.eclipse.sirius.ui.business.api.viewpoint.ViewpointSelectionCallback;
+import org.eclipse.sirius.viewpoint.description.RepresentationDescription;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+
+/**
+ * This service is in charge to manage all stuff about Sirius Session
+ */
+public class SessionService implements ISiriusSessionService, ISiriusSessionViewpointUpdater {
+
+ /**
+ * The service registry associated to this current SessionService
+ */
+ private ServicesRegistry servicesRegistry;
+
+ /**
+ * the current ModelSet
+ */
+ private ModelSet modelSet;
+
+ /**
+ * the current editing domain;
+ */
+ private TransactionalEditingDomain editingDomain;
+
+ /**
+ * The created session
+ */
+ private Session createdSession = null;
+
+ private SiriusArchitectureDescriptionAdapter architectureListener;
+
+ public SessionService() {
+ // nothing to do
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.services.IService#init(org.eclipse.papyrus.infra.core.services.ServicesRegistry)
+ *
+ * @param servicesRegistry
+ * the service registry associated to the current model
+ * @throws ServiceException
+ */
+ @Override
+ public void init(final ServicesRegistry servicesRegistry) throws ServiceException {
+ this.servicesRegistry = servicesRegistry;
+ if (this.servicesRegistry == null) {
+ throw new ServiceException(NLS.bind("The service {0} can't be initialized because the ServicesRegistry is not found", ISiriusSessionService.SERVICE_ID));
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.services.IService#startService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void startService() throws ServiceException {
+ this.modelSet = getModelSet();
+ this.editingDomain = getEditingDomain();
+ if (this.modelSet == null || this.editingDomain == null) {
+ throw new ServiceException(NLS.bind("The service {0} can't start.", ISiriusSessionService.SERVICE_ID));
+ }
+ this.architectureListener = new SiriusArchitectureDescriptionAdapter(this);
+ ArchitectureDescriptionAdapterUtils.registerListener(this.modelSet, this.architectureListener);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.services.IService#disposeService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void disposeService() throws ServiceException {
+ if (this.architectureListener != null) {
+ ArchitectureDescriptionAdapterUtils.unregisterListener(this.modelSet, this.architectureListener);
+ }
+ this.servicesRegistry = null;
+ this.editingDomain = null;
+ this.modelSet = null;
+ this.createdSession = null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService#getSiriusSession()
+ *
+ * @return
+ * the Sirius Session associated to the {@link ServicesRegistry}. This method creates it if is doesn't yet exists
+ */
+ @Override
+ public Session getSiriusSession() {
+ if (this.createdSession == null) {
+ createdSession();
+ }
+ return this.createdSession;
+ }
+
+ /**
+ * This method creates the Sirius session
+ */
+ private void createdSession() {
+ if (this.servicesRegistry == null || this.modelSet == null || this.editingDomain == null) {
+ return;
+ }
+
+ // 1. create the Sirius file resource URI
+ URI siriusFileResource = modelSet.getURIWithoutExtension();
+ siriusFileResource = siriusFileResource.appendFileExtension(SiriusConstants.SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION);
+
+ // 2. save the notation file
+ saveNotationFile(modelSet);
+
+ // 3. create the session
+ this.createdSession = createSiriusSession(siriusFileResource);
+
+
+ SiriusDiagramModel siriusModel = (SiriusDiagramModel) modelSet.getModel(SiriusDiagramModel.SIRIUS_DIAGRAM_MODEL_ID);
+ Assert.isNotNull(siriusModel, NLS.bind("We can't find the '{0}' class.", SiriusDiagramModel.class.getName()));
+ siriusModel.setSiriusSession(this.createdSession);
+
+
+
+ // useless or not ?*
+ /* Papyrus */SessionManager.INSTANCE.add(createdSession);
+ /* Papyrus */SessionManager.INSTANCE.openSession(siriusFileResource, new NullProgressMonitor(), null);// check parameters
+
+ URI umlURI = modelSet.getURIWithoutExtension().appendFileExtension("uml");//// $NON-NLS-1 //TODO uml as string is not very nice inside an infra plugin
+ this.createdSession.addSemanticResource(umlURI, new NullProgressMonitor());
+ this.createdSession.save(new NullProgressMonitor());
+
+ // 4. update applied sirius viewpoints
+ updateAppliedSiriusViewpoints();
+
+ // VL : not sure if we need to save before or after the sirius viewpoint application.
+ //initially we applied the sirius viewpoint AFTER the save
+ // this.createdSession.save(new NullProgressMonitor());
+
+
+ }
+
+ /**
+ *
+ * @return
+ * the editing domain or <code>null</code> if not found
+ */
+ private final TransactionalEditingDomain getEditingDomain() {
+ try {
+ return ServiceUtils.getInstance().getTransactionalEditingDomain(this.servicesRegistry);
+ } catch (ServiceException e) {
+ Activator.log.error("EditingDomain not found", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the {@link ModelSet} or <code>null</code> if not found
+ */
+ private final ModelSet getModelSet() {
+ try {
+ return this.servicesRegistry.getService(ModelSet.class);
+ } catch (ServiceException e) {
+ Activator.log.error("ModelSet not found", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ * This method calls ModelSet.save() to save the notation file if it doesn't yet exist
+ *
+ * @param modelSet
+ * the current modelSet
+ */
+ private final void saveNotationFile(final ModelSet modelSet) {
+ // this action is required to avoid a crash when we create a new sirius diagram from the Papyrus "create model wizard"
+ // TODO to avoid this bug, we should propose a patch to Sirius to check the file exists before trying to load it? (or a try catch)
+ // bug is in org.eclipse.sirius.business.api.helper.SiriusResourceHelper.getCorrespondingViewpoint(Session, Viewpoint), line 136
+ // so at this line : editingDomainResource.load(Collections.EMPTY_MAP);
+ URI notationURi = modelSet.getURIWithoutExtension();
+ notationURi = notationURi.appendFileExtension("notation");////$NON-NLS-1$
+ boolean exists = modelSet.getURIConverter().exists(notationURi, null);
+ if (!exists) {
+ try {
+ modelSet.save(new NullProgressMonitor());
+ } catch (IOException e) {
+ Activator.log.error("ModelSet can't be saved", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ *
+ * @param siriusResourceURI
+ * the resource uri to use to create the Session
+ * @return
+ * the Session or <code>null</code>
+ */
+ private Session createSiriusSession(final URI siriusResourceURI) {
+ final DefaultLocalSessionCreationOperation operation = new PapyrusLocalSessionCreationOperation(siriusResourceURI, new NullProgressMonitor(), this.editingDomain);
+ try {
+ operation.execute();
+ return operation.getCreatedSession();
+ } catch (CoreException e) {
+ Activator.log.error(NLS.bind("The resource {0} can't be created", siriusResourceURI), e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the collection of Sirius {@link Viewpoint} referenced in the current Papyrus architecture framework
+ */
+ private final Collection<Viewpoint> collectSiriusViewpointInPapyrusArchitecture() {
+ final ArchitectureDescriptionUtils utils = new ArchitectureDescriptionUtils(this.modelSet);
+ final Collection<MergedArchitectureViewpoint> vp = utils.getArchitectureContext().getViewpoints();
+ final Collection<Viewpoint> siriusViewpoints = new HashSet<>();
+ for (MergedArchitectureViewpoint tmp : vp) {
+ for (RepresentationKind current : tmp.getRepresentationKinds()) {
+ if (current instanceof SiriusDiagramPrototype) {
+ final DiagramDescription desc = ((SiriusDiagramPrototype) current).getDiagramDescription();
+ final EObject currentV = desc.eContainer();
+ if (currentV instanceof Viewpoint) {
+ siriusViewpoints.add((Viewpoint) currentV);
+ }
+ }
+ }
+ }
+ return siriusViewpoints;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionViewpointUpdater#updateAppliedViewpoint()
+ *
+ */
+ @Override
+ public void updateAppliedSiriusViewpoints() {
+ if (getEditingDomain() == null) {
+ // we are disposing the service
+ return;
+ }
+ try {
+ // required to allow to open a sirius Diagram from the ModelExplorer on double click as first action!
+ // if not we get this kind of exception : java.lang.IllegalStateException: Cannot modify resource set without a write transaction
+ GMFUnsafe.write(getEditingDomain(), new UpdateSiriusViewpointRunnable(this.createdSession));
+ } catch (InterruptedException | RollbackException e) {
+ Activator.log.error(e);
+ }
+
+ }
+
+ private class UpdateSiriusViewpointRunnable implements Runnable {
+
+ private Session session;
+
+ public UpdateSiriusViewpointRunnable(final Session session) {
+ this.session = session;
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ *
+ */
+ @Override
+ public void run() {
+ final Collection<Viewpoint> toApply = collectSiriusViewpointInPapyrusArchitecture();
+ final Collection<Viewpoint> currentAppliedViewpoints = this.session.getSelectedViewpoints(false);
+
+ final Collection<Viewpoint> toUnapply = new ArrayList<>(currentAppliedViewpoints);
+ toUnapply.removeAll(toApply);
+ toApply.removeAll(currentAppliedViewpoints);
+
+ final ViewpointSelectionCallback callBack = new ViewpointSelectionCallback();
+
+ for (final Viewpoint previouslySelected : toUnapply) {
+ callBack.deselectViewpoint(previouslySelected, this.session, new NullProgressMonitor());
+ }
+
+ for (Viewpoint current : toApply) {
+ callBack.selectViewpoint(current, this.session, new NullProgressMonitor());
+ }
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService#getSiriusDiagramDescriptionFromPapyrusPrototype(org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype, org.eclipse.emf.ecore.EObject)
+ *
+ * @param siriusDiagramPrototype
+ * @param context
+ * @return
+ * the DiagramDescription corresponding to the {@link SiriusDiagramPrototype} and registered in the current session, or <code>null</code> if not found
+ */
+ @Override
+ public DiagramDescription getSiriusDiagramDescriptionFromPapyrusPrototype(final SiriusDiagramPrototype siriusDiagramPrototype, final EObject context) {
+ if (getSiriusSession() == null || siriusDiagramPrototype == null || siriusDiagramPrototype.getDiagramDescription() == null) {
+ return null;
+ }
+ final URI descriptionURI = siriusDiagramPrototype.getDiagramDescription().eResource().getURI();
+ if (descriptionURI == null) {
+ return null;
+ }
+ Collection<RepresentationDescription> desc = DialectManager.INSTANCE.getAvailableRepresentationDescriptions(this.createdSession.getSelectedViewpoints(false), context);
+ if (desc.isEmpty()) { // TODO required?
+ updateAppliedSiriusViewpoints();
+ }
+ desc = DialectManager.INSTANCE.getAvailableRepresentationDescriptions(this.createdSession.getSelectedViewpoints(false), context);
+ final java.util.Iterator<RepresentationDescription> iter = desc.iterator();
+ while (iter.hasNext()) {
+ final RepresentationDescription current = iter.next();
+ if (current instanceof DiagramDescription && current.eResource() != null) {
+ final URI uri = current.eResource().getURI();
+ if (descriptionURI.equals(uri)) {
+ return (DiagramDescription) current;
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionServiceFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionServiceFactory.java
new file mode 100755
index 0000000..21c009c
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SessionServiceFactory.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.services.IServiceFactory;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+
+/**
+ * The factory used to create the Sirius Session Service
+ */
+public class SessionServiceFactory implements IServiceFactory {
+
+ /**
+ * The Papyrus service registry
+ */
+ private ServicesRegistry servReg;
+
+ /**
+ * the created {@link SessionService}
+ */
+ private SessionService sessionService;
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IService#init(org.eclipse.papyrus.infra.core.services.ServicesRegistry)
+ *
+ * @param servicesRegistry
+ * @throws ServiceException
+ */
+ @Override
+ public void init(ServicesRegistry servicesRegistry) throws ServiceException {
+ this.servReg = servicesRegistry;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IService#startService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void startService() throws ServiceException {
+ // nothing to do
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IService#disposeService()
+ *
+ * @throws ServiceException
+ */
+ @Override
+ public void disposeService() throws ServiceException {
+ this.servReg = null;
+ if (this.sessionService != null) {
+ this.sessionService.disposeService();
+ }
+ this.sessionService = null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.services.IServiceFactory#createServiceInstance()
+ *
+ * @return
+ * @throws ServiceException
+ */
+ @Override
+ public Object createServiceInstance() throws ServiceException {
+ if (this.servReg == null) {
+ throw new ServiceException(NLS.bind("The service factory {0} seems disposed.", this.getClass().getName())); //$NON-NLS-1$
+ }
+ this.sessionService = new SessionService();
+ sessionService.init(this.servReg);
+ sessionService.startService();
+ return sessionService;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SiriusConstants.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SiriusConstants.java
new file mode 100755
index 0000000..66db5db
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/SiriusConstants.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions;
+
+/**
+ * Constants used by the Sirius integration
+ */
+public class SiriusConstants {
+
+ private SiriusConstants() {
+ // to prevent instantiation
+ }
+
+ /**
+ * the Sirius file extension (*.aird)
+ */
+ public static final String SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION = "aird"; // $NON-NLS-1$
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/services/IPapyrusSessionFactory.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/services/IPapyrusSessionFactory.java
new file mode 100755
index 0000000..040eb19
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/sessions/services/IPapyrusSessionFactory.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.services;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.sirius.business.api.session.Session;
+
+/**
+ *
+ */
+public interface IPapyrusSessionFactory {
+
+ public Session createPapyrusSession(URI sessionResourceURI, TransactionalEditingDomain ted) throws CoreException;
+
+ public Session createPapyrusSession(final URI sessionResourceURI, IProgressMonitor monitor, TransactionalEditingDomain ted) throws CoreException;
+
+ public Session createDefaultPapyrusSession(URI sessionResourceURI, TransactionalEditingDomain ted) throws CoreException;
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/CreateSiriusDiagramViewTypeCommandHelper.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/CreateSiriusDiagramViewTypeCommandHelper.java
new file mode 100755
index 0000000..3ede4a0
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/CreateSiriusDiagramViewTypeCommandHelper.java
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+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.papyrus.infra.architecture.ArchitectureDomainManager;
+import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind;
+import org.eclipse.papyrus.infra.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramConstants;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.viewpoint.description.DAnnotation;
+
+/**
+ * Represents a helper for the handling of Sirius Diagram Template View Type creation commands.
+ *
+ */
+public class CreateSiriusDiagramViewTypeCommandHelper implements IViewTypeHelper {
+
+ /**
+ * The cache of prototypes
+ */
+ private Map<PapyrusRepresentationKind, SiriusDiagramViewPrototype> cache;
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EClass)
+ *
+ * @param type
+ * @return
+ */
+ @Override
+ public boolean isSupported(EClass type) {
+ return EcoreUtil.equals(type, org.eclipse.papyrus.infra.siriusdiag.representation.RepresentationPackage.eINSTANCE.getSiriusDiagramPrototype());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EObject)
+ *
+ * @param view
+ * @return
+ */
+ @Override
+ public boolean isSupported(EObject view) {
+ return (view instanceof DSemanticDiagram);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeFor(org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind)
+ *
+ * @param kind
+ * @return
+ */
+ @Override
+ public ViewPrototype getPrototypeFor(PapyrusRepresentationKind kind) {
+ if (!(kind instanceof SiriusDiagramPrototype)) {
+ return null;
+ }
+
+ SiriusDiagramPrototype siriusDiagram = (SiriusDiagramPrototype) kind;
+ if (cache == null) {
+ cache = new HashMap<>();
+ }
+ if (cache.containsKey(siriusDiagram)) {
+ return cache.get(siriusDiagram);
+ }
+ String creationCommandClassName = siriusDiagram.getCreationCommandClass();
+ if (creationCommandClassName == null || creationCommandClassName.isEmpty()) {
+ return null;
+ }
+
+ Class<?> creationCommandClass = ClassLoaderHelper.loadClass(creationCommandClassName);
+ if (creationCommandClass != null) {
+ try {
+ final Constructor<?> constructor = creationCommandClass.getDeclaredConstructor(new Class[0]);
+ Object newInstance = constructor.newInstance();
+ if (newInstance instanceof ICreateSiriusDiagramEditorCommand) {
+ ICreateSiriusDiagramEditorCommand command = (ICreateSiriusDiagramEditorCommand) newInstance;
+ SiriusDiagramViewPrototype proto = new SiriusDiagramViewPrototype(siriusDiagram, command);
+ cache.put(siriusDiagram, proto);
+ return proto;
+ }
+ } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | SecurityException e) {
+ Activator.log.error(e);
+ } catch (IllegalArgumentException e) {
+ Activator.log.error(e);
+ } catch (InvocationTargetException e) {
+ Activator.log.error(e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeOf(org.eclipse.emf.ecore.EObject)
+ *
+ * @param view
+ * @return
+ */
+ @Override
+ public ViewPrototype getPrototypeOf(EObject view) {
+ if (!isSupported(view)) {
+ return null;
+ }
+
+ final DSemanticDiagram dsd = (DSemanticDiagram) view;
+ final DAnnotation annotation = dsd.getDAnnotation(SiriusDiagramConstants.PAPYRUS_SIRIUS_DIAGRAM_IMPLEMENTATION_DANNOTATION_SOURCE);
+ final String protoID = annotation.getDetails().get(SiriusDiagramConstants.PAPYRUS_SIRIUS_DIAGRAM_IMPLEMENTATION_DANNOTATION_KEY);
+
+ PolicyChecker checker = PolicyChecker.getFor(view);
+ ArchitectureDomainManager manager = ArchitectureDomainManager.getInstance();
+
+ SiriusDiagramPrototype repKind = (SiriusDiagramPrototype) manager.getRepresentationKindById(protoID);
+ if (null != repKind && checker.isInViewpoint(repKind)) {
+ return getPrototypeFor(repKind);
+ }
+ return ViewPrototype.UNAVAILABLE_VIEW;
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/ExtendedViewPrototype.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/ExtendedViewPrototype.java
new file mode 100755
index 0000000..f45e6ec
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/ExtendedViewPrototype.java
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * Interface for ViewPrototype to get the result of the instantiation instead of a boolean
+ */
+public interface ExtendedViewPrototype<T extends EObject> {
+
+ /**
+ *
+ * @param semanticOwner
+ * the semantic owner of the instantiated view
+ * @param graphicalOwner
+ * the graphical owner of the instantiated view
+ * @param name
+ * the name of the instantiated view
+ * @param openCreatedView
+ * if <code>true</code> the created view will be open
+ * @return
+ * the instantiated view
+ */
+ public T instantiateOn(EObject semanticOwner, EObject graphicalOwner, String name, boolean openCreatedView);
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/SiriusDiagramViewPrototype.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/SiriusDiagramViewPrototype.java
new file mode 100755
index 0000000..a454d6d
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/internal/viewpoint/SiriusDiagramViewPrototype.java
@@ -0,0 +1,221 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+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.siriusdiag.representation.ICreateSiriusDiagramEditorCommand;
+import org.eclipse.papyrus.infra.siriusdiag.representation.SiriusDiagramPrototype;
+import org.eclipse.papyrus.infra.siriusdiag.ui.Activator;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+
+/**
+ * Represents a prototype of Sirius Diagram View for the viewpoints infrastructure.
+ */
+public class SiriusDiagramViewPrototype extends ViewPrototype implements ExtendedViewPrototype<DSemanticDiagram> {
+
+ private final ICreateSiriusDiagramEditorCommand command;
+
+ /**
+ * Constructor.
+ *
+ * @param prototype
+ * The PapyrusDocument representation
+ */
+ public SiriusDiagramViewPrototype(final SiriusDiagramPrototype prototype, final ICreateSiriusDiagramEditorCommand command) {
+ super(prototype);
+ this.command = command;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#isOwnerReassignable()
+ *
+ * @return
+ */
+ @Override
+ public boolean isOwnerReassignable() {
+ // Users can always move documents that are part of their viewpoint
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject, java.lang.String, boolean)
+ *
+ * @param owner
+ * @param name
+ * @param openCreatedView
+ * @return
+ */
+ @Override
+ public boolean instantiateOn(EObject owner, String name, boolean openCreatedView) {
+ return instantiateOn(owner, owner, name, openCreatedView) != null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject)
+ *
+ * @param owner
+ * @return
+ */
+ @Override
+ public boolean instantiateOn(EObject owner) {
+ return instantiateOn(owner, null);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject, java.lang.String)
+ *
+ * @param owner
+ * @param name
+ * @return
+ */
+ @Override
+ public boolean instantiateOn(EObject owner, String name) {
+ if (this.command != null) {
+ // TODO VL useless or not ?
+ 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;
+ }
+ }
+ return instantiateOn(owner, name, true);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getOwnerOf(org.eclipse.emf.ecore.EObject)
+ *
+ * @param view
+ * @return
+ */
+ @Override
+ public EObject getOwnerOf(EObject view) {
+ // it is graphical context
+ return ((DSemanticDiagram) view).eContainer();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getRootOf(org.eclipse.emf.ecore.EObject)
+ *
+ * @param view
+ * @return
+ */
+ @Override
+ public EObject getRootOf(EObject view) {
+ // it is semantic context
+ return ((DSemanticDiagram) view).getTarget();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.siriusdiag.ui.internal.viewpoint.ExtendedViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, java.lang.String, boolean)
+ *
+ * @param semanticOwner
+ * @param graphicalOwner
+ * @param name
+ * @param openCreatedView
+ * @return
+ */
+ @Override
+ public DSemanticDiagram instantiateOn(final EObject semanticOwner, final EObject graphicalOwner, final String name, final boolean openCreatedView) {
+ return command.execute(this, name, semanticOwner, graphicalOwner, openCreatedView);
+ }
+
+
+
+ @Override
+ public Command getCommandChangeRoot(EObject view, final EObject target) {
+ final DSemanticDiagram diagram = (DSemanticDiagram) view;
+ final EObject previous = diagram.getTarget();
+ return new AbstractCommand("Change diagram root element") {
+ @Override
+ public void execute() {
+ diagram.setTarget(target);
+ }
+
+ @Override
+ public void undo() {
+ diagram.setTarget(previous);
+ }
+
+ @Override
+ public void redo() {
+ diagram.setTarget(target);
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+ };
+ }
+
+ /**
+ * @since 3.0
+ */
+ @Override
+ public SiriusDiagramPrototype getRepresentationKind() {
+ return (SiriusDiagramPrototype) representationKind;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getCommandChangeOwner(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
+ *
+ * @param view
+ * @param target
+ * @return
+ */
+ @Override
+ public Command getCommandChangeOwner(EObject view, final EObject target) {
+ final DSemanticDiagram diagram = (DSemanticDiagram) view;
+ final EObject previous = diagram.getTarget();
+ 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;
+ }
+ };
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/modelresource/SiriusDiagramModel.java b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/modelresource/SiriusDiagramModel.java
new file mode 100755
index 0000000..3d080c9
--- /dev/null
+++ b/plugins/infra/siriusdiag/org.eclipse.papyrus.infra.siriusdiag.ui/src/org/eclipse/papyrus/infra/siriusdiag/ui/modelresource/SiriusDiagramModel.java
@@ -0,0 +1,240 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.siriusdiag.ui.modelresource;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.resource.AbstractDynamicModel;
+import org.eclipse.papyrus.infra.core.resource.BadArgumentExcetion;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.PapyrusSession;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.SiriusConstants;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.ui.business.api.session.SessionUIManager;
+
+/**
+ * This class manages PapyrusDocument in aird model resource.
+ */
+public class SiriusDiagramModel extends AbstractDynamicModel<DSemanticDiagram> {
+
+ private Session siriusSession = null;
+
+ /**
+ * Document Model ID.
+ */
+ public static final String SIRIUS_DIAGRAM_MODEL_ID = "org.eclipse.papyrus.infra.siriusdiag.ui.DSemanticDiagram"; //$NON-NLS-1$
+
+ /**
+ * the file extension where document are stored.
+ */
+ private static final String SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION = SiriusConstants.SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION;
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public SiriusDiagramModel() {
+ super();
+ }
+
+ /**
+ *
+ * @param session
+ * the Sirius Session
+ */
+ public void setSiriusSession(Session session) {
+ this.siriusSession = session;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
+ *
+ * @return
+ */
+ @Override
+ protected String getModelFileExtension() {
+ return SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractModel#getIdentifier()
+ *
+ * @return
+ */
+ @Override
+ public String getIdentifier() {
+ return SIRIUS_DIAGRAM_MODEL_ID;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#loadModel(org.eclipse.emf.common.util.URI)
+ *
+ * @param uriWithoutExtension
+ */
+ @Override
+ public void loadModel(URI uriWithoutExtension) {
+ // It is a common use case that this resource does not (and will not)
+ // exist
+ if (exists(uriWithoutExtension)) {
+ try {
+ super.loadModel(uriWithoutExtension);
+ } catch (Exception ex) {
+ createModel(uriWithoutExtension);
+ }
+ }
+
+ if (resource == null) {
+ createModel(uriWithoutExtension);
+ }
+ }
+
+
+ /**
+ * Add a new initialized document to the aird model.
+ *
+ * @param siriusDiagram
+ * @param context
+ * we need the context to be able to calculate the resource name were the DSemanticDiagram will be saved.
+ * because this value is maybe not yet set to {@link DSemanticDiagram#setSemanticContext(EObject)}
+ */
+ public void addDiagram(final DSemanticDiagram siriusDiagram, final EObject context) {
+ if (context != null) { // we check the resource for control mode feature
+ if (siriusSession != null) {
+ final Resource sessionRes = siriusSession.getSessionResource();
+ if (!sessionRes.getContents().contains(siriusDiagram)) {
+ sessionRes.getContents().add(siriusDiagram);
+ }
+ SessionUIManager.INSTANCE.getOrCreateUISession(this.siriusSession);// TODO fait dans SessionEditroInput.openSession
+ }
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.IEMFModel#canPersist(org.eclipse.emf.ecore.EObject)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean canPersist(EObject object) {
+ return (getResource() != null) && isSupportedRoot(object);
+ }
+
+ /**
+ *
+ * @param object
+ * @return
+ */
+ protected boolean isSupportedRoot(EObject object) {
+ return object instanceof DSemanticDiagram;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.IEMFModel#persist(org.eclipse.emf.ecore.EObject)
+ *
+ * @param object
+ */
+ @Override
+ public void persist(EObject object) {
+ if (!canPersist(object)) {
+ throw new IllegalArgumentException("cannot persist " + object); //$NON-NLS-1$
+ }
+
+ getResource().getContents().add(object);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#configureResource(org.eclipse.emf.ecore.resource.Resource)
+ *
+ * @param resource
+ */
+ @Override
+ protected void configureResource(Resource resource) {
+ super.configureResource(resource);
+ }
+
+ /**
+ * Get a diagram by its name.
+ *
+ * @param diagramName
+ * Name of the diagram. This is the name set by the user.
+ * @return
+ * @throws NotFoundException
+ * @throws BadArgumentExcetion
+ */
+ public DSemanticDiagram getDiagram(final String diagramName) throws NotFoundException, BadArgumentExcetion {
+ if (diagramName == null || diagramName.length() == 0) {
+ throw new BadArgumentExcetion("Diagram name should not be null and size should be >0."); //$NON-NLS-1$
+ }
+ for (Resource current : modelSet.getResources()) {
+ for (EObject element : current.getContents()) {
+ if (element instanceof DSemanticDiagram) {
+ DSemanticDiagram diagram = (DSemanticDiagram) element;
+
+ if (diagramName.equals(diagram.getName())) {
+ // Found
+ return diagram;
+
+ }
+ }
+ }
+ }
+ // not found
+ throw new NotFoundException(NLS.bind("No Diagram named '{0}' can be found in Model.", diagramName)); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#unload()
+ *
+ */
+ @Override
+ public void unload() {
+ // TODO : the way used to initialized the sirius session here is not satisfying.
+ // if we create open a Papyrus model with a Sirius diagram, but without creating new one, the field won't be initialized,
+ // so the sirius session won't be properly closed
+ if (this.siriusSession != null) {
+ this.siriusSession.close(new NullProgressMonitor());
+ this.siriusSession = null;
+ }
+ super.unload();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractDynamicModel#saveModel()
+ *
+ * @throws IOException
+ */
+ @Override
+ public void saveModel() throws IOException {
+ if (this.siriusSession != null) {
+ if (this.siriusSession instanceof PapyrusSession) {
+ ((PapyrusSession) this.siriusSession).papyrusSave(null, new NullProgressMonitor());
+ } else {
+ // need to force the save
+ resource.save(null);
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/siriusdiag/pom.xml b/plugins/infra/siriusdiag/pom.xml
new file mode 100644
index 0000000..41ff875
--- /dev/null
+++ b/plugins/infra/siriusdiag/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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>
+ <artifactId>org.eclipse.papyrus.infra.siriusdiag</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus Diagram Infrastructure</name>
+ <description>Common language-agnostic frameworks for sirius based diagram editors.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.infra.siriusdiag.modelexplorer</module>
+ <module>org.eclipse.papyrus.infra.siriusdiag.properties</module>
+ <module>org.eclipse.papyrus.infra.siriusdiag.representation</module>
+ <module>org.eclipse.papyrus.infra.siriusdiag.representation.architecture</module>
+ <module>org.eclipse.papyrus.infra.siriusdiag.representation.edit</module>
+ <module>org.eclipse.papyrus.infra.siriusdiag.sirius</module>
+ <module>org.eclipse.papyrus.infra.siriusdiag.ui</module>
+ </modules>
+</project>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.classpath b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.classpath
new file mode 100755
index 0000000..6ae8eb6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.project b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.project
new file mode 100755
index 0000000..b544276
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.sirius.clazz.diagram</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..cd8d089
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,15 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/META-INF/MANIFEST.MF b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..346cf09
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.sirius.clazz.diagram;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Automatic-Module-Name: org.eclipse.papyrus.uml.sirius.clazz.diagram
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.sirius;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ com.google.guava;bundle-version="[30.1.0,31.0.0)",
+ org.eclipse.sirius.ecore.extender;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.sirius.common;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.uml.sirius.common.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.profile;bundle-version="[4.2.0,5.0.0)"
+Bundle-Activator: org.eclipse.papyrus.uml.sirius.clazz.diagram.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/about.html b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/about.html
new file mode 100755
index 0000000..3e183aa
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/build.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/build.properties
new file mode 100755
index 0000000..34d2e4d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign
new file mode 100755
index 0000000..6eeba08
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign
@@ -0,0 +1,2125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:filter="http://www.eclipse.org/sirius/diagram/description/filter/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" name="papyrus" version="12.0.0.2017041100">
+ <ownedViewpoints name="ClassDiagram" modelFileExtension="uml">
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Package%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='InstanceSpecification%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='InformationItem%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Observation%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Signal%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20Primitive%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20Enumeration%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20DataType%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20DataType%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20Enumeration%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20Primitive%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='to%20Package%20%26%26%20Diagram'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Model%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='AddHyperlinkView']" documentation="Representation to edit class diagrams" name="ClassDiagram" titleExpression="aql:self.name +' Class Diagram'" domainClass="uml::Model" preconditionExpression="" enablePopupBars="true">
+ <metamodel href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#/"/>
+ <filters xsi:type="filter:CompositeFilterDescription" name="Show Stereotypes"/>
+ <filters xsi:type="filter:CompositeFilterDescription" name="Show Bendpoint"/>
+ <filters xsi:type="filter:CompositeFilterDescription" name="Show Qualified Names"/>
+ <defaultLayer name="Class">
+ <nodeMappings name="CD_BrokenAssociation" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getBrokenAssociations" semanticElements="service:getSemanticElements" synchronizationLock="true" domainClass="uml.Association">
+ <style xsi:type="style:BundledImageDescription" labelExpression="aql:self.name +' : (Association with missing ends)'" shape="dot">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="CD_Constraint" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='ConstraintEdit']" semanticCandidatesExpression="feature:ownedRule" createElements="false" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Constraint">
+ <style xsi:type="style:NoteDescription" labelSize="9" labelExpression="service:getConstraintLabel()" sizeComputationExpression="9" labelPosition="node" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomGreen']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="CD_InformationItem" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="aql:self.packagedElement" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.InformationItem">
+ <style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" iconPath="/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/InformationItem.gif" sizeComputationExpression="" labelPosition="node" resizeKind="NSEW" width="16" height="5" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <edgeMappings name="CD_Abstraction" preconditionExpression="aql:self.isCurrentLinkType('AbstractionImpl')" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetFinderExpression="feature:supplier" sourceFinderExpression="feature:client" domainClass="uml.Abstraction" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Abstraction%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Abstraction%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="<<abstraction>>">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_Association" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getAssociation(diagram)" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetFinderExpression="service:getTargetType(diagram)" sourceFinderExpression="service:getSourceType(diagram)" targetExpression="var:self" domainClass="uml.Association" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Association%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Association%20Edge']">
+ <style targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <beginLabelStyleDescription showIcon="false" labelExpression="aql:self.computeAssociationBeginLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </beginLabelStyleDescription>
+ <centerLabelStyleDescription labelSize="7" showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ <endLabelStyleDescription showIcon="false" labelExpression="aql:self.computeAssociationEndLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </endLabelStyleDescription>
+ </style>
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::AssociationClass)">
+ <style targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <beginLabelStyleDescription showIcon="false" labelExpression="service:computeAssociationClassBeginLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </beginLabelStyleDescription>
+ <centerLabelStyleDescription>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ <endLabelStyleDescription showIcon="false" labelExpression="service:computeAssociationClassEndLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </endLabelStyleDescription>
+ </style>
+ </conditionnalStyles>
+ </edgeMappings>
+ <edgeMappings name="CD_Connector" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getAssociation(diagram)" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" targetFinderExpression="service:getTargetType(diagram)" sourceFinderExpression="service:getSourceType(diagram)" targetExpression="var:self" domainClass="uml.AssociationClassLink" useDomainElement="true">
+ <style targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <beginLabelStyleDescription showIcon="false" labelExpression="aql:self.computeAssociationBeginLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </beginLabelStyleDescription>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ <endLabelStyleDescription showIcon="false" labelExpression="aql:self.computeAssociationEndLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </endLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_ContainmentLink" preconditionExpression="service:isValidSourecAndTarget(sourceView,targetView,source,target)" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']" targetFinderExpression="service:getContainmentLinkTarget()" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Containment%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Containment%20Edge']">
+ <style sourceArrow="Diamond" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_ContextLink" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Abstraction'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@borderedNodeMappings[name='CD_RedefinableTemplateSignature'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Connector'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ContextLink'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Dependency'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ElementImport'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']/@subNodeMappings[name='CD_EnumerationLiteral'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']/@subNodeMappings[name='CD_Slot'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InformationFlow'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Abstraction'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@borderedNodeMappings[name='CD_RedefinableTemplateSignature'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Connector'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ContextLink'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Dependency'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ElementImport'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']/@subNodeMappings[name='CD_EnumerationLiteral'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']/@subNodeMappings[name='CD_Slot'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InformationFlow'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetFinderExpression="feature:context">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_Dependency" preconditionExpression="aql:self.isCurrentLinkType('DependencyImpl')" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetFinderExpression="feature:supplier" sourceFinderExpression="feature:client" domainClass="uml.Dependency" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Dependency%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Dependency%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_ElementImport" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Alias']" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" targetExpression="var:self" domainClass="uml.ElementImport" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20ElementImport%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20ElementImport%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <beginLabelStyleDescription showIcon="false" labelExpression="feature:alias">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </beginLabelStyleDescription>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_Generalization" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" targetExpression="var:self" domainClass="uml.Generalization" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Generalization%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Generalization%20Edge']">
+ <style targetArrow="InputClosedArrow">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_GeneralizationSet" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']" targetFinderExpression="service:getTargetGeneralization()" sourceFinderExpression="service:getSourceGeneralization()" targetExpression="var:self" domainClass="uml.GeneralizationSet" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20GeneralizationSet%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20GeneralizationSet%20Edge']">
+ <style lineStyle="dash" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_InformationFlow" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" targetExpression="var:self" domainClass="uml.InformationFlow" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20InformationFlow%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20InformationFlow%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_InstanceSpecification" preconditionExpression="service:isInstanceSpecificationEdge()" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" targetFinderExpression="service:getTargetOfInstanceSpecification()" sourceFinderExpression="service:getSourceOfInstanceSpecification()" targetExpression="var:self" domainClass="uml.InstanceSpecification" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20InstanceSpec%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20InstanceSpec%20Edge']">
+ <style targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <beginLabelStyleDescription showIcon="false" labelExpression="aql:self.computeInstanceSpecBeginLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </beginLabelStyleDescription>
+ <endLabelStyleDescription showIcon="false" labelExpression="aql:self.computeInstanceSpecEndLabel()">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </endLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_InterfaceRealization" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" targetFinderExpression="feature:supplier" sourceFinderExpression="feature:client" targetExpression="var:self" domainClass="uml.InterfaceRealization" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20InterfaceRealization%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20InterfaceRealization%20Edge']">
+ <style lineStyle="dash" targetArrow="InputClosedArrow">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_PackageImport" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.PackageImport" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20PackageImport%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20PackageImport%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_PackageMerge" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.PackageMerge" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20PackageMerge%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20PackageMerge%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_ProfileApplication" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Abstraction'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_AssociationClassLink'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@borderedNodeMappings[name='CD_RedefinableTemplateSignature'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Connector'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ContainmentLink'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ContextLink'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Dependency'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ElementImport'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']/@subNodeMappings[name='CD_EnumerationLiteral'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_GeneralizationSet'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InformationFlow'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']/@subNodeMappings[name='CD_Slot'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InterfaceRealization'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_PackageImport'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_PackageMerge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ProfileApplication'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Realization'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Substitution'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_TemplateBinding'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Usage']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.ProfileApplication" useDomainElement="true">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_Realization" preconditionExpression="aql:self.isCurrentLinkType('RealizationImpl')" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.Realization" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Realization%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Realization%20Edge']">
+ <style lineStyle="dash" targetArrow="InputClosedArrow">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_Substitution" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.Substitution" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Substitution%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Substitution%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_TemplateBinding" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:diagram.getTemplateBindingInverseRefs" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']" targetFinderExpression="aql:self.oclAsType(uml::TemplateBinding).signature.template" sourceFinderExpression="feature:boundElement" domainClass="uml.TemplateBinding" useDomainElement="true">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_Usage" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.Usage" useDomainElement="true" reconnections="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Source%20of%20Usage%20Edge'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.3/@ownedTools[name='Reconnect%20Target%20of%20Usage%20Edge']">
+ <style lineStyle="dash">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="CD_AssociationClassLink" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass']" targetMapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" targetFinderExpression="aql:self" sourceFinderExpression="aql:self" domainClass="uml.Association" useDomainElement="true">
+ <style lineStyle="dash" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <containerMappings name="CD_Class" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="feature:eAllContents" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Class" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassDataTypeNode']" reusedContainerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']" childrenPresentation="VerticalStack">
+ <borderedNodeMappings name="CD_RedefinableTemplateSignature" semanticCandidatesExpression="feature:ownedTemplateSignature" synchronizationLock="true" domainClass="uml.RedefinableTemplateSignature">
+ <style xsi:type="style:SquareDescription" labelSize="9" labelPosition="node" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <subContainerMappings name="CD_Attribute" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.Class" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations%20from%20Model']" childrenPresentation="List">
+ <subNodeMappings name="CD_ClassProperty" preconditionExpression="service:isNotAssociation()" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface) or self.oclIsKindOf(uml::Signal)) then self.ownedAttribute else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Property">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="properties" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::Component)">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </conditionnalStyles>
+ </subContainerMappings>
+ <subContainerMappings name="CD_Operation" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.Class" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations%20from%20Model']" childrenPresentation="List">
+ <subNodeMappings name="CD_ClassOperation" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.ownedOperation else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Operation">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_Reception" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.ownedReception else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Reception">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="operation" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::Component)">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </conditionnalStyles>
+ </subContainerMappings>
+ <subContainerMappings name="CD_ClassDataTypes" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.Class" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20Primitive%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20Enumeration%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20DataType%20from%20Model']" childrenPresentation="List">
+ <subNodeMappings name="CD_ClassDataTypeNode" preconditionExpression="service:isDataType()" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.DataType">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_ClassPrimitiveTypeNode" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.PrimitiveType">
+ <style xsi:type="style:SquareDescription" labelSize="9" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_ClassEnumerationNode" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Enumeration">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_ClassSignalNode" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Signal">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_ClassClass" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Class">
+ <style xsi:type="style:SquareDescription" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="NestedClassifiers" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::Component)">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </conditionnalStyles>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel()" tooltipExpression="service:computeTooltip" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::Component)">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </conditionnalStyles>
+ </containerMappings>
+ <containerMappings name="CD_Interface" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="feature:eAllContents" createElements="false" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Interface" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations']" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" childrenPresentation="VerticalStack">
+ <subContainerMappings name="CD_Attribute" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.Interface" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations%20from%20Model']" childrenPresentation="List">
+ <subNodeMappings name="CD_InterfaceProperty" preconditionExpression="service:isNotAssociation()" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface) or self.oclIsKindOf(uml::Signal)) then self.ownedAttribute else null endif" semanticElements="service:getSemanticElements" synchronizationLock="true" domainClass="uml.Property">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="CD_Operation" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.Interface" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_Reception']" childrenPresentation="List">
+ <subNodeMappings name="CD_InterfaceOperation" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.ownedOperation else null endif" semanticElements="service:getSemanticElements" synchronizationLock="true" domainClass="uml.Operation">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="CD_InterfaceDataTypes" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.Interface" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20DataType%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20Enumeration%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20Primitive%20from%20Model']" reusedContainerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']" childrenPresentation="List">
+ <subNodeMappings name="CD_InterfaceDataTypeNode" preconditionExpression="service:isDataType()" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" semanticElements="service:getSemanticElements" synchronizationLock="true" domainClass="uml.DataType">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_InterfacePrimitiveTypeNode" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" semanticElements="service:getSemanticElements" synchronizationLock="true" domainClass="uml.PrimitiveType">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="CD_InterfaceEnumerationNode" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" semanticElements="service:getSemanticElements" synchronizationLock="true" domainClass="uml.Enumeration">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" tooltipExpression="service:computeTooltip" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_DataType" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="feature:eAllContents" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.DataType" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" reusedContainerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_PrimitiveType" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.PrimitiveType" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" reusedContainerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_Enumeration" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Enumeration" childrenPresentation="List">
+ <subNodeMappings name="CD_EnumerationLiteral" semanticCandidatesExpression="feature:ownedLiteral" semanticElements="service:getSemanticElements" domainClass="uml.EnumerationLiteral">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" sizeComputationExpression="1" color="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_Package" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="feature:eAllContents" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Package" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Package%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='InstanceSpecification%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='InformationItem%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Observation%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Signal%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20Primitive%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20Enumeration%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20DataType%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20DataType%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20Enumeration%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Interface%20Primitive%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='to%20Package%20%26%26%20Diagram']" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem']" reusedContainerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.0"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_Model" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="feature:eAllContents" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Model" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Class%20from%20Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='to%20Package%20%26%26%20Diagram']" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem']" reusedContainerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel()" labelAlignment="LEFT" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.0"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_AssociationClass" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="aql:diagram.getVisibleAssociationClass(containerView.oclAsType(viewpoint::DSemanticDecorator).target)" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.AssociationClass" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations%20from%20Model']" childrenPresentation="VerticalStack">
+ <subContainerMappings name="FirstRegion" semanticCandidatesExpression="aql:self" domainClass="uml.AssociationClass" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" showIcon="false" labelExpression="" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="SecondRegion" semanticCandidatesExpression="aql:self" domainClass="uml.AssociationClass" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" showIcon="false" labelExpression="" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="ThirdRegion" semanticCandidatesExpression="aql:self" domainClass="uml.AssociationClass" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" showIcon="false" labelExpression="" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_InstanceSpecification" preconditionExpression="aql:self.isNotInstanceSpecificationLink()" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" semanticCandidatesExpression="feature:packagedElement" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.InstanceSpecification" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" childrenPresentation="List">
+ <subNodeMappings name="CD_Slot" semanticCandidatesExpression="feature:slot" createElements="false" domainClass="uml.Slot">
+ <style xsi:type="style:SquareDescription" labelSize="6" labelExpression="service:slotLabel" labelAlignment="LEFT" sizeComputationExpression="1">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='chocolate']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_chocolate']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_Signal" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" createElements="false" semanticElements="service:getSemanticElements" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Signal" dropDescriptions="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Attributes%20or%20Operations%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty']" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="5" arcHeight="5" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildLabel" tooltipExpression="service:computeTooltip" roundedCorner="true" widthComputationExpression="service:defaultWidth" heightComputationExpression="service:defaultHeight" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="CD_Observation" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Element%20Name']" createElements="false" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Observation">
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::TimeObservation)">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" showIcon="false" labelExpression="service:computeUmlLabel" labelAlignment="LEFT" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql:self.oclIsKindOf(uml::DurationObservation)">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel()" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/DurationObservation.gif" labelAlignment="LEFT" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='CustomGris']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </conditionnalStyles>
+ </containerMappings>
+ <toolSections name="Nodes">
+ <ownedTools xsi:type="tool:ToolDescription" name="Class" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/Class.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:elementView">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isDDiagram()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Class" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeListContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Class" referenceName="nestedClassifier">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassClass']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Class" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" documentation="Create a new class" name="Component" containerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']" iconPath="/org.eclipse.papyrus.uml.icons/resource/gif/Component.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Component" referenceName="ownedType">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::uml::VisibilityKind::public"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Data Type" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/DataType.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:elementView">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isDDiagram()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.DataType" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeListContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.DataType" referenceName="nestedClassifier">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.DataType" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Enumeration" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/Enumeration.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:elementView">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isDDiagram()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Enumeration" referenceName="service:getTypeTarget()">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeListContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Enumeration" referenceName="nestedClassifier">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Enumeration" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Interface" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/Interface.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:elementView">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isDDiagram()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Interface" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeListContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Interface" referenceName="nestedClassifier">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Interface" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" documentation="Create a new class" name="Instance Specification" containerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" iconPath="/org.eclipse.papyrus.uml.profile/resources/icons/InstanceSpecification.gif" extraMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:If" conditionExpression="service:container.isNotTypeOfClass">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.InstanceSpecification" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new time observation" name="Information Item" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/TimeObservation.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.InformationItem" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::uml::VisibilityKind::public"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="PrimitiveType" iconPath="/org.eclipse.papyrus.uml.profile/resources/icons/PrimitiveType.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:elementView">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isDDiagram()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.PrimitiveType" referenceName="ownedType">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeListContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.PrimitiveType" referenceName="nestedClassifier">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.PrimitiveType" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" documentation="Create a new class" name="Model" containerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Model.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Model" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Signal" iconPath="/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Signal.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:elementView">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isDDiagram()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Signal" referenceName="ownedType">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeListContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Signal" referenceName="nestedClassifier">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassSignalNode']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.isClassNodeContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Signal" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::public"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal']" containerViewExpression="aql:elementView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" documentation="Create a new class" name="Package" containerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" iconPath="/org.eclipse.papyrus.uml.profile/resources/icons/Package.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Package" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" name="Time Observation" containerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/TimeObservation.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.TimeObservation" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::uml::VisibilityKind::public"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" name="Duration Observation" containerMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/DurationObservation.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.DurationObservation" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="aql:uml::VisibilityKind::uml::VisibilityKind::public"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new literal" name="Constraint" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Comment.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Constraint" referenceName="ownedRule">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:instance">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml::OpaqueExpression" referenceName="specification">
+ <subModelOperations xsi:type="tool:SetValue" featureName="language" valueExpression="OCL"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="body" valueExpression="true"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="constraintSpec"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new literal" name="EnumerationLiteral" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']/@subNodeMappings[name='CD_EnumerationLiteral']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/EnumerationLiteral.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.EnumerationLiteral" referenceName="ownedLiteral">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.LiteralInteger" referenceName="specification">
+ <subModelOperations xsi:type="tool:SetValue" featureName="value" valueExpression="aql:self.eContainer().eContainer().eAllContents(uml::EnumerationLiteral)->size() - 1"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new operation" name="Operation" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_InterfaceOperation']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/Operation.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Operation" referenceName="ownedOperation" variableName="aOperation">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="public"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new property" name="Property" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_InterfaceProperty']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Property.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Property" referenceName="ownedAttribute" variableName="aProperty">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="lower" valueExpression="0"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="upper" valueExpression="1"/>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:aProperty.findTypeByName('String') <> null">
+ <subModelOperations xsi:type="tool:SetValue" featureName="type" valueExpression="aql:self.findTypeByName('String')"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:SetValue" featureName="visibility" valueExpression="public"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Redefinable Template Signature" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@borderedNodeMappings[name='CD_RedefinableTemplateSignature']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/RedefinableTemplateSignature.gif" extraMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.RedefinableTemplateSignature" referenceName="ownedTemplateSignature" variableName="aProperty">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Classifier Template Parameter" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/ClassifierTemplateParameter.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Operation Template Parameter" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/OperationTemplateParameter.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new operation" name="Reception" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_Reception']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/Operation.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Reception" referenceName="ownedReception" variableName="aOperation">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new operation" name="Slot" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']/@subNodeMappings[name='CD_Slot']" iconPath="/org.eclipse.papyrus.uml.icons/resource/gif/Slot.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Slot" referenceName="slot" variableName="slot"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Template Parameter">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Template Signature" iconPath="/org.eclipse.papyrus.uml.icons/resource/gif/TemplateSignature.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ToolDescription" name="Connectable Element Template Parameter" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/ConnectableElementTemplateParameter.gif">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ </toolSections>
+ <toolSections name="Edges">
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Abstraction" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Abstraction']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Abstraction.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createAbstractionLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ToolGroup" name="Associations">
+ <tools xsi:type="tool_1:EdgeCreationDescription" documentation="Create a new association" name="Association (Directed)" precondition="service:isValidAssociation(preSource, preTarget)" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" extraSourceMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" extraTargetMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" connectionStartPrecondition="service:isValidAssociation(preSource)">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.createAssociation(source, target, sourceView, targetView,0)"/>
+ </initialOperation>
+ </tools>
+ <tools xsi:type="tool_1:EdgeCreationDescription" documentation="Create a new reference" name="Association" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" extraSourceMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.createAssociation(source, target, sourceView, targetView,0)"/>
+ </initialOperation>
+ </tools>
+ <tools xsi:type="tool_1:EdgeCreationDescription" documentation="Create a new composition" name="Composite Association (Directed)" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Association_composite.gif" extraSourceMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.createAssociation(source, target, sourceView, targetView, 2)"/>
+ </initialOperation>
+ </tools>
+ <tools xsi:type="tool_1:EdgeCreationDescription" documentation="Create a new aggregation" name="Shared Association (Directed)" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Association_shared.gif" extraSourceMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_BrokenAssociation']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.createAssociation(source, target, sourceView, targetView, 1)"/>
+ </initialOperation>
+ </tools>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Association Branch" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Association_none.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Containment Link" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ContainmentLink']" iconPath="/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/ContainmentConnection.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createContainmentLink( source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Context Link" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Association_none.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Dependency" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Dependency']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createDependencyLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Dependency Branch">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Element Import" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ElementImport']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/ElementImport.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createElementImportLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" documentation="Create a new generalization" name="Generalization" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Generalization.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createGeneralizationLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Generalization Set" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_GeneralizationSet']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/GeneralizationSet.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createGeneralizationSetLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Information Flow" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InformationFlow']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/InformationFlow.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createInformationFlowLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Instance Specification" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InstanceSpecification']" iconPath="/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/InstanceLink.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createInstanceSpecification(sourceView, source, target)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:addInstanceSpecificationToModel(sourceView)"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Interface Realization" precondition="aql:true" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InterfaceRealization']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/InterfaceRealization.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createInterfaceRealizationLink(sourceView, source, target)">
+ <subModelOperations xsi:type="tool:If" conditionExpression="service:isNotInterfaceTarget()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" containerViewExpression="aql:sourceView.getParentDiagram()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Link" forceRefresh="true" iconPath="/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Link.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Package Import" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_PackageImport']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/PackageImport.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createPackageImportLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Package Merge" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_PackageMerge']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/PackageMerge.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createPackageMergeLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Profile Application" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ProfileApplication']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/ProfileApplication.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createProfileApplicationLink(source)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Realization" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Realization']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Realization.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createRealizationLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Substitution" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Substitution']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Substitution.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createSubstitutionLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Template Binding" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/TemplateBinding.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Usage" edgeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Usage']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Usage.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:createUsageLink(sourceView, source, target)"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <toolSections name="Features">
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Attributes or Operations" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_InterfaceProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_InterfaceOperation']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Property)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Operation)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Attributes or Operations from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_InterfaceProperty'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_InterfaceOperation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_ProfileApplication']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Operation)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Attribute)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Class from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Package from Model" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Interface from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']" containerViewExpression="aql:newContainerView"/>
+ <subModelOperations xsi:type="tool:If"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="InstanceSpecification from Model" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="InformationItem from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="to Package && Diagram" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_InformationItem'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:newSemanticContainer" featureName="packagedElement"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Observation from Model" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Class DataType from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassDataTypeNode']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassDataTypeNode']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Interface DataType from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfaceDataTypeNode']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfaceDataTypeNode']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Signal from Model" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Class Enumeration from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassEnumerationNode']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassEnumerationNode']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Interface Enumeration from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfaceEnumerationNode']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfaceEnumerationNode']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Class Primitive from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassPrimitiveTypeNode']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassPrimitiveTypeNode']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Interface Primitive from Model" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfacePrimitiveTypeNode']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassPrimitiveTypeNode']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="DataType" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassDataTypeNode'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfaceDataTypeNode']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="var:newSemanticContainer" featureName="service:getTypeTarget(newSemanticContainer)"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="PrimitiveType" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassPrimitiveTypeNode'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfacePrimitiveTypeNode']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element.dndElement(newContainerView)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Enumeration" forceRefresh="true" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@subNodeMappings[name='CD_ClassEnumerationNode'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@subNodeMappings[name='CD_InterfaceEnumerationNode']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="var:newSemanticContainer" featureName="service:getTypeTarget(newSemanticContainer)"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="undelete">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:self"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="QualifierDirectEdit" forceRefresh="true" inputLabelExpression="service:computeUmlDirectEditLabel">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:self.editQualifierLabel(arg0)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="Element Name" inputLabelExpression="aql:self.name">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="Element Alias">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:SetValue" featureName="alias" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Model from Model" precondition="service:isValidContainer(newViewContainer)" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <toolSections name="Relationships">
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Containment Edge" precondition="service:reconnectContainmentLinkPrecondition(target)" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectContainmentEdgeSource(edgeView, sourceView, targetView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Containment Edge" precondition="service:reconnectContainmentLinkPrecondition(target)">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectContainmentEdgeTarget(edgeView, sourceView, targetView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Dependency Edge" precondition="service:reconnectDependencyLinkPrecondition(target)" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectDependencyEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Dependency Edge" precondition="service:reconnectDependencyLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectDependencyEdgeTarget(edgeView, sourceView, targetView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of ElementImport Edge" precondition="service:reconnectElementImportLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectElementImportEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of ElementImport Edge" precondition="service:reconnectElementImportLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectElementImportEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Generalization Edge" precondition="service:reconnectGeneralizationLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectGeneralizationEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Generalization Edge" precondition="service:reconnectGeneralizationLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectGeneralizationEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of GeneralizationSet Edge" precondition="service:reconnectGeneralizationSetLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectGeneralizationSetEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of GeneralizationSet Edge" precondition="service:reconnectGeneralizationSetLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectGeneralizationSetEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of InformationFlow Edge" precondition="service:reconnectInformationFlowLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectInformationFlowEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of InformationFlow Edge" precondition="service:reconnectInformationFlowLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectInformationFlowEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of InstanceSpec Edge" precondition="service:reconnectInstanceSpecLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectInstanceSpecEdge(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of InstanceSpec Edge" precondition="service:reconnectInstanceSpecLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectInstanceSpecEdge(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of PackageImport Edge" precondition="service:reconnectPackageImportMergeLinkSourcePrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectPackageImportEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of PackageImport Edge" precondition="service:reconnectPackageImportMergeLinkTargetPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectPackageImportEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of PackageMerge Edge" precondition="service:reconnectPackageImportMergeLinkSourcePrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectPackageMergeEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of PackageMerge Edge" precondition="service:reconnectPackageImportMergeLinkTargetPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectPackageMergeEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Realization Edge" precondition="service:reconnectRealizationLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectRealizationEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Realization Edge" precondition="service:reconnectRealizationLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectRealizationEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Substitution Edge" precondition="service:reconnectSubstitutionLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectSubstitutionEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Substitution Edge" precondition="service:reconnectSubstitutionLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectSubstitutionEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Usage Edge" precondition="service:reconnectUsageLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectUsageEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Usage Edge" precondition="service:reconnectUsageLinkPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectUsageEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Link Edge" precondition="service:reconnectLinkSourcePrecondition(target)" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectLinkEdgeSource(edgeView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Link Edge" precondition="service:reconnectLinkTargetPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectLinkEdgeTarget(edgeView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Association Edge" precondition="service:reconnectAssociationLinkPrecondition(target)" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:reconnectAssociationEdgeSource(edgeView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Association Edge" precondition="service:reconnectAssociationLinkPrecondition(target)">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:reconnectAssociationEdgeTarget(edgeView, source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of Abstraction Edge" precondition="service:reconnectAbstractionLinkPrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectAbstractionEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of Abstraction Edge" precondition="service:reconnectAbstractionLinkPrecondition(target)">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectAbstractionEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source of InterfaceRealization Edge" precondition="service:reconnectInterfaceRealizationLinkSourcePrecondition(target)" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectInterfaceRealizationEdgeSource(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target of InterfaceRealization Edge" precondition="service:reconnectInterfaceRealizationLinkTargetPrecondition(target)" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:element.reconnectInterfaceRealizationEdgeTarget(source, target)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="Delete Nested Class">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:element.eContainer(uml::Package)" featureName="ownedMember"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:PopupMenu" name="Name Expression">
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add String Expression" precondition="aql:self.oclIsTypeOf(uml::Property) and self.oclAsType(uml::Property).nameExpression = null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/StringExpression.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="aql:views.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:i">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="StringExpression" referenceName="nameExpression"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Remove" precondition="aql:self.oclIsTypeOf(uml::Property) and self.nameExpression <> null">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target.oclAsType(uml::Property).nameExpression">
+ <subModelOperations xsi:type="tool:RemoveElement"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ </ownedTools>
+ <ownedTools xsi:type="tool:PopupMenu" name="Default Value">
+ <menuItemDescription xsi:type="tool:OperationAction" name="Remove" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue <> null">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="aql:views.oclAsType(viewpoint::DSemanticDecorator).target->filter(uml::Property).defaultValue">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:i">
+ <subModelOperations xsi:type="tool:RemoveElement"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Duration" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue = null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Duration.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Duration" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Duration Interval" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/DurationInterval.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="DurationInterval" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Expression" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Expression.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Expression" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Instance Value" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/InstanceValue.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="InstanceValue" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Interval" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Interval.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Interval" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Literal Boolean" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/LiteralBoolean.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="LiteralBoolean" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Literal Integer" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/LiteralInteger.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="LiteralInteger" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Literal Null" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/LiteralNull.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="LiteralNull" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Literal String" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/LiteralString.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="LiteralString" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Literal Unlimited Natural" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/LiteralUnlimitedNatural.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="LiteralUnlimitedNatural" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Opaque Expression" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/OpaqueExpression.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="OpaqueExpression" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add String Expression" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/StringExpression.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="StringExpression" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ <menuItemDescription xsi:type="tool:OperationAction" name="Add Time Interval" precondition="aql:self.oclIsTypeOf(uml::Property) and self.defaultValue =null" icon="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/TimeInterval.gif">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:For" expression="var:views">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:i.oclAsType(viewpoint::DSemanticDecorator).target">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="TimeInterval" referenceName="defaultValue"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </menuItemDescription>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="deleteNAryAssociationLinks">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:deleteNAryAssociation(elementView)">
+ <subModelOperations xsi:type="tool:ChangeContext"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <decorationDescriptionsSet>
+ <decorationDescriptions xsi:type="description_1:MappingBasedDecoration" name="Observation symbol" position="CENTER" imageExpression="service:GetSymbolPath()" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']"/>
+ </decorationDescriptionsSet>
+ <customization>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:targetIsNavigable">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="targetArrow" value="aql:diagram::EdgeArrows::InputArrow"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:sourceIsShared">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="targetArrow" value="aql:diagram::EdgeArrows::Diamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:sourceIsComposite">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="targetArrow" value="aql:diagram::EdgeArrows::FillDiamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:targetIsNavigableAndSourceIsShared">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="targetArrow" value="aql:diagram::EdgeArrows::InputArrowWithDiamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:targetIsNavigableAndSourceIsComposite">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="targetArrow" value="aql:diagram::EdgeArrows::InputArrowWithFillDiamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:sourceIsNavigable(view)">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="sourceArrow" value="aql:diagram::EdgeArrows::InputArrow"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:targetIsShared">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="sourceArrow" value="aql:diagram::EdgeArrows::Diamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:targetIsComposite">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="sourceArrow" value="aql:diagram::EdgeArrows::FillDiamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:sourceIsNavigableAndTargetIsShared">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="sourceArrow" value="aql:diagram::EdgeArrows::InputArrowWithDiamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:sourceIsNavigableAndTargetIsComposite">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Association']/@style" attributeName="sourceArrow" value="aql:diagram::EdgeArrows::InputArrowWithFillDiamond"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="feature:isAbstract">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration']/@style //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType']/@style" attributeName="labelFormat" value="service:self.getAbstractBoldLabelFormat"/>
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']/@style" attributeName="labelFormat" value="service:self.getAbstractItalicLabelFormat"/>
+ </vsmElementCustomizations>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization" predicateExpression="service:isStatic">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@subNodeMappings[name='CD_ClassOperation']/@style //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@subNodeMappings[name='CD_ClassProperty']/@style" attributeName="labelFormat" value="aql:viewpoint::FontFormat::underline"/>
+ </vsmElementCustomizations>
+ </customization>
+ </defaultLayer>
+ <additionalLayers name="Common" optional="false">
+ <nodeMappings name="Bendpoint" semanticCandidatesExpression="aql:diagram.getCommonBendpointsToDraw()" synchronizationLock="true" domainClass="uml.Element">
+ <style xsi:type="style:DotDescription" labelSize="12" showIcon="false" labelExpression="" hideLabelByDefault="true" sizeComputationExpression="aql:self.getBenpointDiameter()">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="Hyperlink" preconditionExpression="aql:self.isNotSemanticElement()" semanticCandidatesExpression="aql:self.allAvailableViews()" createElements="false" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Hyperlink%20View']" domainClass="EObject">
+ <style xsi:type="style:SquareDescription" labelSize="12" labelPosition="node" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomBlue']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <toolSections name="Common">
+ <ownedTools xsi:type="tool_1:DoubleClickDescription" name="Open Hyperlink" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_PrimitiveType'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Enumeration'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_AssociationClass'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Signal'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment'] //@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:elementView.createOrOpenHyperlink()"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="PapyrusDelete">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element.deleteElement(elementView)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:PopupMenu" name="Sirius View Deletion">
+ <menuItemDescription xsi:type="tool:OperationAction" name="Delete View">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:DeleteView"/>
+ </initialOperation>
+ </menuItemDescription>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="AddHyperlinkView" precondition="aql:element.isNotSemanticElement()" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DoubleClickDescription" name="Hyperlink View" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Constraint from Model" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Comment from Model" mappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="CommentEdit">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:SetValue" featureName="body" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="ConstraintEdit" inputLabelExpression="service:getBody()">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:setConstraintBody(arg0)"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <decorationDescriptionsSet>
+ <decorationDescriptions xsi:type="description:SemanticBasedDecoration"/>
+ </decorationDescriptionsSet>
+ </additionalLayers>
+ <additionalLayers name="Comment" activeByDefault="true">
+ <nodeMappings name="CD_Comment" deletionDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='CommentEdit']" semanticCandidatesExpression="feature:ownedComment" createElements="false" doubleClickDescription="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Comment">
+ <style xsi:type="style:NoteDescription" labelSize="9" showIcon="false" labelExpression="feature:body" sizeComputationExpression="9" labelPosition="node" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='CustomYellow']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <toolSections name="Nodes">
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" documentation="Create a new literal" name="Comment" nodeMappings="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Comment.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml.Comment" referenceName="ownedComment">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </additionalLayers>
+ </ownedRepresentations>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.clazz.diagram.services.ClassDiagramServices"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.common.diagram.core.services.AbstractDiagramServices"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.common.diagram.services.SemanticDeletionService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink.NavigateHyperlinkAction"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink.HyperlinkService"/>
+ </ownedViewpoints>
+ <userColorsPalettes>
+ <entries xsi:type="description:UserFixedColor" red="195" green="209" blue="213" name="CustomGris"/>
+ <entries xsi:type="description:UserFixedColor" red="195" green="215" blue="221" name="CustomBlue"/>
+ <entries xsi:type="description:UserFixedColor" red="255" green="255" blue="204" name="CustomYellow"/>
+ <entries xsi:type="description:UserFixedColor" red="200" green="255" blue="230" name="CustomGreen"/>
+ </userColorsPalettes>
+</description:Group>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/DataType.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/DataType.gif
new file mode 100755
index 0000000..b4337de
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/DataType.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Enumeration.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Enumeration.gif
new file mode 100755
index 0000000..c7573bd
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Enumeration.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/InformationItem.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/InformationItem.gif
new file mode 100755
index 0000000..d58d685
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/InformationItem.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/NotFound.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/NotFound.png
new file mode 100755
index 0000000..eba32c6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/NotFound.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Signal.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Signal.gif
new file mode 100755
index 0000000..27c88f9
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/Signal.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/durationObservation.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/durationObservation.png
new file mode 100755
index 0000000..e40be6f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/durationObservation.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/durationObservation.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/durationObservation.svg
new file mode 100755
index 0000000..3f65834
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/durationObservation.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg3787" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="TimeObservation.svg">
+ <defs id="defs3789" />
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.8481082" inkscape:cx="-46.07925" inkscape:cy="14.291126" inkscape:current-layer="svg3787" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata3792">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer" transform="translate(0,4)" />
+ <text xml:space="preserve" style="font-size:12.61640644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:116.99999571%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial" x="1.0969616" y="10.079314" id="text3828" sodipodi:linespacing="117%" transform="matrix(1.0691606,0,0,0.93531316,-0.0887114,1.7064536)"><tspan sodipodi:role="line" x="1.0969616" y="10.079314" id="tspan3870" style="font-weight:bold;-inkscape-font-specification:Arial Bold">&d<tspan style="font-size:8.83148575px;font-weight:bold;line-height:116.99999571%;fill:#476caa;fill-opacity:1;-inkscape-font-specification:Arial Bold" id="tspan3876" /></tspan></text>
+ <text xml:space="preserve" style="font-size:9.0160284px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Sans" x="5.4504604" y="19.354103" id="text3908" sodipodi:linespacing="125%" transform="matrix(1.2529306,0,0,0.7981288,2.0387078,1.5790345)"><tspan sodipodi:role="line" id="tspan3910" x="5.4504604" y="19.354103" style="font-weight:bold;-inkscape-font-specification:Sans Bold">l</tspan></text>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/timeObservation.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/timeObservation.png
new file mode 100755
index 0000000..9857a08
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/timeObservation.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/timeObservation.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/timeObservation.svg
new file mode 100755
index 0000000..e4abb84
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/icons/symbols/timeObservation.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg3787" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="TimeObservation.svg">
+ <defs id="defs3789" />
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.8481082" inkscape:cx="-46.07925" inkscape:cy="13.972578" inkscape:current-layer="svg3787" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata3792">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer" transform="translate(0,4)" />
+ <text xml:space="preserve" style="font-size:12.61640644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:116.99999571%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial" x="1.0969616" y="10.079314" id="text3828" sodipodi:linespacing="117%" transform="matrix(1.0691606,0,0,0.93531316,1.9112886,1.7064536)"><tspan sodipodi:role="line" x="1.0969616" y="10.079314" id="tspan3870" dy="0 1.6874446" style="font-weight:bold;-inkscape-font-specification:Arial Bold"><tspan style="font-size:8.83148575000000060px;line-height:116.99999570999999000%;fill:#476caa;fill-opacity:1;font-weight:bold;-inkscape-font-specification:Arial Bold" id="tspan3876" dy="-1.6874446">@</tspan>t</tspan></text>
+ <text xml:space="preserve" style="font-size:9.0160284px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Sans" x="5.4504604" y="19.354103" id="text3908" sodipodi:linespacing="125%" transform="matrix(1.2529306,0,0,0.7981288,2.0387078,1.5790345)"><tspan sodipodi:role="line" id="tspan3910" x="5.4504604" y="19.354103" style="font-weight:bold;-inkscape-font-specification:Sans Bold">l</tspan></text>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/plugin.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/plugin.properties
new file mode 100755
index 0000000..b43eaed
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/plugin.properties
@@ -0,0 +1,2 @@
+pluginName = Papyrus-SiriusDiagram - Sirius class diagram implementation
+providerName = Eclipse Modeling Project
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/plugin.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/plugin.xml
new file mode 100755
index 0000000..12dafc3
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.papyrus.uml.sirius.clazz.diagram.Startup">
+ </startup>
+ </extension>
+
+
+</plugin>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/pom.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/pom.xml
new file mode 100755
index 0000000..cf75b93
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/pom.xml
@@ -0,0 +1,11 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.sirius.clazz.diagram</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/Activator.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/Activator.java
new file mode 100755
index 0000000..7fedbdb
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/Activator.java
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.clazz.diagram;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.sirius.business.api.componentization.ViewpointRegistry;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.sirius.clazz.diagram";
+
+ // The shared instance
+ private static Activator plugin;
+
+ private static Set<Viewpoint> viewpoints;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ viewpoints = new HashSet<Viewpoint>();
+ viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/papyrus_class.odesign"));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ if (viewpoints != null) {
+ for (final Viewpoint viewpoint: viewpoints) {
+ ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
+ }
+ viewpoints.clear();
+ viewpoints = null;
+ }
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/Startup.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/Startup.java
new file mode 100755
index 0000000..ed01c09
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/Startup.java
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.clazz.diagram;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * Early start-up hook for the externalized profile applications subsystem.
+ */
+public class Startup implements IStartup {
+
+ public Startup() {
+ super();
+ }
+
+ @Override
+ public void earlyStartup() {
+ Activator.getDefault();
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/services/ClassDiagramServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/services/ClassDiagramServices.java
new file mode 100755
index 0000000..c1efadc
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.clazz.diagram/src/org/eclipse/papyrus/uml/sirius/clazz/diagram/services/ClassDiagramServices.java
@@ -0,0 +1,3123 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.clazz.diagram.services;
+
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.swing.DefaultListModel;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.AssociationServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.DirectEditLabelSwitch;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.DisplayLabelSwitch;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.EditLabelSwitch;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.ElementServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.LabelServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.NodeInverseRefsServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.OperationServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.StereotypeServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.UIServices;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DSemanticDiagramSpec;
+import org.eclipse.sirius.viewpoint.DSemanticDecorator;
+import org.eclipse.sirius.viewpoint.FontFormat;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.dialogs.ListDialog;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.DurationObservation;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.Feature;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.GeneralizationSet;
+import org.eclipse.uml2.uml.InformationFlow;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.InterfaceRealization;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Observation;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.PackageMerge;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Realization;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Substitution;
+import org.eclipse.uml2.uml.TimeObservation;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.Usage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Services to handle typed Element concerns.
+ *
+ */
+public class ClassDiagramServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final ClassDiagramServices INSTANCE = new ClassDiagramServices();
+
+ /** Class diagram package name */
+ public static final String CLASS_DIAGRAM_PACKAGE_NAME = "/org.eclipse.papyrus.uml.sirius.clazz.diagram";
+
+ /** TimeObseravtion element symbol path */
+ public static final String TIME_OBSERVATION_SYMBOL_PATH = CLASS_DIAGRAM_PACKAGE_NAME
+ + "/icons/symbols/timeObservation.png";
+
+ /** DurationObseravtion element symbol path */
+ public static final String DURATION_OBSERVATION_SYMBOL_PATH = CLASS_DIAGRAM_PACKAGE_NAME
+ + "/icons/symbols/durationObservation.png";
+
+ /** INSTANCE_END for instance specification eAnnotation */
+ protected static final String INSTANCE_END = "InstanceEnd";
+
+ /** Dialog CANCEL button label */
+ private static final String CANCEL_LABEL = "Cancel";
+
+ /** Dialog OK button label */
+ private static final String OK_LABEL = "OK";
+
+ /** Annotation generic source name */
+ private static final String ANNOTATION_GENERIC_SOURCE = "org.eclipse.papyrus";
+
+ /** Annotation InstanceEnd source name */
+ private static final String ANNOTATION_INSTANCE_END_SOURCE = "InstanceEnd";
+
+ /** Annotation detail key */
+ private static final String ANNOTATION_DETAIL_KEY = "nature";
+
+ /** Annotation detail value */
+ private static final String ANNOTATION_DETAIL_VALUE = "UML_Nature";
+
+ /** underscore separator */
+ private static final String UNDERSCORE = "_";
+
+ /** ITEM_LABEL_PREFIX_START_TAG */
+ private static final String ITEM_LABEL_PREFIX_START_TAG = "<<";
+
+ /** ITEM_LABEL_PREFIX_END_TAG */
+ private static final String ITEM_LABEL_PREFIX_END_TAG = ">>";
+
+ /** InstanceSpecification edge */
+ private InstanceSpecification _instanceSpec;
+
+ /** Association type for a new created InstanceSpecification */
+ private String _selectedAssosType = "";
+
+ /**
+ * Move the given Element
+ * @param semanticObjectToDrop semantic element to drop
+ * @param targetContainerView the target container view
+ * @return the element
+ */
+ public EObject dndElement(EObject semanticObjectToDrop, EObject targetContainerView) {
+ if ((targetContainerView instanceof DSemanticDecorator) && (semanticObjectToDrop instanceof PackageableElement)) {
+ Element element = (PackageableElement) semanticObjectToDrop;
+ EObject target = ((DSemanticDecorator) targetContainerView).getTarget();
+
+ Model targetModel = null;
+ if (target instanceof Model) {
+ targetModel = (Model) target;
+ }
+ if (targetModel != null) {
+ targetModel.getPackagedElements().add((PackageableElement)element);
+ }
+
+ }
+ return semanticObjectToDrop;
+ }
+
+ /**
+ * Create a new Abstraction Link between the source and the target.
+ * @param context, the current context
+ * @param sourceview, the source view
+ * @param source, the semantic source element
+ * @param target, the semantic target element
+ * @return nothing
+ */
+ public static void createAbstractionLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ Abstraction abstraction = UMLFactory.eINSTANCE.createAbstraction();
+ model.getPackagedElements().add(abstraction);
+ abstraction.getClients().add((NamedElement) source);
+ abstraction.getSuppliers().add((NamedElement) target);
+ }
+ }
+ }
+
+ /**
+ * Get diagram root.
+ * @param context the current context (view)
+ * @return the root diagram owning the element
+ */
+ private static EObject getDiagramRoot(EObject sourceView) {
+ DDiagramElement diagramElement = (DDiagramElement) sourceView;
+ DSemanticDiagram diagram = (DSemanticDiagram) diagramElement.getParentDiagram();
+ EObject root = diagram.getTarget();
+ return root;
+ }
+
+ /**
+ * Create a new Containment Link between the source and the target
+ * @param context the current context
+ * @param source, the source element
+ * @param target, the target element
+ * @return nothing
+ */
+ public static void createContainmentLink(EObject context, Element source, Element target) {
+ if (source instanceof Class) {
+ Class sourceElement = (Class) source;
+ Classifier targetElement = (Classifier) target;
+ sourceElement.getNestedClassifiers().add(targetElement);
+ } else if (source instanceof Package) {
+ Package sourceElement = (Package) source;
+ PackageableElement targetElement = (PackageableElement) target;
+ sourceElement.getPackagedElements().add(targetElement);
+ }
+
+ }
+
+ /**
+ * Precondition test if sirius diagram or not.
+ * @param context the current context
+ * @return true if context is a DDiagram
+ */
+ public boolean isDDiagram(EObject self) {
+ return self instanceof DDiagram;
+ }
+
+ /**
+ * Test if element is ClassNodeList.
+ * @param context the current context
+ * @return true if class node list mapping
+ */
+ public boolean isClassNodeListContainer(EObject self) {
+ if (self instanceof DNodeList) {
+ DNodeList node = (DNodeList) self;
+ return node.getTarget() instanceof Class;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Test if element is ClassNodeContainer.
+ * @param context the current context
+ * @return true if class node container mapping
+ */
+ public boolean isClassNodeContainer(EObject self) {
+ if (self instanceof DNodeContainer) {
+ DNodeContainer node = (DNodeContainer) self;
+ return node.getTarget() instanceof Package;
+ } else {
+ return false;
+ }
+ }
+
+
+ /**
+ * Get the target element for the containment link.
+ * @param context the current context
+ * @return containment link lists
+ */
+ public static EList<?> getContainmentLinkTarget(Element source) {
+ if (source instanceof Class) {
+ Class sourceElement = (Class) source;
+ return sourceElement.getNestedClassifiers();
+ } else if (source instanceof Package) {
+ Package sourceElement = (Package) source;
+ return sourceElement.getPackagedElements();
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the feature which will contain the element.
+ * @param context the current context
+ * @return the name of the feature
+ */
+ public String getFeatureName(EObject context) {
+ if (context instanceof Constraint) {
+ return "ownedRule";
+ } else if (context instanceof Comment) {
+ return "ownedComment";
+ }
+ return "packagedElement";
+ }
+
+ /**
+ * Precondition check is data type.
+ * @param context the current context
+ * @return true is DataType and not enumeration or PrimitiveType
+ */
+ public boolean isDataType(EObject context) {
+ return !(context instanceof Enumeration || context instanceof PrimitiveType);
+ }
+
+ /**
+ * Get the feature to contain the element
+ *
+ * @param context the current context
+ * @return the target feature
+ */
+ public String getTypeTarget(EObject context) {
+ if (context instanceof Class || context instanceof Interface) {
+ return "nestedClassifier";
+ }
+
+ return "packagedElement";
+ }
+
+ /**
+ * Check if the oldcontainer was a class.
+ *
+ * @param context the current context
+ * @param oldContainer the current context
+ * @return true if the source is a class or an interface
+ */
+ public boolean ifSourceIsClass(EObject context, EObject oldContainer) {
+ if (oldContainer instanceof Class || oldContainer instanceof Interface) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the feature to contain the element
+ *
+ * @param context the current context
+ * @param newContainerView the new container view
+ * @return the target name
+ */
+ public String getTypeTarget(EObject context, EObject newContainerView) {
+ if (newContainerView instanceof Class || newContainerView instanceof Interface) {
+ return "nestedClassifier";
+ }
+
+ return "packagedElement";
+ }
+
+ /**
+ * Check if the container is valid or not
+ *
+ * @param context the current context
+ * @param newContainerView the new container view
+ * @return true if the container can contain the element to create
+ */
+ public boolean isValidContainer(EObject context, EObject newContainerView) {
+ if (newContainerView instanceof DSemanticDiagramSpec) {
+ return context.eContainer().equals(((DSemanticDiagramSpec) newContainerView).getTarget());
+
+ } else if (newContainerView instanceof DNodeContainerSpec)
+
+ {
+ return context.eContainer().equals(((DNodeContainerSpec) newContainerView).getTarget());
+
+ }
+ return false;
+ }
+
+
+ /**
+ * Check if the source and target are valid
+ *
+ * @param context the current context
+ * @param sourceView the source view
+ * @param targetView the target view
+ * @param source the semantic source element
+ * @param target the semantic target element
+ * @return true if the source and target are valid
+ */
+ public boolean isValidSourecAndTarget(EObject context, EObject sourceView, EObject targetView, Element source,
+ Element target) {
+ return !targetView.eContainer().equals(sourceView);
+ }
+
+ /**
+ * Create a new Dependency Link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createDependencyLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ Dependency dependency = UMLFactory.eINSTANCE.createDependency();
+ dependency.getClients().add((NamedElement) source);
+ dependency.getSuppliers().add((NamedElement) target);
+
+ if (source instanceof Class) {
+ model.getPackagedElements().add(dependency);
+ } else if (source instanceof Package) {
+ ((Package) source).getPackagedElements().add(dependency);
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a new Association Class Link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public AssociationClass createAssociationClassLink(EObject context, EObject sourceView, Element source,
+ Element target) {
+ AssociationClass associationClass = null;
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ associationClass = UMLFactory.eINSTANCE.createAssociationClass();
+ model.getPackagedElements().add(associationClass);
+ associationClass.setName(LabelServices.INSTANCE.computeDefaultName(associationClass));
+
+ final Property end1 = AssociationServices.INSTANCE.createAssociationClassEnd((Type) source);
+ associationClass.getMemberEnds().add(end1);
+ final Property end2 = AssociationServices.INSTANCE.createAssociationClassEnd((Type) target);
+ associationClass.getMemberEnds().add(end2);
+
+ end1.setAssociation(associationClass);
+ end2.setAssociation(associationClass);
+ associationClass.getOwnedEnds().add(end1);
+ associationClass.getOwnedEnds().add(end2);
+
+ EAnnotation eAnnotation = associationClass.createEAnnotation(ANNOTATION_GENERIC_SOURCE);
+ eAnnotation.getDetails().put(ANNOTATION_DETAIL_KEY, ANNOTATION_DETAIL_VALUE);
+ associationClass.getEAnnotations().add(eAnnotation);
+ }
+ }
+ return associationClass;
+ }
+
+ /**
+ * Create a new Element Import Link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createElementImportLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ PackageableElement sourceElement = (PackageableElement) source;
+ PackageableElement targetElement = (PackageableElement) target;
+ ElementImport elemImport = UMLFactory.eINSTANCE.createElementImport();
+ elemImport.setImportedElement(targetElement);
+ ((Namespace) sourceElement).getElementImports().add(elemImport);
+ }
+ }
+ }
+
+ /**
+ * Create a new Generalization Link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createGeneralizationLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Classifier sourceElement = (Classifier) source;
+ Classifier targetElement = (Classifier) target;
+ Generalization generalization = UMLFactory.eINSTANCE.createGeneralization();
+ generalization.setGeneral(targetElement);
+ sourceElement.getGeneralizations().add(generalization);
+ }
+ }
+ }
+
+ /**
+ * Create a new Information Flow Link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createInformationFlowLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ InformationFlow informationFlow = UMLFactory.eINSTANCE.createInformationFlow();
+ informationFlow.getInformationSources().add((NamedElement) source);
+ informationFlow.getInformationTargets().add((NamedElement) target);
+
+ if (source instanceof Classifier) {
+ model.getPackagedElements().add(informationFlow);
+ } else if (source instanceof Package) {
+ ((Package) source).getPackagedElements().add(informationFlow);
+ }
+ }
+ }
+ }
+
+ /**
+ * Check if the target element is an Interface or not.
+ */
+ public boolean isNotInterfaceTarget(EObject elem) {
+ return elem instanceof InterfaceRealization;
+ }
+
+ /**
+ * Create a new Interface Realization Link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public InterfaceRealization createInterfaceRealizationLink(EObject context, EObject sourceView, Element source,
+ Element target) {
+ InterfaceRealization interfaceRealization = null;
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ if (source instanceof Class && target instanceof Interface) {
+ Class sourceElement = (Class) source;
+ Interface targetElement = (Interface) target;
+ interfaceRealization = UMLFactory.eINSTANCE.createInterfaceRealization();
+ interfaceRealization.getClients().add(sourceElement);
+ interfaceRealization.getSuppliers().add(targetElement);
+ interfaceRealization.setContract(targetElement);
+ sourceElement.getInterfaceRealizations().add(interfaceRealization);
+ }
+ }
+ }
+ return interfaceRealization;
+ }
+
+ /**
+ * Check if the current link type is corresponding to the linkTypeName.
+ */
+ public boolean isCurrentLinkType(EObject elem, String linkTypeName) {
+ return elem.getClass().getSimpleName().equalsIgnoreCase(linkTypeName);
+ }
+
+ /**
+ * Create a new Realization link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createRealizationLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ Realization realization = UMLFactory.eINSTANCE.createRealization();
+ realization.getClients().add((NamedElement) source);
+ realization.getSuppliers().add((NamedElement) target);
+
+ if (source instanceof Package) {
+ ((Package) source).getPackagedElements().add(realization);
+ } else {
+ model.getPackagedElements().add(realization);
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a new Substitution link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createSubstitutionLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Classifier sourceElement = (Classifier) source;
+ Classifier targetElement = (Classifier) target;
+ Substitution substitution = UMLFactory.eINSTANCE.createSubstitution();
+ substitution.getClients().add(sourceElement);
+ substitution.getSuppliers().add(targetElement);
+ substitution.setContract(targetElement);
+ ((Classifier) sourceElement).getSubstitutions().add(substitution);
+ }
+ }
+ }
+
+ /**
+ * Create a new Package Import link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createPackageImportLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package sourceElement = (Package) source;
+ Package targetElement = (Package) target;
+ PackageImport packageImport = UMLFactory.eINSTANCE.createPackageImport();
+ packageImport.setImportedPackage(targetElement);
+ sourceElement.getPackageImports().add(packageImport);
+ }
+ }
+
+ }
+
+ /**
+ * Create a new Package Merge link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createPackageMergeLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package sourceElement = (Package) source;
+ Package targetElement = (Package) target;
+ PackageMerge packageMerge = UMLFactory.eINSTANCE.createPackageMerge();
+ packageMerge.setMergedPackage(targetElement);
+ sourceElement.getPackageMerges().add(packageMerge);
+ }
+ }
+
+ }
+
+ /**
+ * Create a new Usage link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createUsageLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ NamedElement sourceElement = (NamedElement) source;
+ NamedElement targetElement = (NamedElement) target;
+ Usage usage = UMLFactory.eINSTANCE.createUsage();
+ usage.getClients().add(sourceElement);
+ usage.getSuppliers().add(targetElement);
+
+ if (source instanceof Package) {
+ ((Package) source).getPackagedElements().add(usage);
+ } else {
+ model.getPackagedElements().add(usage);
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Create a new Generalization Set link.
+ * @param sourceView the source view
+ * @param target the semantic target element
+ * @param targetView the target view
+ */
+ public void createGeneralizationSetLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ Generalization generalization1 = (Generalization) source;
+ Generalization generalization2 = (Generalization) target;
+
+ GeneralizationSet generalizationSet = UMLFactory.eINSTANCE.createGeneralizationSet();
+ model.getPackagedElements().add(generalizationSet);
+
+ // build name
+ String name = LabelServices.INSTANCE.computeDefaultName(generalizationSet);
+ String firstGeneralisationClassName = ((Classifier) generalization1.getGeneral()).getName();
+ String secondGeneralisationClassName = ((Classifier) generalization2.getGeneral()).getName();
+ name = name + UNDERSCORE + firstGeneralisationClassName + UNDERSCORE + secondGeneralisationClassName;
+ generalizationSet.setName(name);
+
+ generalizationSet.getGeneralizations().add(generalization1);
+ generalizationSet.getGeneralizations().add(generalization2);
+ }
+ }
+ }
+
+ /**
+ * Get the source element of the Generalization link.
+ */
+ public EObject getSourceGeneralization(EObject elem) {
+ if (elem instanceof GeneralizationSet) {
+ GeneralizationSet generalizationSet = (GeneralizationSet) elem;
+ return generalizationSet.getGeneralizations().get(0);
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the target element of the Generalization link.
+ */
+ public EObject getTargetGeneralization(EObject elem) {
+ if (elem instanceof GeneralizationSet) {
+ GeneralizationSet generalizationSet = (GeneralizationSet) elem;
+ return generalizationSet.getGeneralizations().get(1);
+ }
+
+ return null;
+ }
+
+ /**
+ * Create a new Link link.
+ * @param sourceView the source view
+ * @param source the semantic source element
+ * @param target the semantic target element
+ */
+ public void createLink(EObject context, EObject sourceView, Element source, Element target) {
+ if (source instanceof Comment) {
+ ((Comment) source).getAnnotatedElements().add(target);
+ } else if (source instanceof Constraint) {
+ ((Constraint) source).getConstrainedElements().add(target);
+ }
+ if (source instanceof TimeObservation && !(target instanceof Comment)) {
+ ((TimeObservation) source).setEvent((NamedElement) target);
+ } else if (source instanceof DurationObservation && !(target instanceof Comment)) {
+ ((DurationObservation) source).getEvents().add((NamedElement) target);
+ }
+ }
+
+ /**
+ * Get the target element of the Link link.
+ */
+ public static EList<?> getLinkTarget(Element source) {
+ EList<NamedElement> target = new BasicEList<NamedElement>();
+
+ if (source instanceof Constraint) {
+ Constraint sourceElement = (Constraint) source;
+ return sourceElement.getConstrainedElements();
+ } else if (source instanceof Comment) {
+ Comment sourceElement = (Comment) source;
+ return sourceElement.getAnnotatedElements();
+ } else if (source instanceof TimeObservation) {
+ TimeObservation sourceElement = (TimeObservation) source;
+ target.add(sourceElement.getEvent());
+ return target;
+ } else if (source instanceof DurationObservation) {
+ DurationObservation sourceElement = (DurationObservation) source;
+ return sourceElement.getEvents();
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the target element of the Link link.
+ * @param source the semantic source element
+ * @param target the semantic target element
+ */
+ public boolean isNotObservationSourceWithCommentTarget(EObject context, Element source, Element target) {
+ if ((source instanceof TimeObservation || source instanceof DurationObservation) && target instanceof Comment) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Get the Constraint label.
+ */
+ public String getConstraintLabel(Element elem) {
+ StringBuilder constLabel = new StringBuilder();
+ String body = "";
+ String lang = "";
+ if (elem instanceof Constraint) {
+ Constraint constraint = ((Constraint) elem);
+ ValueSpecification valueSpec = constraint.getSpecification();
+ if (valueSpec instanceof OpaqueExpression) {
+ OpaqueExpression opaqueEsp = (OpaqueExpression) valueSpec;
+ if (!opaqueEsp.getBodies().isEmpty()) {
+ body = opaqueEsp.getBodies().get(0);
+ }
+ if (!opaqueEsp.getLanguages().isEmpty()) {
+ lang = opaqueEsp.getLanguages().get(0);
+ }
+
+ List<Stereotype> appliedStereoTypes = constraint.getAppliedStereotypes();
+ if (!appliedStereoTypes.isEmpty()) {
+ constLabel.append("<<");
+ }
+ for (int i = 0; i < constraint.getAppliedStereotypes().size(); i++) {
+ Stereotype stereoType = appliedStereoTypes.get(i);
+ constLabel.append(stereoType.getName());
+ if (i + 1 == appliedStereoTypes.size()) {
+ constLabel.append(">>");
+ } else {
+ constLabel.append(",");
+ }
+ }
+ constLabel.append(constraint.getName());
+ constLabel.append(System.getProperty("line.separator"));
+ constLabel.append("{{" + lang + "} " + body + "}");
+ }
+ }
+
+ return constLabel.toString();
+ }
+
+
+ /**
+ * Get the Constraint text body.
+ */
+ public String getBody(EObject elem) {
+ Constraint constraint = ((Constraint) elem);
+ ValueSpecification valueSpec = constraint.getSpecification();
+ if (valueSpec instanceof OpaqueExpression) {
+ OpaqueExpression opaqueEsp = (OpaqueExpression) valueSpec;
+ if (!opaqueEsp.getBodies().isEmpty()) {
+ return opaqueEsp.getBodies().get(0);
+ }
+ }
+ return "";
+ }
+
+ /**
+ * Compute label for InformationItem
+ *
+ * @param elem the current InformationItem element
+ * @return the label of InformationItem element
+ */
+ public String buildLabel(Element elem) {
+ StringBuilder labelBuilder = new StringBuilder();
+ String name = LabelServices.INSTANCE.computeUmlLabel(elem);
+ String prefix = elem.getClass().getSimpleName();
+ int endIndex = prefix.indexOf("Impl");
+ if (endIndex != -1) {
+ prefix = ITEM_LABEL_PREFIX_START_TAG + prefix.substring(0, endIndex) + ITEM_LABEL_PREFIX_END_TAG;
+ }
+
+ if (!name.startsWith(prefix)) {
+ labelBuilder.append(prefix);
+ labelBuilder.append(System.getProperty("line.separator"));
+ labelBuilder.append(name);
+ return labelBuilder.toString();
+ }
+
+ return name;
+ }
+
+ /**
+ * Get the symbol path for decorator
+ *
+ * @param elem the current element
+ * @return the path of symbol to use
+ */
+
+ public String GetSymbolPath(Element elem) {
+ if (elem instanceof TimeObservation) {
+ return TIME_OBSERVATION_SYMBOL_PATH;
+ }
+ return DURATION_OBSERVATION_SYMBOL_PATH;
+
+ }
+
+ /**
+ * Set the Constraint body.
+ */
+ public void setConstraintBody(Element elem, String bodyValue) {
+ if (elem instanceof Constraint) {
+ ValueSpecification valueSpec = ((Constraint) elem).getSpecification();
+ if (valueSpec instanceof OpaqueExpression) {
+ OpaqueExpression opaqueEsp = (OpaqueExpression) valueSpec;
+
+ if (!opaqueEsp.getBodies().isEmpty()) {
+ opaqueEsp.getBodies().remove(0);
+ opaqueEsp.getBodies().add(0, bodyValue);
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a new Instance Specification link.
+ * @param context the context element
+ * @param sourceView the source view
+ * @param source the semantic source element
+ * @param target the semantic target element
+ * @return the instance specification to create
+ */
+ public InstanceSpecification createInstanceSpecification(EObject context, EObject sourceView, Element source,
+ Element target) {
+ JDialog dialog = new JDialog();
+ GridLayout layout = new GridLayout(3, 1);
+ layout.setVgap(5);
+ dialog.setLayout(layout);
+ dialog.setModal(true);
+ dialog.setAlwaysOnTop(true);
+ dialog.setTitle("AssociationSelection");
+ dialog.setSize(new Dimension(350, 200));
+
+ dialog.add(new JLabel("Select the association for this instanceSpecification"));
+
+ // create OK button for the dialog
+ JButton okButton = new JButton(OK_LABEL);
+ okButton.setEnabled(false);
+
+ // create associationType list for the dialog
+ DefaultListModel<String> assosTypesList = new DefaultListModel<String>();
+ assosTypesList.addElement("<untyped>");
+ JList<String> list = new JList<String>(assosTypesList);
+ list.addListSelectionListener(new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ if (e.getValueIsAdjusting() == false) {
+ _selectedAssosType = list.getSelectedValue();
+ okButton.setEnabled(true);
+ }
+ }
+ });
+
+ dialog.add(list);
+
+ // add listener to OK button
+ okButton.addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ if (source instanceof InstanceSpecification && target instanceof InstanceSpecification) {
+ _instanceSpec = UMLFactory.eINSTANCE.createInstanceSpecification();
+ EAnnotation endtypes = _instanceSpec.createEAnnotation(ANNOTATION_INSTANCE_END_SOURCE);
+ endtypes.getReferences().add(source);
+ endtypes.getReferences().add(target);
+ }
+ }
+ }
+ dialog.setVisible(false);
+
+ }
+ });
+
+ // create Cancel button for the dialog
+ JButton cancelButton = new JButton(CANCEL_LABEL);
+ cancelButton.addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ dialog.setVisible(false);
+
+ }
+ });
+
+ JPanel buttonsPane = new JPanel();
+ buttonsPane.setLayout(new GridLayout(1, 2));
+ buttonsPane.add(okButton);
+ buttonsPane.add(cancelButton);
+ dialog.add(buttonsPane);
+ dialog.setVisible(true);
+
+ return _instanceSpec;
+ }
+
+ /**
+ * Add the new created instance specification to the model
+ *
+ * @param context the new created instance specification
+ * @param sourceView the source view
+ */
+ public void addInstanceSpecificationToModel(EObject context, EObject sourceView) {
+ if (sourceView instanceof DDiagramElement) {
+ EObject root = getDiagramRoot(sourceView);
+ if (root instanceof Package) {
+ Package model = (Package) root;
+ InstanceSpecification createdInstanceSpec = (InstanceSpecification) context;
+ model.getPackagedElements().add(createdInstanceSpec);
+ createdInstanceSpec.setName(LabelServices.INSTANCE.computeDefaultName(createdInstanceSpec));
+ }
+ }
+ }
+
+ /**
+ * Service used to determine if the selected containment edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectContainmentLinkPrecondition(Element context, Element target) {
+ return (target instanceof Class || target instanceof Interface || target instanceof Model
+ || target instanceof Package || target instanceof DataType);
+ }
+
+ /**
+ * Service used to determine if the selected Dependency edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectDependencyLinkPrecondition(Element context, Element target) {
+ return (target instanceof Class || target instanceof Package || target instanceof Interface
+ || target instanceof Enumeration || target instanceof PrimitiveType);
+ }
+
+ /**
+ * Service used to determine if the selected ElementImport edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectElementImportLinkPrecondition(Element context, Element target) {
+ return (target instanceof Class || target instanceof Package || target instanceof Interface
+ || target instanceof Enumeration || target instanceof PrimitiveType);
+ }
+
+ /**
+ * Service used to determine if the selected Generalization edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectGeneralizationLinkPrecondition(Element context, Element target) {
+ return (target instanceof Class || target instanceof Interface || target instanceof Enumeration
+ || target instanceof PrimitiveType);
+ }
+
+ /**
+ * Service used to determine if the selected GeneralizationSet edge target could
+ * be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectGeneralizationSetLinkPrecondition(Element context, Element target) {
+ return target instanceof Generalization;
+ }
+
+ /**
+ * Service used to determine if the selected InformationFlow edge target could
+ * be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectInformationFlowLinkPrecondition(Element context, Element target) {
+ return (target instanceof Class || target instanceof Package || target instanceof Interface
+ || target instanceof Enumeration || target instanceof PrimitiveType);
+ }
+
+ /**
+ * Service used to determine if the selected InstanceSpecification edge target
+ * could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectInstanceSpecLinkPrecondition(Element context, Element target) {
+ return target instanceof InstanceSpecification;
+ }
+
+ /**
+ * Service used to determine if the selected PackageImport/PackageMerge edge
+ * source could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectPackageImportMergeLinkSourcePrecondition(Element context, Element newSource) {
+ return newSource instanceof Package && !(newSource instanceof Model);
+ }
+
+ /**
+ * Service used to determine if the selected Realization edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectRealizationLinkPrecondition(Element context, Element newSource) {
+ return newSource instanceof Class || newSource instanceof Interface || newSource instanceof Enumeration
+ || newSource instanceof PrimitiveType || newSource instanceof Package
+ || newSource instanceof InstanceSpecification;
+ }
+
+ /**
+ * Service used to determine if the selected Substitution edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectSubstitutionLinkPrecondition(Element context, Element newSource) {
+ return newSource instanceof Class || newSource instanceof Interface || newSource instanceof Enumeration
+ || newSource instanceof PrimitiveType;
+ }
+
+ /**
+ * Service used to determine if the selected InterfaceRealization edge source
+ * could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectInterfaceRealizationLinkSourcePrecondition(Element context, Element newSource) {
+ return newSource instanceof Class;
+ }
+
+ /**
+ * Service used to determine if the selected InterfaceRealization edge target
+ * could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newTarget Represents the target element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectInterfaceRealizationLinkTargetPrecondition(Element context, Element newTarget) {
+ return newTarget instanceof Interface;
+ }
+
+ /**
+ * Service used to determine if the selected Usage edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectUsageLinkPrecondition(Element context, Element newSource) {
+ return newSource instanceof Class || newSource instanceof Package || newSource instanceof Interface
+ || newSource instanceof Enumeration || newSource instanceof PrimitiveType;
+ }
+
+ /**
+ * Service used to determine if the selected Link edge source could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectLinkSourcePrecondition(Element context, Element newSource) {
+ return newSource instanceof Constraint || newSource instanceof Comment || newSource instanceof Observation;
+ }
+
+ /**
+ * Service used to determine if the selected Link edge target could be
+ * reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newSource Represents the source element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectLinkTargetPrecondition(Element context, Element newSource) {
+ return newSource instanceof Constraint || newSource instanceof Comment || newSource instanceof Observation
+ || newSource instanceof PrimitiveType || newSource instanceof Enumeration
+ || newSource instanceof Package || newSource instanceof Interface || newSource instanceof Class;
+ }
+
+ /**
+ * Service used to determine if the selected PackageImport/PackageMerge edge
+ * target could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param newTarget Represents the target element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectPackageImportMergeLinkTargetPrecondition(Element context, Element newtarget) {
+ return newtarget instanceof Package;
+ }
+
+ /**
+ * Service used to determine if the selected Association edge source/target
+ * could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectAssociationLinkPrecondition(Element context, Element target) {
+ return target instanceof Class || target instanceof Interface || target instanceof Enumeration
+ || target instanceof PrimitiveType;
+ }
+
+ /**
+ * Service used to determine if the selected Abstraction edge source/target
+ * could be reconnected to an element.
+ *
+ * @param context Element attached to the existing edge
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return true if the edge could be reconnected
+ */
+ public boolean reconnectAbstractionLinkPrecondition(Element context, Element target) {
+ return target instanceof Class || target instanceof Interface || target instanceof Enumeration
+ || target instanceof PrimitiveType;
+ }
+
+ /**
+ * Service used to reconnect a Containment edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param sourceView Represents the graphical element pointed by the edge before
+ * reconnecting
+ * @param targetView Represents the graphical element pointed by the edge after
+ * reconnecting
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectContainmentEdgeSource(Element context, DEdge edgeView, EdgeTarget sourceView,
+ EdgeTarget targetView, Element oldSource, Element newSource) {
+ if (oldSource instanceof Class) // if the old source is a Class
+ {
+ // remove the target from the old source class and add it to the new source
+ // class
+ Classifier target = (Classifier) ((DNodeContainerSpec) edgeView.getTargetNode()).getTarget();
+ ((Class) oldSource).getNestedClassifiers().remove(target);
+ if (newSource instanceof Class) {
+ ((Class) newSource).getNestedClassifiers().add(target);
+ } else if (newSource instanceof Package) {
+ ((Package) newSource).getPackagedElements().add(target);
+ }
+ } else if (oldSource instanceof Package)// if the old source is a Package
+ {
+ // remove the target from the old source package and add it to the new source
+ // package
+ PackageableElement target = (PackageableElement) ((DNodeContainerSpec) edgeView.getTargetNode())
+ .getTarget();
+ ((Package) oldSource).getPackagedElements().remove(target);
+
+ if (newSource instanceof Class) {
+ ((Class) newSource).getNestedClassifiers().add((Classifier) target);
+ } else if (newSource instanceof Package) {
+ ((Package) newSource).getPackagedElements().add(target);
+ }
+ }
+ }
+
+ /**
+ * Service used to reconnect a Containment edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param sourceView Represents the graphical element pointed by the edge before
+ * reconnecting
+ * @param targetView Represents the graphical element pointed by the edge after
+ * reconnecting
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectContainmentEdgeTarget(Element context, DEdge edgeView, EdgeTarget sourceView,
+ EdgeTarget targetView, Element oldTarget, Element newTarget) {
+ // get the root model of the diagram
+ Model rootModel = getRootModel(oldTarget);
+
+ // if the old target element is a Class
+ if (oldTarget instanceof Class) {
+ // remove old target from the class source and add the new target
+ Class source = (Class) ((DNodeContainerSpec) edgeView.getSourceNode()).getTarget();
+ ((Class) source).getNestedClassifiers().remove(oldTarget);
+ ((Class) source).getNestedClassifiers().add((Classifier) newTarget);
+ }
+ // if the old target element is a Package
+ else if (oldTarget instanceof Package) {
+ // remove old target from the package source and add the new target
+ Package source = (Package) ((DNodeContainerSpec) edgeView.getSourceNode()).getTarget();
+ source.getPackagedElements().remove(oldTarget);
+ source.getPackagedElements().add((PackageableElement) newTarget);
+ }
+
+ // keep the old target (Class or Package) in the root model
+ if (oldTarget instanceof Class) {
+ rootModel.getPackagedElements().add((Class) oldTarget);
+ } else if (oldTarget instanceof Package) {
+ rootModel.getPackagedElements().add((Package) oldTarget);
+ }
+ }
+
+ /**
+ * Get the root model of the diagram
+ */
+ private Model getRootModel(Element element) {
+ Model currentModel = element.getModel();
+ if (!element.equals(currentModel)) {
+ currentModel = getRootModel(currentModel);
+ }
+
+ return currentModel;
+ }
+
+ /**
+ * Service used to reconnect a Dependency edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectDependencyEdgeSource(Element context, Element oldSource, Element newSource) {
+ // get the root model of the diagram
+ Model rootModel = getRootModel(oldSource);
+
+ // remove the old source from the Dependency edge and to it the new source
+ Dependency dependencyEdge = (Dependency) context;
+ dependencyEdge.getClients().remove(oldSource);
+ dependencyEdge.getClients().add((NamedElement) newSource);
+
+ if (oldSource instanceof Package && !(newSource instanceof Package)) {
+ // remove the dependencyEdge from the old source Package and keep it in the root
+ // model
+ ((Package) oldSource).getPackagedElements().remove(dependencyEdge);
+ rootModel.getPackagedElements().add(dependencyEdge);
+ } else if (newSource instanceof Package && !(oldSource instanceof Package)) {
+ // add the dependencyEdge to the new source Package and remove it from the root
+ // model
+ ((Package) newSource).getPackagedElements().add(dependencyEdge);
+ rootModel.getPackagedElements().remove(dependencyEdge);
+ }
+ }
+
+ /**
+ * Service used to reconnect a Containment edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param sourceView Represents the graphical element pointed by the edge before
+ * reconnecting
+ * @param targetView Represents the graphical element pointed by the edge after
+ * reconnecting
+ * @param source Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectDependencyEdgeTarget(Element context, DEdge edgeView, EdgeTarget sourceView,
+ EdgeTarget targetView, Element source, Element target) {
+ Dependency dependencyEdge = (Dependency) context;
+ dependencyEdge.getSuppliers().remove(source);
+ dependencyEdge.getSuppliers().add((NamedElement) target);
+ }
+
+ /**
+ * Service used to reconnect an ElementImport edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param sourceView Represents the graphical element pointed by the edge before
+ * reconnecting
+ * @param targetView Represents the graphical element pointed by the edge after
+ * reconnecting
+ * @param source Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectElementImportEdgeSource(Element context, Element source, Element target) {
+ ElementImport elementImportEdge = (ElementImport) context;
+ ((Namespace) source).getElementImports().remove(elementImportEdge);
+ ((Namespace) target).getElementImports().add(elementImportEdge);
+ }
+
+ /**
+ * Service used to reconnect an ElementImport edge target.
+ *
+ * @param context Element attached to the existing edge
+ * reconnecting
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectElementImportEdgeTarget(Element context, Element source, Element target) {
+ ElementImport elementImportEdge = (ElementImport) context;
+ elementImportEdge.setImportedElement((PackageableElement) target);
+ }
+
+ /**
+ * Service used to reconnect a Generalization edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param source Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectGeneralizationEdgeSource(Element context, Element source, Element target) {
+ Generalization generalizationEdge = (Generalization) context;
+ ((Classifier) source).getGeneralizations().remove(generalizationEdge);
+ ((Classifier) target).getGeneralizations().add(generalizationEdge);
+ }
+
+ /**
+ * Service used to reconnect a Generalization edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param source Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectGeneralizationEdgeTarget(Element context, Element source, Element target) {
+ Generalization generalizationEdge = (Generalization) context;
+ generalizationEdge.setGeneral((Classifier) target);
+ }
+
+ /**
+ * Service used to reconnect a GeneralizationSet edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectGeneralizationSetEdgeSource(Element context, Element oldSource, Element newSource) {
+ // get the old and new source generalization elements
+ GeneralizationSet generalizationSet = (GeneralizationSet) context;
+ Generalization oldSourceGeneralization = (Generalization) oldSource;
+ Generalization newSourceGeneralization = (Generalization) newSource;
+
+ // delete the old source generalization from the generalizations set and add the
+ // new source one
+ generalizationSet.getGeneralizations().add(0, newSourceGeneralization);
+ generalizationSet.getGeneralizations().remove(oldSource);
+
+ // build new name for the generalization set
+ String newSourceName = newSourceGeneralization.getGeneral().getName();
+ String oldSourceName = oldSourceGeneralization.getGeneral().getName();
+
+ String newName = generalizationSet.getName().replace(oldSourceName, newSourceName);
+ generalizationSet.setName(newName);
+ }
+
+ /**
+ * Service used to reconnect a GeneralizationSet edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectGeneralizationSetEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ GeneralizationSet generalizationSet = (GeneralizationSet) context;
+ Generalization oldTargetGeneralization = (Generalization) oldTarget;
+ Generalization newTargetGeneralization = (Generalization) newTarget;
+
+ generalizationSet.getGeneralizations().add(1, newTargetGeneralization);
+ generalizationSet.getGeneralizations().remove(oldTargetGeneralization);
+
+ // build new name
+ String newTargetName = newTargetGeneralization.getGeneral().getName();
+ String oldTargetName = oldTargetGeneralization.getGeneral().getName();
+
+ String newName = generalizationSet.getName().replace(oldTargetName, newTargetName);
+ generalizationSet.setName(newName);
+ }
+
+ /**
+ * Service used to reconnect an InformationFlow edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectInformationFlowEdgeSource(Element context, Element oldSource, Element newSource) {
+ // get the root model of the diagram
+ Model rootModel = getRootModel(oldSource);
+
+ // remove the old source from the information flow element and add to it the new
+ // source
+ InformationFlow informationFlow = (InformationFlow) context;
+ informationFlow.getInformationSources().remove(oldSource);
+ informationFlow.getInformationSources().add((NamedElement) newSource);
+
+ // keep the removed old source in the root model
+ if (oldSource instanceof Package && !(newSource instanceof Package)) {
+ ((Package) oldSource).getPackagedElements().remove(informationFlow);
+ rootModel.getPackagedElements().add(informationFlow);
+ } else if (newSource instanceof Package && !(oldSource instanceof Package)) {
+ ((Package) newSource).getPackagedElements().add(informationFlow);
+ rootModel.getPackagedElements().remove(informationFlow);
+ }
+ }
+
+ /**
+ * Service used to reconnect an informationFlow edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectInformationFlowEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ InformationFlow informationFlow = (InformationFlow) context;
+ informationFlow.getInformationTargets().remove(oldTarget);
+ informationFlow.getInformationTargets().add((NamedElement) newTarget);
+ }
+
+ /**
+ * Service used to reconnect an InstanceSpecifictaion edge source/target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectInstanceSpecEdge(Element context, Element oldSource, Element newSource) {
+ InstanceSpecification instanceSpec = (InstanceSpecification) context;
+ EAnnotation eAnnotation = instanceSpec.getEAnnotations().get(0);
+ eAnnotation.getReferences().remove(oldSource);
+ eAnnotation.getReferences().add((InstanceSpecification) newSource);
+ }
+
+ /**
+ * Service used to reconnect an PacakgeImport edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectPackageImportEdgeSource(Element context, Element oldSource, Element newSource) {
+ PackageImport packageImport = (PackageImport) context;
+ ((Package) oldSource).getPackageImports().remove(packageImport);
+ ((Package) newSource).getPackageImports().add(packageImport);
+ }
+
+ /**
+ * Service used to reconnect a PacakgeImport edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectPackageImportEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ PackageImport packageImport = (PackageImport) context;
+ packageImport.setImportedPackage((Package) newTarget);
+ }
+
+ /**
+ * Service used to reconnect a PackageMerge edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectPackageMergeEdgeSource(Element context, Element oldSource, Element newSource) {
+ PackageMerge packageMerged = (PackageMerge) context;
+ ((Package) oldSource).getPackageMerges().remove(packageMerged);
+ ((Package) newSource).getPackageMerges().add(packageMerged);
+ }
+
+ /**
+ * Service used to reconnect a PackageMerge edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectPackageMergeEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ PackageMerge packageMerged = (PackageMerge) context;
+ packageMerged.setMergedPackage((Package) newTarget);
+ }
+
+ /**
+ * Service used to reconnect a Realization edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+
+ public void reconnectRealizationEdgeSource(Element context, Element oldSource, Element newSource) {
+ // get the root model of the diagram
+ Model rootModel = getRootModel(oldSource);
+
+ // remove the old source from the realization element and add the new source
+ Realization realizationEdge = (Realization) context;
+ realizationEdge.getClients().remove(oldSource);
+ realizationEdge.getClients().add((NamedElement) newSource);
+
+ // keep the removed old source in the root model
+ if (oldSource instanceof Package && !(newSource instanceof Package)) {
+ ((Package) oldSource).getPackagedElements().remove(realizationEdge);
+ rootModel.getPackagedElements().add(realizationEdge);
+ } else if (newSource instanceof Package && !(oldSource instanceof Package)) {
+ ((Package) newSource).getPackagedElements().add(realizationEdge);
+ rootModel.getPackagedElements().remove(realizationEdge);
+ }
+ }
+
+ /**
+ * Service used to reconnect a Realization edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectRealizationEdgeTarget(Element context, Element source, Element target) {
+ Realization realizationEdge = (Realization) context;
+ realizationEdge.getSuppliers().remove(source);
+ realizationEdge.getSuppliers().add((NamedElement) target);
+ }
+
+ /**
+ * Service used to reconnect a Substitution edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectSubstitutionEdgeSource(Element context, Element oldSource, Element newSource) {
+ Substitution substitutionEdge = (Substitution) context;
+ substitutionEdge.getClients().remove(oldSource);
+ substitutionEdge.getClients().add((NamedElement) newSource);
+
+ ((Classifier) oldSource).getSubstitutions().remove(substitutionEdge);
+ ((Classifier) newSource).getSubstitutions().add(substitutionEdge);
+ }
+
+ /**
+ * Service used to reconnect a Substitution edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectSubstitutionEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ Substitution substitutionEdge = (Substitution) context;
+ substitutionEdge.getSuppliers().remove(oldTarget);
+ substitutionEdge.getSuppliers().add((NamedElement) newTarget);
+ substitutionEdge.setContract((Classifier) newTarget);
+ }
+
+ /**
+ * Service used to reconnect a InterfaceRealization edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectInterfaceRealizationEdgeSource(Element context, Element oldSource, Element newSource) {
+ InterfaceRealization interfaceRealizationEdge = (InterfaceRealization) context;
+ interfaceRealizationEdge.getClients().remove(oldSource);
+ interfaceRealizationEdge.getClients().add((NamedElement) newSource);
+
+ ((Class) oldSource).getInterfaceRealizations().remove(interfaceRealizationEdge);
+ ((Class) newSource).getInterfaceRealizations().add(interfaceRealizationEdge);
+ }
+
+ /**
+ * Service used to reconnect a InterfaceRealization edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectInterfaceRealizationEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ InterfaceRealization interfaceRealizationEdge = (InterfaceRealization) context;
+ interfaceRealizationEdge.getSuppliers().remove(oldTarget);
+ interfaceRealizationEdge.getSuppliers().add((NamedElement) newTarget);
+ interfaceRealizationEdge.setContract((Interface) newTarget);
+ }
+
+ /**
+ * Service used to reconnect a Usage edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectUsageEdgeSource(Element context, Element oldSource, Element newSource) {
+ // get the root model of the diagram
+ Model rootModel = getRootModel(oldSource);
+
+ // remove the old source from the Usage element and the new source
+ Usage usageEdge = (Usage) context;
+ usageEdge.getClients().remove(oldSource);
+ usageEdge.getClients().add((NamedElement) newSource);
+
+ // keep the removed old source in the root model
+ if (oldSource instanceof Package && !(newSource instanceof Package)) {
+ ((Package) oldSource).getPackagedElements().remove(usageEdge);
+ rootModel.getPackagedElements().add(usageEdge);
+ } else if (newSource instanceof Package && !(oldSource instanceof Package)) {
+ ((Package) newSource).getPackagedElements().add(usageEdge);
+ rootModel.getPackagedElements().remove(usageEdge);
+ }
+ }
+
+ /**
+ * Service used to reconnect a Usage edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param source Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param target Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectUsageEdgeTarget(Element context, Element source, Element target) {
+ Usage usageEdge = (Usage) context;
+ usageEdge.getSuppliers().remove(source);
+ usageEdge.getSuppliers().add((NamedElement) target);
+ }
+
+ /**
+ * Service used to reconnect a Link edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param oldsource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectLinkEdgeSource(Element context, DEdge edgeView, Element oldSource, Element newSource) {
+ Element target = (Element) ((DNodeContainerSpec) edgeView.getTargetNode()).getTarget();
+
+ // remove the target from the old source
+ if (oldSource instanceof Comment) {
+ ((Comment) oldSource).getAnnotatedElements().remove(target);
+ } else if (oldSource instanceof Constraint) {
+ ((Constraint) oldSource).getConstrainedElements().remove(target);
+ } else if (oldSource instanceof TimeObservation) {
+ ((TimeObservation) oldSource).setEvent(null);
+ } else if (oldSource instanceof DurationObservation) {
+ ((DurationObservation) oldSource).getEvents().remove((NamedElement) target);
+ }
+
+ // add the target to the new source
+ if (newSource instanceof Comment) {
+ ((Comment) newSource).getAnnotatedElements().add(target);
+ } else if (newSource instanceof Constraint) {
+ ((Constraint) newSource).getConstrainedElements().add(target);
+ } else if (newSource instanceof TimeObservation && !(target instanceof Comment)) {
+ ((TimeObservation) newSource).setEvent((NamedElement) target);
+ } else if (newSource instanceof DurationObservation && !(target instanceof Comment)) {
+ ((DurationObservation) newSource).getEvents().add((NamedElement) target);
+ }
+ }
+
+ /**
+ * Service used to reconnect a Link edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectLinkEdgeTarget(Element context, DEdge edgeView, Element oldTarget, Element newTarget) {
+ Element source = (Element) ((DNodeContainerSpec) edgeView.getSourceNode()).getTarget();
+
+ if (source instanceof Comment) {
+ ((Comment) source).getAnnotatedElements().remove(oldTarget);
+ ((Comment) source).getAnnotatedElements().add(newTarget);
+ } else if (source instanceof Constraint) {
+ ((Constraint) source).getConstrainedElements().remove(oldTarget);
+ ((Constraint) source).getConstrainedElements().add(newTarget);
+ } else if (source instanceof TimeObservation && !(newTarget instanceof Comment)) {
+ ((TimeObservation) source).setEvent((NamedElement) newTarget);
+ } else if (source instanceof DurationObservation && !(newTarget instanceof Comment)) {
+ ((DurationObservation) source).getEvents().remove((NamedElement) oldTarget);
+ ((DurationObservation) source).getEvents().add((NamedElement) newTarget);
+ }
+ }
+
+ /**
+ * Service used to reconnect a Abstraction edge source.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectAbstractionEdgeSource(Element context, Element oldSource, Element newSource) {
+ Abstraction abstractionEdge = (Abstraction) context;
+ abstractionEdge.getClients().remove(oldSource);
+ abstractionEdge.getClients().add((NamedElement) newSource);
+ }
+
+ /**
+ * Service used to reconnect a Abstraction edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectAbstractionEdgeTarget(Element context, Element oldTarget, Element newTarget) {
+ Abstraction abstractionEdge = (Abstraction) context;
+ abstractionEdge.getSuppliers().remove(oldTarget);
+ abstractionEdge.getSuppliers().add((NamedElement) newTarget);
+ }
+
+ /**
+ * Service used to reconnect a Link edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param oldSource Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newSource Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectAssociationEdgeSource(Element context, DEdge edgeView, Element oldSource, Element newSource) {
+ // if reconnect the source of an AssociationClass edge
+ if (context instanceof AssociationClass) {
+ // set the ownedEnd to the new source
+ for (Property ownedEnd : ((AssociationClass) context).getOwnedEnds()) {
+ if (ownedEnd.getType().equals(oldSource)) {
+ ownedEnd.setType((Type) newSource);
+ ownedEnd.setName(((Type) newSource).getName());
+ break;
+ }
+ }
+ } else // if reconnect the source of an Association edge
+ {
+ // get the target of the edge
+ Element target = null;
+ if (edgeView.getTargetNode() instanceof DNodeListSpec) {
+ target = (Element) ((DNodeListSpec) edgeView.getTargetNode()).getTarget();
+ } else if (edgeView.getTargetNode() instanceof DNodeContainerSpec)
+
+ {
+ target = (Element) ((DNodeContainerSpec) edgeView.getTargetNode()).getTarget();
+ }
+
+ // find the Attribute in the old source to be modified
+ EList<Property> attributes = null;
+ if (oldSource instanceof Class) {
+ attributes = ((Class) oldSource).getOwnedAttributes();
+ } else if (oldSource instanceof Interface) {
+ attributes = ((Interface) oldSource).getOwnedAttributes();
+ } else if (oldSource instanceof DataType) {
+ attributes = ((DataType) oldSource).getOwnedAttributes();
+ }
+
+ // remove attribute from the old source
+ Property modifiedAttribute = findAttributToBeModified(attributes, (Element) target);
+ attributes.remove(modifiedAttribute);
+
+ // add attribute to the new source
+ if (newSource instanceof Class) {
+ ((Class) newSource).getOwnedAttributes().add(modifiedAttribute);
+ } else if (newSource instanceof Interface) {
+ ((Interface) newSource).getOwnedAttributes().add(modifiedAttribute);
+ } else if (newSource instanceof DataType) {
+ ((DataType) newSource).getOwnedAttributes().add(modifiedAttribute);
+ }
+
+ Association association = (Association) modifiedAttribute.getAssociation();
+ for (Property ownedEnd : association.getOwnedEnds()) {
+ if (ownedEnd.getType().equals(oldSource)) {
+ ownedEnd.setType((Type) newSource);
+ ownedEnd.setName(((Type) newSource).getName());
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Find an attribute in a list of attributes
+ *
+ * @param attributes list of attributes
+ * @param target the searched attribute
+ * @return the found attribute
+ */
+ private Property findAttributToBeModified(EList<Property> attributes, Element target) {
+ for (Property attribut : attributes) {
+ if (attribut.getType().equals(target)) {
+ return attribut;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Service used to reconnect a Link edge target.
+ *
+ * @param context Element attached to the existing edge
+ * @param edgeView Represents the graphical new edge
+ * @param oldTarget Represents the semantic element pointed by the edge before
+ * reconnecting
+ * @param newTarget Represents the semantic element pointed by the edge after
+ * reconnecting
+ * @return the Element attached to the edge once it has been modified
+ */
+ public void reconnectAssociationEdgeTarget(Element context, DEdge edgeView, Element oldTarget, Element newTarget) {
+ // if reconnect the target of an AssociationClass edge
+ if (context instanceof AssociationClass) {
+ // set the ownedEnd to the new target
+ for (Property ownedEnd : ((AssociationClass) context).getOwnedEnds()) {
+ if (ownedEnd.getType().equals(oldTarget)) {
+ ownedEnd.setType((Type) newTarget);
+ ownedEnd.setName(((Type) newTarget).getName());
+ break;
+ }
+ }
+ } else // if reconnect the target of an Association edge
+ {
+ // get the source of the edge
+ Element source = null;
+ if (edgeView.getSourceNode() instanceof DNodeListSpec) {
+ source = (Element) ((DNodeListSpec) edgeView.getSourceNode()).getTarget();
+ } else if (edgeView.getSourceNode() instanceof DNodeContainerSpec)
+
+ {
+ source = (Element) ((DNodeContainerSpec) edgeView.getSourceNode()).getTarget();
+ }
+
+ // find the Attribute in the source to be modified
+ EList<Property> attributes = null;
+ if (source instanceof Class) {
+ attributes = ((Class) source).getOwnedAttributes();
+ } else if (source instanceof Interface) {
+ attributes = ((Interface) source).getOwnedAttributes();
+ } else if (source instanceof DataType) {
+ attributes = ((DataType) source).getOwnedAttributes();
+ }
+ Property modifiedAttribute = findAttributToBeModified(attributes, (Element) oldTarget);
+
+ // set the attribute to the new target
+ modifiedAttribute.setType((Type) newTarget);
+ modifiedAttribute.setName(((Type) newTarget).getName());
+ }
+ }
+
+ /**
+ * Check if the current element is instance of instance specification Link or
+ * Class.
+ *
+ * @param elem the current element to be checked
+ * @return true if instance specification Class, otherwise return false
+ */
+ public boolean isNotInstanceSpecificationLink(Element elem) {
+ return elem.getEAnnotations().isEmpty();
+ }
+
+ /**
+ * Check if the current element is instance of instance specification Link or
+ * Class.
+ *
+ * @param elem the current element to be checked
+ * @return true if instance specification Class, otherwise return false
+ */
+ public boolean isInstanceSpecificationEdge(EObject elem) {
+ if (elem instanceof InstanceSpecification) {
+ InstanceSpecification instanceSpecification = (InstanceSpecification) elem;
+ return !instanceSpecification.getEAnnotations().isEmpty();
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the target element of the instance specification link.
+ *
+ * @param elem the instance specification Link
+ * @return the target element of the current instance specification link
+ */
+ public EObject getTargetOfInstanceSpecification(EObject elem) {
+ if (elem instanceof InstanceSpecification) {
+ InstanceSpecification instanceSpecification = (InstanceSpecification) elem;
+ if (!instanceSpecification.getEAnnotations().isEmpty()) {
+ EAnnotation eAnnotation = instanceSpecification.getEAnnotations().get(0);
+ if (!eAnnotation.getReferences().isEmpty()) {
+ return eAnnotation.getReferences().get(1);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the source element of the instance specification link.
+ *
+ * @param elem the instance specification Link
+ * @return the source element of the current instance specification link
+ */
+ public EObject getSourceOfInstanceSpecification(EObject elem) {
+ if (elem instanceof InstanceSpecification) {
+ InstanceSpecification instanceSpecification = (InstanceSpecification) elem;
+ if (!instanceSpecification.getEAnnotations().isEmpty()) {
+ EAnnotation eAnnotation = instanceSpecification.getEAnnotations().get(0);
+ if (!eAnnotation.getReferences().isEmpty()) {
+ return eAnnotation.getReferences().get(0);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Compute the label of the given association.
+ *
+ * @param association the {@link Association} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeAssociationBeginLabel(Association association) {
+ return LabelServices.INSTANCE.computeAssociationBeginLabel(association);
+ }
+
+ public boolean isValidTest(EObject obj) {
+ return true;
+ }
+
+ /**
+ * Compute the association edge begin name
+ *
+ * @param association the current association
+ * @return the begin name
+ */
+ public String computeAssociationClassBeginLabel(Association association) {
+ Property source = AssociationServices.INSTANCE.getSource(association);
+ return "+ " + source.getName();
+ }
+
+ /**
+ * Compute the association edge end name
+ *
+ * @param association the current association
+ * @return the end name
+ */
+ public String computeAssociationClassEndLabel(Association association) {
+ Property target = AssociationServices.INSTANCE.getTarget(association);
+ return "+ " + target.getName();
+ }
+
+ /**
+ * Compute the instance specification edge begin name
+ *
+ * @param context the current instance specification
+ * @return the begin name
+ */
+ public String computeInstanceSpecBeginLabel(EObject context) {
+ InstanceSpecification instanceSpec = (InstanceSpecification) context;
+ InstanceSpecification source = (InstanceSpecification) instanceSpec.getEAnnotations().get(0).getReferences()
+ .get(0);
+ return source.getName();
+ }
+
+ /**
+ * Compute the instance specification edge end name
+ *
+ * @param context the current instance specification
+ * @return the end name
+ */
+ public String computeInstanceSpecEndLabel(EObject context) {
+ InstanceSpecification instanceSpec = (InstanceSpecification) context;
+ InstanceSpecification target = (InstanceSpecification) instanceSpec.getEAnnotations().get(0).getReferences()
+ .get(1);
+ return target.getName();
+ }
+
+ /**
+ * Compute the label of the given association.
+ *
+ * @param association the {@link Association} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeAssociationEndLabel(Association association) {
+ return LabelServices.INSTANCE.computeAssociationEndLabel(association);
+ }
+
+ /**
+ * Compute label forn_ary association edge.
+ *
+ * @param association
+ * @param view edge
+ * @return label
+ */
+ public String computeAssociationNAryBeginLabel(Association association, DDiagramElement view) {
+ return LabelServices.INSTANCE.computeAssociationBeginLabel(association, view);
+ }
+
+ /**
+ * Create an association between two elements.
+ *
+ * @param source association source
+ * @param target association target
+ * @return The association
+ */
+ private Association createAssociation(Element source, Element target, int assocType) {
+ // get the root model of the diagram
+ Model rootModel = getRootModel(source);
+
+ final Association association = UMLFactory.eINSTANCE.createAssociation();
+ final Property end1 = AssociationServices.INSTANCE.createAssociationClassEnd((Type) source);
+ association.getMemberEnds().add(end1);
+ final Property end2 = AssociationServices.INSTANCE.createAssociationEnd((Type) target);
+ association.getMemberEnds().add(end2);
+
+ association.getOwnedEnds().add(end1);
+ end2.setAssociation(association);
+ end2.setUpper(1);
+
+ switch (assocType) {
+ case AggregationKind.SHARED:
+ end2.setAggregation(AggregationKind.SHARED_LITERAL);
+ break;
+ case AggregationKind.COMPOSITE:
+ end2.setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ break;
+ default:
+ break;
+ }
+
+ if (source instanceof Class) {
+ ((Class) source).getOwnedAttributes().add(end2);
+ } else if (source instanceof Interface) {
+ ((Interface) source).getOwnedAttributes().add(end2);
+ } else if (source instanceof DataType) {
+ ((DataType) source).getOwnedAttributes().add(end2);
+ }
+
+ EAnnotation eAnnotation = association.createEAnnotation(ANNOTATION_GENERIC_SOURCE);
+ eAnnotation.getDetails().put(ANNOTATION_DETAIL_KEY, ANNOTATION_DETAIL_VALUE);
+ association.getEAnnotations().add(eAnnotation);
+
+ rootModel.getPackagedElements().add(association);
+
+ return association;
+ }
+
+ public boolean isNotAssociation(EObject elem) {
+ return ((Property) elem).getAssociation() == null;
+ }
+
+ public void createProfileApplicationLink(EObject object, Element source) {
+ ProfileApplication profileApplication = UMLFactory.eINSTANCE.createProfileApplication();
+ ((Package) source).getProfileApplications().add(profileApplication);
+ }
+
+ /**
+ * Create a new association.
+ *
+ * @param object Object
+ * @param source selected source
+ * @param target selected Target
+ * @param sourceView Source view
+ * @param targetView Target view
+ * @return Association
+ */
+ public Association createAssociation(EObject object, Element source, Element target, EObject sourceView,
+ EObject targetView, int assocType) {
+ if (source.eContainer() instanceof Package) {
+ // tool creation association edge
+ if (!(source instanceof Association || target instanceof Association)) {
+ return createAssociation(source, target, assocType);
+ } else if ((source instanceof AssociationClass || target instanceof AssociationClass)
+ && (sourceView instanceof DEdge || targetView instanceof DEdge)) {
+ // try to connect association from/to associationClas (edge part)
+ return createAssociationAddEnd(source, target);
+ } else if (source instanceof AssociationClass || target instanceof AssociationClass
+ && (sourceView instanceof DNodeList || targetView instanceof DNodeList)) {
+ // try to connect association from/to associationClas (container part)
+ return createAssociation(source, target, assocType);
+ } else if (source instanceof Association || target instanceof Association) {
+ return createAssociationAddEnd(source, target);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Add an end to an existing association.
+ *
+ * @param source Association or element
+ * @param target element or association
+ */
+ private Association createAssociationAddEnd(Element source, Element target) {
+ Association association;
+ Type type;
+ if (source instanceof Association) {
+ association = (Association) source;
+ type = (Type) target;
+ } else {
+ association = (Association) target;
+ type = (Type) source;
+ }
+
+ if (isBroken(association)) { // Look for broken association
+ fixAssociation(association, type);
+ } else { // create new end
+ final Property end = AssociationServices.INSTANCE.createAssociationEnd(type);
+ association.getNavigableOwnedEnds().add(end);
+ association.getOwnedEnds().add(end);
+ }
+ return association;
+ }
+
+ /**
+ * Precondition for n-ary association creation.
+ *
+ * @param object selected association
+ * @return true if association is binary and no end have no qualifiers
+ */
+ public boolean createNaryAssociationPrecondition(EObject object) {
+ return AssociationServices.INSTANCE.createNaryAssociationPrecondition(object);
+ }
+
+ /**
+ * Create an operation in a class.
+ *
+ * @param type the container {@link org.eclipse.uml2.uml.Type} element
+ * @return New operation
+ */
+ public Operation createOperation(org.eclipse.uml2.uml.Type type) {
+ return OperationServices.INSTANCE.createOperation(type);
+ }
+
+ /**
+ * Create new qualifier for association
+ *
+ * @param association selected association
+ */
+ public void createQualifier(Association association) {
+ // Display a selection pop-up to choose the end
+ final ListDialog dialog = new ListDialog(Display.getCurrent().getActiveShell());
+ dialog.setTitle("Qualifier creation"); //$NON-NLS-1$
+ dialog.setMessage("Please select the end to create new Qualifier:"); //$NON-NLS-1$
+ dialog.setInput(association.getMemberEnds().toArray());
+ dialog.setContentProvider(new ArrayContentProvider());
+ dialog.setLabelProvider(new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ return ((NamedElement) element).getName();
+ }
+ });
+ dialog.setInitialSelections(new Object[] { association.getMemberEnds().get(0) });
+
+ final int status = dialog.open();
+ if (status == Window.OK) {
+ final Property qualifier = UMLFactory.eINSTANCE.createProperty();
+ final Property end = (Property) dialog.getResult()[0];
+ end.getQualifiers().add(qualifier);
+ qualifier.setName(LabelServices.INSTANCE.computeDefaultName(qualifier));
+ }
+ }
+
+ /**
+ * Delete selected edge fron a N-Ary association
+ *
+ * @param association association
+ * @param element edge to delete
+ */
+ public void deleteNAryAssociation(Association association, DDiagramElement element) {
+ if (isNary(association)) {
+ final Property end = AssociationServices.INSTANCE.getSourceEndAssociation(association, element);
+ end.eContainer();
+ EcoreUtil.delete(end);
+ }
+ }
+
+ /**
+ * Edit the qualifier label
+ *
+ * @param context property association end element
+ * @param editedLabelContent edit label content
+ * @return end
+ */
+ public Element editQualifierLabel(Property context, String editedLabelContent) {
+ final DisplayLabelSwitch displayLabelSwitch = new DisplayLabelSwitch();
+ final EditLabelSwitch editLabel = new EditLabelSwitch();
+ // Separator for direct edit
+ final ArrayList<String> labels = new ArrayList<String>(
+ Arrays.asList(editedLabelContent.split(DirectEditLabelSwitch.QUALIFIER_SEPARATOR)));
+ // List qualifiers
+ final EList<Property> qualifiers = context.getQualifiers();
+ // Check for changes
+ if (labels.size() != qualifiers.size()) {
+ qualifiers.clear();
+ for (final String label : labels) {
+ final Property qualifier = UMLFactory.eINSTANCE.createProperty();
+ qualifiers.add(qualifier);
+ editLabel.setEditedLabelContent(label);
+ editLabel.doSwitch(qualifier);
+ }
+ } else {
+ // Only rename element
+ int index = 0;
+ for (final String label : labels) {
+ if (!label.equals(displayLabelSwitch.doSwitch(qualifiers.get(index)))) {
+ editLabel.setEditedLabelContent(label);
+ editLabel.doSwitch(qualifiers.get(index));
+ }
+ index++;
+ }
+ }
+ return context;
+ }
+
+ /**
+ * Iterate over the given {@link Collection} of root elements to find a
+ * {@link Type} element with the given name.
+ *
+ * @param roots the elements to inspect
+ * @param typeName the name to match
+ * @return the found {@link Type} or <code>null</code>
+ */
+ public Type findTypeByName(Collection<EObject> roots, String typeName) {
+ return ElementServices.INSTANCE.findTypeByName(roots, typeName);
+ }
+
+ /**
+ * With the given {@link EObject} iterate over root elements to find a
+ * {@link Type} element with the given name.
+ *
+ * @param object the elements to inspect
+ * @param typeName the name to match
+ * @return the found {@link Type} or <code>null</code>
+ */
+ public Type findTypeByName(EObject object, String typeName) {
+ return ElementServices.INSTANCE.findTypeByName(object, typeName);
+ }
+
+ private void fixAssociation(Association association, Type type) {
+ final EList<Property> ends = association.getMemberEnds();
+ final List<Property> brokenEnds = new ArrayList<Property>();
+ for (final Property end : ends) {
+ if (end.getType() == null) {
+ brokenEnds.add(end);
+ }
+ }
+
+ if (brokenEnds.size() > 1) {
+ // If several broken links exist user have to select the link to reconnect.
+
+ final ListDialog dialog = new ListDialog(Display.getCurrent().getActiveShell());
+ dialog.setTitle("Reconnect broken association end:"); //$NON-NLS-1$
+ dialog.setMessage("Please select the end to reconnect: "); //$NON-NLS-1$
+ dialog.setInput(brokenEnds.toArray());
+ dialog.setContentProvider(new ArrayContentProvider());
+ dialog.setLabelProvider(new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ return ((NamedElement) element).getName();
+ }
+ });
+ dialog.setInitialSelections(new Object[] { brokenEnds.get(0) });
+
+ final int status = dialog.open();
+ if (status == Window.OK) {
+ final Object[] types = dialog.getResult();
+ if (types != null && types.length == 1) {
+ final Property endToFix = (Property) types[0];
+ endToFix.setType(type);
+ endToFix.setName(AssociationServices.INSTANCE.getAssociationEndsName(type));
+ }
+ }
+ } else {
+ final Property endToFix = brokenEnds.get(0);
+ endToFix.setType(type);
+ endToFix.setName(AssociationServices.INSTANCE.getAssociationEndsName(type));
+ }
+ }
+
+ /**
+ * Fix association.
+ *
+ * @param host Host
+ * @param a Association
+ * @param b Association
+ */
+ public void fixAssociation(EObject host, EObject a, EObject b) {
+ if (a instanceof Association && b instanceof Type) {
+ fixAssociation((Association) a, (Type) b);
+ } else if (b instanceof Association && a instanceof Type) {
+ fixAssociation((Association) b, (Type) a);
+ }
+ }
+
+ /**
+ * Get abstract label format.
+ *
+ * @param object EObject
+ * @return Abstract label format
+ */
+ public List<FontFormat> getAbstractBoldLabelFormat(EObject object) {
+ // Fix to return bold/italic when bug will be fixed on sirius
+ final List<FontFormat> fontFormats = new ArrayList<FontFormat>();
+ fontFormats.add(FontFormat.BOLD_LITERAL);
+ fontFormats.add(FontFormat.ITALIC_LITERAL);
+ return fontFormats;
+ }
+
+ /**
+ * Get abstract label format.
+ *
+ * @param object EObject
+ * @return Abstract label format
+ */
+ public FontFormat getAbstractItalicLabelFormat(EObject object) {
+ // Fix to return bold/italic when bug will be fixed on sirius
+ return FontFormat.ITALIC_LITERAL;
+ }
+
+ /**
+ * Get all the stereotype applications according to the selected diagram.
+ *
+ * @param diagram Current diagram
+ * @return Stereotype applications
+ */
+ public Collection<Object> getAllStereotypeApplications(DDiagram diagram) {
+ return org.eclipse.papyrus.uml.sirius.common.diagram.core.services.StereotypeServices.INSTANCE
+ .getAllStereotypeApplications(diagram);
+ }
+
+ /**
+ * Get list of association. Check in diagram only two ends are presents.
+ *
+ * @param container package
+ * @param diagram diagram
+ * @return list of binary association
+ */
+ public List<Association> getAssociation(Package container, DDiagram diagram) {
+ final List<Association> result = new ArrayList<Association>();
+ final Collection<EObject> associations = getAssociationInverseRefs(diagram);
+ for (final EObject object : associations) {
+ final Association association = (Association) object;
+ if (getVisibleAssociationEnds(association, diagram).size() <= 2) {
+ result.add(association);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Retrieve the cross references of the association of all the UML elements
+ * displayed as node in a Diagram. Note that a Property cross reference will
+ * lead to retrieve the cross references of this property.
+ *
+ * @param diagram a diagram.
+ * @return the list of cross reference of the given
+ */
+ public Collection<EObject> getAssociationInverseRefs(DDiagram diagram) {
+ return NodeInverseRefsServices.INSTANCE.getAssociationInverseRefs(diagram);
+ }
+
+ /**
+ * Get base class associated to a stereotype application.
+ *
+ * @param stereotypeApplication Stereotype application
+ * @return Base class
+ */
+ public Element getBaseClass(EObject stereotypeApplication) {
+ return StereotypeServices.INSTANCE.getBaseClass(stereotypeApplication);
+ }
+
+ /**
+ * Get broken associations.
+ *
+ * @param container the current container.
+ * @return a list of association which might be considered as "broken", we are
+ * not able to display them as edges.
+ */
+ public Collection<Association> getBrokenAssociations(EObject container) {
+ final Collection<Association> result = new ArrayList<Association>();
+ for (final EObject child : container.eContents()) {
+ if (child instanceof Association && isBroken((Association) child)) {
+ result.add((Association) child);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get list of n-ary association. Check in diagram if more than two ends are
+ * presents.
+ *
+ * @param container package
+ * @param diagram diagram
+ * @return list of n-ary association
+ */
+ public List<Association> getNAryAssociation(Package container, DDiagram diagram) {
+ final List<Association> result = new ArrayList<Association>();
+ final Collection<EObject> associations = getAssociationInverseRefs(diagram);
+ for (final EObject object : associations) {
+ final Association association = (Association) object;
+ if (association.eContainer().equals(container)
+ && getVisibleAssociationEnds(association, diagram).size() > 2) {
+ // Check if n-ary association container is current container to avoid to display
+ // twice
+ result.add(association);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get source for n-ary association.
+ *
+ * @param association association
+ * @return list of source.
+ */
+ public EList<Type> getNAryAssociationSource(Association association) {
+ return association.getEndTypes();
+ }
+
+ /**
+ * Get navigable owned end of an association
+ *
+ * @param association Association
+ * @return Association
+ */
+ public List<Property> getNavigableOwnedEnds(Association association) {
+ final List<Property> ends = Lists.newArrayList();
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ if (source != null) {
+ ends.add(source);
+ }
+ if (target != null) {
+ ends.add(target);
+ }
+ return ends;
+ }
+
+ /**
+ * Return a set of classes from model.
+ *
+ * @param element an element in model
+ * @return set of classes or empty collection
+ */
+ public Collection<Class> getSemanticCandidatesClasses(Element element) {
+ final Set<Class> classes = new HashSet<Class>();
+ final TreeIterator<EObject> iterator = element.getModel().eAllContents();
+ while (iterator.hasNext()) {
+ final EObject object = iterator.next();
+ if (isTypeOfClass(object) || object instanceof Component) {
+ classes.add((Class) object);
+ }
+ }
+ return classes;
+ }
+
+ /**
+ * Get association end qualifier for a classifier.
+ *
+ * @param classifier association end
+ * @param diagram Diagram
+ * @return List of qualifier
+ */
+ public List<Property> getSemanticCandidatesQualifier(Classifier classifier, DDiagram diagram) {
+ final List<Property> qualifiers = new ArrayList<Property>();
+ final Collection<EObject> associations = getAssociationInverseRefs(diagram);
+ for (final EObject association : associations) {
+ for (final Property end : ((Association) association).getMemberEnds()) {
+ if (((Association) association).getMemberEnds().size() <= 2 && end.getType().equals(classifier)
+ && !end.getQualifiers().isEmpty()
+ && getVisibleAssociationEnds((Association) association, diagram).size() >= 2) {
+ qualifiers.add(end);
+ }
+ }
+ }
+ return qualifiers;
+ }
+
+ /**
+ * Get the type of the association source end.
+ *
+ * @param association association
+ * @param diagram diagram
+ * @return type of the source
+ */
+ public Element getSourceType(Association association, DDiagram diagram) {
+ final EList<DDiagramElement> elements = diagram.getDiagramElements();
+ // List semantic elements visible in diagram
+ final List<EObject> visibleEnds = new ArrayList<EObject>();
+ for (final DDiagramElement element : elements) {
+ visibleEnds.add(element.getTarget());
+ }
+ final EList<Property> ends = association.getMemberEnds();
+ for (final Property end : ends) {
+ if (visibleEnds.contains(end.getType())) {
+ if (end.getQualifiers().isEmpty()) {
+ return end.getType();
+ }
+ return end;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get stereotype application label.
+ *
+ * @param stereotypeApplication Stereotype application
+ * @return The stereotype name.
+ */
+ public String getStereotypeApplicationLabel(EObject stereotypeApplication) {
+ return org.eclipse.papyrus.uml.sirius.common.diagram.core.services.StereotypeServices.INSTANCE
+ .getStereotypeApplicationLabel(stereotypeApplication);
+ }
+
+ /**
+ * Get tagged value label.
+ *
+ * @param feature Feature
+ * @param view Stereotype application view
+ * @return Tagged value label featureName = value
+ */
+ public String getTaggedValueLabel(EStructuralFeature feature, DDiagramElement view) {
+ final DDiagramElement stereotypeApplicationView = (DDiagramElement) view.eContainer();
+ final EObject stereotypeApplication = stereotypeApplicationView.getTarget();
+
+ return feature.getName() + "=" + stereotypeApplication.eGet(feature); //$NON-NLS-1$
+ }
+
+ /**
+ * Get tagged values.
+ *
+ * @param stereotypeApplication Container
+ * @return Collection of tagged values
+ */
+ public Collection<Object> getTaggedValues(EObject stereotypeApplication) {
+ final Collection<Object> results = Lists.newArrayList();
+ for (final EStructuralFeature feature : stereotypeApplication.eClass().getEAllStructuralFeatures()) {
+ if (!feature.getName().startsWith("base_")) { //$NON-NLS-1$
+ results.add(feature);
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * Get the list of broken ends.
+ *
+ * @param association association
+ * @return List
+ */
+ public List<Type> getTargetBrokenAssociationToClasse(Association association) {
+ if (!isNary(association)) {
+ return AssociationServices.INSTANCE.getTypes(association);
+ }
+ return null;
+ }
+
+ /**
+ * Get the type of the association target end.
+ *
+ * @param association association
+ * @param diagram diagram
+ * @return Type of the target
+ */
+ public Element getTargetType(Association association, DDiagram diagram) {
+
+ final EList<DDiagramElement> elements = diagram.getDiagramElements();
+
+ // List semantic elements visible in diagram
+ final List<EObject> diagramElements = new ArrayList<EObject>();
+ for (final DDiagramElement element : elements) {
+ diagramElements.add(element.getTarget());
+ }
+
+ final List<Property> ends = association.getMemberEnds();
+ // find source index in list
+ int sourceIndex = 0;
+ for (int i = 0; i < ends.size(); i++) {
+ if (diagramElements.contains(ends.get(i).getType())) {
+ sourceIndex = i;
+ break;
+ }
+ }
+
+ // find target from the end of the list
+ int targetIndex = ends.size() - 1;
+ while (targetIndex > 0 && targetIndex > sourceIndex) {
+ if (diagramElements.contains(ends.get(targetIndex).getType())) {
+ if (ends.get(targetIndex).getQualifiers().isEmpty()) {
+ return ends.get(targetIndex).getType();
+ }
+ return ends.get(targetIndex);
+ }
+ targetIndex--;
+ }
+ return null;
+ }
+
+ /**
+ * Retrieve the cross references of the template binding of all the UML elements
+ * displayed as node in a Diagram. Note that a Property cross reference will
+ * lead to retrieve the cross references of this property.
+ *
+ * @param diagram a diagram.
+ * @return the list of cross reference of the given
+ */
+ public Collection<EObject> getTemplateBindingInverseRefs(DDiagram diagram) {
+ return NodeInverseRefsServices.INSTANCE.getTemplateBindingInverseRefs(diagram);
+ }
+
+ /**
+ * Return collection of visible association class in a diagram.
+ *
+ * @param diagram Diagram
+ * @param container Container of the associationClass
+ * @return Set of visible association Classes or empty collection
+ */
+ public Collection<EObject> getVisibleAssociationClass(DSemanticDiagram diagram, EObject container) {
+ final Set<EObject> associationClasses = new HashSet<EObject>();
+ final Collection<EObject> displayedNodes = UIServices.INSTANCE.getDisplayedNodes(diagram);
+ final Collection<EObject> associations = getAssociationInverseRefs(diagram);
+ for (final EObject association : associations) {
+ if (association instanceof AssociationClass) {
+ final Property source = AssociationServices.INSTANCE.getSource((AssociationClass) association);
+ final Property target = AssociationServices.INSTANCE.getTarget((AssociationClass) association);
+ if (source != null && target != null) {
+ final Type sourceType = source.getType();
+ final Type targetType = target.getType();
+ final Package parent = ((AssociationClass) association).getNearestPackage();
+
+ // An association class is visible in its parent if the parent is visible, else
+ // it is visible
+ // directly on the diagram
+ if ((container.equals(parent)
+ || !displayedNodes.contains(parent) && container.equals(diagram.getTarget()))
+ && sourceType != null && displayedNodes.contains(sourceType) && targetType != null
+ && displayedNodes.contains(targetType)) {
+ associationClasses.add(association);
+ }
+ }
+ }
+ }
+ return associationClasses;
+ }
+
+ private List<Property> getVisibleAssociationEnds(Association association, DDiagram diagram) {
+ final List<Property> ends = new ArrayList<Property>();
+ // Association should be visible in self container
+ // At least one of the ends is visible in diagram
+ final EList<DDiagramElement> elements = diagram.getDiagramElements();
+ // check if at least more than 2 ends are displayed in diagram
+ final List<EObject> visibleEndsList = new ArrayList<EObject>();
+ for (final DDiagramElement element : elements) {
+ visibleEndsList.add(element.getTarget());
+ }
+ final EList<Property> associationEnds = association.getMemberEnds();
+ for (final Property end : associationEnds) {
+ if (visibleEndsList.contains(end.getType())) {
+ ends.add(end);
+ }
+ if (end.getType() == null) { // Broken association case
+ ends.add(end);
+ }
+ }
+ return ends;
+ }
+
+ private boolean isBroken(Association child) {
+ final EList<Property> ends = child.getMemberEnds();
+ for (final Property end : ends) {
+ if (end.getType() == null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean isNary(Association association) {
+ if (association != null && association.getMembers() != null && association.getMembers().size() > 2) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Check an element is not a Class.
+ *
+ * @param element Element
+ * @return return true if the element is not a Class
+ */
+ public boolean isNotTypeOfClass(EObject element) {
+ return !isTypeOfClass(element);
+ }
+
+ /**
+ * Check if an element is a package.
+ *
+ * @param element Element
+ * @return True if element is a package
+ */
+ public boolean isPackage(EObject element) {
+ return element instanceof Package;
+ }
+
+ /**
+ * Check is a feature is static.
+ *
+ * @param feature Feature
+ * @return True if it is a static feature
+ */
+ public boolean isStatic(Feature feature) {
+ return feature != null && feature.isStatic();
+ }
+
+ /**
+ * Check if an element is type of class.
+ *
+ * @param element Element
+ * @return True if element is a class
+ */
+ public boolean isTypeOfClass(EObject element) {
+ return "Class".equals(element.eClass().getName()); //$NON-NLS-1$
+ }
+
+ /**
+ * Is a composite or aggregation association is valid.
+ *
+ * @param association
+ * @return true if an aggregation or a composite association is binary
+ */
+ public boolean isValidAggregationCompositeAssociation(Association association) {
+ final EList<Property> ends = association.getMemberEnds();
+ if (ends.size() > 2) {
+ for (final Property end : ends) {
+ if (end.getAggregation().getValue() != AggregationKind.NONE) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Check if an association can be created.
+ *
+ * @param self association
+ * @param preSource selected element
+ * @return true if valid
+ */
+ public boolean isValidAssociation(EObject self, Element preSource) {
+ if (preSource instanceof Association) {
+ // Verify association ends don't have qualifiers
+ final EList<Property> ends = ((Association) preSource).getMemberEnds();
+ for (final Property end : ends) {
+ if (!end.getQualifiers().isEmpty()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Check if an association can be created. Both selected elements are not
+ * association. If an association is selected is should not be an aggregation or
+ * a composite
+ *
+ * @param self association
+ * @param preSource User select element as source
+ * @param preTarget user select element as target
+ * @return true if valid
+ */
+ public boolean isValidAssociation(EObject self, Element preSource, Element preTarget) {
+
+ if (preSource instanceof Association && preTarget instanceof Association) {
+ return false; // Source and Target are not association
+ } else if (preSource instanceof Association || preTarget instanceof Association) {
+ // Verify association is not a binary association
+ Association association;
+ if (preSource instanceof Association) {
+ association = (Association) preSource;
+ } else {
+ association = (Association) preTarget;
+ }
+
+ final EList<Property> ends = association.getMemberEnds();
+ for (final Property end : ends) {
+ if (AssociationServices.INSTANCE.isComposite(end) || AssociationServices.INSTANCE.isShared(end)) {
+ return false;
+ }
+ if (!end.getQualifiers().isEmpty()) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if an Nary association can be created. Both selected elements are not
+ * association. If an association is selected is should not be an aggregation or
+ * a composite
+ *
+ * @param self association
+ * @param preSource User select element as source
+ * @param preTarget user select element as target
+ * @return true if valid
+ */
+ public boolean isValidNaryAssociation(EObject self, Element preSource, Element preTarget) {
+
+ if (preSource instanceof Association || preTarget instanceof Association) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Check is an association source is composite.
+ *
+ * @param association Association
+ * @return True if source is composite
+ */
+ public boolean sourceIsComposite(Association association) {
+ return AssociationServices.INSTANCE.sourceIsComposite(association);
+ }
+
+ /**
+ * Check is an association source is navigable.
+ *
+ * @param association Association
+ * @param element Edge element
+ * @return True if source is navigable
+ */
+ public boolean sourceIsNavigable(Association association, DDiagramElement element) {
+ return AssociationServices.INSTANCE.sourceIsNavigable(association, element);
+ }
+
+ /**
+ * Check is an association source is navigable and composite.
+ *
+ * @param association Association
+ * @return True if source is navigable and composite
+ */
+ public boolean sourceIsNavigableAndTargetIsComposite(Association association) {
+ return AssociationServices.INSTANCE.sourceIsNavigableAndTargetIsComposite(association);
+ }
+
+ /**
+ * Check is an association source is navigable and shared.
+ *
+ * @param association Association
+ * @return True if source is navigable and shared
+ */
+ public boolean sourceIsNavigableAndTargetIsShared(Association association) {
+ return AssociationServices.INSTANCE.sourceIsNavigableAndTargetIsShared(association);
+ }
+
+ /**
+ * Check is an association source is shared.
+ *
+ * @param association Association
+ * @return True if source is shared
+ */
+ public boolean sourceIsShared(Association association) {
+ return AssociationServices.INSTANCE.sourceIsShared(association);
+ }
+
+ /**
+ * Check is an association target is composite.
+ *
+ * @param association Association
+ * @return True if target is composite
+ */
+ public boolean targetIsComposite(Association association) {
+ return AssociationServices.INSTANCE.targetIsComposite(association);
+ }
+
+ /**
+ * Check is an association target is navigable.
+ *
+ * @param association Association
+ * @return True if target is navigable
+ */
+ public boolean targetIsNavigable(Association association) {
+ return AssociationServices.INSTANCE.targetIsNavigable(association);
+ }
+
+ /**
+ * Check is an association target is navigable and composite.
+ *
+ * @param association Association
+ * @return True if target is navigable and composite
+ */
+ public boolean targetIsNavigableAndSourceIsComposite(Association association) {
+ return AssociationServices.INSTANCE.targetIsNavigableAndSourceIsComposite(association);
+ }
+
+ /**
+ * Check is an association target is navigable and shared.
+ *
+ * @param association Association
+ * @return True if target is navigable and shared
+ */
+ public boolean targetIsNavigableAndSourceIsShared(Association association) {
+ return AssociationServices.INSTANCE.targetIsNavigableAndSourceIsShared(association);
+ }
+
+ /**
+ * Check is an association target is shared.
+ *
+ * @param association Association
+ * @return True if target is shared
+ */
+ public boolean targetIsShared(Association association) {
+ return AssociationServices.INSTANCE.targetIsShared(association);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.classpath b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.classpath
new file mode 100755
index 0000000..6ae8eb6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.project b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.project
new file mode 100755
index 0000000..9a76480
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.sirius.common.diagram</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c9545f0
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/META-INF/MANIFEST.MF b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..d8c3255
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/META-INF/MANIFEST.MF
@@ -0,0 +1,63 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.sirius.common.diagram;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Automatic-Module-Name: org.eclipse.papyrus.uml.sirius.common.diagram
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.sirius;bundle-version="[6.4.2,7.0.0)",
+ com.google.guava;bundle-version="[30.1.0,31.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.draw2d;bundle-version="[3.10.0,4.0.0)",
+ org.eclipse.sirius.common;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.sirius.common.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.ecore.extender;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.gef;bundle-version="[3.11.0,4.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[3.1.1,4.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.gmf.runtime.draw2d.ui;bundle-version="[1.9.1,2.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.18.100,4.0.0)",
+ org.eclipse.sirius.common.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.types;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.types.core;bundle-version="[5.1.0,6.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.hyperlink;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.gmf.runtime.notation.edit;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[2.0.0,3.0.0)",
+ org.apache.commons.cli;bundle-version="[1.4.0,2.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="[1.7.1,2.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.sirius;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.decoration;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.uml2.uml.edit;bundle-version="[5.5.0,6.0.0)"
+Bundle-Activator: org.eclipse.papyrus.uml.sirius.common.diagram.Activator
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.sirius.common.diagram,
+ org.eclipse.papyrus.uml.sirius.common.diagram.core.services,
+ org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink,
+ org.eclipse.papyrus.uml.sirius.common.diagram.services
+Bundle-Vendor: %providerName
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/about.html b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/about.html
new file mode 100755
index 0000000..3e183aa
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/build.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/build.properties
new file mode 100755
index 0000000..e9863e2
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/icons/NotFound.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/icons/NotFound.png
new file mode 100755
index 0000000..eba32c6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/icons/NotFound.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/plugin.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/plugin.properties
new file mode 100755
index 0000000..d458db6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/plugin.properties
@@ -0,0 +1,2 @@
+pluginName = Papyrus-SiriusDiagram - Sirius common diagram services
+providerName = Eclipse Modeling Project
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/plugin.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/plugin.xml
new file mode 100755
index 0000000..c224dc6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/plugin.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <decoratorProvider class="org.eclipse.papyrus.uml.sirius.common.diagram.validation.SiriusValidationDecoratorProvider">
+ <Priority name="Highest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+</extension>
+
+ <extension
+ point="org.eclipse.sirius.refreshExtensionProvider">
+ <refreshExtensionProvider
+ providerClass="org.eclipse.papyrus.uml.sirius.common.diagram.refresh.CommonRefreshExtensionProvider">
+ </refreshExtensionProvider>
+ </extension>
+ <extension
+ point="org.eclipse.sirius.diagram.ui.tabbarContributor">
+ <tabbarContributor
+ class="org.eclipse.papyrus.uml.sirius.common.diagram.PapyrusSiriusTabbarContributor">
+ </tabbarContributor>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.uml.sirius.common.diagram.SiriusEditPolicyProvider">
+ <Priority
+ name="High">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+
+ <!--
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink.NavigationEditPolicyProvider">
+ <Priority
+ name="High">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+ -->
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink.SiriusShortcutEditPartProvider">
+ <Priority
+ name="Highest">
+ </Priority>
+ </editpartProvider>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <?gmfgen generated="true"?>
+ <key
+ commandId="org.eclipse.sirius.diagram.ui.command.deleteFromDiagram"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+DEL">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.uml.diagram.menu.commands.SelectAllShapesCommand"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+A">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.uml.diagram.menu.command.grow.top"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+ARROW_UP">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.uml.diagram.menu.command.grow.bottom"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+ARROW_DOWN">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.uml.diagram.menu.command.grow.left"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+ARROW_LEFT">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.uml.diagram.menu.command.grow.right"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+ARROW_RIGHT">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.uml.sirius.common.diagram.semantic.DeleteCommand"
+ contextId="org.eclipse.sirius.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="DEL">
+ </key>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.sirius.common.diagram.handler.DeleteFromModelHandler"
+ commandId="org.eclipse.papyrus.uml.sirius.common.diagram.semantic.DeleteCommand">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.papyrus.uml.sirius.common.diagram.semantic.DeleteCommand"
+ name="Delete From Model">
+ </command>
+ </extension>
+</plugin>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/pom.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/pom.xml
new file mode 100755
index 0000000..4b40ed6
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/pom.xml
@@ -0,0 +1,11 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.sirius.common.diagram</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/Activator.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/Activator.java
new file mode 100755
index 0000000..160c797
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/Activator.java
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram;
+
+import java.util.Set;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.sirius.common.diagram";
+
+ // The shared instance
+ private static Activator plugin;
+
+ private static Set<Viewpoint> viewpoints;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {}
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/PapyrusSiriusTabbarContributor.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/PapyrusSiriusTabbarContributor.java
new file mode 100755
index 0000000..ab6b60c
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/PapyrusSiriusTabbarContributor.java
@@ -0,0 +1,175 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDDiagramEditPart;
+import org.eclipse.sirius.diagram.ui.edit.api.part.IAbstractDiagramNodeEditPart;
+import org.eclipse.sirius.diagram.ui.tools.api.editor.tabbar.AbstractTabbarContributor;
+
+/**
+ * The Class PapyrusSiriusTabbarContributor.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class PapyrusSiriusTabbarContributor extends AbstractTabbarContributor {
+
+ /** The diagram contribution items. */
+ private ArrayList<IContributionItem> diagramContributionItems;
+
+ /** The diagram element contribution items. */
+ private ArrayList<IContributionItem> diagramElementContributionItems;
+
+ /**
+ * Gets the contribution items.
+ *
+ * @param selection the selection
+ * @param part the part
+ * @param manager the manager
+ * @return the contribution items
+ * @see org.eclipse.sirius.diagram.ui.tools.api.editor.tabbar.ITabbarContributor#getContributionItems(org.eclipse.jface.viewers.ISelection, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart, org.eclipse.jface.action.ToolBarManager)
+ */
+
+ @Override
+ public List<IContributionItem> getContributionItems(ISelection selection, IDiagramWorkbenchPart part, ToolBarManager manager) {
+ List<IContributionItem> contributionItems = new ArrayList<IContributionItem>();
+ if (selection instanceof IStructuredSelection) {
+ Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+ if (firstElement instanceof AbstractDDiagramEditPart) {
+ contributionItems = getDiagramContributionItem(part, manager);
+ } else if (firstElement instanceof IAbstractDiagramNodeEditPart) {
+ contributionItems = getDiagramElementContributionItem(part, manager);
+ }
+ }
+ return contributionItems;
+ }
+
+ /**
+ * Accept.
+ *
+ * @param selection the selection
+ * @return true, if successful
+ * @see org.eclipse.sirius.diagram.ui.tools.api.editor.tabbar.ITabbarContributor#accept(org.eclipse.jface.viewers.ISelection)
+ */
+
+ @Override
+ public boolean accept(ISelection selection) {
+ boolean accept = false;
+ if (selection == null) {
+ accept = true;
+ } else if (selection instanceof IStructuredSelection) {
+ Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+ if (firstElement instanceof AbstractDDiagramEditPart || firstElement instanceof IAbstractDiagramNodeEditPart) {
+ accept = true;
+ }
+ }
+ return accept;
+ }
+
+ /**
+ * Gets the contribution items.
+ *
+ * @param part the part
+ * @param manager the manager
+ * @return the contribution items
+ * @see org.eclipse.sirius.diagram.ui.tools.api.editor.tabbar.ITabbarContributor#getContributionItems(org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart, org.eclipse.jface.action.ToolBarManager)
+ */
+
+ @Override
+ public List<IContributionItem> getContributionItems(IDiagramWorkbenchPart part, ToolBarManager manager) {
+ return getDiagramContributionItem(part, manager);
+ }
+
+ /**
+ * Gets the diagram contribution item.
+ *
+ * @param part
+ * the part
+ * @param manager
+ * the manager
+ * @return the diagram contribution item
+ */
+ private List<IContributionItem> getDiagramContributionItem(IDiagramWorkbenchPart part, ToolBarManager manager) {
+ if (diagramContributionItems == null) {
+ diagramContributionItems = new ArrayList<IContributionItem>();
+// diagramContributionItems.add(createArrangeMenuManager(part));
+// diagramContributionItems.add(createSelectMenuManager());
+ diagramContributionItems.add(createLayerContribution(part, manager));
+// diagramContributionItems.add(createZoomInContribution(part));
+// diagramContributionItems.add(createZoomOutContribution(part));
+// diagramContributionItems.add(createZoomContribution(part));
+ diagramContributionItems.add(createSelectPinnedElementsContribution(part));
+ diagramContributionItems.add(createSelectHiddenElementsContribution(part));
+ diagramContributionItems.add(createFilterContribution(part, manager));
+ diagramContributionItems.add(createPasteFormatContribution(part));
+ diagramContributionItems.add(createRefreshContribution());
+ diagramContributionItems.add(createSaveAsImageContributionItem());
+ diagramContributionItems.add(createModeMenuManagerContributionItem(part));
+ diagramContributionItems.add(createCopyAppearancePropertiesContribution(part));
+ diagramContributionItems.add(createCopyFormatContribution(part));
+ }
+ diagramElementContributionItems=null;
+ return diagramContributionItems;
+ }
+
+ /**
+ * Gets the diagram element contribution item.
+ *
+ * @param part
+ * the part
+ * @param manager
+ * the manager
+ * @return the diagram element contribution item
+ */
+ private List<IContributionItem> getDiagramElementContributionItem(IDiagramWorkbenchPart part, ToolBarManager manager) {
+ if (diagramElementContributionItems == null) {
+ diagramElementContributionItems = new ArrayList<IContributionItem>();
+ diagramElementContributionItems.add(createArrangeMenuManager(part));
+ diagramElementContributionItems.add(createAlignMenuManager());
+ diagramElementContributionItems.add(createHideElementLabelContribution(part));
+ diagramElementContributionItems.add(createHideElementContribution(part));
+ diagramElementContributionItems.add(createDeleteFromDiagramContribution(part));
+ diagramElementContributionItems.add(createDeleteFromModelContribution(part));
+ IContributionItem pinElementContributionItem = createPinElementContribution(part);
+ diagramElementContributionItems.add(pinElementContributionItem);
+ diagramElementContributionItems.add(createUnPinElementContribution(part, pinElementContributionItem));
+ diagramElementContributionItems.add(createFontColorContribution(part));
+ diagramElementContributionItems.add(createPasteFormatContribution(part));
+ diagramElementContributionItems.add(createBoldFontStyleContribution(part));
+ diagramElementContributionItems.add(createItalicFontStyleContribution(part));
+ diagramElementContributionItems.add(createFontDialogContribution(part));
+ diagramElementContributionItems.add(createFillColorContribution(part));
+ diagramElementContributionItems.add(createLineColorPropertyContribution(part));
+ diagramElementContributionItems.add(createResetStylePropertyContribution(part));
+ diagramElementContributionItems.add(createSetStyleToWorkspaceImageContribution(part));
+ diagramElementContributionItems.add(createSaveAsImageContributionItem());
+ diagramElementContributionItems.add(createDistributeContribution());
+ diagramElementContributionItems.add(createModeMenuManagerContributionItem(part));
+ diagramElementContributionItems.add(createRouterContribution());
+ diagramElementContributionItems.add(createCopyAppearancePropertiesContribution(part));
+ diagramElementContributionItems.add(createCopyFormatContribution(part));
+ diagramElementContributionItems.add(createSizeBothContribution(part));
+ diagramElementContributionItems.add(createAutoSizeContribution(part));
+ }
+ diagramContributionItems=null;
+ return diagramElementContributionItems;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/SiriusEditPolicyProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/SiriusEditPolicyProvider.java
new file mode 100755
index 0000000..9595532
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/SiriusEditPolicyProvider.java
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurélien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
+import org.eclipse.sirius.diagram.DragAndDropTarget;
+import org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusContainerDropPolicy;
+import org.eclipse.sirius.diagram.ui.internal.edit.policies.AbstractCreateEditPolicyProvider;
+
+/**
+ * The Class SiriusEditPolicyProvider.
+ *
+ * @author Aurélien Didier (Artal Technologies)
+ */
+@SuppressWarnings("restriction")
+public class SiriusEditPolicyProvider extends AbstractCreateEditPolicyProvider {
+
+ /**
+ * Creates the edit policies.
+ *
+ * @param editpart
+ * the editpart
+ * @see org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider#createEditPolicies(org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ public void createEditPolicies(EditPart editpart) {
+ editpart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new SiriusContainerDropPolicy());
+ }
+
+ /**
+ * Checks if is valid edit part.
+ *
+ * @param editPart
+ * the edit part
+ * @return true, if is valid edit part
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.policies.AbstractCreateEditPolicyProvider#isValidEditPart(org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ protected boolean isValidEditPart(EditPart editPart) {
+ Object model = editPart.getModel();
+ if (model instanceof NodeImpl) {
+ EObject element = ((NodeImpl) model).getElement();
+ if (element instanceof DragAndDropTarget) {
+ return true;
+ }
+ }
+ if (model instanceof Diagram) {
+ EObject element = ((Diagram) model).getElement();
+ if (element instanceof DragAndDropTarget) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AbstractDiagramServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AbstractDiagramServices.java
new file mode 100755
index 0000000..167412d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AbstractDiagramServices.java
@@ -0,0 +1,535 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.api.helper.graphicalfilters.HideFilterHelper;
+import org.eclipse.sirius.diagram.business.api.query.DDiagramElementQuery;
+import org.eclipse.sirius.diagram.business.internal.helper.task.operations.CreateViewTask;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.description.AbstractNodeMapping;
+import org.eclipse.sirius.diagram.description.DiagramElementMapping;
+import org.eclipse.sirius.diagram.description.tool.CreateView;
+import org.eclipse.sirius.diagram.description.tool.ToolFactory;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.exception.FeatureNotFoundException;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.exception.MetaClassNotFoundException;
+import org.eclipse.sirius.tools.api.command.CommandContext;
+import org.eclipse.sirius.viewpoint.DRepresentation;
+import org.eclipse.sirius.viewpoint.DSemanticDecorator;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Deployment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.Feature;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.InterfaceRealization;
+import org.eclipse.uml2.uml.Manifestation;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.UseCase;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * A set of services used by diagrams.
+ */
+@SuppressWarnings("restriction")
+public abstract class AbstractDiagramServices {
+
+ /**
+ * Compute default name.
+ *
+ * @param element
+ * New element
+ * @return Name for the new element, he name will looks like
+ * 'ElementType'+total of existing elements of the same type.
+ */
+ public String computeDefaultName(final EObject element) {
+ return LabelServices.INSTANCE.computeDefaultName(element);
+ }
+
+ /**
+ * Compute the tooltip.
+ *
+ * @param element
+ * New element
+ * @return Tooltip for the new element, the tooltip will looks like
+ * 'pkg::name'.
+ */
+ public String computeTooltip(final EObject element) {
+ return TooltipServices.INSTANCE.computeTooltip(element);
+ }
+
+ /**
+ * Compute the label of the given element.
+ *
+ * @param element
+ * the {@link Element} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeUmlLabel(Element element) {
+ return LabelServices.INSTANCE.computeUmlLabel(element);
+ }
+
+ /**
+ * @param semanticElement
+ * @param containerView
+ * @param containerViewExpression
+ */
+ public void createView(final EObject semanticElement, final DSemanticDecorator containerView, final String containerViewExpression) {
+ Session session=SessionManager.INSTANCE.getSession(semanticElement);
+ createView(semanticElement, containerView, session, containerViewExpression);
+ }
+
+
+ /**
+ * Create view.
+ *
+ * @param semanticElement
+ * Semantic element
+ * @param containerView
+ * Container view
+ * @param session
+ * Session
+ * @param containerViewVariable
+ * Name of the container view variable
+ */
+ protected void createView(final EObject semanticElement, final DSemanticDecorator containerView, final Session session, final String containerViewExpression) {
+ // Get all available mappings applicable for the semantic element in the
+ // current container
+ final List<DiagramElementMapping> semanticElementMappings = getMappings(semanticElement, containerView, session);
+
+ // Build a createView tool
+ final CreateView createViewOp = ToolFactory.eINSTANCE.createCreateView();
+ for (final DiagramElementMapping semanticElementMapping : semanticElementMappings) {
+ final DiagramElementMapping tmpSemanticElementMapping = semanticElementMapping;
+ createViewOp.setMapping(tmpSemanticElementMapping);
+ createViewOp.setContainerViewExpression(containerViewExpression);
+
+ session.getTransactionalEditingDomain().getCommandStack().execute(new RecordingCommand(session.getTransactionalEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ try {
+ // Get the command context
+ DRepresentation representation = null;
+ if (containerView instanceof DRepresentation) {
+ representation = (DRepresentation) containerView;
+ } else if (containerView instanceof DDiagramElement) {
+ representation = ((DDiagramElement) containerView).getParentDiagram();
+ }
+
+ final CommandContext context = new CommandContext(semanticElement, representation);
+
+ // Execute the create view task
+ final CreateViewTask task = new CreateViewTask(context, session.getModelAccessor(), createViewOp, session.getInterpreter());
+ task.execute();
+
+ final Object createdView = session.getInterpreter().getVariable(createViewOp.getVariableName());
+ if (createdView instanceof DDiagramElement) {
+ final DDiagramElement element = (DDiagramElement) createdView;
+ HideFilterHelper.INSTANCE.reveal(element);
+ }
+ } catch (final MetaClassNotFoundException e) {
+// UMLDesignerCorePlugin.log(IStatus.ERROR, NLS.bind(Messages.UmlModelWizard_UI_ErrorMsg_BadFileExtension, semanticElement), e);
+ } catch (final FeatureNotFoundException e) {
+// UMLDesignerCorePlugin.log(IStatus.ERROR, NLS.bind(Messages.UmlModelWizard_UI_ErrorMsg_BadFileExtension, semanticElement), e);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Default height.
+ *
+ * @param any
+ * Any
+ * @return The default height.
+ */
+ public int defaultHeight(EObject any) {
+ return 10/*UIServices.INSTANCE.defaultHeight()*/;
+ }
+
+ /**
+ * Default width.
+ *
+ * @param any
+ * Any
+ * @return The default width.
+ */
+ public int defaultWidth(EObject any) {
+ return 10/*UIServices.INSTANCE.defaultWidth()*/;
+ }
+
+ /**
+ * Precondition for Dependency creation.
+ *
+ * @param preTarget
+ * target element
+ * @return true if target element is a NamedElement
+ */
+ public boolean dependencyCreationCompletePrecondition(Element preTarget) {
+ return preTarget instanceof NamedElement;
+ }
+
+ /**
+ * Precondition for dependency creation.
+ *
+ * @param preSource
+ * source element
+ * @return true if source is a NamedElement
+ */
+ public boolean dependencyCreationStartPrecondition(Element preSource) {
+ return preSource instanceof NamedElement;
+ }
+
+ /**
+ * Drop a semantic element and create the corresponding view in the given
+ * container
+ *
+ * @param newContainer
+ * Semantic container
+ * @param semanticElement
+ * Element to drop
+ * @param containerView
+ * Container view
+ * @param moveSemanticElement
+ * True to move the dropped semantic element or false to just
+ * show the element on a diagram
+ */
+ //TODO
+ private void drop(final Element newContainer, final Element semanticElement, final DSemanticDecorator containerView, boolean moveSemanticElement) {
+ final Session session = SessionManager.INSTANCE.getSession(newContainer);
+ final Element oldContainer = semanticElement.getOwner();
+ if (moveSemanticElement && oldContainer != newContainer) {
+ // Manage stereotypes and profiles
+ final List<Stereotype> stereotypesToApply = Lists.newArrayList();
+ for (final Stereotype stereotype : semanticElement.getAppliedStereotypes()) {
+ stereotypesToApply.add(stereotype);
+ }
+
+ // Move the semantic element to the selected container
+ final TransactionalEditingDomain domain = session.getTransactionalEditingDomain();
+ // The feature is set to null because the domain will deduce it
+ Command cmd = AddCommand.create(domain, newContainer, null, semanticElement);
+ if (cmd.canExecute()) {
+ cmd.execute();
+ }
+ cmd = RemoveCommand.create(domain, oldContainer, null, semanticElement);
+ if (cmd.canExecute()) {
+ cmd.execute();
+ }
+
+ if (semanticElement instanceof UseCase) {
+ // Reset the current element as subject
+ cmd = SetCommand.create(domain, semanticElement, UMLPackage.Literals.USE_CASE__SUBJECT, SetCommand.UNSET_VALUE);
+ if (cmd.canExecute()) {
+ cmd.execute();
+ }
+ final List<Element> subjects = new ArrayList<Element>();
+ subjects.add(newContainer);
+ cmd = SetCommand.create(domain, semanticElement, UMLPackage.Literals.USE_CASE__SUBJECT, subjects);
+ if (cmd.canExecute()) {
+ cmd.execute();
+ }
+ }
+ // Apply stereotypes on dropped element and apply the necessary
+ // profiles automatically
+ StereotypeServices.INSTANCE.applyAllStereotypes(semanticElement, stereotypesToApply);
+
+ // Check if profile should be unapplied
+ for (final Stereotype stereotype : stereotypesToApply) {
+ StereotypeServices.INSTANCE.unapplyProfile(oldContainer, stereotype);
+ }
+ }
+
+ // Show the semantic element on the diagram
+ showView(semanticElement, containerView, session, "[self.getContainerView(newContainerView)/]"); //$NON-NLS-1$
+ }
+
+ /**
+ * Drop a semantic element from a diagram and create the corresponding view
+ * in the given container
+ *
+ * @param newContainer
+ * Semantic container
+ * @param semanticElement
+ * Element to drop
+ * @param containerView
+ * Container view
+ */
+ public void dropFromDiagram(final Element newContainer, final Element semanticElement, final DSemanticDecorator containerView) {
+ drop(newContainer, semanticElement, containerView, true);
+ }
+
+ /**
+ * Drop a semantic element and create the corresponding view in the given
+ * container
+ *
+ * @param newContainer
+ * Semantic container
+ * @param semanticElement
+ * Element to drop
+ * @param containerView
+ * Container view
+ */
+ public void dropFromModel(final Element newContainer, final Element semanticElement, final DSemanticDecorator containerView) {
+ final Session session = SessionManager.INSTANCE.getSession(semanticElement);
+ //markForAutosize(semanticElement);
+ showView(semanticElement, containerView, session, "[self.getContainerView(newContainerView)/]"); //$NON-NLS-1$
+ }
+
+ /**
+ * Get all available root packages.
+ *
+ * @param element
+ * ELement
+ * @return List of root packages
+ */
+ public List<Package> getAllAvailableRootPackages(Element element) {
+ final List<Package> packages = Lists.newArrayList();
+ packages.add(element.getModel());
+ packages.addAll(Lists.newArrayList(Iterables.filter(element.getModel().getImportedPackages(), Model.class)));
+ return packages;
+ }
+
+ /**
+ * Get all the hidden existing diagram elements related to a semantic
+ * element.
+ *
+ * @param semanticElement
+ * Semantic element
+ * @param containerView
+ * Container view
+ * @return List of all existing diagram elements for the given semantic
+ * element which are currently hidden in the diagram
+ */
+ //TODO
+ private List<DDiagramElement> getHiddenExistingDiagramElements(EObject semanticElement, DSemanticDecorator containerView) {
+ final List<DDiagramElement> existingDiagramElements = Lists.newArrayList();
+ if (containerView instanceof DSemanticDiagram) {
+ for (final DDiagramElement element : ((DSemanticDiagram) containerView).getDiagramElements()) {
+ if (semanticElement.equals(element.getTarget())) {
+ final DDiagramElementQuery query = new DDiagramElementQuery(element);
+ if (query.isHidden()) {
+ existingDiagramElements.add(element);
+ }
+ // Get the hidden parent container of the element to reveal,
+ // in order to reveal all the
+ // hierarchy
+ existingDiagramElements.addAll(getHiddenParentContainerViews(element));
+ }
+ }
+ }
+ return existingDiagramElements;
+ }
+
+ /**
+ * Get all the hidden diagram element in the hierarchy of a given diagram
+ * element.
+ *
+ * @param diagramElement
+ * Diagram element
+ * @return List of all the hidden parent container element
+ */
+ //TODO
+ private List<DDiagramElement> getHiddenParentContainerViews(DDiagramElement diagramElement) {
+ final List<DDiagramElement> containerViews = Lists.newArrayList();
+ EObject containerView = diagramElement.eContainer();
+ while (!(containerView instanceof DDiagram) && containerView instanceof DDiagramElement) {
+ final DDiagramElementQuery query = new DDiagramElementQuery((DDiagramElement) containerView);
+ if (query.isHidden()) {
+ containerViews.add((DDiagramElement) containerView);
+ }
+ containerView = containerView.eContainer();
+ }
+ return containerViews;
+ }
+
+ /**
+ * Get mappings available for a given container view.
+ *
+ * @param containerView
+ * Container view
+ * @param session
+ * Session
+ * @return List of mappings which could not be null
+ */
+ //TODO
+ protected List<DiagramElementMapping> getMappings(final DSemanticDecorator containerView, Session session) {
+ final List<DiagramElementMapping> mappings = new ArrayList<DiagramElementMapping>();
+
+ if (containerView instanceof DSemanticDiagram) {
+
+ for (final DiagramElementMapping mapping : ((DSemanticDiagram) containerView).getDescription().getContainerMappings()) {
+ if (!mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ for (final DiagramElementMapping mapping : ((DSemanticDiagram) containerView).getDescription().getNodeMappings()) {
+ if (!mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ } else if (containerView instanceof DNodeContainerSpec) {
+ for (final DiagramElementMapping mapping : ((DNodeContainerSpec) containerView).getActualMapping().getSubContainerMappings()) {
+ if (!mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ for (final DiagramElementMapping mapping : ((DNodeContainerSpec) containerView).getActualMapping().getSubNodeMappings()) {
+ if (!mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ }
+ return mappings;
+ }
+
+ /**
+ * Get mappings available for a semantic element and a given container view.
+ *
+ * @param semanticElement
+ * Semantic element
+ * @param containerView
+ * Container view
+ * @param session
+ * Session
+ * @return List of mappings which could not be null
+ */
+ //TODO
+ protected List<DiagramElementMapping> getMappings(final EObject semanticElement, final DSemanticDecorator containerView, Session session) {
+ final ModelAccessor modelAccessor = session.getModelAccessor();
+ final List<DiagramElementMapping> mappings = new ArrayList<DiagramElementMapping>();
+
+ if (containerView instanceof DSemanticDiagram) {
+ mappings.addAll(AddElementToDiagramServices.INSTANCE.getValidMappingsForDiagram(semanticElement, (DSemanticDiagram) containerView, session));
+ } else if (containerView instanceof DNodeContainerSpec) {
+ for (final DiagramElementMapping mapping : ((DNodeContainerSpec) containerView).getActualMapping().getSubContainerMappings()) {
+ final String domainClass = ((AbstractNodeMapping) mapping).getDomainClass();
+ if (modelAccessor.eInstanceOf(semanticElement, domainClass) && !mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ for (final DiagramElementMapping mapping : ((DNodeContainerSpec) containerView).getActualMapping().getSubNodeMappings()) {
+ final String domainClass = ((AbstractNodeMapping) mapping).getDomainClass();
+ if (modelAccessor.eInstanceOf(semanticElement, domainClass) && !mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ }
+ return mappings;
+ }
+
+ /**
+ * return the list of semantic elements we should bind with the given
+ * element in the property view.
+ *
+ * @param e
+ * a semantic element.
+ * @return the list of semantic elements we should bind with the given
+ * element in the property view.
+ */
+ public Collection<EObject> getSemanticElements(EObject e) {
+ return new SemanticElementsSwitch().getSemanticElements(e);
+ }
+
+ /**
+ * Check if a semantic element can be represented in a given container view.
+ *
+ * @param container
+ * Semantic container
+ * @param semanticElement
+ * Element to test
+ * @param containerView
+ * Container view
+ * @return True if element is valid for the current container view
+ */
+ public boolean isValidElementForContainerView(final Element container, final Element semanticElement, final DSemanticDecorator containerView) {
+ final Session session = SessionManager.INSTANCE.getSession(container);
+
+ // Get all available mappings applicable for the selected element in the
+ // current container
+ final List<DiagramElementMapping> semanticElementMappings = getMappings(semanticElement, containerView, session);
+
+ return semanticElementMappings.size() > 0;
+ }
+
+
+ /**
+ * Show the given semantic element on the diagram. If the element already
+ * exists but is hidden juste reveal it, otherwise create a new view.
+ *
+ * @param semanticElement
+ * Semantic element
+ * @param containerView
+ * Container view
+ * @param session
+ * Session
+ */
+ protected void showView(final EObject semanticElement, final DSemanticDecorator containerView, final Session session, String containerViewExpression) {
+ // Check if the dropped element already exists in the diagram but is
+ // hidden
+ final List<DDiagramElement> hiddenDiagramElements = getHiddenExistingDiagramElements(semanticElement, containerView);
+ if (!hiddenDiagramElements.isEmpty()) {
+ // Just reveal the elements
+ for (final DDiagramElement existingDiagramElement : hiddenDiagramElements) {
+ HideFilterHelper.INSTANCE.reveal(existingDiagramElement);
+ }
+ } else {
+ // Else create a new element
+ // Create the view for the dropped element
+ createView(semanticElement, containerView, session, containerViewExpression);
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AddElementToDiagramServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AddElementToDiagramServices.java
new file mode 100755
index 0000000..8b22ccc
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AddElementToDiagramServices.java
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.description.AbstractNodeMapping;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+import org.eclipse.sirius.diagram.description.DiagramElementMapping;
+import org.eclipse.sirius.diagram.description.Layer;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Collaboration;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Device;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.StructuredClassifier;
+import org.eclipse.uml2.uml.UseCase;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+/**
+ * A set of services used by the add to diagram feature.
+ *
+ */
+public class AddElementToDiagramServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final AddElementToDiagramServices INSTANCE = new AddElementToDiagramServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private AddElementToDiagramServices() {
+
+ }
+
+ /**
+ * Get mappings available for a semantic element and a given diagram.
+ *
+ * @param semanticElement Semantic element
+ * @param diagram Container view
+ * @param session Session
+ * @return List of mappings which could not be null
+ */
+ public List<DiagramElementMapping> getValidMappingsForDiagram(final EObject semanticElement,
+ final DSemanticDiagram diagram, Session session) {
+ final List<DiagramElementMapping> mappings = new ArrayList<DiagramElementMapping>();
+ // check semantic element could be added to diagram
+ if (!isValidForDiagram(diagram, null).apply(semanticElement)) {
+ return mappings;
+ }
+
+ final ModelAccessor modelAccessor = session.getModelAccessor();
+
+ for (final DiagramElementMapping mapping : diagram.getDescription().getContainerMappings()) {
+ final String domainClass = ((AbstractNodeMapping) mapping).getDomainClass();
+ if (modelAccessor.eInstanceOf(semanticElement, domainClass) && !mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+ for (final DiagramElementMapping mapping : diagram.getDescription().getNodeMappings()) {
+ final String domainClass = ((AbstractNodeMapping) mapping).getDomainClass();
+ if (modelAccessor.eInstanceOf(semanticElement, domainClass) && !mapping.isCreateElements()) {
+ mappings.add(mapping);
+ }
+ }
+
+ return mappings;
+ }
+
+ private Predicate<Object> getValidsForClassDiagram() {
+ final Predicate<Object> validForClassDiagram = new Predicate<Object>() {
+
+ public boolean apply(Object input) {
+ return input instanceof Package || input instanceof Interface || input instanceof DataType
+ || "Class".equals(((EObject) input).eClass().getName()) //$NON-NLS-1$
+ || "Component".equals(((EObject) input).eClass().getName()); //$NON-NLS-1$
+ }
+ };
+ return validForClassDiagram;
+ }
+
+
+ /**
+ * Get valid elements for a diagram.
+ *
+ * @param diagram diagram
+ * @param container selected container
+ * @return List of valid elements for the current representation
+ */
+ public Predicate<Object> isValidForDiagram(DDiagram diagram, EObject container) {
+ Predicate<Object> results = Predicates.alwaysTrue();
+ if (diagram instanceof DSemanticDiagram) {
+ final DiagramDescription description = ((DSemanticDiagram) diagram).getDescription();
+
+ if ("Class Diagram".equals(description.getName()) //$NON-NLS-1$
+ || "Profile Diagram".equals(description.getName())) { //$NON-NLS-1$
+ results = getValidsForClassDiagram();
+ }
+ }
+
+ return results;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AssociationServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AssociationServices.java
new file mode 100755
index 0000000..4cf679e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/AssociationServices.java
@@ -0,0 +1,490 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Services to handle typed Association concerns.
+ *
+ */
+public class AssociationServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final AssociationServices INSTANCE = new AssociationServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private AssociationServices() {
+
+ }
+
+ /**
+ * Create association end.
+ *
+ * @param type
+ * type of end
+ * @return property
+ */
+ public Property createAssociationEnd(Type type) {
+ final Property property = UMLFactory.eINSTANCE.createProperty();
+ property.setName(getAssociationEndsName(type));
+ property.setType(type);
+ property.setLower(0);
+ property.setUpper(-1);
+ return property;
+ }
+
+ /**
+ * Create association class end.
+ *
+ * @param type
+ * type of end
+ * @return property
+ */
+ public Property createAssociationClassEnd(Type type) {
+ final Property property = UMLFactory.eINSTANCE.createProperty();
+ property.setName(getAssociationEndsName(type));
+ property.setType(type);
+ return property;
+ }
+
+ /**
+ * Precondition for n-ary association creation.
+ *
+ * @param object
+ * selected association
+ * @return true if association is binary and no end have no qualifiers
+ */
+ public boolean createNaryAssociationPrecondition(EObject object) {
+ // aql:self.oclIsKindOf(uml::Association) and
+ // self.oclAsType(uml::Association).getEndTypes()->size()<=2
+ if (object instanceof Association) {
+ boolean res = true;
+ // if (((Association)object).getMemberEnds().size() == 2) {
+ for (final Property end : ((Association) object).getMemberEnds()) {
+ if (!end.getQualifiers().isEmpty()) {
+ res = false;
+ }
+ }
+ // }
+ return res;
+ }
+ return false;
+ }
+
+ /**
+ * Compute Association end name.
+ *
+ * @param type
+ * type of end
+ * @return name
+ */
+ public String getAssociationEndsName(Type type) {
+ String name = ((NamedElement) type).getName();
+ if (!com.google.common.base.Strings.isNullOrEmpty(name)) {
+ final char c[] = name.toCharArray();
+ c[0] = Character.toLowerCase(c[0]);
+ name = new String(c) + 's';
+ }
+ return name;
+ }
+
+ /**
+ * Retrieve the cross references of the association of all the UML elements displayed as node in a
+ * Diagram. Note that a Property cross reference will lead to retrieve the cross references of this
+ * property.
+ *
+ * @param diagram
+ * a diagram.
+ * @return the list of cross reference of the given
+ */
+ public Collection<EObject> getAssociationInverseRefs(DDiagram diagram) {
+ return NodeInverseRefsServices.INSTANCE.getAssociationInverseRefs(diagram);
+ }
+
+ /**
+ * Get association end qualifier for a classifier.
+ *
+ * @param classifier
+ * association end
+ * @param diagram
+ * Diagram
+ * @return List of qualifier
+ */
+ public List<Property> getSemanticCandidatesQualifier(Classifier classifier, DDiagram diagram) {
+ final List<Property> qualifiers = new ArrayList<Property>();
+ final Collection<EObject> associations = getAssociationInverseRefs(diagram);
+ for (final EObject association : associations) {
+ for (final Property end : ((Association)association).getMemberEnds()) {
+ if (((Association)association).getMemberEnds().size() <= 2 && end.getType().equals(classifier)
+ && !end.getQualifiers().isEmpty()
+ && getVisibleAssociationEnds((Association)association, diagram).size() >= 2) {
+ qualifiers.add(end);
+ }
+ }
+ }
+ return qualifiers;
+ }
+
+ /**
+ * Return the source of an association.
+ *
+ * @param association
+ * the {@link Association} context
+ * @return first end of the association
+ */
+ public Property getSource(Association association) {
+ if (association.getMemberEnds() != null && association.getMemberEnds().size() > 0) {
+ return association.getMemberEnds().get(0);
+ }
+ return null;
+ }
+
+ /**
+ * Get the source of an n-ary association.
+ *
+ * @param association
+ * the association
+ * @param view
+ * the edge to retrieve the source end
+ * @return end
+ */
+ public Property getSourceEndAssociation(Association association, DDiagramElement view) {
+
+ if (view instanceof DEdge) {
+ final DEdge edge = (DEdge) view;
+ final List<Property> members = association.getMemberEnds();
+ final EdgeTarget edgeSource = edge.getSourceNode();
+ List<EObject> sourceSemanticElements = new ArrayList<EObject>();
+
+ if (edgeSource instanceof DNodeListSpec) {
+ // edge source is a classifier
+ final DNodeListSpec source = (DNodeListSpec) edgeSource;
+ sourceSemanticElements = source.getSemanticElements();
+ for (final EObject sourceEObject : sourceSemanticElements) {
+ for (final Property member : members) {
+ if (sourceEObject.equals(member.getType())) {
+ return member;
+ }
+ }
+ }
+ } else if (edgeSource instanceof DNodeSpec) {
+ // edge source is a qualifier
+ sourceSemanticElements = ((DNodeSpec) edgeSource).getSemanticElements();
+ for (final EObject sourceEObject : sourceSemanticElements) {
+ for (final Property member : members) {
+ if (sourceEObject.equals(member)) {
+ return member;
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the type of the association source end.
+ *
+ * @param association
+ * Association
+ * @return Type of the source
+ */
+ public Type getSourceType(Association association) {
+ final Property source = getSource(association);
+ if (source != null) {
+ return source.getType();
+ }
+ return null;
+ }
+
+ /**
+ * Return the target of an association.
+ *
+ * @param association
+ * the {@link Association} context
+ * @return second end of the association
+ */
+ public Property getTarget(Association association) {
+ if (association.getMemberEnds() != null && association.getMemberEnds().size() > 1) {
+ return association.getMemberEnds().get(1);
+ }
+ return null;
+ }
+
+ /**
+ * Get the type of the association target end.
+ *
+ * @param association
+ * Association
+ * @return Type of the target
+ */
+ public Type getTargetType(Association association) {
+ final Property target = getTarget(association);
+ if (target != null) {
+ return target.getType();
+ }
+ return null;
+ }
+
+ /**
+ * Get types.
+ *
+ * @param association
+ * Association
+ * @return List of types
+ */
+ public List<Type> getTypes(Association association) {
+ final List<Type> types = Lists.newArrayList();
+ types.add(getSourceType(association));
+ types.add(getTargetType(association));
+ return types;
+ }
+
+ private List<Property> getVisibleAssociationEnds(Association association, DDiagram diagram) {
+ final List<Property> ends = new ArrayList<Property>();
+ // Association should be visible in self container
+ // At least one of the ends is visible in diagram
+ final EList<DDiagramElement> elements = diagram.getDiagramElements();
+ // check if at least more than 2 ends are displayed in diagram
+ final List<EObject> visibleEndsList = new ArrayList<EObject>();
+ for (final DDiagramElement element : elements) {
+ visibleEndsList.add(element.getTarget());
+ }
+ final EList<Property> associationEnds = association.getMemberEnds();
+ for (final Property end : associationEnds) {
+ if (visibleEndsList.contains(end.getType())) {
+ ends.add(end);
+ }
+ if (end.getType() == null) { // Broken association case
+ ends.add(end);
+ }
+ }
+ return ends;
+ }
+
+ public boolean isComposite(Property property) {
+ return property != null && property.isComposite();
+ }
+
+ private boolean isNavigable(Property property) {
+ return property != null && property.isNavigable();
+ }
+
+ public boolean isShared(Property property) {
+ return property != null && AggregationKind.SHARED_LITERAL.equals(property.getAggregation());
+ }
+
+ /**
+ * Remove ends or association.
+ *
+ * @param association
+ * association
+ */
+ /*public void removeAssociationEnd(final Association association) {
+ final EList<Property> ends = association.getMemberEnds();
+ final ModelElementsSelectionDialog dlg = new ModelElementsSelectionDialog("Remove end Association", //$NON-NLS-1$
+ "Select end to remove from association." + System.lineSeparator() //$NON-NLS-1$
+ + " If all ends are selected except one the association will be deleted else end are remove from association " //$NON-NLS-1$
+ + System.lineSeparator());
+ final List<Element> endOwners = new ArrayList<Element>();
+
+ dlg.setGrayedPredicate(new Predicate<EObject>() {
+
+ public boolean apply(EObject input) {
+ if (endOwners.contains(input)) {
+ return true;
+ } else if (input instanceof Property) {
+ return false;
+ }
+ return true;
+ }
+ });
+ final List<?> elementsToAdd = dlg.open(association);
+ final Session session = SessionManager.INSTANCE.getSession(association);
+ TransactionalEditingDomain editingDomain = null;
+ if (session != null) {
+ editingDomain = session.getTransactionalEditingDomain();
+ }
+ if (editingDomain != null && elementsToAdd.size() > 0 && ends.containsAll(elementsToAdd) && ends.size() - elementsToAdd.size() >= 2) {
+ final RecordingCommand command = new RecordingCommand(editingDomain) {
+ @Override
+ protected void doExecute() {
+ for (final Object element : elementsToAdd) {
+ if (element instanceof Element) {
+ ((Element) element).destroy();
+ }
+ }
+ }
+ };
+ editingDomain.getCommandStack().execute(command);
+ } else if (editingDomain != null && elementsToAdd.size() > 0 && ends.containsAll(elementsToAdd) && ends.size() - elementsToAdd.size() < 2) {
+ final RecordingCommand command = new RecordingCommand(editingDomain) {
+ @Override
+ protected void doExecute() {
+ association.destroy();
+ }
+ };
+ editingDomain.getCommandStack().execute(command);
+ }
+ }
+*/
+ /**
+ * Check is an association source is composite.
+ *
+ * @param association
+ * Association
+ * @return True if source is composite
+ */
+ public boolean sourceIsComposite(Association association) {
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ return isComposite(source);
+ }
+
+ /**
+ * Check is an association source is navigable.
+ *
+ * @param association
+ * Association
+ * @param element
+ * Edge element
+ * @return True if source is navigable
+ */
+ public boolean sourceIsNavigable(Association association, DDiagramElement element) {
+ final Property source = AssociationServices.INSTANCE.getSourceEndAssociation(association, element);
+ return isNavigable(source);
+ }
+
+ /**
+ * Check is an association source is navigable and composite.
+ *
+ * @param association
+ * Association
+ * @return True if source is navigable and composite
+ */
+ public boolean sourceIsNavigableAndTargetIsComposite(Association association) {
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ return isNavigable(source) && isComposite(target);
+ }
+
+ /**
+ * Check is an association source is navigable and shared.
+ *
+ * @param association
+ * Association
+ * @return True if source is navigable and shared
+ */
+ public boolean sourceIsNavigableAndTargetIsShared(Association association) {
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ return isNavigable(source) && isShared(target);
+ }
+
+ /**
+ * Check is an association source is shared.
+ *
+ * @param association
+ * Association
+ * @return True if source is shared
+ */
+ public boolean sourceIsShared(Association association) {
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ return isShared(source);
+ }
+
+ /**
+ * Check is an association target is composite.
+ *
+ * @param association
+ * Association
+ * @return True if target is composite
+ */
+ public boolean targetIsComposite(Association association) {
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ return isComposite(target);
+ }
+
+ /**
+ * Check is an association target is navigable.
+ *
+ * @param association
+ * Association
+ * @return True if target is navigable
+ */
+ public boolean targetIsNavigable(Association association) {
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ return isNavigable(target);
+ }
+
+ /**
+ * Check is an association target is navigable and composite.
+ *
+ * @param association
+ * Association
+ * @return True if target is navigable and composite
+ */
+ public boolean targetIsNavigableAndSourceIsComposite(Association association) {
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ return isNavigable(target) && isComposite(source);
+ }
+ /**
+ * Check is an association target is navigable and shared.
+ *
+ * @param association
+ * Association
+ * @return True if target is navigable and shared
+ */
+ public boolean targetIsNavigableAndSourceIsShared(Association association) {
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ final Property source = AssociationServices.INSTANCE.getSource(association);
+ return isNavigable(target) && isShared(source);
+ }
+
+ /**
+ * Check is an association target is shared.
+ *
+ * @param association
+ * Association
+ * @return True if target is shared
+ */
+ public boolean targetIsShared(Association association) {
+ final Property target = AssociationServices.INSTANCE.getTarget(association);
+ return isShared(target);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/DirectEditLabelSwitch.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/DirectEditLabelSwitch.java
new file mode 100755
index 0000000..c86b66f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/DirectEditLabelSwitch.java
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.TemplateableElement;
+
+/**
+ * A switch that handle the label computation for each UML types for direct edit operation.
+ *
+ */
+public class DirectEditLabelSwitch extends DisplayLabelSwitch {
+
+ /**
+ * Qualifier separator used for direct edit.
+ */
+ public static final String QUALIFIER_SEPARATOR = ","; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseClass(Class object) {
+ final String templateParameters = LabelServices.INSTANCE.getTemplatedParameters(object);
+ if (templateParameters != null) {
+ return object.getName() + templateParameters;
+ }
+
+ return object.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseNamedElement(NamedElement object) {
+ if (object instanceof TemplateableElement){
+ final String templateParameters = LabelServices.INSTANCE
+ .getTemplatedParameters((TemplateableElement)object);
+ if (templateParameters != null) {
+ return object.getName() + templateParameters;
+ }
+ }
+ return object.getName();
+ }
+
+ @Override
+ public String caseProperty(Property property) {
+ if (!property.getQualifiers().isEmpty()) {
+ String label = ""; //$NON-NLS-1$
+ boolean first = true;
+ final DisplayLabelSwitch displayLabelSwitch = new DisplayLabelSwitch();
+ for (final Property qualifier : property.getQualifiers()) {
+ if (first) {
+ label += displayLabelSwitch.doSwitch(qualifier);
+ first = false;
+ } else {
+ label += QUALIFIER_SEPARATOR;
+ label += displayLabelSwitch.doSwitch(qualifier);
+ }
+ }
+ return label;
+ }
+ return super.caseProperty(property);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/DisplayLabelSwitch.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/DisplayLabelSwitch.java
new file mode 100755
index 0000000..e93ff4a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/DisplayLabelSwitch.java
@@ -0,0 +1,953 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLQualifiedNameUtils;
+//import org.eclipse.ui.navigator.ICommonLabelProvider;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DataStoreNode;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Duration;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Expression;
+import org.eclipse.uml2.uml.Feature;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.Interval;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralNull;
+import org.eclipse.uml2.uml.LiteralReal;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.PackageMerge;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.ParameterableElement;
+import org.eclipse.uml2.uml.Pin;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.ProtocolStateMachine;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.StructuralFeature;
+import org.eclipse.uml2.uml.Substitution;
+import org.eclipse.uml2.uml.TemplateBinding;
+import org.eclipse.uml2.uml.TemplateParameterSubstitution;
+import org.eclipse.uml2.uml.TemplateableElement;
+import org.eclipse.uml2.uml.TimeExpression;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+import org.eclipse.uml2.uml.util.UMLSwitch;
+//import org.obeonetwork.dsl.uml2.core.UMLDesignerCorePlugin;
+
+import com.google.common.base.Strings;
+
+/**
+ * A switch that handle the label computation for each UML types.
+ *
+ */
+public class DisplayLabelSwitch extends UMLSwitch<String> implements ILabelConstants {
+
+ /**
+ * Spaced column constant.
+ */
+ private static final String SPACED_COLUMN = " : "; //$NON-NLS-1$
+
+ /**
+ * Spaced column constant.
+ */
+ private static final String SPACED_COMMA = ", "; //$NON-NLS-1$
+
+ /**
+ * Closing brace constant.
+ */
+ private static final String CLOSING_BRACE = "]"; //$NON-NLS-1$
+
+ /**
+ * Opening brace constant.
+ */
+ private static final String OPENING_BRACE = "["; //$NON-NLS-1$
+
+ /**
+ * Line separator.
+ */
+ public static final String END_OF_LINE = System.lineSeparator();
+
+ /**
+ * Space.
+ */
+ public static final String SPACE = " "; //$NON-NLS-1$
+
+ private static boolean showStereotypeFilter = true;
+
+ private static boolean showQualifiedNameFilter = true;
+
+ /**
+ * Compute the {@link Stereotype} label part for the given {@link Element}.
+ *
+ * @param element the context element.
+ * @return the {@link Stereotype} label.
+ */
+ public static String computeStereotypes(Element element) {
+
+ if (showStereotypeFilter) {
+ final Iterator<Stereotype> it = element.getAppliedStereotypes().iterator();
+
+ if (!it.hasNext()) {
+ return ""; //$NON-NLS-1$
+ }
+
+ final StringBuffer stereotypeLabel = new StringBuffer();
+ stereotypeLabel.append(OPEN_QUOTE_MARK);
+ for (;;) {
+ final Stereotype appliedStereotype = it.next();
+
+ stereotypeLabel.append(appliedStereotype.getName());
+ if (it.hasNext()) {
+ stereotypeLabel.append(", "); //$NON-NLS-1$
+ } else {
+ break;
+ }
+ }
+ stereotypeLabel.append(CLOSE_QUOTE_MARK);
+ if (element instanceof Feature) {
+ stereotypeLabel.append(" "); //$NON-NLS-1$
+ } else {
+ stereotypeLabel.append(NL);
+ }
+
+ return stereotypeLabel.toString();
+ }
+ return "";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseActivity(Activity object) {
+ return OPEN_QUOTE_MARK + "Activity" + CLOSE_QUOTE_MARK + caseBehavior(object); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseClass(Class object) {
+ return caseTemplateableElement(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseComponentRealization(org.eclipse.uml2.uml.ComponentRealization object) {
+ return computeStereotypes(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseConstraint(Constraint object) {
+ final StringBuilder label = new StringBuilder();
+ label.append('{');
+ if (object != null) {
+ final String constraintName = object.getName();
+ if (!Strings.isNullOrEmpty(constraintName)) {
+ label.append(constraintName);
+ label.append(':');
+ }
+ final ValueSpecification specification = object.getSpecification();
+ if (specification == null) {
+ label.append("missing specification"); //$NON-NLS-1$
+ } else {
+ label.append(specification.stringValue());
+ }
+ }
+ label.append('}');
+ return label.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseDataStoreNode(DataStoreNode object) {
+ final StringBuffer buffer = new StringBuffer();
+ buffer.append(OPEN_QUOTE_MARK);
+ buffer.append("Datastore"); //$NON-NLS-1$
+ buffer.append(CLOSE_QUOTE_MARK);
+ buffer.append(NL);
+ buffer.append(caseNamedElement(object));
+ return buffer.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseDependency(Dependency object) {
+ return computeStereotypes(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseDeployment(org.eclipse.uml2.uml.Deployment object) {
+ return computeStereotypes(object) + "<<deploy>>";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseDuration(Duration object) {
+ return object.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseElementImport(ElementImport object) {
+ return computeStereotypes(object) + "<<import>>";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseEnumerationLiteral(EnumerationLiteral object) {
+ return object.getLabel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseExecutionSpecification(ExecutionSpecification execution) {
+ if (execution instanceof BehaviorExecutionSpecification) {
+ if (((BehaviorExecutionSpecification) execution).getBehavior() != null
+ && ((BehaviorExecutionSpecification) execution).getBehavior().getSpecification() != null) {
+ return caseOperation(
+ (Operation) ((BehaviorExecutionSpecification) execution).getBehavior().getSpecification());
+ }
+ }
+ return execution.getLabel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseExpression(Expression object) {
+ return object.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String casePackageMerge(PackageMerge object) {
+ return computeStereotypes(object) + "<<merge>>";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseElement(Element object) {
+ return computeStereotypes(object);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseSubstitution(Substitution object) {
+ return computeStereotypes(object) + "<<substitue>>";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseInstanceSpecification(InstanceSpecification object) {
+ final StringBuilder label = new StringBuilder(caseNamedElement(object));
+
+ if (object.getClassifiers() != null && object.getClassifiers().size() > 0) {
+ label.append(SPACED_COLUMN);
+ final Iterator<Classifier> it = object.getClassifiers().iterator();
+ while (it.hasNext()) {
+ final Classifier classifier = it.next();
+ label.append(doSwitch(classifier).replace("\n", " ")); //$NON-NLS-1$ //$NON-NLS-2$
+ if (it.hasNext()) {
+ label.append(SPACED_COMMA);
+ }
+ }
+ }
+ return label.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseInstanceValue(InstanceValue object) {
+ return LabelServices.INSTANCE.computeUmlLabel(object.getInstance());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
+ return computeStereotypes(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseInterval(Interval object) {
+ final String minLabel = LabelServices.INSTANCE.computeUmlLabel(object.getMin());
+ final String maxLabel = LabelServices.INSTANCE.computeUmlLabel(object.getMax());
+ if (minLabel != null && minLabel.length() > 0 && maxLabel != null && maxLabel.length() > 0) {
+ return OPENING_BRACE + minLabel + " " + maxLabel + CLOSING_BRACE; //$NON-NLS-1$
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLifeline(Lifeline lifeline) {
+ final StringBuilder label = new StringBuilder();
+ if (lifeline.getRepresents() != null && isDependencyDescribed(lifeline)) {
+ for (final NamedElement context : lifeline.getClientDependencies().get(0).getSuppliers()) {
+ label.append(context.getLabel());
+ label.append(SPACED_COLUMN.trim());
+ label.append(SPACED_COLUMN.trim());
+ }
+ label.append(doSwitch(lifeline.getRepresents()));
+ } else if (lifeline.getRepresents() == null && isDependencyDescribed(lifeline)) {
+ for (final NamedElement context : lifeline.getClientDependencies().get(0).getSuppliers()) {
+ label.append(doSwitch(context));
+ }
+ } else if (lifeline.getRepresents() instanceof Property) {
+ // label.append(SPACED_COLUMN);
+ label.append(caseProperty((Property) lifeline.getRepresents()));
+ } else {
+ label.append(caseNamedElement(lifeline));
+ }
+ return label.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLiteralBoolean(LiteralBoolean object) {
+ return object.stringValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLiteralInteger(LiteralInteger object) {
+ return object.stringValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLiteralNull(LiteralNull object) {
+ return "null"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLiteralReal(LiteralReal object) {
+ return object.stringValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLiteralString(LiteralString object) {
+ return object.stringValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseLiteralUnlimitedNatural(LiteralUnlimitedNatural object) {
+ return object.stringValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseMultiplicityElement(MultiplicityElement object) {
+ return getMultiplicity(object.getLower(), object.getUpper());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseNamedElement(NamedElement object) {
+ if (showQualifiedNameFilter) {
+ return computeStereotypes(object)
+ + (object.getName() == null ? "" : UMLQualifiedNameUtils.getQualifiedName(object, ":")); //$NON-NLS-1$
+ } else {
+ return computeStereotypes(object) + (object.getName() == null ? "" //$NON-NLS-1$
+ : UMLLabelInternationalization.getInstance().getLabel(object, shouldTranslate()));
+ }
+ }
+
+ protected boolean shouldTranslate() {
+ return UMLEditPlugin.INSTANCE.shouldTranslate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseOpaqueExpression(OpaqueExpression object) {
+ final String expr = object.getBodies().get(0);
+ if (expr != null && !"".equalsIgnoreCase(expr) && !"true".equalsIgnoreCase(expr) //$NON-NLS-1$ //$NON-NLS-2$
+ && !"1".equalsIgnoreCase(expr)) { //$NON-NLS-1$
+ return expr;
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseOperation(Operation object) {
+ final StringBuilder label = new StringBuilder(caseNamedElement(object));
+ label.append("("); //$NON-NLS-1$
+
+ boolean first = true;
+ for (final Parameter parameter : object.getOwnedParameters()) {
+ if (!ParameterDirectionKind.RETURN_LITERAL.equals(parameter.getDirection())) {
+ if (!first) {
+ label.append(", "); //$NON-NLS-1$
+ } else {
+ first = false;
+ }
+ label.append(caseTypedElement(parameter));
+ }
+ }
+ label.append(")"); //$NON-NLS-1$
+ if (object.getType() != null) {
+ label.append(SPACED_COLUMN + object.getType().getName());
+ label.append(getMultiplicity(object.getLower(), object.getUpper()));
+ }
+ final StringBuilder operProperties = new StringBuilder();
+ if (object.getRedefinedElements() != null && object.getRedefinedElements().size() > 0
+ && object.getRedefinedElements().get(0) != null) {
+ operProperties.append("redefines " + object.getRedefinedElements().get(0).getName()); //$NON-NLS-1$
+ }
+ if (object.isQuery()) {
+ if (operProperties.length() > 0) {
+ operProperties.append(", "); //$NON-NLS-1$
+ }
+ operProperties.append("query"); //$NON-NLS-1$
+ }
+ if (object.isOrdered()) {
+ if (operProperties.length() > 0) {
+ operProperties.append(", "); //$NON-NLS-1$
+ }
+ operProperties.append("ordered"); //$NON-NLS-1$
+ }
+ if (!object.isUnique()) {
+ if (operProperties.length() > 0) {
+ operProperties.append(", "); //$NON-NLS-1$
+ }
+ operProperties.append("nonunique"); //$NON-NLS-1$
+ }
+ if (operProperties.length() > 0) {
+ label.append("{" + operProperties + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return label.toString();
+
+ }
+
+ @Override
+ public String caseParameter(Parameter object) {
+ final StringBuilder label = new StringBuilder(caseNamedElement(object));
+ return label.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String casePin(Pin object) {
+ final StringBuffer buffer = new StringBuffer();
+ buffer.append(caseTypedElement(object));
+ buffer.append(caseMultiplicityElement(object));
+ return buffer.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String casePort(Port object) {
+ String tilde = ""; //$NON-NLS-1$
+ if (object.isConjugated()) {
+ tilde = "~"; //$NON-NLS-1$
+ }
+ if (object.getType() != null) {
+ return caseNamedElement(object) + SPACED_COLUMN + tilde + object.getType().getName();
+ }
+ return caseNamedElement(object) + SPACED_COLUMN;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseProfile(Profile profile) {
+ return profile.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseProperty(Property property) {
+ if (property != null) {
+ // Qualifier are end properties displayed as bordered node
+ if (!property.getQualifiers().isEmpty()) {
+ String label = ""; //$NON-NLS-1$
+ boolean first = true;
+ for (final Property qualifier : property.getQualifiers()) {
+ if (first) {
+ label += SPACE + computeLabel(qualifier);
+ first = false;
+ } else {
+ label += END_OF_LINE;
+ label += SPACE + computeLabel(qualifier);
+ }
+ }
+ return label;
+ }
+ }
+ return computeLabel(property);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseProtocolStateMachine(ProtocolStateMachine object) {
+ return object.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseSlot(Slot object) {
+
+ final StringBuilder label = new StringBuilder(object.getDefiningFeature().getName());
+ label.append(" = "); //$NON-NLS-1$
+ final List<ValueSpecification> values = object.getValues();
+ boolean first = true;
+ for (final ValueSpecification valueSpecification : values) {
+ if (first) {
+ first = false;
+ } else {
+ label.append(SPACED_COMMA);
+ }
+
+ if (valueSpecification instanceof InstanceValue) {
+ final InstanceValue anInstanceValue = (InstanceValue) valueSpecification;
+ label.append(anInstanceValue.getInstance().getName());
+ } else if (valueSpecification instanceof LiteralString) {
+ final LiteralString aLiteralString = (LiteralString) valueSpecification;
+ label.append(aLiteralString.getValue());
+ } else if (valueSpecification instanceof LiteralInteger) {
+ final LiteralInteger aLiteralInteger = (LiteralInteger) valueSpecification;
+ label.append(aLiteralInteger.getValue());
+ } else if (valueSpecification instanceof LiteralBoolean) {
+ final LiteralBoolean aLiteralBoolean = (LiteralBoolean) valueSpecification;
+ label.append(aLiteralBoolean.booleanValue());
+ } else {
+ label.append(valueSpecification.getName());
+ }
+ }
+ return label.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseStateMachine(StateMachine object) {
+ return computeStereotypes(object) + OPEN_QUOTE_MARK + "StateMachine" + CLOSE_QUOTE_MARK + caseBehavior(object); //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseStereotype(Stereotype stereotype) {
+ final String name = stereotype.getName();
+ final String profileName = stereotype.containingProfile().getName();
+ return profileName + " :: " + name; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseStructuralFeature(StructuralFeature object) {
+ return caseTypedElement(object) + " " + caseMultiplicityElement(object); //$NON-NLS-1$
+ }
+
+ @Override
+ public String caseTemplateableElement(TemplateableElement object) {
+ final String templateParameters = LabelServices.INSTANCE.getTemplatedParameters(object);
+ if (templateParameters != null) {
+ return computeStereotypes(object) + caseNamedElement((NamedElement) object) + templateParameters;
+ }
+ return caseNamedElement((NamedElement) object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseTemplateBinding(TemplateBinding object) {
+ final List<TemplateParameterSubstitution> parameterSubstitutions = object.getParameterSubstitutions();
+ final StringBuffer binding = new StringBuffer();
+ boolean first = true;
+ for (final TemplateParameterSubstitution parameterSubstitution : parameterSubstitutions) {
+ if (first) {
+ first = false;
+ } else {
+ binding.append(", "); //$NON-NLS-1$
+ }
+ final ParameterableElement formal = parameterSubstitution.getFormal().getDefault();
+ if (formal instanceof NamedElement) {
+ binding.append(((NamedElement) formal).getName() + "->"); //$NON-NLS-1$
+ final ParameterableElement actual = parameterSubstitution.getActual();
+ if (actual != null && actual instanceof NamedElement) {
+ binding.append(((NamedElement) actual).getName());
+ } else {
+ binding.append("?"); //$NON-NLS-1$
+ }
+ }
+ }
+ return computeStereotypes(object) + binding.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseTimeExpression(TimeExpression object) {
+ return object.stringValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseTransition(Transition object) {
+ // {trigger ','}* [guard] /behavior_spec
+ // Triggers
+ String triggersLabel = null;
+ if (object.getTriggers() != null && object.getTriggers().size() > 0) {
+ for (final Trigger trigger : object.getTriggers()) {
+ if (triggersLabel != null) {
+ triggersLabel += ","; //$NON-NLS-1$
+ } else {
+ triggersLabel = "";
+ }
+ triggersLabel += LabelServices.INSTANCE.computeUmlLabel(trigger);
+ }
+ }
+ // Guard
+ String guardLabel = null;
+ final Constraint constraint = object.getGuard();
+ if (constraint != null) {
+ final ValueSpecification specification = constraint.getSpecification();
+
+ if (specification != null) {
+ final String specificationLabel = LabelServices.INSTANCE.computeUmlLabel(specification);
+ if (specificationLabel != null && specificationLabel.length() > 0) {
+ guardLabel = OPENING_BRACE + specificationLabel + CLOSING_BRACE;
+ }
+ }
+ }
+
+ // Behavior spec
+ String effectLabel = null;
+ final Behavior effect = object.getEffect();
+ if (effect != null) {
+ final String behaviorLabel = LabelServices.INSTANCE.computeUmlLabel(effect);
+ if (behaviorLabel != null) {
+ effectLabel = "/" + behaviorLabel; //$NON-NLS-1$
+ }
+ }
+
+ final StringBuffer transitionLabel = new StringBuffer();
+ if (triggersLabel != null && triggersLabel.length() > 0) {
+ transitionLabel.append(triggersLabel);
+ }
+ if (guardLabel != null && guardLabel.length() > 0) {
+ transitionLabel.append(guardLabel);
+ }
+ if (effectLabel != null && effectLabel.length() > 0) {
+ transitionLabel.append(effectLabel);
+ }
+
+ return computeStereotypes(object) + transitionLabel.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseTypedElement(TypedElement object) {
+ if (object.getType() != null) {
+ return caseNamedElement(object) + SPACED_COLUMN + object.getType().getName();
+ }
+ return caseNamedElement(object) + SPACED_COLUMN;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String caseUsage(org.eclipse.uml2.uml.Usage object) {
+ return computeStereotypes(object) + "<<use>>"; //$NON-NLS-1$
+ }
+
+ /**
+ * Compute label for a property.
+ *
+ * @param object property
+ * @return label
+ */
+ private String computeLabel(Property object) {
+ if (object.eContainer() instanceof Property
+ && object.eContainmentFeature().getFeatureID() == UMLPackage.PROPERTY__QUALIFIER) {
+ return computeQualifierLabel(object);
+ }
+ return computePropertyLabel(object);
+
+ }
+
+ private String computePropertyLabel(Property object) {
+ final StringBuilder label = new StringBuilder();
+
+ if (object.isDerived()) {
+ label.append("/"); //$NON-NLS-1$
+ }
+ label.append(caseStructuralFeature(object));
+ if (object.getDefault() != null && !"".equals(object.getDefault().trim())) { //$NON-NLS-1$
+ // is the label on multiple lines ?
+ if (object.getDefault().contains(NL)) {
+ label.append(" = ..."); //$NON-NLS-1$
+ } else {
+ label.append(" = " + object.getDefault()); //$NON-NLS-1$
+ }
+ } else if (object.getDefaultValue() instanceof InstanceValue) {
+ label.append(" = " + ((InstanceValue) object.getDefaultValue()).getName()); //$NON-NLS-1$
+ }
+
+ final StringBuilder propertyModifier = new StringBuilder();
+ if (object.getRedefinedElements() != null && object.getRedefinedElements().size() > 0
+ && object.getRedefinedElements().get(0) != null) {
+ String parentName = null;
+ if (object.getRedefinedElements().get(0).eContainer() instanceof NamedElement) {
+ final NamedElement elem = (NamedElement) object.getRedefinedElements().get(0).eContainer();
+ parentName = elem.getName();
+ }
+ String redefPropertyname = object.getRedefinedElements().get(0).getName();
+ if (parentName != null && !parentName.isEmpty()) {
+ redefPropertyname = parentName + "::" + object.getRedefinedElements().get(0).getName(); //$NON-NLS-1$
+ }
+ propertyModifier.append("redefines " + redefPropertyname); //$NON-NLS-1$
+ }
+ if (object.getSubsettedProperties() != null && object.getSubsettedProperties().size() > 0
+ && object.getSubsettedProperties().get(0) != null) {
+ String parentName = null;
+ if (object.getSubsettedProperties().get(0).eContainer() instanceof NamedElement) {
+ final NamedElement elem = (NamedElement) object.getSubsettedProperties().get(0).eContainer();
+ parentName = elem.getName();
+ }
+ String subsetPropertyname = object.getSubsettedProperties().get(0).getName();
+ if (parentName != null && !parentName.isEmpty()) {
+ subsetPropertyname = parentName + "::" + object.getSubsettedProperties().get(0).getName(); //$NON-NLS-1$
+ }
+ propertyModifier.append("subsets " + subsetPropertyname); //$NON-NLS-1$
+ }
+ if (object.isID()) {
+ if (propertyModifier.length() > 0) {
+ propertyModifier.append(", "); //$NON-NLS-1$
+ }
+ propertyModifier.append("id"); //$NON-NLS-1$
+ }
+ if (object.isReadOnly()) {
+ if (propertyModifier.length() > 0) {
+ propertyModifier.append(", "); //$NON-NLS-1$
+ }
+ propertyModifier.append("readOnly"); //$NON-NLS-1$
+ }
+ // Ordered applies on multivalued multiplicity only
+ if (object.getUpper() != 1 && object.isOrdered()) {
+ if (propertyModifier.length() > 0) {
+ propertyModifier.append(", "); //$NON-NLS-1$
+ }
+ propertyModifier.append("ordered"); //$NON-NLS-1$
+ }
+ // Unique applies on multivalued multiplicity only
+ if (object.getUpper() != 1 && object.isUnique()) {
+ if (propertyModifier.length() > 0) {
+ propertyModifier.append(", "); //$NON-NLS-1$
+ }
+ propertyModifier.append("unique"); //$NON-NLS-1$
+ }
+ if (!object.isUnique() && object.isOrdered()) {
+ if (propertyModifier.length() > 0) {
+ propertyModifier.append(", "); //$NON-NLS-1$
+ }
+ propertyModifier.append("seq"); //$NON-NLS-1$
+ }
+ if (propertyModifier.length() > 0) {
+ label.append("{" + propertyModifier + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return label.toString();
+ }
+
+ private String computeQualifierLabel(Property object) {
+ if (object.getType() != null) {
+ return caseNamedElement(object) + SPACED_COLUMN + object.getType().getName();
+ }
+ return caseNamedElement(object);
+ }
+
+ /**
+ * Compute label for association end.
+ *
+ * @param p the {@link Association}'s {@link Property} end.
+ * @return the label of the association end.
+ */
+ public String getAssociationEndLabel(Property p) {
+ final StringBuilder sb = new StringBuilder(""); //$NON-NLS-1$
+ if (p.isDerived()) {
+ sb.append("/"); //$NON-NLS-1$
+ }
+ if (p.getName() != null) {
+ sb.append("+ " + p.getName());
+ }
+ sb.append(caseMultiplicityElement(p));
+ return sb.toString();
+ }
+
+ /**
+ * Get multiplicity.
+ *
+ * @param lower Lower bound
+ * @param upper Upper bound
+ * @return Multiplicity
+ */
+ private String getMultiplicity(int lower, int upper) {
+ final StringBuffer label = new StringBuffer();
+ if (lower == upper) {
+ // [1..1]
+ label.append("[" + lower + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (lower == 0 && upper == -1) {
+ // [0..*]
+ label.append("[*]"); //$NON-NLS-1$
+ } else {
+ label.append(OPENING_BRACE + lower + ".."); //$NON-NLS-1$
+ if (upper == -1) {
+ label.append("*]"); //$NON-NLS-1$
+ } else {
+ label.append(upper + CLOSING_BRACE);
+ }
+ }
+ return label.toString();
+ }
+
+ /**
+ * Test if a context dependency is added to the lifeline.
+ *
+ * @param lifeline the lifeline
+ * @return true if any
+ */
+ private boolean isDependencyDescribed(Lifeline lifeline) {
+ return lifeline.getClientDependencies() != null && lifeline.getClientDependencies().size() > 0
+ && lifeline.getClientDependencies().get(0) != null
+ && lifeline.getClientDependencies().get(0).getSuppliers().size() > 0;
+ }
+
+ public static void setStereotypeFilter(boolean filterValue) {
+ showStereotypeFilter = filterValue;
+ }
+
+ public static void setQualifiedNameFilter(boolean filterValue) {
+ showQualifiedNameFilter = filterValue;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/EditLabelSwitch.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/EditLabelSwitch.java
new file mode 100755
index 0000000..e16cc8e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/EditLabelSwitch.java
@@ -0,0 +1,767 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.ClassifierTemplateParameter;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DataStoreNode;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.FunctionBehavior;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.ParameterableElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.ProtocolStateMachine;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.TemplateBinding;
+import org.eclipse.uml2.uml.TemplateParameter;
+import org.eclipse.uml2.uml.TemplateParameterSubstitution;
+import org.eclipse.uml2.uml.TemplateSignature;
+import org.eclipse.uml2.uml.TemplateableElement;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.util.UMLSwitch;
+
+/**
+ * A switch that handle the label edition for each UML types.
+ *
+ */
+public class EditLabelSwitch extends UMLSwitch<Element> implements ILabelConstants {
+ /**
+ * Create new classifier template parameter.
+ *
+ * @param context
+ * Context
+ * @param templateSignature
+ * Template signature
+ * @param newTemplateClassName
+ * Template class name
+ * @return New Classifier template parameter
+ */
+ private static ClassifierTemplateParameter createNewClassifierTemplateParameter(TemplateSignature templateSignature, String newTemplateClassName) {
+ final ClassifierTemplateParameter result = UMLFactory.eINSTANCE.createClassifierTemplateParameter();
+ final Class newGenericClass = UMLFactory.eINSTANCE.createClass();
+ newGenericClass.setName(newTemplateClassName);
+ result.setOwnedDefault(newGenericClass);
+ result.setParameteredElement(newGenericClass);
+
+ templateSignature.getOwnedParameters().add(result);
+ return result;
+ }
+
+ /**
+ * The raw label content edited by the user.
+ */
+ private String editedLabelContent;
+
+ @Override
+ public Element caseActivity(Activity object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseActivityEdge(ActivityEdge object) {
+ ValueSpecification expr = object.getGuard();
+ if (expr == null || expr instanceof LiteralBoolean) {
+ expr = UMLFactory.eINSTANCE.createOpaqueExpression();
+ expr.setName(object.getName() + GUARD_SUFFIX);
+ object.setGuard(expr);
+ }
+
+ if (editedLabelContent.matches("\\[.*\\]")) { //$NON-NLS-1$
+ // Remove the first & last bracket character.
+ editedLabelContent = editedLabelContent.substring(1, editedLabelContent.length() - 1);
+ }
+
+ if (expr instanceof OpaqueExpression) {
+ ((OpaqueExpression) expr).getBodies().clear();
+ ((OpaqueExpression) expr).getBodies().add(editedLabelContent);
+ }
+
+ return caseNamedElement(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseAssociation(Association object) {
+ /**
+ * Nothing to do the label direct edit is done by the edit part provider
+ * {@see #UMLEditPartProvider}
+ */
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseBehaviorExecutionSpecification(BehaviorExecutionSpecification execution) {
+ // Edit execution
+ caseExecutionSpecification(execution);
+ // Edit opaque behavior
+ final Behavior behavior = execution.getBehavior();
+ LabelServices.INSTANCE.editUmlLabel(behavior, editedLabelContent);
+ // Edit operation
+ final Operation operation = (Operation) behavior.getSpecification();
+ LabelServices.INSTANCE.editUmlLabel(operation, editedLabelContent);
+ return execution;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseClass(Class object) {
+
+ editedLabelContent = parseInputLabel(object, editedLabelContent);
+ return caseNamedElement(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseComment(Comment comment) {
+ comment.setBody(editedLabelContent);
+ return comment;
+ }
+
+ @Override
+ public Element caseConstraint(Constraint object) {
+ // this case was implemlented for transition direct edit from
+ // StateMachineDiagram
+ setEditedLabelContent(editedLabelContent);
+ doSwitch(object.getSpecification());
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseDataStoreNode(DataStoreNode object) {
+ editedLabelContent = editedLabelContent.replaceFirst("(<<Datastore>>|\u00ABDatastore\u00BB)\\s*", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return caseNamedElement(object);
+ }
+
+ @Override
+ public Element caseEnumerationLiteral(EnumerationLiteral object) {
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseExecutionOccurrenceSpecification(ExecutionOccurrenceSpecification occurence) {
+ if (occurence.equals(occurence.getExecution().getStart())) {
+ occurence.setName(editedLabelContent + START_SUFFIX);
+ } else if (occurence.equals(occurence.getExecution().getFinish())) {
+ occurence.setName(editedLabelContent + FINISH_SUFFIX);
+ } else {
+ occurence.setName(editedLabelContent);
+ }
+ return occurence;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseExecutionSpecification(ExecutionSpecification execution) {
+ // Edit execution name
+ execution.setName(editedLabelContent);
+ // Edit start execution name
+ execution.getStart().setName(editedLabelContent + START_SUFFIX);
+ // Edit finish execution name
+ execution.getFinish().setName(editedLabelContent + FINISH_SUFFIX);
+ // Edit message if exists
+ if (execution.getStart() instanceof MessageOccurrenceSpecification) {
+ LabelServices.INSTANCE.editUmlLabel(((MessageOccurrenceSpecification) execution.getStart()).getMessage(), editedLabelContent);
+ }
+ return execution;
+ }
+
+ @Override
+ public Element caseFunctionBehavior(FunctionBehavior object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ @Override
+ public Element caseInteraction(Interaction object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseLifeline(Lifeline lifeline) {
+ final int indexOfColon = editedLabelContent.indexOf(":"); //$NON-NLS-1$
+ if (indexOfColon > 0) {
+ editedLabelContent.substring(0, indexOfColon);
+ editedLabelContent.substring(indexOfColon + 1, // $NON-NLS-1$
+ editedLabelContent.length()).trim();
+ }
+ // Edit lifeline name
+ caseNamedElement(lifeline);
+
+ // Edit property
+ final ConnectableElement represents = lifeline.getRepresents();
+ if (represents instanceof Property) {
+ caseProperty((Property) represents);
+ }
+
+ return lifeline;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseMessage(Message message) {
+ // Edit message name
+ message.setName(editedLabelContent);
+ // Edit message send
+ LabelServices.INSTANCE.editUmlLabel(message.getSendEvent(), editedLabelContent);
+ // Edit message receive
+ LabelServices.INSTANCE.editUmlLabel(message.getReceiveEvent(), editedLabelContent);
+ return message;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseMessageOccurrenceSpecification(MessageOccurrenceSpecification occurence) {
+ if (occurence.equals(occurence.getMessage().getSendEvent())) {
+ occurence.setName(editedLabelContent + SENDER_SUFFIX);
+ } else if (occurence.equals(occurence.getMessage().getReceiveEvent())) {
+ occurence.setName(editedLabelContent + RECEIVER_SUFFIX);
+ } else {
+ occurence.setName(editedLabelContent);
+ }
+ return occurence;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseNamedElement(NamedElement object) {
+ // FIXME We should detect the stereotype brackets instead of trying to
+ // replace the generated label
+ // that might have been modified...
+ final String stereotype = DisplayLabelSwitch.computeStereotypes(object);
+ if (stereotype != null && !"".equals(stereotype)) { //$NON-NLS-1$
+ editedLabelContent = editedLabelContent.replace(stereotype, ""); //$NON-NLS-1$
+ }
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ @Override
+ public Element caseOpaqueBehavior(OpaqueBehavior object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ @Override
+ public Element caseOpaqueExpression(OpaqueExpression object) {
+ // This case was implemented in the case of direct editing of transition
+ // in StateMachineDiagram
+ object.getBodies().clear();
+ object.getBodies().add(editedLabelContent);
+
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseOperation(Operation object) {
+ OperationServices.INSTANCE.parseInputLabel(object, editedLabelContent);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseProperty(Property object) {
+ PropertyServices.INSTANCE.parseInputLabel(object, editedLabelContent);
+ return object;
+ }
+
+ @Override
+ public Element caseProtocolStateMachine(ProtocolStateMachine object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseRegion(Region region) {
+ // Name of a region is in the form "OwnerName : RegionName"
+ final int pos = editedLabelContent.indexOf(":"); //$NON-NLS-1$
+ if (pos > -1) {
+ final String ownerName = editedLabelContent.substring(0, pos).trim();
+ if (region.getOwner() instanceof NamedElement) {
+ ((NamedElement) region.getOwner()).setName(ownerName);
+ }
+ region.setName(editedLabelContent.substring(pos + 1).trim());
+ } else {
+ region.setName(editedLabelContent.trim());
+ }
+
+ return region;
+ }
+
+ /**
+ * Case Role.
+ *
+ * @param property
+ * Property
+ */
+ public void caseRole(Property property) {
+ /*
+ * We need to find roles names, end user might type: "aRoleName"
+ * "aRoleName - aRoleName " aRoleName[cardinality]
+ */
+ String escapedLabel = editedLabelContent;
+ if (editedLabelContent.indexOf('/') > -1) {
+ // should be derived
+ escapedLabel.replace('/', ' ');
+ property.setIsDerived(true);
+ } else {
+ property.setIsDerived(false);
+ }
+ escapedLabel = escapedLabel.trim();
+ // multiplicity
+ if (escapedLabel.indexOf('[') > -1) {
+ final String endOfMul = escapedLabel.substring(escapedLabel.indexOf('[') + 1);
+ escapedLabel = escapedLabel.substring(0, escapedLabel.indexOf('['));
+ escapedLabel = escapedLabel.trim();
+ // lower bound
+ int lowerBound = property.getLower();
+ int upperBound = property.getUpper();
+ if (endOfMul.indexOf(']') > -1) {
+ final String mulInter = endOfMul.substring(0, endOfMul.indexOf(']')).trim();
+ if ("*".equals(mulInter)) { //$NON-NLS-1$
+ lowerBound = 0;
+ upperBound = -1;
+ } else {
+ if (mulInter.length() > 0) {
+ if (mulInter.indexOf("..") > -1) { //$NON-NLS-1$
+ final String low = mulInter.substring(0, mulInter.indexOf("..")).trim(); //$NON-NLS-1$
+ if (low.length() > 0) {
+ lowerBound = Integer.valueOf(low).intValue();
+ }
+ final String up = mulInter.substring(mulInter.indexOf("..") + 2).trim(); //$NON-NLS-1$
+ if (up.length() > 0) {
+ if ("*".equals(up)) { //$NON-NLS-1$
+ upperBound = -1;
+ } else {
+ upperBound = Integer.valueOf(up).intValue();
+ }
+ }
+ } else {
+ final int singleBound = Integer.valueOf(mulInter).intValue();
+ lowerBound = singleBound;
+ upperBound = singleBound;
+ }
+
+ }
+ }
+ }
+ property.setLower(lowerBound);
+ property.setUpper(upperBound);
+ }
+ property.setName(escapedLabel);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseSlot(Slot slot) {
+ for (final ValueSpecification value : slot.getValues()) {
+ if (value instanceof InstanceValue) {
+ caseInstanceValue((InstanceValue) value);
+ } else if (value instanceof LiteralInteger) {
+ caseLiteralInteger((LiteralInteger) value);
+ } else if (value instanceof LiteralBoolean) {
+ caseLiteralBoolean((LiteralBoolean) value);
+ } else if (value instanceof LiteralString) {
+ caseLiteralString((LiteralString) value);
+ }
+ }
+ return slot;
+ }
+
+ @Override
+ public Element caseStateMachine(StateMachine object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ @Override
+ public Element caseTemplateableElement(TemplateableElement object) {
+ editedLabelContent = parseInputLabel(object, editedLabelContent);
+ return super.caseTemplateableElement(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseTemplateBinding(TemplateBinding object) {
+ TemplateBindingServices.INSTANCE.parseInputLabel(object, editedLabelContent);
+ editedLabelContent = new DisplayLabelSwitch().doSwitch(object);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseTransition(Transition object) {
+ final String newLabel = editedLabelContent;
+
+ // Edit guard if not exist create it
+ editTransitionGuard(object, newLabel);
+
+ // Edit behaviorExpression if not exist create it
+ editTransitionBehaviorExpression(object, newLabel);
+
+ // Edit triggers if not exist create it
+ editTransitionTrigger(object, newLabel);
+ return object;
+ }
+
+ @Override
+ public Element caseTrigger(Trigger object) {
+ // Implemented for direct edit Transition
+ object.setName(editedLabelContent);
+ return object;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Element caseTypedElement(TypedElement object) {
+ final String[] splittedLabel = editedLabelContent.split("\\s*:\\s*"); //$NON-NLS-1$
+
+ if (splittedLabel.length == 1) {
+ return caseNamedElement(object);
+ }
+ object.setName(splittedLabel[0]);
+ // TODO retrieve and set the element type
+ return object;
+ }
+
+ private void editTransitionBehaviorExpression(Transition object, String newLabel) {
+ final int behaviorStartIndex = newLabel.lastIndexOf("/");//$NON-NLS-1$
+
+ if (behaviorStartIndex != -1) {
+ int guardEndIndex = -1;
+ if (newLabel.matches(".*\\[.*\\].*")) {//$NON-NLS-1$
+ guardEndIndex = newLabel.lastIndexOf("]");//$NON-NLS-1$
+ }
+ if (behaviorStartIndex > guardEndIndex) { // to be sure "/" is not
+ // in guard
+ final String behaviorLabelContent = newLabel.substring(behaviorStartIndex + 1);
+ if (!behaviorLabelContent.isEmpty()) {// no change if string is
+ // empty
+ Behavior effect = object.getEffect();
+ if (effect == null) {
+ effect = UMLFactory.eINSTANCE.createOpaqueBehavior();
+ object.setEffect(effect);
+ }
+ setEditedLabelContent(behaviorLabelContent);
+ doSwitch(effect);
+ }
+ }
+ } else {
+ if (object.getEffect() != null) {
+ object.getEffect().destroy();
+ }
+ }
+
+ }
+
+ private void editTransitionGuard(Transition object, String newLabel) {
+ final int guardStartIndex = newLabel.indexOf("[");//$NON-NLS-1$
+
+ if (newLabel.matches(".*\\[.*\\].*")) { //$NON-NLS-1$
+ String editedGuardLabelContent = newLabel;
+ final int guardEndIndex = editedGuardLabelContent.lastIndexOf("]");//$NON-NLS-1$
+ editedGuardLabelContent = editedGuardLabelContent.substring(guardStartIndex + 1, guardEndIndex);
+ if (!editedGuardLabelContent.isEmpty()) {// no change if string is
+ // empty
+ OpaqueExpression expr;
+ Constraint constraint = object.getGuard();
+ if (constraint == null) {
+ // Create new constraint
+ constraint = UMLFactory.eINSTANCE.createConstraint();
+ constraint.setName(object.getName() + "_transition"); //$NON-NLS-1$
+ // With opaque expression
+ expr = UMLFactory.eINSTANCE.createOpaqueExpression();
+ expr.setName(object.getName() + GUARD_SUFFIX);
+ constraint.setSpecification(expr);
+ object.setGuard(constraint);
+ }
+ setEditedLabelContent(editedGuardLabelContent);
+ doSwitch(constraint);
+ }
+ } else {
+ // Check a guard was removed from model
+ if (object.getGuard() != null) {
+ // Delete constaint and sub elements
+ object.getGuard().destroy();
+ }
+ }
+ }
+
+ private void editTransitionTrigger(Transition object, String newLabel) {
+ final int guardStartIndex = newLabel.indexOf("[");//$NON-NLS-1$
+ final int behaviorStartIndex = newLabel.lastIndexOf("/");//$NON-NLS-1$
+
+ // Find trigger part label
+ int triggerEndIndex = -1;
+ if (behaviorStartIndex >= 0 && guardStartIndex >= 0) {
+ triggerEndIndex = guardStartIndex;
+ if (guardStartIndex > behaviorStartIndex) {
+ triggerEndIndex = behaviorStartIndex;
+ }
+ } else if (behaviorStartIndex != -1) { // String don't start with
+ // behaviorExpression
+ triggerEndIndex = behaviorStartIndex;
+ } else if (guardStartIndex != -1) {// String don't start with guard
+ triggerEndIndex = guardStartIndex;
+ } else {// String don't have guard or behavior expression
+ triggerEndIndex = newLabel.length();
+ }
+ // Get a list of trigger labels
+ final List<String> triggersLabels = new ArrayList<String>();
+
+ if (!newLabel.isEmpty() && triggerEndIndex > 0) {
+ final String triggerEditedLabel = newLabel.substring(0, triggerEndIndex);
+
+ // String[] triggersLabels = {triggerEditedLabel};
+ if (triggerEditedLabel.contains(",")) {//$NON-NLS-1$
+ triggersLabels.addAll(Arrays.asList(triggerEditedLabel.split(",")));//$NON-NLS-1$
+ } else {
+ triggersLabels.add(triggerEditedLabel);
+ }
+ }
+
+ // For each label edit trigger
+ if (triggersLabels.size() > 0) {
+ // Find existing trigger
+ final List<String> existingTriggersNames = new ArrayList<String>();
+ for (final Trigger trigger : object.getTriggers()) {
+ existingTriggersNames.add(trigger.getName());
+ }
+ // Find trigger to create and trigger to delete
+ final List<String> toBeCreated = new ArrayList<String>();
+ for (final String label : triggersLabels) {
+ if (existingTriggersNames.contains(label.trim())) {
+ existingTriggersNames.remove(label.trim());
+ } else {
+ toBeCreated.add(label.trim());
+ }
+ }
+ // delete no not found trigger
+ for (final String label : existingTriggersNames) {
+ object.getTrigger(label).destroy();
+ }
+ // Create and add new trigger to transition
+ for (final String label : toBeCreated) {
+ final Trigger trigger = UMLFactory.eINSTANCE.createTrigger();
+ object.getTriggers().add(trigger);
+ setEditedLabelContent(label.trim());
+ doSwitch(trigger);
+ }
+
+ } else {
+ // remove all triggers
+ final EList<Trigger> triggers = object.getTriggers();
+ if (triggers.size() > 0) {
+ for (final Trigger trigger : triggers) {
+ trigger.destroy();
+ }
+ }
+ }
+ }
+
+ /**
+ * Parse the edited label content and update the underlying {@link Class}.
+ *
+ * @param aTemplateableElement
+ * the context {@link Class} object.
+ * @param inputLabel
+ * the user edited label content.
+ * @return Class name
+ */
+ private String parseInputLabel(org.eclipse.uml2.uml.TemplateableElement aTemplateableElement, String inputLabel) {
+ String result = inputLabel;
+ final String validLabel = "[a-zA-Z_0-9]+((\\s)*<[a-zA-Z_0-9]+(,(\\s)*[a-zA-Z_0-9]+)*>)?"; //$NON-NLS-1$
+ final String templatedLabel = "[a-zA-Z_0-9]+((\\s)*<[a-zA-Z_0-9]+(,(\\s)*[a-zA-Z_0-9]+)*>)"; //$NON-NLS-1$
+
+ if (inputLabel.matches(validLabel)) {
+ if (inputLabel.matches(templatedLabel) && aTemplateableElement instanceof Classifier) {
+ final String[] splittedLabel = inputLabel.split("(\\s)*<"); //$NON-NLS-1$
+ result = splittedLabel[0].trim();
+
+ // rename the template parameter
+ final String templateSignatureLabel = splittedLabel[1].replace(">", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ final String[] templateParamLabels = templateSignatureLabel.split(",(\\s)*"); //$NON-NLS-1$
+ TemplateSignature templateSignature = aTemplateableElement.getOwnedTemplateSignature();
+ if (templateSignature == null) {
+ // create a template signature
+ templateSignature = aTemplateableElement.createOwnedTemplateSignature();
+ }
+ final List<TemplateParameter> templateParameters = templateSignature.getOwnedParameters();
+ for (int i = 0; i < templateParamLabels.length; i++) {
+ final String templateParamLabel = templateParamLabels[i].trim();
+ try {
+ final TemplateParameter templateParameter = templateParameters.get(i);
+ if (templateParameter.getParameteredElement() instanceof NamedElement) {
+ ((NamedElement) templateParameter.getParameteredElement()).setName(templateParamLabel);
+ }
+ } catch (final IndexOutOfBoundsException e) {
+ final TemplateParameter createNewClassifierTemplateParameter;
+ createNewClassifierTemplateParameter = createNewClassifierTemplateParameter(templateSignature, templateParamLabel);
+ final Session sess = SessionManager.INSTANCE.getSession(templateSignature);
+ final Collection<Setting> inverseReferences = sess.getSemanticCrossReferencer().getInverseReferences(templateSignature);
+ for (final Setting setting : inverseReferences) {
+ if (setting.getEObject() instanceof TemplateBinding) {
+ final TemplateBinding templateBinding = (TemplateBinding) setting.getEObject();
+ final TemplateParameterSubstitution templateParameterSubstitution = templateBinding.createParameterSubstitution();
+ templateParameterSubstitution.setFormal(createNewClassifierTemplateParameter);
+ }
+ }
+ }
+ }
+ while (templateParamLabels.length < templateParameters.size()) {
+ // remove related binding
+ final TemplateParameter templateParameterToRemove = templateParameters.get(templateParameters.size() - 1);
+ final Session sess = SessionManager.INSTANCE.getSession(templateParameterToRemove);
+ final Collection<Setting> inverseReferences = sess.getSemanticCrossReferencer().getInverseReferences(templateParameterToRemove);
+ for (final Setting setting : inverseReferences) {
+ if (setting.getEObject() instanceof TemplateParameterSubstitution) {
+ TemplateParameterSubstitution templateParameterSubstitution = (TemplateParameterSubstitution) setting.getEObject();
+ final TemplateBinding templateBinding = templateParameterSubstitution.getTemplateBinding();
+ templateBinding.getParameterSubstitutions().remove(templateParameterSubstitution);
+ templateParameterSubstitution = null;
+ }
+ }
+ templateSignature.getParameters().remove(templateParameterToRemove);
+ }
+ } else {
+ final TemplateSignature templateSignature = aTemplateableElement.getOwnedTemplateSignature();
+ if (templateSignature != null) {
+
+ // delete templateBinding
+ final Session sess = SessionManager.INSTANCE.getSession(templateSignature);
+ final Collection<Setting> inverseReferences = sess.getSemanticCrossReferencer().getInverseReferences(templateSignature);
+ for (final Setting setting : inverseReferences) {
+ if (setting.getEObject() instanceof TemplateBinding) {
+ final TemplateBinding templateBinding = (TemplateBinding) setting.getEObject();
+ templateBinding.getParameterSubstitutions().clear();
+ templateBinding.setSignature(null);
+ final TemplateableElement boundElement = templateBinding.getBoundElement();
+ boundElement.setOwnedTemplateSignature(null);
+ boundElement.getTemplateBindings().clear();
+ }
+ }
+
+ // delete templateSignature and templateParameter
+ templateSignature.getParameters().clear();
+ templateSignature.getOwnedParameters().clear();
+ ((ParameterableElement) aTemplateableElement).setTemplateParameter(null);
+ aTemplateableElement.setOwnedTemplateSignature(null);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Set edited label content.
+ *
+ * @param editedLabelContent
+ * Label content
+ */
+ public void setEditedLabelContent(String editedLabelContent) {
+ this.editedLabelContent = editedLabelContent;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/ElementServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/ElementServices.java
new file mode 100755
index 0000000..41ca4cc
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/ElementServices.java
@@ -0,0 +1,347 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+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.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.UMLResource;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Services to handle typed Element concerns.
+ *
+ */
+public class ElementServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final ElementServices INSTANCE = new ElementServices();
+
+ /**
+ * Scenario element name prefix.
+ */
+ private static final String SCENARIO_PREFIX = "Scenario_"; //$NON-NLS-1$
+
+ /**
+ * Operation element name prefix.
+ */
+ private static final String OPERATION_PREFIX = "Operation_"; //$NON-NLS-1$
+
+ /**
+ * Hidden constructor.
+ */
+ private ElementServices() {
+
+ }
+
+ /**
+ * Iterate over the given {@link Collection} of root elements to find a
+ * {@link Type} element with the given name.
+ *
+ * @param roots
+ * the elements to inspect
+ * @param typeName
+ * the name to match
+ * @return the found {@link Type} or <code>null</code>
+ */
+ public Type findTypeByName(Collection<EObject> roots, String typeName) {
+ for (final EObject root : roots) {
+ final Type result = findTypeByNameFrom(root, typeName);
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Find a {@link Type} element that match the given name in the ResourceSet
+ * of the given element.
+ *
+ * @param object
+ * the object for which to find a corresponding type.
+ * @param typeName
+ * the type name to match.
+ * @return the found {@link Type} element or <code>null</code>
+ */
+ public Type findTypeByName(EObject object, String typeName) {
+ final Type result = findTypeByName(getAllRootsInResourceSet(object), typeName);
+ return result;
+ }
+
+ /**
+ * Iterate over the root children to find a {@link Type} element with the
+ * given name.
+ *
+ * @param root
+ * the root object to iterate.
+ * @param typeName
+ * the name to match
+ * @return the found {@link Type} or <code>null</code>
+ */
+ private Type findTypeByNameFrom(EObject root, String typeName) {
+ if (root instanceof Type && nameMatches((Type) root, typeName)) {
+ return (Type) root;
+ }
+
+ for (final Iterator<EObject> i = root.eAllContents(); i.hasNext();) {
+ final EObject obj = i.next();
+ if (obj instanceof Type && nameMatches((Type) obj, typeName)) {
+ return (Type) obj;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Retrieves all the root elements of the resource in the resource set of
+ * the given context object.
+ *
+ * @param context
+ * the context object on which to execute this service.
+ * @return a {@link Collection} of all the root element of the current
+ * resource set.
+ */
+ private Collection<EObject> getAllRootsInResourceSet(EObject context) {
+ final Resource res = context.eResource();
+ if (res != null && res.getResourceSet() != null) {
+ final Collection<EObject> roots = new ArrayList<EObject>();
+ for (final Resource childRes : res.getResourceSet().getResources()) {
+ roots.addAll(childRes.getContents());
+ }
+ return roots;
+ }
+ return Collections.emptySet();
+ }
+
+ /**
+ * Get all root elements of the current session.
+ *
+ * @param any
+ * The element to retrieve a session
+ * @return root elements
+ */
+ public Collection<Element> getAllRootsInSession(EObject any) {
+ final Session session = SessionManager.INSTANCE.getSession(any);
+ final Collection<Element> roots = Lists.newArrayList();
+ if (session != null) {
+ for (final Resource childRes : session.getSemanticResources()) {
+ for (final EObject root : childRes.getContents()) {
+ if (root instanceof Element) {
+ roots.add((Element) root);
+ }
+ }
+ }
+ }
+ return roots;
+ }
+
+ /**
+ * Get the namespace associated to a named element.
+ *
+ * @param element
+ * Named element
+ * @return Namespace, if the element is a model or a profile the namespace
+ * is itself
+ */
+ public Namespace getNamespace(NamedElement element) {
+ if (element instanceof Model || element instanceof Profile) {
+ return (Namespace) element;
+ }
+ return element.getNamespace();
+ }
+
+ /**
+ * Parse the edited package to find the name of the new interaction.
+ *
+ * @param pkg
+ * the container {@link Package} object.
+ * @return Name for new interaction.
+ */
+ public String getNewInteractionName(EObject pkg) {
+ final StringBuffer name = new StringBuffer(SCENARIO_PREFIX);
+ name.append(getNumberOfElements(((Package) pkg).getPackagedElements(), SCENARIO_PREFIX));
+ return name.toString();
+ }
+
+ /**
+ * Parse the edited class to find the name of the new operation.
+ *
+ * @param type
+ * the container {@link org.eclipse.uml2.uml.Type} object.
+ * @return New operation name
+ */
+ public String getNewOperationName(org.eclipse.uml2.uml.Type type) {
+ String name = ""; //$NON-NLS-1$
+ List<Operation> operations = null;
+ if (type instanceof Class) {
+ operations = ((Class) type).getOperations();
+ } else if (type instanceof Interface) {
+ operations = ((Interface) type).getOperations();
+ } else if (type instanceof Component) {
+ operations = ((Component) type).getOperations();
+ } else if (type instanceof DataType) {
+ operations = ((DataType) type).getOperations();
+ }
+ if (operations != null) {
+ name = OPERATION_PREFIX + (operations.size() + 1);
+ }
+ return name;
+ }
+
+ /**
+ * Search the index of the last created element.
+ *
+ * @param elements
+ * List of elements.
+ * @param prefix
+ * Prefix defining the index
+ * @return The index to use for a new element
+ */
+ @SuppressWarnings("rawtypes")
+ private int getNumberOfElements(List elements, String prefix) {
+ int lastUsedIndex = -1;
+ for (final Object element : elements) {
+ final String name = ((NamedElement) element).getName();
+ if (name != null && name.startsWith(prefix)) {
+ final int index = Integer.valueOf(name.substring(name.lastIndexOf("_") + 1)).intValue(); //$NON-NLS-1$
+ if (index > lastUsedIndex) {
+ lastUsedIndex = index;
+ }
+ }
+ }
+
+ return lastUsedIndex + 1;
+ }
+
+ /**
+ * Import the package containing default Ecore primitive types.
+ *
+ * @param element
+ * Named element
+ */
+ public void importEcorePrimitiveTypes(NamedElement element) {
+ ElementServices.INSTANCE.importPrimitiveTypes(element, UMLResource.ECORE_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Import the package containing default Java primitive types.
+ *
+ * @param element
+ * Named element
+ */
+ public void importJavaPrimitiveTypes(NamedElement element) {
+ ElementServices.INSTANCE.importPrimitiveTypes(element, UMLResource.JAVA_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Loads & import library into the {@link Namespace}.
+ *
+ * @param element
+ * Named element
+ * @param libraryUri
+ * the URI of the library to load.
+ */
+ public void importPrimitiveTypes(NamedElement element, String libraryUri) {
+ //VL : not sure this step is required. but keeping it shouldn't break the Papyrus behavior
+ final Namespace namespace = getNamespace(element);
+ final ResourceSet resourceSet = namespace.eResource().getResourceSet();
+ final Resource resource = resourceSet.getResource(URI.createURI(libraryUri), true);
+ // Add the resource to the session's semantic resources
+ final Session session = SessionManager.INSTANCE.getSession(namespace);
+ if (session != null) {
+ session.addSemanticResource(resource.getURI(), new NullProgressMonitor());
+ }
+ final Package root = (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE);
+ // We check if a package import already exists
+ if (!namespace.getImportedPackages().contains(root)) {
+ namespace.createPackageImport(root);
+ }
+ }
+
+ /**
+ * Import the package containing default UML primitive types.
+ *
+ * @param element
+ * Named element
+ */
+ public void importUmlPrimitiveTypes(NamedElement element) {
+ ElementServices.INSTANCE.importPrimitiveTypes(element, UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Import the package containing default XML primitive types.
+ *
+ * @param element
+ * Named element
+ */
+ public void importXmlPrimitiveTypes(NamedElement element) {
+ ElementServices.INSTANCE.importPrimitiveTypes(element, UMLResource.XML_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Check if an element is a component.
+ *
+ * @param element
+ * Element
+ * @return True if element is an instance of component
+ */
+ public boolean isComponent(EObject element) {
+ return element instanceof Component;
+ }
+
+ /**
+ * Check if the given element's name match the given String.
+ *
+ * @param namedElt
+ * the {@link NamedElement} to check.
+ * @param name
+ * the name to match.
+ * @return <code>true</code> if the name match, <code>false</code>
+ * otherwise.
+ */
+ private boolean nameMatches(NamedElement namedElt, String name) {
+ if (namedElt != null && namedElt.getName() != null && name != null) {
+ return namedElt.getName().trim().equalsIgnoreCase(name.trim());
+ }
+ return false;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/FilterService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/FilterService.java
new file mode 100755
index 0000000..ce5ec12
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/FilterService.java
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.description.filter.FilterDescription;
+
+/**
+ * Service to manage filters.
+ *
+ */
+public final class FilterService {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final FilterService INSTANCE = new FilterService();
+
+ /**
+ * Hidden constructor.
+ */
+ private FilterService() {
+ }
+
+ public boolean isBenpointFilterActivated(DDiagram diagram) {
+ for (FilterDescription filter : diagram.getActivatedFilters()) {
+ if (filter.getName().equals("Show Bendpoint")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isStereotypeFilterActivated(DDiagram diagram) {
+ for (FilterDescription filter : diagram.getActivatedFilters()) {
+ if (filter.getName().equals("Show Stereotypes")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isQualifiedNameFilterActivated(DDiagram diagram) {
+ for (FilterDescription filter : diagram.getActivatedFilters()) {
+ if (filter.getName().equals("Show Qualified Names")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/ILabelConstants.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/ILabelConstants.java
new file mode 100755
index 0000000..aad5891
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/ILabelConstants.java
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+/**
+ * Describes the common label constants.
+ *
+ */
+public interface ILabelConstants {
+
+ /**
+ * New line constant.
+ */
+ public static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ /**
+ * Open quote mark.
+ */
+ public static final String OPEN_QUOTE_MARK = "\u00AB"; //$NON-NLS-1$
+
+ /**
+ * Close quote mark.
+ */
+ public static final String CLOSE_QUOTE_MARK = "\u00BB"; //$NON-NLS-1$
+
+ /**
+ * Receiver element name suffix.
+ */
+ public static final String RECEIVER_SUFFIX = "_receiver"; //$NON-NLS-1$
+
+ /**
+ * Sender element name suffix.
+ */
+ public static final String SENDER_SUFFIX = "_sender"; //$NON-NLS-1$
+
+ /**
+ * Finish element name suffix.
+ */
+ public static final String FINISH_SUFFIX = "_finish"; //$NON-NLS-1$
+
+ /**
+ * Start element name suffix.
+ */
+ public static final String START_SUFFIX = "_start"; //$NON-NLS-1$
+
+ /**
+ * The guard suffix constant.
+ */
+ public static final String GUARD_SUFFIX = "_guard"; //$NON-NLS-1$
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/LabelServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/LabelServices.java
new file mode 100755
index 0000000..329bf35
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/LabelServices.java
@@ -0,0 +1,400 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.List;
+
+import javax.swing.event.ChangeEvent;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.ActivityFinalNode;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.CallEvent;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.DataStoreNode;
+import org.eclipse.uml2.uml.DecisionNode;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Event;
+import org.eclipse.uml2.uml.FinalState;
+import org.eclipse.uml2.uml.FlowFinalNode;
+import org.eclipse.uml2.uml.ForkNode;
+import org.eclipse.uml2.uml.InitialNode;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.JoinNode;
+import org.eclipse.uml2.uml.MergeNode;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.ParameterableElement;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.eclipse.uml2.uml.SignalEvent;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.TemplateParameter;
+import org.eclipse.uml2.uml.TemplateSignature;
+import org.eclipse.uml2.uml.TemplateableElement;
+import org.eclipse.uml2.uml.TimeEvent;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Manage the diagram elements' labels.
+ *
+ */
+public class LabelServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final LabelServices INSTANCE = new LabelServices();
+
+ /**
+ * Space constant.
+ */
+ private static final String SPACE = " "; //$NON-NLS-1$
+
+ /**
+ * Sequence diagram element name suffix.
+ */
+ private static final String SEQUENCE_DIAGRAM_SUFFIX = "sequence diagram"; //$NON-NLS-1$
+
+ /**
+ * Hidden constructor.
+ */
+ private LabelServices() {
+
+ }
+
+ /**
+ * Compute the label of the given association.
+ *
+ * @param association
+ * the {@link Association} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeAssociationBeginLabel(Association association) {
+ return computeAssociationEndLabel(AssociationServices.INSTANCE.getSource(association));
+ }
+
+ /**
+ * Compute the label of the given association.
+ *
+ * @param association
+ * the {@link Association} for which to retrieve a label.
+ * @param view
+ * the edge for which to retrieve the source.
+ * @return the computed label.
+ */
+ public String computeAssociationBeginLabel(Association association, DDiagramElement view) {
+ final Property sourceEnd = AssociationServices.INSTANCE.getSourceEndAssociation(association, view);
+ if (sourceEnd != null) {
+ final DisplayLabelSwitch displayLabel = new DisplayLabelSwitch();
+ return displayLabel.getAssociationEndLabel(sourceEnd);
+ }
+ return null;
+ }
+
+ /**
+ * Compute the label of the given association.
+ *
+ * @param association
+ * the {@link Association} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeAssociationEndLabel(Association association) {
+ return computeAssociationEndLabel(AssociationServices.INSTANCE.getTarget(association));
+ }
+
+ /**
+ * Compute the label of the given property with mutiplicity and such.
+ *
+ * @param p
+ * the {@link Property} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeAssociationEndLabel(Property p) {
+ final DisplayLabelSwitch displayLabel = new DisplayLabelSwitch();
+ return displayLabel.getAssociationEndLabel(p);
+ }
+
+ /**
+ * Compute default name.
+ *
+ * @param element
+ * New element
+ * @return Name for the new element, he name will looks like
+ * 'ElementType'+total of existing elements of the same type.
+ */
+ public String computeDefaultName(final EObject element) {
+ if (element instanceof NamedElement) {
+ if (((NamedElement) element).getName() != null) {
+ return ((NamedElement) element).getName();
+ }
+ }
+
+ Predicate<EObject> predicate = null;
+ String name = element.getClass().getSimpleName();
+ name = name.substring(0, name.indexOf("Impl")); //$NON-NLS-1$
+ predicate = new Predicate<EObject>() {
+ public boolean apply(EObject input) {
+ return input.getClass().getName().equals(element.getClass().getName());
+ }
+ };
+ if (element instanceof AssociationClass) {
+ name = "AssociationClass"; //$NON-NLS-1$
+ }
+ else if (element instanceof InstanceSpecification) {
+ name = "InstanceSpecification"; //$NON-NLS-1$
+ }
+ else if (element instanceof InitialNode) {
+ name = "Initial"; //$NON-NLS-1$
+ } else if (element instanceof DecisionNode) {
+ name = "Decision"; //$NON-NLS-1$
+ } else if (element instanceof ActivityFinalNode) {
+ name = "ActivityFinal"; //$NON-NLS-1$
+ } else if (element instanceof StateMachine) {
+ name = "StateMachine"; //$NON-NLS-1$
+ } else if (element instanceof FlowFinalNode) {
+ name = "FlowFinal"; //$NON-NLS-1$
+ } else if (element instanceof MergeNode) {
+ name = "Merge"; //$NON-NLS-1$
+ } else if (element instanceof JoinNode) {
+ name = "Join"; //$NON-NLS-1$
+ } else if (element instanceof DataStoreNode) {
+ name = "DataStore"; //$NON-NLS-1$
+ } else if (element instanceof ActivityParameterNode) {
+ name = "Parameter"; //$NON-NLS-1$
+ } else if (element instanceof ForkNode) {
+ name = "Fork"; //$NON-NLS-1$
+ } else if (element instanceof EnumerationLiteral) {
+ name = "Literal"; //$NON-NLS-1$
+ } else if (element instanceof Port) {
+ name = "port"; //$NON-NLS-1$
+ } else if (element instanceof Property) {
+ if (element.eContainingFeature().getFeatureID() == UMLPackage.PROPERTY__QUALIFIER) {
+ name = "qualifier"; //$NON-NLS-1$
+ } else {
+ name = "property"; //$NON-NLS-1$
+ }
+ } else if (element instanceof FinalState) {
+ name = "Final"; //$NON-NLS-1$
+ } else if (element instanceof Pseudostate) {
+ final String kind = ((Pseudostate) element).getKind().getLiteral();
+ name = Character.toUpperCase(kind.charAt(0)) + kind.substring(1);
+ } else if (element instanceof Association) {
+ final String end1 = ((Association) element).getOwnedEnds().get(0).getName();
+ final String end2 = ((Association) element).getOwnedEnds().get(1).getName();
+ return end1 + "To" + Character.toUpperCase(end2.charAt(0)) + end2.substring(1); //$NON-NLS-1$
+ } else if (element instanceof InstanceSpecification) {
+ predicate = new Predicate<EObject>() {
+ public boolean apply(EObject input) {
+ return input instanceof InstanceSpecification;
+ }
+ };
+ name = "anObject"; //$NON-NLS-1$
+ final List<Classifier> classifiers = ((InstanceSpecification) element).getClassifiers();
+ if (!classifiers.isEmpty()) {
+ final String classifierName = classifiers.get(0).getName();
+ if (classifierName != null && classifierName.length() > 0) {
+ if (startWithVowel(classifierName)) {
+ name = "an"; //$NON-NLS-1$
+ } else {
+ name = "a"; //$NON-NLS-1$
+ }
+ name += classifierName;
+ }
+ }
+ } else if (element instanceof AcceptEventAction) {
+ final AcceptEventAction acceptEventAction = (AcceptEventAction) element;
+ final List<Trigger> triggers = acceptEventAction.getTriggers();
+ if (triggers.size() > 0) {
+ final Trigger trigger = triggers.get(0);
+ final Event event = trigger.getEvent();
+ if (event instanceof TimeEvent) {
+ name = "TimeEventAction"; //$NON-NLS-1$
+ } else if (event instanceof SignalEvent) {
+ name = "SignalEventAction"; //$NON-NLS-1$
+ } else if (event instanceof CallEvent) {
+ name = "CallEventAction"; //$NON-NLS-1$
+ } else if (event instanceof ChangeEvent) {
+ name = "AcceptEventAction"; //$NON-NLS-1$
+ }
+ }
+ }
+
+ final List<EObject> existingElements = Lists.newArrayList(Iterables.filter(element.eContainer().eContents(), predicate));
+
+ return name + existingElements.size();
+ }
+
+ /**
+ * Compute the label of the given element.
+ *
+ * @param element
+ * the {@link Element} for which to retrieve a label.
+ * @return the computed label.
+ */
+ public String computeUmlLabel(Element element) {
+ final DisplayLabelSwitch displayLabel = new DisplayLabelSwitch();
+ if (element != null) {
+ return displayLabel.doSwitch(element);
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String slotLabel(Slot slot) {
+ if (slot.getDefiningFeature()!= null) {
+ slot.getDefiningFeature().getName();
+ } else {
+ return "<UNDEFINED>";
+ }
+ return null;
+ }
+
+
+ /**
+ * @param bound
+ * @return
+ */
+ public String convertBound(int bound) {
+ if (bound == -1) {
+ return "*"; //$NON-NLS-1$
+ }
+ return String.valueOf(bound);
+ }
+
+ /**
+ * {@link String} to {@link Integer} bound conversion.
+ *
+ * @param bound
+ * string description
+ * @return converted integer or <code>null</code> in case of
+ * {@link NumberFormatException}.
+ */
+ public int convertBound(String bound) {
+ if ("*".equals(bound)) { //$NON-NLS-1$
+ return -1;
+ }
+ try {
+ return new Integer(bound).intValue();
+ } catch (final NumberFormatException e) {
+ return Integer.MAX_VALUE;
+ }
+ }
+
+ /**
+ * Parse the edited label string and update the underlying context
+ * {@link Element}.
+ *
+ * @param context
+ * the context object on which to execute this service.
+ * @param editedLabelContent
+ * the content entered by the user.
+ * @return the context {@link Element}
+ */
+ public Element editUmlLabel(Element context, String editedLabelContent) {
+ final EditLabelSwitch editLabel = new EditLabelSwitch();
+ editLabel.setEditedLabelContent(editedLabelContent);
+ return editLabel.doSwitch(context);
+ }
+
+ /**
+ * Get sequence diagram label.
+ *
+ * @param interaction
+ * Interaction associated to sequence diagram
+ * @return Sequence diagram label
+ */
+ public String getSequenceDiagramName(Interaction interaction) {
+ return interaction.getName() + SPACE + SEQUENCE_DIAGRAM_SUFFIX;
+ }
+
+ /**
+ * Get sequence diagram label.
+ *
+ * @param pkg
+ * Package associated to sequence diagram
+ * @return Sequence diagram label
+ */
+ public String getSequenceDiagramName(org.eclipse.uml2.uml.Package pkg) {
+ return ElementServices.INSTANCE.getNewInteractionName(pkg) + SPACE + SEQUENCE_DIAGRAM_SUFFIX;
+ }
+
+ /**
+ * Get templated parameters.
+ *
+ * @param object
+ * TemplateableElement
+ * @return Templated parameter
+ */
+ public String getTemplatedParameters(TemplateableElement object) {
+ final TemplateSignature ownedTemplateSignature = object.getOwnedTemplateSignature();
+ final StringBuffer templateParameters = new StringBuffer();
+ if (ownedTemplateSignature != null) {
+ final List<TemplateParameter> ownedTemplateParameters = ownedTemplateSignature.getOwnedParameters();
+ boolean first = true;
+ for (final TemplateParameter templateParameter : ownedTemplateParameters) {
+ if (first) {
+ first = false;
+ } else {
+ templateParameters.append(", "); //$NON-NLS-1$
+ }
+ final ParameterableElement parameterableElement = templateParameter.getOwnedDefault();
+ if (parameterableElement instanceof NamedElement) {
+ final NamedElement classTempate = (NamedElement) parameterableElement;
+ templateParameters.append(classTempate.getName());
+ }
+ }
+ return " <" + templateParameters + ">"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return null;
+ }
+
+ /**
+ * Return true if a named element has a name set otherwise false
+ *
+ * @param element
+ * @return True if the name is not null or empty
+ */
+ public boolean isNameNotSet(final Element element) {
+ final String label = computeUmlLabel(element);
+ return label == null || label.isEmpty();
+ }
+
+ private boolean startWithVowel(String str) {
+ boolean result = false;
+ if (str != null && str.length() > 0) {
+ final char[] vowels = new char[] { 'a', 'e', 'i', 'o', 'u' };
+ for (final char vowel : vowels) {
+ if (str.startsWith(Character.toString(vowel)) || str.startsWith(Character.toString(vowel).toUpperCase())) {
+ result = true;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/NameAndType.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/NameAndType.java
new file mode 100755
index 0000000..1524311
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/NameAndType.java
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Utility class used to handle information about a name and a type.
+ *
+ */
+public class NameAndType {
+ /**
+ * The name.
+ */
+ private final String name;
+
+ /**
+ * The type.
+ */
+ private final Type type;
+
+ /**
+ * Constructor.
+ *
+ * @param name
+ * the name.
+ * @param type
+ * the type.
+ */
+ public NameAndType(String name, Type type) {
+ this.name = name;
+ this.type = type;
+ }
+
+ /**
+ * Get name.
+ *
+ * @return Name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Get type.
+ *
+ * @return Type
+ */
+ public Type getType() {
+ return type;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/NodeInverseRefsServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/NodeInverseRefsServices.java
new file mode 100755
index 0000000..009fe94
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/NodeInverseRefsServices.java
@@ -0,0 +1,193 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.viewpoint.DSemanticDecorator;
+import org.eclipse.uml2.common.util.DerivedUnionEObjectEList;
+import org.eclipse.uml2.uml.Property;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Sets;
+
+/**
+ * Utilities to manage node inverse references.
+ *
+ */
+public class NodeInverseRefsServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final NodeInverseRefsServices INSTANCE = new NodeInverseRefsServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private NodeInverseRefsServices() {
+
+ }
+
+ /**
+ * Retrieve the cross references of the association of all the UML elements displayed as node in a
+ * Diagram. Note that a Property cross reference will lead to retrieve the cross references of this
+ * property.
+ *
+ * @param diagram
+ * a diagram.
+ * @return the list of cross reference of the given
+ */
+ public Collection<EObject> getAssociationInverseRefs(DDiagram diagram) {
+ return getNodeInverseRefs(diagram, "Association"); //$NON-NLS-1$
+ }
+
+ /**
+ * Retrieve the cross references of the given type of all the UML elements displayed as node in a Diagram.
+ * Note that a Property cross reference will lead to retrieve the cross references of this property.
+ *
+ * @param diagram
+ * a diagram.
+ * @param typeName
+ * the expected type.
+ * @return the list of cross reference of the given
+ */
+ @SuppressWarnings("unchecked")
+ public Collection<EObject> getNodeInverseRefs(DDiagram diagram, String typeName) {
+ final Set<EObject> result = Sets.newLinkedHashSet();
+ if (diagram instanceof DSemanticDecorator) {
+ final Session sess = SessionManager.INSTANCE
+ .getSession(((DSemanticDecorator)diagram).getTarget());
+
+ final Iterator<EObject> it = Iterators.transform(
+ Iterators.filter(diagram.eAllContents(), AbstractDNode.class),
+ new Function<AbstractDNode, EObject>() {
+
+ public EObject apply(AbstractDNode input) {
+ return input.getTarget();
+ }
+ });
+ while (it.hasNext()) {
+ final EObject displayedAsANode = it.next();
+ if (displayedAsANode != null) {
+ for (final Setting xRef : sess.getSemanticCrossReferencer()
+ .getInverseReferences(displayedAsANode)) {
+ final EObject eObject = xRef.getEObject();
+
+ if (xRef instanceof DerivedUnionEObjectEList) {
+ for (final EObject eObject2 : (List<EObject>)xRef) {
+ if (sess.getModelAccessor().eInstanceOf(eObject2, typeName)) {
+ result.add(eObject2);
+ }
+ }
+ }
+ if (sess.getModelAccessor().eInstanceOf(eObject, typeName)) {
+ result.add(eObject);
+ }
+ /*
+ * In the case of an association the real interesting object is the association linked
+ * to the Property and not the direct cross reference.
+ */
+ if (eObject instanceof Property) {
+ if (((Property)eObject).getAssociation() != null) {
+ if (sess.getModelAccessor().eInstanceOf(((Property)eObject).getAssociation(),
+ typeName)) {
+ result.add(((Property)eObject).getAssociation());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Retrieve the cross references of the given type of all the UML elements displayed as node in a Diagram.
+ * Note that a Property cross reference will lead to retrieve the cross references of this property.
+ *
+ * @param containerView
+ * a diagram.
+ * @param typeName
+ * the expected type.
+ * @return the list of cross reference of the given
+ */
+ public Collection<EObject> getNodeInverseRefs(DDiagramElement containerView, String typeName) {
+ final Set<EObject> result = Sets.newLinkedHashSet();
+ final Session sess = SessionManager.INSTANCE.getSession(containerView.getTarget());
+
+ final Iterator<EObject> it = Iterators.transform(
+ Iterators.filter(containerView.eAllContents(), AbstractDNode.class),
+ new Function<AbstractDNode, EObject>() {
+
+ public EObject apply(AbstractDNode input) {
+ return input.getTarget();
+ }
+ });
+ while (it.hasNext()) {
+ final EObject displayedAsANode = it.next();
+ if (displayedAsANode != null) {
+ for (final Setting xRef : sess.getSemanticCrossReferencer()
+ .getInverseReferences(displayedAsANode)) {
+ final EObject eObject = xRef.getEObject();
+ if (sess.getModelAccessor().eInstanceOf(eObject, typeName)) {
+ result.add(eObject);
+ }
+ /*
+ * In the case of an association the real interesting object is the association linked to
+ * the Property and not the direct cross reference.
+ */
+ if (eObject instanceof Property) {
+ if (((Property)eObject).getAssociation() != null) {
+ if (sess.getModelAccessor().eInstanceOf(((Property)eObject).getAssociation(),
+ typeName)) {
+ result.add(((Property)eObject).getAssociation());
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Retrieve the cross references of the template binding of all the UML elements displayed as node in a
+ * Diagram. Note that a Property cross reference will lead to retrieve the cross references of this
+ * property.
+ *
+ * @param diagram
+ * a diagram.
+ * @return the list of cross reference of the given
+ */
+ public Collection<EObject> getTemplateBindingInverseRefs(DDiagram diagram) {
+ return getNodeInverseRefs(diagram, "TemplateBinding"); //$NON-NLS-1$
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/OperationServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/OperationServices.java
new file mode 100755
index 0000000..adf3776
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/OperationServices.java
@@ -0,0 +1,343 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Services to handle typed Element concerns.
+ *
+ */
+public class OperationServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final OperationServices INSTANCE = new OperationServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private OperationServices() {
+
+ }
+
+ /**
+ * Create a new input {@link Parameter}.
+ *
+ * @param name
+ * the parameter name.
+ * @param type
+ * the parameter type.
+ * @return the new {@link Parameter}.
+ */
+ private Parameter createInputParameter(String name, Type type) {
+ final Parameter param = UMLFactory.eINSTANCE.createParameter();
+ param.setDirection(ParameterDirectionKind.IN_LITERAL);
+ param.setName(name);
+ param.setType(type);
+ return param;
+ }
+
+ /**
+ * Create an operation in a class.
+ *
+ * @param type
+ * the container {@link org.eclipse.uml2.uml.Type} element
+ * @return New operation
+ */
+ public Operation createOperation(org.eclipse.uml2.uml.Type type) {
+ // Create new operation
+ final String name = ElementServices.INSTANCE.getNewOperationName(type);
+ Operation operation = null;
+ if (type instanceof org.eclipse.uml2.uml.Class) {
+ operation = ((org.eclipse.uml2.uml.Class) type).createOwnedOperation(name, null, null, null);
+ } else if (type instanceof Interface) {
+ operation = ((Interface) type).createOwnedOperation(name, null, null, null);
+ } else if (type instanceof Component) {
+ operation = ((Component) type).createOwnedOperation(name, null, null, null);
+ } else if (type instanceof DataType) {
+ operation = ((DataType) type).createOwnedOperation(name, null, null, null);
+ }
+ return operation;
+ }
+
+ /**
+ * Update the {@link Operation} multiplicity.
+ *
+ * @param operation
+ * the context {@link Operation} object.
+ * @param lowerBound
+ * the lower bound user content
+ * @param upperBound
+ * the upper bound user content
+ */
+ private void handleMultiplicity(Operation operation, String lowerBound, String upperBound) {
+ final int lower = LabelServices.INSTANCE.convertBound(lowerBound);
+ final int upper = LabelServices.INSTANCE.convertBound(upperBound);
+
+ if (lower != Integer.MAX_VALUE && upper != Integer.MAX_VALUE && (lower <= upper || upper == -1)) {
+ if (lower == -1) {
+ operation.setLower(0);
+ } else {
+ operation.setLower(lower);
+ }
+ operation.setUpper(upper);
+ }
+ }
+
+ /**
+ * Update the given {@link Operation} with the given parameter descriptions.
+ *
+ * @param operation
+ * the context {@link Operation} to update.
+ * @param paramsToBeCreated
+ * the parsed parameter informations.
+ */
+ private void handleParameters(Operation operation, List<NameAndType> paramsToBeCreated) {
+ // Keep only the non-return params and detach them from the operation
+ // (only temporarily for some of
+ // them)
+ final List<Parameter> existingParams = new ArrayList<Parameter>(operation.getOwnedParameters());
+ final List<Parameter> existingNonReturnParams = new ArrayList<Parameter>();
+ for (final Parameter parameter : existingParams) {
+ if (!ParameterDirectionKind.RETURN_LITERAL.equals(parameter.getDirection())) {
+ parameter.getOperation().getOwnedParameters().remove(parameter);
+ existingNonReturnParams.add(parameter);
+ }
+ }
+
+ // We keep the new parameters in an array
+ // because we're going to build them in random order
+ final Parameter[] tabParameters = new Parameter[paramsToBeCreated.size()];
+ final boolean[] tabMarkers = new boolean[paramsToBeCreated.size()];
+
+ // First pass, we try to reuse parameters with the same name
+ for (int i = 0; i < paramsToBeCreated.size(); i++) {
+ final NameAndType paramInfo = paramsToBeCreated.get(i);
+ final String newName = paramInfo.getName();
+
+ // If a parameter with the same name already existed we reuse it
+ for (int j = 0; j < existingNonReturnParams.size(); j++) {
+ final Parameter existingParam = existingNonReturnParams.get(j);
+ final String oldName = existingParam.getName();
+ if (newName == null && oldName == null || newName != null && newName.equalsIgnoreCase(oldName)) {
+ tabParameters[i] = existingNonReturnParams.remove(j);
+ updateType(tabParameters[i], paramInfo.getType());
+ tabMarkers[i] = true;
+ break;
+ }
+ }
+ }
+
+ // Second pass, we reuse the old params in their order of appearance
+ for (int i = 0; i < paramsToBeCreated.size(); i++) {
+ if (!tabMarkers[i]) {
+ final NameAndType paramInfo = paramsToBeCreated.get(i);
+
+ if (existingNonReturnParams.isEmpty()) {
+ // We create a new parameter
+ tabParameters[i] = createInputParameter(paramInfo.getName(), paramInfo.getType());
+ } else {
+ // We reuse an old parameter
+ tabParameters[i] = existingNonReturnParams.remove(0);
+ tabParameters[i].setName(paramInfo.getName());
+ updateType(tabParameters[i], paramInfo.getType());
+ }
+ }
+ }
+
+ // Third, we delete the unused old parameters
+ for (final Parameter unusedParam : existingNonReturnParams) {
+ EcoreUtil.delete(unusedParam);
+ }
+
+ // Fourth; we re-attach the remaining parameters to the operation
+ for (final Parameter remainingParam : tabParameters) {
+ operation.getOwnedParameters().add(remainingParam);
+ }
+ }
+
+ /**
+ * Parse the edited label content for parameters part and update the
+ * underlying {@link Operation}.
+ *
+ * @param operation
+ * the context {@link Operation} object.
+ * @param parametersInfo
+ * the user edited label content for parameters.
+ */
+ private void handleParameters(Operation operation, String parametersInfo) {
+ // Regexp used to extract name and type from a string as "name : type"
+ // or "name" or ":type"
+ final Pattern ptnParam = Pattern.compile("^([^:]*)\\s*:?\\s*(.*)$"); //$NON-NLS-1$
+
+ // Used to store the name and types of the parameters we'll have to
+ // create
+ final List<NameAndType> paramsToBeCreated = new ArrayList<NameAndType>();
+
+ // Let's compile information on the parameters
+ if (parametersInfo != null && !"".equals(parametersInfo.trim())) { //$NON-NLS-1$
+ final String[] paramInfos = parametersInfo.split("\\s*,\\s*"); //$NON-NLS-1$
+ for (int i = 0; i < paramInfos.length; i++) {
+ final String paramInfo = paramInfos[i];
+ final Matcher mtchParam = ptnParam.matcher(paramInfo);
+ if (mtchParam.find()) {
+ final String name = mtchParam.group(1).trim();
+ final String typeName = mtchParam.group(2).trim();
+ Type foundType = null;
+
+ if (typeName != null && !"".equals(typeName)) { //$NON-NLS-1$
+ foundType = ElementServices.INSTANCE.findTypeByName(operation, typeName);
+ }
+
+ paramsToBeCreated.add(new NameAndType(name, foundType));
+ }
+ }
+ }
+ handleParameters(operation, paramsToBeCreated);
+ }
+
+ /**
+ * Update the return type of the given {@link Operation}.
+ *
+ * @param operation
+ * the context {@link Operation} to update.
+ * @param returnTypeName
+ * the name of {@link Operation}'s return type.
+ */
+ private void handleReturnType(Operation operation, String returnTypeName) {
+ // Search the type and sets it on the property if found
+ if (returnTypeName != null && !"".equals(returnTypeName)) { //$NON-NLS-1$
+ if (operation.getType() == null || !returnTypeName.equalsIgnoreCase(operation.getType().getName())) {
+ final Type foundType = ElementServices.INSTANCE.findTypeByName(operation, returnTypeName);
+ if (foundType != null) {
+ operation.setType(foundType);
+ }
+ }
+ } else {
+ operation.setType(null);
+ }
+ }
+
+ /**
+ * Parse the edited label content and update the underlying
+ * {@link Operation}.
+ *
+ * @param operation
+ * the context {@link Operation} object.
+ * @param inputLabel
+ * the user edited label content.
+ */
+ public void parseInputLabel(Operation operation, String inputLabel) {
+ // The discriminating parts in the label are :
+ // - name of the operation
+ // - list of parameters between parens
+ // - a ":" preceding the return type
+ // original regexp = ^([^(]*)\(?([^)]*)\)?\s*:([^)]*)$
+ final Pattern ptnWithType = Pattern.compile("^([^(]*)\\(?([^)]*)\\)?\\s*:([^)]*)$"); //$NON-NLS-1$
+ final Matcher mtchWithType = ptnWithType.matcher(inputLabel.trim());
+
+ boolean matchFound = false;
+ boolean typeWasSpecified = false;
+
+ String name = null;
+ String parametersInfo = null;
+ String returnType = null;
+
+ if (mtchWithType.find()) {
+ matchFound = true;
+ typeWasSpecified = true;
+
+ name = mtchWithType.group(1).trim();
+ parametersInfo = mtchWithType.group(2).trim();
+ returnType = mtchWithType.group(3).trim();
+ final Pattern ptnTypeInfo = Pattern.compile("^(.*)\\[\\s*((\\S+)\\s*\\.\\.)?\\s*(\\S+)\\s*\\]$"); //$NON-NLS-1$
+ final Matcher mtchTypeInfo = ptnTypeInfo.matcher(returnType);
+
+ if (mtchTypeInfo.find()) {
+ final String lowerBound = mtchTypeInfo.group(3);
+ final String upperBound = mtchTypeInfo.group(4);
+
+ // Checking validity of bounds
+ // "-1" and "*" can't be used as a lower bound
+ // "0" can't be used as a upper bound
+ if ((lowerBound == null || lowerBound.matches("^[0-9]+$")) //$NON-NLS-1$
+ && upperBound.matches("^[1-9][0-9]*|\\*|-1$")) { //$NON-NLS-1$
+ // Handling multiplicity
+ if (lowerBound == null || "".equals(lowerBound)) { //$NON-NLS-1$
+ handleMultiplicity(operation, upperBound, upperBound);
+ } else {
+ handleMultiplicity(operation, lowerBound, upperBound);
+ }
+ }
+ }
+
+ } else {
+ // The pattern with an explicit return type did not match
+ // Let's assume the user did not specify the return type
+ final Pattern ptnWithoutType = Pattern.compile("^([^(]*)\\(?([^)]*)\\)?"); //$NON-NLS-1$
+ final Matcher mtchWithoutType = ptnWithoutType.matcher(inputLabel.trim());
+ if (mtchWithoutType.find()) {
+ matchFound = true;
+ typeWasSpecified = false;
+ name = mtchWithoutType.group(1).trim();
+ parametersInfo = mtchWithoutType.group(2).trim();
+ }
+ }
+
+ if (matchFound) {
+ // Sets the name of the operation
+ operation.setName(name);
+
+ // Handle parameters
+ handleParameters(operation, parametersInfo);
+
+ // Handle the return type if it has been specified
+ if (typeWasSpecified) {
+ handleReturnType(operation, returnType);
+ }
+ }
+ }
+
+ /**
+ * Update the parameter with the given type.
+ *
+ * @param param
+ * the parameter to update.
+ * @param type
+ * the type to set.
+ */
+ private void updateType(Parameter param, Type type) {
+ if (type == null) {
+ param.setType(null);
+ } else {
+ if (!type.equals(param.getType())) {
+ param.setType(type);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/PropertyServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/PropertyServices.java
new file mode 100755
index 0000000..928c689
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/PropertyServices.java
@@ -0,0 +1,295 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.UMLResource;
+
+/**
+ * Utility services to manage edges direct label edition on properties.
+ *
+ */
+public final class PropertyServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final PropertyServices INSTANCE = new PropertyServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private PropertyServices() {
+ }
+
+ /**
+ * Update the {@link Property} multiplicity.
+ *
+ * @param property
+ * the context {@link Property} object.
+ * @param lowerBound
+ * the lower bound user content
+ * @param upperBound
+ * the upper bound user content
+ */
+ private void handleMultiplicity(Property property, String lowerBound, String upperBound) {
+ final int lower = LabelServices.INSTANCE.convertBound(lowerBound);
+ final int upper = LabelServices.INSTANCE.convertBound(upperBound);
+
+ if (lower != Integer.MAX_VALUE && upper != Integer.MAX_VALUE && (lower <= upper || upper == -1)) {
+ if (lower == -1) {
+ property.setLower(0);
+ } else {
+ property.setLower(lower);
+ }
+ property.setUpper(upper);
+ }
+ }
+
+ /**
+ * Parse the edited label content for the multiplicity & type part and
+ * update the underlying {@link Property}.
+ *
+ * @param property
+ * the context {@link Property} object.
+ * @param typeInfo
+ * the user edited label content for the multiplicity & type
+ * part.
+ */
+ private void handleTypeAndMultiplicity(Property property, String typeInfo) {
+ // Normal expression is
+ // ^(.*)\[\s*((\S+)\s*\.\.)?\s*(\S+)\s*\]$
+ // after doubling the backslashes it becomes
+ final Pattern ptnTypeInfo = Pattern.compile("^(.*)\\[\\s*((\\S+)\\s*\\.\\.)?\\s*(\\S+)\\s*\\]$"); //$NON-NLS-1$
+
+ // it can be read as :
+ // anything from the beginning of the string until a "[" is encountered
+ // then the multiplicity is provided between "[" and "]" characters
+ // in a form like "lower..upper" or "upper"
+ final Matcher mtchTypeInfo = ptnTypeInfo.matcher(typeInfo);
+
+ String typeName = ""; //$NON-NLS-1$
+ if (mtchTypeInfo.find()) {
+ typeName = mtchTypeInfo.group(1);
+ final String lowerBound = mtchTypeInfo.group(3);
+ final String upperBound = mtchTypeInfo.group(4);
+
+ // Checking validity of bounds
+ // "-1" and "*" can't be used as a lower bound
+ // "0" can't be used as a upper bound
+ if ((lowerBound == null || lowerBound.matches("^[0-9]+$")) //$NON-NLS-1$
+ && upperBound.matches("^[1-9][0-9]*|\\*|-1$")) { //$NON-NLS-1$
+ // Handling multiplicity
+ if (lowerBound == null || "".equals(lowerBound)) { //$NON-NLS-1$
+ handleMultiplicity(property, upperBound, upperBound);
+ } else {
+ handleMultiplicity(property, lowerBound, upperBound);
+ }
+ }
+ } else {
+ // only a type name has been provided
+ typeName = typeInfo;
+ }
+
+ // Search the type and sets it on the property if found
+ if (typeName != null && !"".equals(typeName)) { //$NON-NLS-1$
+ Type foundType = ElementServices.INSTANCE.findTypeByName(property, typeName);
+
+ if (foundType == null) {
+ final Namespace namespace = (Namespace) property.eContainer();
+
+ // Register primitive type
+ if (isUmlPrimitiveType(namespace, typeName)) {
+ ElementServices.INSTANCE.importUmlPrimitiveTypes(namespace);
+ } else if (isEcorePrimitiveType(namespace, typeName)) {
+ ElementServices.INSTANCE.importEcorePrimitiveTypes(namespace);
+ } else if (isJavaPrimitiveType(namespace, typeName)) {
+ ElementServices.INSTANCE.importJavaPrimitiveTypes(namespace);
+ } else if (isXmlPrimitiveType(namespace, typeName)) {
+ ElementServices.INSTANCE.importXmlPrimitiveTypes(namespace);
+ }
+
+ // Get the primitive type
+ foundType = ElementServices.INSTANCE.findTypeByName(property, typeName);
+
+ if (foundType == null) {
+ // Create a new class
+ foundType = UMLFactory.eINSTANCE.createClass();
+ foundType.setName(typeName);
+ final Package pkg = property.getOwner().getNearestPackage();
+ pkg.getPackagedElements().add(foundType);
+ }
+ }
+
+ property.setType(foundType);
+
+ }
+ }
+
+ /**
+ * Indicates if a type name is an Ecore primitive type.
+ *
+ * @param namespace
+ * the {@link Namespace} context
+ * @param typeName
+ * Type name
+ * @return True if type name is a primitive type otherwise false
+ */
+ public boolean isEcorePrimitiveType(Namespace namespace, String typeName) {
+ return isPrimitiveType(namespace, typeName, UMLResource.ECORE_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Indicates if a type name is a Java primitive type.
+ *
+ * @param namespace
+ * the {@link Namespace} context
+ * @param typeName
+ * Type name
+ * @return True if type name is a primitive type otherwise false
+ */
+ public boolean isJavaPrimitiveType(Namespace namespace, String typeName) {
+ return isPrimitiveType(namespace, typeName, UMLResource.JAVA_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Indicates if a type name is a primitive type.
+ *
+ * @param namespace
+ * the {@link Namespace} context
+ * @param typeName
+ * Type name
+ * @param libraryUri
+ * the URI of the library to load.
+ * @return True if type name is a primitive type otherwise false
+ */
+ private boolean isPrimitiveType(Namespace namespace, String typeName, String libraryUri) {
+ final ResourceSet resourceSet = namespace.eResource().getResourceSet();
+ final Resource resource = resourceSet.getResource(URI.createURI(libraryUri), true);
+ // Add the resource to the session's semantic resources
+ final Package root = (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE);
+ // Search the type and sets it on the property if found
+ if (typeName != null && !"".equals(typeName)) { //$NON-NLS-1$
+ final Type foundType = ElementServices.INSTANCE.findTypeByName(root, typeName);
+ if (foundType != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Indicates if a type name is a UML primitive type.
+ *
+ * @param namespace
+ * the {@link Namespace} context
+ * @param typeName
+ * Type name
+ * @return True if type name is a primitive type otherwise false
+ */
+ public boolean isUmlPrimitiveType(Namespace namespace, String typeName) {
+ return isPrimitiveType(namespace, typeName, UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Indicates if a type name is an XML primitive type.
+ *
+ * @param namespace
+ * the {@link Namespace} context
+ * @param typeName
+ * Type name
+ * @return True if type name is a primitive type otherwise false
+ */
+ public boolean isXmlPrimitiveType(Namespace namespace, String typeName) {
+ return isPrimitiveType(namespace, typeName, UMLResource.XML_PRIMITIVE_TYPES_LIBRARY_URI);
+ }
+
+ /**
+ * Parse the edited label content and update the underlying {@link Property}
+ * .
+ *
+ * @param property
+ * the context {@link Property} object.
+ * @param inputLabel
+ * the user edited label content.
+ * @return Property name
+ */
+ public String parseInputLabel(Property property, String inputLabel) {
+ // Smart edit multiplicity : x, x y, x..y, [x], [x y], [x..y], x..*,
+ // [x..*], *, [*], -1, [-1]
+ Pattern p = Pattern.compile("\\[?([0-9]*)[ .]*(([0-9 \\* \\-1]*)?)\\]?"); //$NON-NLS-1$
+ Matcher m = p.matcher(inputLabel.trim());
+ if (m.find() && m.group(1) != null && m.group(1).length() > 0 || m.group(2) != null && m.group(2).length() > 0) {
+ final String lower = m.group(1).trim();
+ final String upper = m.group(2).trim();
+ if (upper != null && upper.length() > 0) {
+ if ("*".equals(upper) || "-1".equals(upper)) { //$NON-NLS-1$ //$NON-NLS-2$
+ property.setUpper(-1);
+ property.setLower(0);
+ } else {
+ property.setUpper(Integer.parseInt(upper));
+ }
+ } else if (lower != null && lower.length() > 0) {
+ property.setUpper(Integer.parseInt(lower));
+ }
+
+ if (lower != null && lower.length() > 0) {
+ property.setLower(Integer.parseInt(lower));
+ }
+ }
+ // Other cases
+ else {
+ // The discriminating parts in the label are :
+ // - a "/" at the beginning for a derived property
+ // - a ":" between the name and the type
+ // - a "=" preceding the default value
+ // Between these signs who all are optional one can find any
+ // character
+ p = Pattern.compile("^(/?)([^:]*):?([^=]*)=?(.*)$"); //$NON-NLS-1$
+ m = p.matcher(inputLabel.trim());
+
+ if (m.find()) {
+ final boolean isDerived = m.group(1) != null && !"".equals(m.group(1)); //$NON-NLS-1$
+ property.setIsDerived(isDerived);
+
+ final String name = m.group(2).trim();
+ if (name != null && name.length() > 0) {
+ property.setName(name);
+ }
+
+ final String typeInfo = m.group(3).trim();
+ handleTypeAndMultiplicity(property, typeInfo);
+
+ // Use UML api to manage the default value
+ if (m.group(4) != null && !"".equals(m.group(4))) { //$NON-NLS-1$
+ final String defaultValue = m.group(4).trim();
+ property.setDefault(defaultValue);
+ }
+ return name;
+ }
+ }
+ return property.getName();
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/SemanticElementsSwitch.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/SemanticElementsSwitch.java
new file mode 100755
index 0000000..d47301c
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/SemanticElementsSwitch.java
@@ -0,0 +1,152 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.util.UMLSwitch;
+
+import com.google.common.collect.Lists;
+
+/**
+ * An EMF Switch used to compute the elements related to another one, which should be displayed on the
+ * property view.
+ */
+public class SemanticElementsSwitch extends UMLSwitch<Object> {
+
+ private List<EObject> semantics = Lists.newArrayList();
+
+ private void addIfNotNull(EObject defaultValue) {
+ if (defaultValue != null) {
+ semantics.add(defaultValue);
+ }
+ }
+
+ @Override
+ public Object caseActivityEdge(ActivityEdge object) {
+ addIfNotNull(object.getGuard());
+ return super.caseActivityEdge(object);
+ }
+
+ @Override
+ public Object caseAssociation(Association object) {
+ semantics.addAll(object.getMemberEnds());
+ return super.caseAssociation(object);
+ }
+
+ @Override
+ public Object caseConnector(Connector object) {
+ semantics.addAll(object.getEnds());
+ return super.caseConnector(object);
+ }
+
+ @Override
+ public Object caseElement(Element object) {
+ semantics.addAll(object.getStereotypeApplications());
+ semantics.addAll(object.getAppliedStereotypes());
+ return super.caseElement(object);
+ }
+
+ @Override
+ public Object caseEModelElement(EModelElement object) {
+ semantics.addAll(object.getEAnnotations());
+ return super.caseEModelElement(object);
+ }
+
+ @Override
+ public Object caseExtend(Extend object) {
+ addIfNotNull(object.getExtension());
+ addIfNotNull(object.getExtendedCase());
+ return super.caseExtend(object);
+ }
+
+ @Override
+ public Object caseInclude(Include object) {
+ addIfNotNull(object.getIncludingCase());
+ addIfNotNull(object.getAddition());
+ return super.caseInclude(object);
+ }
+
+ @Override
+ public Object caseMessage(Message object) {
+ addIfNotNull(object.getSendEvent());
+ addIfNotNull(object.getReceiveEvent());
+ return super.caseMessage(object);
+ }
+
+ @Override
+ public Object caseOperation(Operation object) {
+ semantics.addAll(object.getOwnedParameters());
+ return super.caseOperation(object);
+ }
+
+ @Override
+ public Object caseProperty(Property object) {
+ final ValueSpecification defaultValue = object.getDefaultValue();
+ addIfNotNull(defaultValue);
+ addIfNotNull(object.getNameExpression());
+ return super.caseProperty(object);
+ }
+
+ @Override
+ public Object caseSlot(Slot object) {
+ addIfNotNull(object.getDefiningFeature());
+ return super.caseSlot(object);
+ }
+
+ @Override
+ public Object caseTransition(Transition object) {
+ if (object.getGuard() != null) {
+ addIfNotNull(object.getGuard().getSpecification());
+ }
+ return super.caseTransition(object);
+ }
+
+ @Override
+ public Object defaultCase(EObject object) {
+ addIfNotNull(object);
+ return super.defaultCase(object);
+ }
+
+ /**
+ * Get semantics elements.
+ *
+ * @param cur
+ * Element
+ * @return Semantic elements
+ */
+ public Collection<EObject> getSemanticElements(EObject cur) {
+ semantics = Lists.newArrayList();
+ doSwitch(cur);
+ /*
+ * We are reversing as we want the first specific before.
+ */
+ return Lists.reverse(semantics);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/StereotypeServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/StereotypeServices.java
new file mode 100755
index 0000000..d87ae80
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/StereotypeServices.java
@@ -0,0 +1,229 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElementContainer;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.EcoreMetamodelDescriptor;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.MetamodelDescriptor;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Stereotype;
+
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+/**
+ * Services to handle typed Setereotype concerns.
+ */
+public class StereotypeServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final StereotypeServices INSTANCE = new StereotypeServices();
+
+ /**
+ * Apply Profiles.
+ *
+ * @param pkg
+ * Package
+ * @param profilesToApply
+ * list of profile to apply to package
+ * @return The element on which profiles are applied
+ */
+ public Package applyAllProfiles(Package pkg, List<Profile> profilesToApply) {
+ final Session session = SessionManager.INSTANCE.getSession(pkg);
+ final List<Profile> alreadyAppliedProfiles = pkg.getAppliedProfiles();
+ for (final Profile profile : profilesToApply) {
+ if (!alreadyAppliedProfiles.contains(profile)) {
+ pkg.applyProfile(profile);
+ // Register metamodel
+ for (final ProfileApplication profileApplication : profile.getAllProfileApplications()) {
+ final Set<MetamodelDescriptor> descriptorsForInterpreter = Sets.newLinkedHashSet();
+ descriptorsForInterpreter
+ .add(new EcoreMetamodelDescriptor(profileApplication.getAppliedDefinition()));
+ session.getInterpreter().activateMetamodels(descriptorsForInterpreter);
+ }
+ }
+ }
+ return pkg;
+ }
+
+ /**
+ * Apply stereotypes.
+ *
+ * @param element
+ * Element
+ * @param stereotypesToApply
+ * Stereotyped to apply
+ * @return The element on which stereotypes are applied
+ */
+ public Element applyAllStereotypes(Element element, List<Stereotype> stereotypesToApply) {
+ final Session session = SessionManager.INSTANCE.getSession(element);
+ // Unapplying not selected stereotypes
+ final List<Stereotype> alreadyAppliedStereotypes = element.getAppliedStereotypes();
+ for (final Stereotype alreadyAppliedStereotype : alreadyAppliedStereotypes) {
+ if (stereotypesToApply == null || !stereotypesToApply.contains(alreadyAppliedStereotype)) {
+ element.unapplyStereotype(alreadyAppliedStereotype);
+ unapplyProfile(element, alreadyAppliedStereotype);
+ }
+ }
+
+ if (stereotypesToApply == null) {
+ return element;
+ }
+ // Applying selected stereotypes
+ for (final Stereotype stereotypeToApply : stereotypesToApply) {
+ final Profile profile = stereotypeToApply.getProfile();
+ final Package pkg = element.getNearestPackage();
+ if (!pkg.isProfileApplied(profile)) {
+ pkg.applyProfile(profile);
+ // Register metamodel
+ for (final ProfileApplication profileApplication : profile.getAllProfileApplications()) {
+ final Set<MetamodelDescriptor> descriptorsForInterpreter = Sets.newLinkedHashSet();
+ descriptorsForInterpreter
+ .add(new EcoreMetamodelDescriptor(profileApplication.getAppliedDefinition()));
+ session.getInterpreter().activateMetamodels(descriptorsForInterpreter);
+ }
+ }
+ if (!element.isStereotypeApplied(stereotypeToApply)) {
+ element.applyStereotype(stereotypeToApply);
+ }
+ }
+ return element;
+ }
+
+ /**
+ * Get all the stereotype applications according to the selected diagram.
+ *
+ * @param diagram
+ * Current diagram
+ * @return Stereotype applications
+ */
+ public Collection<Object> getAllStereotypeApplications(DDiagram diagram) {
+ final Collection<Object> results = Lists.newArrayList();
+ for (final DDiagramElementContainer container : diagram.getContainers()) {
+ final EObject target = container.getTarget();
+ if (target instanceof Element) {
+ results.addAll(((Element)target).getStereotypeApplications());
+ }
+ }
+ return results;
+ }
+
+ /**
+ * Get base class associated to a stereotype application.
+ *
+ * @param stereotypeApplication
+ * Stereotype application
+ * @return Base class
+ */
+ public Element getBaseClass(EObject stereotypeApplication) {
+ return (Element)stereotypeApplication
+ .eGet(stereotypeApplication.eClass().getEStructuralFeature("base_Class")); //$NON-NLS-1$
+ }
+
+ /**
+ * Get stereotype application label.
+ *
+ * @param stereotypeApplication
+ * Stereotype application
+ * @return The stereotype name.
+ */
+ public String getStereotypeApplicationLabel(EObject stereotypeApplication) {
+ return stereotypeApplication.eClass().getName();
+ }
+
+ /**
+ * Unapply a profile
+ *
+ * @param element
+ * Element
+ * @param alreadyAppliedStereotype
+ * Stereotype
+ */
+ public void unapplyProfile(Element element, final Stereotype alreadyAppliedStereotype) {
+ // If no other stereotype is used, unapply the profile
+ final Profile profile = alreadyAppliedStereotype.getProfile();
+ final Package pkg = element.getNearestPackage();
+ final List<EObject> stereotypeApplications = Lists.newArrayList();
+
+ final Iterator<Element> it = Iterators.filter(EcoreUtil.getAllProperContents(pkg, true),
+ Element.class);
+ while (it.hasNext()) {
+ final Element cur = it.next();
+ stereotypeApplications.addAll(cur.getStereotypeApplications());
+ }
+
+ for (final EObject stereotypeApplication : stereotypeApplications) {
+ // Get base class
+ final Element baseClass = getBaseClass(stereotypeApplication);
+ // Get all applied stereotypes
+ for (final Stereotype stereotype : baseClass.getAppliedStereotypes()) {
+ // Get profile
+ if (stereotype.getProfile().equals(profile)) {
+ // If stereotypes are still applied return else unapply
+ // profile on package
+ return;
+ }
+ }
+ }
+ pkg.unapplyProfile(profile);
+ }
+
+ /**
+ * Unapply a profile for a Package.
+ *
+ * @param pkg
+ * package
+ * @param appliedProfiles
+ * profileto unapply
+ */
+ public void unapplyProfile(Package pkg, List<Profile> appliedProfiles) {
+ for (final Profile profile : appliedProfiles) {
+ pkg.unapplyProfile(profile);
+ }
+ }
+
+ /**
+ * Unapply selected stereotypes.
+ *
+ * @param element
+ * UML element
+ * @param stereotypesToUnapply
+ * list of stereotypes
+ */
+ public void unapplyStereotypes(Element element, List<Stereotype> stereotypesToUnapply) {
+ // Unapplying selected stereotypes
+ final List<Stereotype> alreadyAppliedStereotypes = element.getAppliedStereotypes();
+ for (final Stereotype stereotype : stereotypesToUnapply) {
+ if (stereotype == null || alreadyAppliedStereotypes.contains(stereotype)) {
+ element.unapplyStereotype(stereotype);
+ unapplyProfile(element, stereotype);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TemplateBindingServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TemplateBindingServices.java
new file mode 100755
index 0000000..72f8847
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TemplateBindingServices.java
@@ -0,0 +1,130 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.List;
+
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.ClassifierTemplateParameter;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.ParameterableElement;
+import org.eclipse.uml2.uml.TemplateBinding;
+import org.eclipse.uml2.uml.TemplateParameter;
+import org.eclipse.uml2.uml.TemplateParameterSubstitution;
+import org.eclipse.uml2.uml.TemplateSignature;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Utility services to manage label edition on templateBindings.
+ *
+ */
+public final class TemplateBindingServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final TemplateBindingServices INSTANCE = new TemplateBindingServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private TemplateBindingServices() {
+ }
+
+ /**
+ * Create new classifier template parameter.
+ *
+ * @param context
+ * Context
+ * @param templateSignature
+ * Template signature
+ * @param newTemplateClassName
+ * Template class name
+ * @return Template parameter
+ */
+ private ClassifierTemplateParameter createNewClassifierTemplateParameter(ParameterableElement context, TemplateSignature templateSignature, String newTemplateClassName) {
+ final ClassifierTemplateParameter result = UMLFactory.eINSTANCE.createClassifierTemplateParameter();
+ final Class newGenericClass = UMLFactory.eINSTANCE.createClass();
+ newGenericClass.setName(newTemplateClassName);
+ result.setOwnedDefault(newGenericClass);
+ result.setParameteredElement(newGenericClass);
+
+ templateSignature.getOwnedParameters().add(result);
+ return result;
+ }
+
+ /**
+ * Parse the edited label content and update the underlying
+ * {@link TemplateBinding}.
+ *
+ * @param templateBinding
+ * the context {@link TemplateBinding} object.
+ * @param inputLabel
+ * the user edited label content.
+ * @return TemplateBinding name
+ */
+ public String parseInputLabel(TemplateBinding templateBinding, String inputLabel) {
+ final String result = inputLabel;
+ final String validLabel = "[a-zA-Z_0-9]+(\\s)*->(\\s)*[a-zA-Z_0-9\\?]+((\\s)*,(\\s)*[a-zA-Z_0-9]+(\\s)*->(\\s)*[a-zA-Z_0-9\\?]+)*"; //$NON-NLS-1$
+
+ final TemplateSignature templateSignature = templateBinding.getSignature();
+ if (inputLabel.matches(validLabel) && templateSignature != null) {
+ final String[] splittedSubstitutionLabels = inputLabel.split("(\\s)*,"); //$NON-NLS-1$
+ int i = 0;
+ final List<TemplateParameterSubstitution> paramSubstitutions = templateBinding.getParameterSubstitutions();
+ for (final String substitutionLabel : splittedSubstitutionLabels) {
+ final String[] substitutionArray = substitutionLabel.split("(\\s)*->(\\s)*"); //$NON-NLS-1$
+ final String formalLabel = substitutionArray[0].trim();
+ final String actualLabel = substitutionArray[1].trim();
+
+ // override or create a templateParamSubstitution at the i index
+ if (paramSubstitutions.size() > i) {
+ final TemplateParameterSubstitution templateParamSubstitution = paramSubstitutions.get(i);
+ // rename or create the formal template
+ final TemplateParameter formal = templateParamSubstitution.getFormal();
+ if (formal == null) {
+ if (templateSignature.getOwnedParameters().size() > i) {
+ final TemplateParameter templateParam = templateSignature.getOwnedParameters().get(i);
+ templateParamSubstitution.setFormal(templateParam);
+ } else {
+ final ClassifierTemplateParameter createTemplateParam = createNewClassifierTemplateParameter((ParameterableElement) templateSignature.getTemplate(), templateSignature,
+ formalLabel);
+
+ templateParamSubstitution.setFormal(createTemplateParam);
+ }
+
+ } else {
+ final ParameterableElement ownedDefault = formal.getOwnedDefault();
+ if (ownedDefault instanceof NamedElement) {
+ ((NamedElement) ownedDefault).setName(formalLabel);
+ }
+ }
+ // set or replace the actual binding
+ if ("?".equals(actualLabel)) { //$NON-NLS-1$
+ templateParamSubstitution.setActual(null);
+ } else {
+ final Type foundType = ElementServices.INSTANCE.findTypeByName(templateBinding, actualLabel);
+ if (foundType != null) {
+ templateParamSubstitution.setActual(foundType);
+ }
+ }
+ } else {
+ break;
+ }
+ i++;
+ }
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TooltipServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TooltipServices.java
new file mode 100755
index 0000000..0517613
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TooltipServices.java
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * Manage the diagram elements' tooltips.
+ */
+public class TooltipServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final TooltipServices INSTANCE = new TooltipServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private TooltipServices() {
+
+ }
+
+ /**
+ * Compute the tooltip of the given element.
+ *
+ * @param element
+ * the {@link EObject} for which to retrieve a tooltip.
+ * @return the computed tooltip.
+ */
+ public String computeTooltip(EObject element) {
+ final TooltipSwitch tooltip = new TooltipSwitch();
+ if (element != null) {
+ return tooltip.doSwitch(element);
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TooltipSwitch.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TooltipSwitch.java
new file mode 100755
index 0000000..732bd46
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/TooltipSwitch.java
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLSwitch;
+
+/**
+ * A switch that handle the tooltip computation for each UML types.
+ *
+ */
+public class TooltipSwitch extends UMLSwitch<String> implements ILabelConstants {
+
+ @Override
+ public String caseModel(Model object) {
+ return object.getName();
+ }
+
+ @Override
+ public String caseNamedElement(NamedElement object) {
+ Element pkg = object;
+ String tooltip = object.getName();
+ while (pkg != null) {
+ pkg = pkg.getOwner();
+ if (pkg instanceof NamedElement) {
+ tooltip = ((NamedElement)pkg).getName() + "::" + tooltip; //$NON-NLS-1$
+ }
+ }
+ return tooltip;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/UIServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/UIServices.java
new file mode 100755
index 0000000..2993165
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/core/services/UIServices.java
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.core.services;
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.business.api.query.DDiagramQuery;
+
+import com.google.common.collect.Sets;
+
+/**
+ * Services to handle UI concerns.
+ *
+ */
+public class UIServices {
+ /**
+ * A singleton instance to be accessed by other java services.
+ */
+ public static final UIServices INSTANCE = new UIServices();
+
+ /**
+ * Hidden constructor.
+ */
+ private UIServices() {
+
+ }
+
+ /**
+ * Default height.
+ *
+ * @return The default height.
+ */
+ public int defaultHeight() {
+ return 10;
+ }
+
+ /**
+ * Default width.
+ *
+ * @return The default width.
+ */
+ public int defaultWidth() {
+ return 12;
+ }
+
+ /**
+ * Get displayed node in a diagram
+ *
+ * @param diagram
+ * Diagram
+ * @return List of displayed semantic objects.
+ */
+ public Collection<EObject> getDisplayedNodes(DDiagram diagram) {
+ final Set<EObject> result = Sets.newLinkedHashSet();
+ final DDiagramQuery query = new DDiagramQuery(diagram);
+ for (final DDiagramElement diagramElement : query.getAllDiagramElements()) {
+ result.add(diagramElement.getTarget());
+ }
+ return result;
+ }
+
+ /**
+ * Mark for auto size.
+ *
+ * @param any
+ * Any
+ * @return the given auto sized object
+ */
+ public EObject markForAutosize(EObject any) {
+ if (any != null) {
+ //any.eAdapters().add(AutosizeTrigger.AUTO_SIZE_MARKER);
+ }
+ return any;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/handler/DeleteFromModelHandler.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/handler/DeleteFromModelHandler.java
new file mode 100755
index 0000000..6cde6b7
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/handler/DeleteFromModelHandler.java
@@ -0,0 +1,116 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.handler;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Handles the delete from model action (DEL key binding).
+ *
+ * @author Aurelien
+ */
+public class DeleteFromModelHandler extends AbstractHandler {
+
+ public boolean isEnabled() {
+ return true;
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ List<IGraphicalEditPart> selection = getSelectedElements();
+ for (IGraphicalEditPart selectedGEF: selection) {
+ EObject current = selectedGEF.resolveSemanticElement();
+ final DestroyElementRequest request = new DestroyElementRequest(current, false);
+ if (request != null) {
+ Command cmd = getEMFEditCommand(current, request);
+ final TransactionalEditingDomain domain = getEditingDomain(current);
+ if (domain != null) {
+ domain.getCommandStack().execute(cmd);
+
+ }
+ }
+
+
+ }
+ return selection;
+ }
+
+ protected final TransactionalEditingDomain getEditingDomain(final EObject eobject) {
+ return TransactionUtil.getEditingDomain(eobject);// TODO check another way in Papyrus
+ }
+
+ protected final IElementEditService getCommandProvider(final EObject eobject) {
+ return ElementEditServiceUtils.getCommandProvider(eobject);
+ }
+
+ protected final ICommand getGMFEditCommand(final EObject eobject, final IEditCommandRequest request) {
+ final IElementEditService provider = getCommandProvider(eobject);
+ final ICommand cmd = provider.getEditCommand(request);
+ return cmd;
+ }
+
+ protected final Command getEMFEditCommand(final EObject eobject, final IEditCommandRequest request) {
+ final ICommand cmd = getGMFEditCommand(eobject, request);
+ return cmd == null ? null : GMFtoEMFCommandWrapper.wrap(cmd);
+ }
+
+
+ /**
+ * Iterate over current selection and build a list of the {@link IGraphicalEditPart} contained in the selection.
+ *
+ * @return the currently selected {@link IGraphicalEditPart}
+ */
+ protected List<IGraphicalEditPart> getSelectedElements() {
+ List<IGraphicalEditPart> editparts = new ArrayList<IGraphicalEditPart>();
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (activeWorkbenchWindow != null) {
+ ISelection selection = activeWorkbenchWindow.getSelectionService().getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ Iterator<?> it = structuredSelection.iterator();
+ while (it.hasNext()) {
+ Object object = it.next();
+ if (object instanceof IGraphicalEditPart) {
+ editparts.add((IGraphicalEditPart) object);
+ }
+ }
+ } else if (selection instanceof IGraphicalEditPart) {
+ editparts.add((IGraphicalEditPart) selection);
+ }
+ }
+ return editparts;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/DiagramAssistantEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/DiagramAssistantEditPolicy.java
new file mode 100755
index 0000000..d836240
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/DiagramAssistantEditPolicy.java
@@ -0,0 +1,517 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.draw2d.MouseEvent;
+import org.eclipse.draw2d.MouseMotionListener;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartListener;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Encapsulates behavior common to editpolicies that popup diagram assistants.
+ *
+ * @author cmahoney
+ */
+public abstract class DiagramAssistantEditPolicy
+ extends GraphicalEditPolicy
+ implements MouseMotionListener {
+
+ /**
+ * The <code>Job</code> used to show the diagram assistant after a certain
+ * amount of time has passed.
+ */
+ private class ShowDiagramAssistantJob
+ extends UIJob {
+
+ /** the mouse location when the job was created */
+ private Point originalMouseLocation;
+
+ /**
+ * Creates a new instance.
+ */
+ protected ShowDiagramAssistantJob() {
+ super("Show Diagram Assistant"); //$NON-NLS-1$
+ setSystem(true);
+ }
+
+ /**
+ * Sets mouse location
+ *
+ * @param originalMouseLocation
+ * the current mouse location
+ */
+ public void setOriginalMouseLocation(Point originalMouseLocation) {
+ this.originalMouseLocation = originalMouseLocation;
+ }
+
+ /**
+ * The diagram assistant added when this task is run if the mouse is
+ * still at the same spot where it was when the timer was started (i.e.
+ * only add the diagram assistant when the user stops moving the mouse).
+ */
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (originalMouseLocation != null
+ && originalMouseLocation.equals(getMouseLocation())) {
+ if (isDiagramAssistantShowing()
+ && !shouldAvoidHidingDiagramAssistant()) {
+ hideDiagramAssistant();
+ }
+ if (shouldShowDiagramAssistant()) {
+
+ // Cancel the hide diagram assistant job for this host if it
+ // is waiting to run.
+ hideDiagramAssistantJob.cancel();
+
+ // Schedule any hide diagram assistant jobs on other
+ // editparts to run immediately to avoid duplicate diagram
+ // assistants showing.
+ if (getDiagramAssistantID() != null) {
+ Job.getJobManager().wakeUp(getDiagramAssistantID());
+ }
+
+ showDiagramAssistant(originalMouseLocation);
+ }
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+ /**
+ * The <code>Job</code> used to hide the diagram assistant after a certain
+ * amount of time has passed.
+ */
+ private class HideDiagramAssistantJob
+ extends UIJob {
+
+ protected HideDiagramAssistantJob() {
+ super("Hide Diagram Assistant"); //$NON-NLS-1$
+ setSystem(true);
+ }
+
+ /**
+ * The diagram assistant is removed when this task is run if the mouse
+ * is still outside the shape.
+ */
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (getMouseLocation() == null
+ || !shouldAvoidHidingDiagramAssistant()) {
+ hideDiagramAssistant();
+ }
+ return Status.OK_STATUS;
+ }
+
+ public boolean belongsTo(Object family) {
+ return family == getDiagramAssistantID();
+ }
+ }
+
+ /**
+ * Listens to the focus events on the owner editpart so that the diagram
+ * assistant can be added when the space bar is pressed. I tried to use
+ * IFigure.addFocusListener(), but the figure isn't getting any focus change
+ * events when the space bar is pressed.
+ */
+ private class FocusListener
+ extends EditPartListener.Stub {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gef.EditPartListener#selectedStateChanged(org.eclipse.gef.EditPart)
+ */
+ public void selectedStateChanged(EditPart part) {
+ if (part.hasFocus() && shouldShowDiagramAssistant()) {
+ showDiagramAssistant(getMouseLocation());
+ } else {
+ hideDiagramAssistant();
+ }
+ }
+ }
+
+ /**
+ * The amount of time to wait before showing the diagram assistant.
+ */
+ private static final int APPEARANCE_DELAY = 200;
+
+ /**
+ * The amount of time to wait before hiding the diagram assistant after it
+ * has been made visible.
+ */
+ private static final int DISAPPEARANCE_DELAY = 2000;
+
+ /**
+ * The amount of time to wait before hiding the diagram assistant after the
+ * user has moved the mouse outside of the editpart.
+ */
+ private static final int DISAPPEARANCE_DELAY_UPON_EXIT = 1000;
+
+ /**
+ * The current mouse location within the host used to determine where the
+ * diagram assistant should be displayed. This will be null if the mouse is
+ * outside the host and diagram assistant figure.
+ */
+ private Point mouseLocation;
+
+ /** Listens to focus change events on the host editpart. */
+ private FocusListener focusListener = new FocusListener();
+
+ /** Flag to indicate that the diagram assistant should not be hidden. */
+ private boolean avoidHidingDiagramAssistant = true;
+
+ private ShowDiagramAssistantJob showDiagramAssistantJob = new ShowDiagramAssistantJob();
+
+ private HideDiagramAssistantJob hideDiagramAssistantJob = new HideDiagramAssistantJob();
+
+ /**
+ * Creates a new instance.
+ */
+ public DiagramAssistantEditPolicy() {
+ super();
+ }
+
+ /**
+ * Checks if the object is or is part of the diagram assistant figure. This
+ * is used to determine if the mouse is hovering over the diagram assistant.
+ *
+ * @param object
+ * the object in question
+ * @return True if the object in question is or is part of the diagram
+ * assistant figure; false otherwise.
+ */
+ protected abstract boolean isDiagramAssistant(Object object);
+
+ /**
+ * Returns true if the diagram assistant is currently showing; false
+ * otherwise. This is used to determine if the diagram assistant should be
+ * shown or hidden at a given point in time.
+ *
+ * @return true if the diagram assistant is showing; false otherwise
+ */
+ protected abstract boolean isDiagramAssistantShowing();
+
+ /**
+ * Shows the diagram assistant figure(s).
+ *
+ * @param referencePoint
+ * The reference point which may be used to determine where the
+ * diagram assistant should be located. This is most likely the
+ * current mouse location. This could be null, for example, when
+ * the host gains focus via the space bar, in which case the
+ * diagram assistant should be shown in a default location.
+ */
+ protected abstract void showDiagramAssistant(Point referencePoint);
+
+ /**
+ * Hides the diagram assistant figure(s).
+ */
+ protected abstract void hideDiagramAssistant();
+
+ /**
+ * Returns true if the diagram assistant should be shown; false otherwise.
+ * This can be overridden to check any other conditions which must be met
+ * prior to showing the diagram assistant.
+ *
+ * @return true if the diagram assistant should be shown; false otherwise.
+ */
+ protected boolean shouldShowDiagramAssistant() {
+ return getHost().isActive() && isPreferenceOn() && isHostEditable()
+ && isHostResolvable() && isDiagramPartActive();
+ }
+
+ /**
+ * Returns true if the preference to show this diagram assistant is on or if
+ * there is no applicable preference; false otherwise.
+ */
+ protected boolean isPreferenceOn() {
+ String prefName = getPreferenceName();
+ if (prefName == null) {
+ return true;
+ }
+ IPreferenceStore preferenceStore = (IPreferenceStore) ((IGraphicalEditPart) getHost())
+ .getDiagramPreferencesHint().getPreferenceStore();
+ return preferenceStore.getBoolean(prefName);
+ }
+
+ /**
+ * The preference name indicating if the preference should be on or off.
+ * This preference must be a boolean preference stored in the diagram
+ * preferences.
+ *
+ * @return the preference name if applicable; null otherwise
+ */
+ String getPreferenceName() {
+ return null;
+ }
+
+ /**
+ * Checks if the host editpart is editable.
+ *
+ * @return True if the host is editable; false otherwise.
+ */
+ private boolean isHostEditable() {
+ if (getHost() instanceof GraphicalEditPart) {
+ return ((GraphicalEditPart) getHost()).isEditModeEnabled();
+ }
+ return true;
+ }
+
+ /**
+ * Is the host's semantic reference resolvable (if applicable)?
+ *
+ * @return true if the semantic reference is resolvable, true if there is no
+ * semantic reference, and false otherwise
+ */
+ private boolean isHostResolvable() {
+ final View view = (View) getHost().getModel();
+ EObject element = view.getElement();
+ if (element != null) {
+ return !element.eIsProxy();
+ }
+ return true;
+ }
+
+
+ /**
+ * Checks if the diagram part is active.
+ *
+ * @return True if the diagram part is active; false otherwise.
+ */
+ private boolean isDiagramPartActive() {
+ IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof IDiagramWorkbenchPart) {
+ return ((IDiagramWorkbenchPart) activePart)
+ .getDiagramEditPart().getRoot().equals(
+ ((IGraphicalEditPart) getHost()).getRoot());
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Shows the diagram assistant after a certain amount of time has passed.
+ *
+ * @param delay
+ * the delay in milliseconds
+ */
+ protected void showDiagramAssistantAfterDelay(int delay) {
+ if (delay >= 0) {
+ showDiagramAssistantJob.setOriginalMouseLocation(getMouseLocation());
+ showDiagramAssistantJob.cancel();
+ showDiagramAssistantJob.schedule(delay);
+ }
+ }
+
+ /**
+ * Hides the diagram assistant after a certain amount of time has passed.
+ *
+ * @param delay
+ * the delay in milliseconds
+ */
+ protected void hideDiagramAssistantAfterDelay(int delay) {
+ if (isDiagramAssistantShowing() && delay >= 0) {
+ hideDiagramAssistantJob.cancel();
+ hideDiagramAssistantJob.schedule(delay);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ */
+ public void activate() {
+ super.activate();
+ ((IGraphicalEditPart) getHost()).getFigure().addMouseMotionListener(
+ this);
+ ((IGraphicalEditPart) getHost()).addEditPartListener(focusListener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ */
+ public void deactivate() {
+ ((IGraphicalEditPart) getHost()).getFigure().removeMouseMotionListener(
+ this);
+ ((IGraphicalEditPart) getHost()).removeEditPartListener(focusListener);
+
+ hideDiagramAssistant();
+
+ super.deactivate();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.draw2d.MouseMotionListener#mouseEntered(org.eclipse.draw2d.MouseEvent)
+ */
+ public void mouseEntered(MouseEvent me) {
+ setMouseLocation(me.getLocation());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.draw2d.MouseMotionListener#mouseExited(org.eclipse.draw2d.MouseEvent)
+ */
+ public void mouseExited(MouseEvent me) {
+ setMouseLocation(null);
+ hideDiagramAssistantAfterDelay(getDisappearanceDelayUponExit());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.draw2d.MouseMotionListener#mouseMoved(org.eclipse.draw2d.MouseEvent)
+ */
+ public void mouseMoved(MouseEvent me) {
+ setMouseLocation(me.getLocation());
+
+ // do not hide the diagram assistant if the user is hovering over it
+ setAvoidHidingDiagramAssistant(isDiagramAssistant(me.getSource()));
+
+ showDiagramAssistantAfterDelay(getAppearanceDelay());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.draw2d.MouseMotionListener#mouseHover(org.eclipse.draw2d.MouseEvent)
+ */
+ public void mouseHover(MouseEvent me) {
+ // do nothing
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.draw2d.MouseMotionListener#mouseDragged(org.eclipse.draw2d.MouseEvent)
+ */
+ public void mouseDragged(MouseEvent me) {
+ // do nothing
+ }
+
+ /**
+ * Gets the amount of time to wait before showing the diagram assistant.
+ *
+ * @return the time to wait in milliseconds
+ */
+ protected int getAppearanceDelay() {
+ return APPEARANCE_DELAY;
+ }
+
+ /**
+ * Gets the amount of time to wait before hiding the diagram assistant after
+ * it has been made visible.
+ *
+ * @return the time to wait in milliseconds
+ */
+ protected int getDisappearanceDelay() {
+ return DISAPPEARANCE_DELAY;
+ }
+
+ /**
+ * Gets the amount of time to wait before hiding the diagram assistant after
+ * the user has moved the mouse outside of the editpart.
+ *
+ * @return the time to wait in milliseconds
+ */
+ protected int getDisappearanceDelayUponExit() {
+ return DISAPPEARANCE_DELAY_UPON_EXIT;
+ }
+
+ /**
+ * Gets the current mouse location. This will be null if the mouse is
+ * outside the host and diagram assistant figure.
+ *
+ * @return Returns the current mouse location
+ */
+ protected Point getMouseLocation() {
+ return mouseLocation;
+ }
+
+ /**
+ * Sets the current mouse location. If set to null, this implies that the
+ * mouse is outside the host and diagram assistant figure.
+ *
+ * @param mouseLocation
+ * the current mouse location
+ */
+ protected void setMouseLocation(Point mouseLocation) {
+ this.mouseLocation = mouseLocation;
+ }
+
+ /**
+ * Sets the flag to indicate that the diagram assistant should not be
+ * hidden.
+ *
+ * @param avoidHidingDiagramAssistant
+ * Flag to indicate that the diagram assistant should not be
+ * hidden
+ */
+ protected void setAvoidHidingDiagramAssistant(boolean avoidHidingDiagramAssistant) {
+ this.avoidHidingDiagramAssistant = avoidHidingDiagramAssistant;
+ }
+
+ /**
+ * Returns true if the diagram assistant should not be hidden; false
+ * otherwise.
+ *
+ * @return true if the diagram assistant should not be hidden; false
+ * otherwise.
+ */
+ protected boolean shouldAvoidHidingDiagramAssistant() {
+ return avoidHidingDiagramAssistant;
+ }
+
+ /**
+ * Gets an ID string used to identify the diagram assistant classification.
+ * This ID should be the same string for all instances of a particular type
+ * of diagram assistant. One use of this ID is to avoid having multiple
+ * diagram assistants of the same type showing at the same time on different
+ * editparts. A good ID string would be the class's name (e.g.
+ * ConnectionHandleEditPolicy.class.getName()).
+ *
+ * @return a unique string for a diagram assistant type or null
+ */
+ protected String getDiagramAssistantID() {
+ return null;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/HyperlinkService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/HyperlinkService.java
new file mode 100755
index 0000000..e95693f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/HyperlinkService.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.hyperlink.Activator;
+import org.eclipse.uml2.uml.Element;
+
+public class HyperlinkService {
+
+
+ public static List<EObject> allAvailableViews(EObject obj) {
+
+ if (obj instanceof Element) {
+ return getViews((Element) obj);
+ }
+ return null;
+
+ }
+
+ protected static List<EObject> getViews(Element element) {
+ if (element == null) {
+ return null;
+ }
+
+ IPageManager pageManager;
+ try {
+ pageManager = ServiceUtilsForEObject.getInstance().getService(IPageManager.class, element);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ return null;
+ }
+ return pageManager.allPages().stream().filter(obj -> obj instanceof EObject).map(obj -> (EObject) obj)
+ .collect(Collectors.toList());
+ }
+
+ public static boolean isNotSemanticElement(EObject obj) {
+ return !(obj instanceof Element);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigateHyperlinkAction.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigateHyperlinkAction.java
new file mode 100755
index 0000000..5c93e69
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigateHyperlinkAction.java
@@ -0,0 +1,378 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.navigation.preference.INavigationPreferenceConstant;
+import org.eclipse.papyrus.infra.hyperlink.helper.AbstractHyperLinkHelper;
+import org.eclipse.papyrus.infra.hyperlink.helper.HyperLinkHelperFactory;
+import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject;
+import org.eclipse.papyrus.infra.hyperlink.service.HyperlinkService;
+import org.eclipse.papyrus.infra.hyperlink.ui.EditorNavigationDialog;
+import org.eclipse.papyrus.infra.hyperlink.ui.HyperLinkManagerShell;
+import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkHelpersRegistrationUtil;
+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.uml.sirius.common.diagram.Activator;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusGMFHelper;
+import org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * This class is used to handle hyperlink on element double click.
+ */
+public class NavigateHyperlinkAction {
+
+ /**
+ *
+ * @param request
+ * @return get the command to open a new diagram
+ */
+ protected Command getHyperlinkOpenCommand(GraphicalEditPart gep) {
+
+ // in order to obtain the list of default diagram we need to fin the
+ // edit part that refers to default diagram
+
+ EObject semanticElement = gep.resolveSemanticElement();
+
+ if (semanticElement instanceof DDiagramElement) {
+ semanticElement=((DDiagramElement)semanticElement).getTarget();
+ }
+
+ // defaultHyperlinks
+ final ArrayList<HyperLinkObject> defaultHyperLinkObject = new ArrayList<HyperLinkObject>();
+ final ArrayList<HyperLinkObject> hyperLinkObjectList;
+
+ if (semanticElement == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // initialization of code to extract hyperlinks, in the future to do with
+ // extension points
+ ArrayList<AbstractHyperLinkHelper> hyperLinkHelpers = new ArrayList<>();
+ // hyperLinkHelpers.add(new DiagramHyperLinkHelper());
+ // hyperLinkHelpers.add(new DocumentHyperLinkHelper());
+ // hyperLinkHelpers.add(new WebHyperLinkHelper());
+ hyperLinkHelpers.addAll(HyperLinkHelpersRegistrationUtil.INSTANCE.getAllRegisteredHyperLinkHelper());
+ final HyperLinkHelperFactory hyperlinkHelperFactory = new HyperLinkHelperFactory(hyperLinkHelpers);
+
+ try {
+ // fill the list of default hyperlinks
+ hyperLinkObjectList = (ArrayList<HyperLinkObject>) hyperlinkHelperFactory
+ .getAllreferenced(gep.getNotationView());
+
+ Iterator<HyperLinkObject> iterator = hyperLinkObjectList.iterator();
+ while (iterator.hasNext()) {
+ HyperLinkObject hyperlinkObject = iterator.next();
+ if (hyperlinkObject.getIsDefault()) {
+
+ defaultHyperLinkObject.add(hyperlinkObject);
+ }
+
+ }
+
+ // test which kind of navigation by consulting preference
+ String navigationKind = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault()
+ .getPreferenceStore().getString(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND);
+
+ // no navigation
+ if (navigationKind.equals(INavigationPreferenceConstant.NO_NAVIGATION)) {
+ // do nothing
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Create default hyperlinks by contributors
+ if (navigationKind.equals(INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION)) {
+ // If clicked-on object is a diagram shortcut, we do not add hyperlinks by
+ // contributors
+ if (!(semanticElement instanceof Diagram) && defaultHyperLinkObject.size() == 0) {//semanticElement n'est pas semantic encore
+ HyperlinkService hyperlinkService = ServiceUtilsForEObject.getInstance()
+ .getServiceRegistry(semanticElement).getService(HyperlinkService.class);
+ defaultHyperLinkObject.addAll(hyperlinkService.getHyperlinks(semanticElement));
+ for (HyperLinkObject hyperlink : defaultHyperLinkObject) {
+ hyperlink.setIsDefault(true);
+ }
+ }
+ }
+
+ if (defaultHyperLinkObject.size() == 1) {
+ // open the diagram
+ final HyperLinkObject hyperlinkObject = defaultHyperLinkObject.get(0);
+
+ class NavigateHyperlinkCommand extends Command implements INonDirtying {
+
+ private ICommand openLinkCommand;
+
+ NavigateHyperlinkCommand() {
+ super("Navigate hyperlink");
+ }
+
+ @Override
+ public void execute() {
+
+ if (hyperlinkObject.needsOpenCommand()) {
+ try {
+ TransactionalEditingDomain editingDomain = ServiceUtilsForEditPart.getInstance()
+ .getTransactionalEditingDomain(gep);
+ openLinkCommand = new OpenCommand(editingDomain, hyperlinkObject);
+ openLinkCommand.execute(new NullProgressMonitor(), null);
+ } catch (ServiceException | ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ } else {
+ hyperlinkObject.openLink();
+ }
+ }
+
+ @Override
+ public void undo() {
+ if (openLinkCommand != null && openLinkCommand.canUndo()) {
+ try {
+ openLinkCommand.undo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (openLinkCommand != null && openLinkCommand.canRedo()) {
+ try {
+ openLinkCommand.redo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ @Override
+ public void dispose() {
+ if (openLinkCommand != null) {
+ openLinkCommand.dispose();
+ openLinkCommand = null;
+ }
+
+ super.dispose();
+ }
+ }
+ ;
+ return new NavigateHyperlinkCommand();
+ }
+
+ if (defaultHyperLinkObject.size() > 1) {
+ // open a dialog to choose a diagram
+ EditorNavigationDialog diagramNavigationDialog = new EditorNavigationDialog(
+ gep.getViewer().getControl().getShell(), defaultHyperLinkObject, semanticElement);
+ diagramNavigationDialog.open();
+ final List<HyperLinkObject> hList = diagramNavigationDialog.getSelectedHyperlinks();
+
+ class NavigateHyperlinksCommand extends Command implements INonDirtying {
+
+ private CompositeCommand openLinksCommand;
+
+ NavigateHyperlinksCommand() {
+ super("Navigate hyperlinks");
+ }
+
+ @Override
+ public void execute() {
+ Iterator<HyperLinkObject> iter = hList.iterator();
+ openLinksCommand = CommandUtils.nonDirtyingGMFComposite("Navigate hyperlinks");
+
+ try {
+ TransactionalEditingDomain editingDomain = ServiceUtilsForEditPart.getInstance()
+ .getTransactionalEditingDomain(gep);
+ while (iter.hasNext()) {
+ final HyperLinkObject hyperlinkObject = iter.next();
+ if (hyperlinkObject.needsOpenCommand()) {
+ openLinksCommand.add(new OpenCommand(editingDomain, hyperlinkObject));
+ } else {
+ hyperlinkObject.openLink();
+ }
+ }
+
+ if (openLinksCommand.isEmpty()) {
+ return;
+ }
+
+ openLinksCommand.execute(new NullProgressMonitor(), null);
+ } catch (ServiceException | ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ @Override
+ public void undo() {
+ if (openLinksCommand != null && openLinksCommand.canUndo()) {
+ try {
+ openLinksCommand.undo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (openLinksCommand != null && openLinksCommand.canRedo()) {
+ try {
+ openLinksCommand.redo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+ }
+ ;
+
+ return new NavigateHyperlinksCommand();
+ }
+
+ // No default hyperlinks, so we open the manager shell if the clicked-on object
+ // is not a diagram shotcut
+ if (!(semanticElement instanceof Diagram)) {
+ if (defaultHyperLinkObject.size() == 0) {
+ class AddHyperlinkCommand extends Command {
+ private Command addLinkCommand;
+
+ private AddHyperlinkCommand() {
+ super("Add hyperlink");
+ }
+
+ @Override
+ public void execute() {
+ addLinkCommand = new Command("Add Hyperlink") {
+ @Override
+ public void execute() {
+ Shell parentShell = EditorHelper.getActiveShell();
+
+ EObject object = gep.getNotationView().getElement();
+ if (object instanceof DDiagramElement) {
+ EModelElement elem=(EModelElement) ((DDiagramElement) object).getTarget();
+ HyperLinkManagerShell hyperLinkManagerShell = new HyperLinkManagerShell(
+ parentShell, createEditorRegistry(gep), gep.getEditingDomain(),
+ elem, gep.getNotationView(), hyperlinkHelperFactory);
+ hyperLinkManagerShell.setInput(hyperLinkObjectList);
+ hyperLinkManagerShell.open();
+ }
+ }
+ };
+
+ addLinkCommand.execute();
+ }
+
+ @Override
+ public void undo() {
+ if (addLinkCommand != null && addLinkCommand.canUndo()) {
+ addLinkCommand.undo();
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (addLinkCommand != null && addLinkCommand.canRedo()) {
+ addLinkCommand.redo();
+ }
+ }
+
+ @Override
+ public void dispose() {
+ if (addLinkCommand != null) {
+ addLinkCommand.dispose();
+ addLinkCommand = null;
+ }
+
+ super.dispose();
+ }
+ }
+ ;
+
+ return new AddHyperlinkCommand();
+ }
+ }
+ } catch (Exception e) {
+ Activator.log.error("Impossible to load hyperlinks", e);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * Return the EditorRegistry for nested editor descriptors. Subclass should
+ * implements this method in order to return the registry associated to the
+ * extension point namespace.
+ *
+ * @return the EditorRegistry for nested editor descriptors
+ */
+ protected IPageIconsRegistry createEditorRegistry(EditPart editPart) {
+ try {
+ return ServiceUtilsForEditPart.getInstance().getService(IPageIconsRegistry.class, editPart);
+ } catch (ServiceException e) {
+ // Return an empty registry always providing null;
+ return new PageIconsRegistry();
+ }
+ }
+
+ class OpenCommand extends AbstractTransactionalCommand implements INonDirtying {
+ private final HyperLinkObject hyperlinkObject;
+
+ OpenCommand(TransactionalEditingDomain editingDomain, HyperLinkObject hyperlinkObject) {
+ super(editingDomain, "Navigate hyperlink", null);
+
+ this.hyperlinkObject = hyperlinkObject;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ hyperlinkObject.openLink();
+ return CommandResult.newOKCommandResult();
+ }
+ }
+
+ public void createOrOpenHyperlink(DDiagramElement obj) {
+ View view = SiriusGMFHelper.getGmfView(obj);
+ GraphicalEditPart gef = (GraphicalEditPart) GMFHelper.getGraphicalEditPart(view).get();
+
+ Command command = getHyperlinkOpenCommand(gef);
+ command.execute();
+ }
+
+}
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigationEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigationEditPolicy.java
new file mode 100755
index 0000000..b66967c
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigationEditPolicy.java
@@ -0,0 +1,452 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+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.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.INonDirtying;
+import org.eclipse.papyrus.infra.emf.gmf.util.CommandUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.hyperlink.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.navigation.preference.INavigationPreferenceConstant;
+import org.eclipse.papyrus.infra.hyperlink.helper.AbstractHyperLinkHelper;
+import org.eclipse.papyrus.infra.hyperlink.helper.HyperLinkHelperFactory;
+import org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject;
+import org.eclipse.papyrus.infra.hyperlink.service.HyperlinkService;
+import org.eclipse.papyrus.infra.hyperlink.ui.EditorNavigationDialog;
+import org.eclipse.papyrus.infra.hyperlink.ui.HyperLinkManagerShell;
+import org.eclipse.papyrus.infra.hyperlink.util.HyperLinkHelpersRegistrationUtil;
+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.swt.widgets.Shell;
+
+/**
+ * This class is used to open a new diagram when the double click is detected.
+ * It is dependent of papyrus environment
+ */
+public class NavigationEditPolicy extends OpenEditPolicy {
+
+ public static final String NAVIGATION_POLICY = "NavigationEditPolicy"; //$NON-NLS-1$
+
+ public NavigationEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy#getOpenCommand(org.eclipse.gef.Request)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getOpenCommand(Request request) {
+ Command openCommand = getHyperlinkOpenCommand(request);
+ if (openCommand == null || !openCommand.canExecute()) {
+ openCommand = getShortCutOpenCommand(request);
+ }
+ return openCommand;
+ }
+
+
+ /**
+ *
+ * @param request
+ * @return get the command to open a new diagram
+ */
+ protected Command getHyperlinkOpenCommand(Request request) {
+ final IGraphicalEditPart gep;
+
+ // in order to obtain the list of default diagram we need to fin the
+ // edit part that refers to default diagram
+
+ // if this a label of a compartment, the good editpart is the parent
+ EditPart target = getHost();
+ while (false == target instanceof IPrimaryEditPart && target != null) {
+ target = target.getParent();
+ }
+
+ if (false == target instanceof IGraphicalEditPart) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ gep = (IGraphicalEditPart) target;
+ final EObject semanticElement = gep.resolveSemanticElement();
+
+ // defaultHyperlinks
+ final ArrayList<HyperLinkObject> defaultHyperLinkObject = new ArrayList<>();
+ final ArrayList<HyperLinkObject> hyperLinkObjectList;
+
+ if (semanticElement == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // initialization of code to extract hyperlinks, in the future to do with
+ // extension points
+ ArrayList<AbstractHyperLinkHelper> hyperLinkHelpers = new ArrayList<>();
+ // hyperLinkHelpers.add(new DiagramHyperLinkHelper());
+ // hyperLinkHelpers.add(new DocumentHyperLinkHelper());
+ // hyperLinkHelpers.add(new WebHyperLinkHelper());
+ hyperLinkHelpers.addAll(HyperLinkHelpersRegistrationUtil.INSTANCE.getAllRegisteredHyperLinkHelper());
+ final HyperLinkHelperFactory hyperlinkHelperFactory = new HyperLinkHelperFactory(hyperLinkHelpers);
+
+ try {
+ // fill the list of default hyperlinks
+ hyperLinkObjectList = (ArrayList<HyperLinkObject>) hyperlinkHelperFactory.getAllreferenced(gep.getNotationView());
+
+ Iterator<HyperLinkObject> iterator = hyperLinkObjectList.iterator();
+ while (iterator.hasNext()) {
+ HyperLinkObject hyperlinkObject = iterator.next();
+ if (hyperlinkObject.getIsDefault()) {
+
+ defaultHyperLinkObject.add(hyperlinkObject);
+ }
+
+ }
+
+ // test which kind of navigation by consulting preference
+ String navigationKind = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore().getString(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND);
+
+ // no navigation
+ if (navigationKind.equals(INavigationPreferenceConstant.NO_NAVIGATION)) {
+ // do nothing
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Create default hyperlinks by contributors
+ if (navigationKind.equals(INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION)) {
+ // If clicked-on object is a diagram shortcut, we do not add hyperlinks by contributors
+ if (!(semanticElement instanceof Diagram) && defaultHyperLinkObject.size() == 0) {
+ HyperlinkService hyperlinkService = ServiceUtilsForEObject.getInstance().getServiceRegistry(semanticElement).getService(HyperlinkService.class);
+ defaultHyperLinkObject.addAll(hyperlinkService.getHyperlinks(semanticElement));
+ for (HyperLinkObject hyperlink : defaultHyperLinkObject) {
+ hyperlink.setIsDefault(true);
+ }
+ }
+ }
+
+ if (defaultHyperLinkObject.size() == 1) {
+ // open the diagram
+ final HyperLinkObject hyperlinkObject = defaultHyperLinkObject.get(0);
+ class NavigateHyperlinkCommand extends Command implements INonDirtying {
+
+ private ICommand openLinkCommand;
+
+ NavigateHyperlinkCommand() {
+ super("Navigate hyperlink");
+ }
+
+ @Override
+ public void execute() {
+
+ if (hyperlinkObject.needsOpenCommand()) {
+ try {
+ TransactionalEditingDomain editingDomain = ServiceUtilsForEditPart.getInstance().getTransactionalEditingDomain(getHost());
+ openLinkCommand = new OpenCommand(editingDomain, hyperlinkObject);
+ openLinkCommand.execute(new NullProgressMonitor(), null);
+ } catch (ServiceException | ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ } else {
+ hyperlinkObject.openLink();
+ }
+ }
+
+ @Override
+ public void undo() {
+ if (openLinkCommand != null && openLinkCommand.canUndo()) {
+ try {
+ openLinkCommand.undo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (openLinkCommand != null && openLinkCommand.canRedo()) {
+ try {
+ openLinkCommand.redo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ @Override
+ public void dispose() {
+ if (openLinkCommand != null) {
+ openLinkCommand.dispose();
+ openLinkCommand = null;
+ }
+
+ super.dispose();
+ }
+ }
+ ;
+ return new NavigateHyperlinkCommand();
+ }
+
+ if (defaultHyperLinkObject.size() > 1) {
+ // open a dialog to choose a diagram
+ EditorNavigationDialog diagramNavigationDialog = new EditorNavigationDialog(getHost().getViewer().getControl().getShell(), defaultHyperLinkObject, semanticElement);
+ diagramNavigationDialog.open();
+ final List<HyperLinkObject> hList = diagramNavigationDialog.getSelectedHyperlinks();
+
+ class NavigateHyperlinksCommand extends Command implements INonDirtying {
+
+ private CompositeCommand openLinksCommand;
+
+ NavigateHyperlinksCommand() {
+ super("Navigate hyperlinks");
+ }
+
+ @Override
+ public void execute() {
+ Iterator<HyperLinkObject> iter = hList.iterator();
+ openLinksCommand = CommandUtils.nonDirtyingGMFComposite("Navigate hyperlinks");
+
+ try {
+ TransactionalEditingDomain editingDomain = ServiceUtilsForEditPart.getInstance().getTransactionalEditingDomain(getHost());
+ while (iter.hasNext()) {
+ final HyperLinkObject hyperlinkObject = iter.next();
+ if (hyperlinkObject.needsOpenCommand()) {
+ openLinksCommand.add(new OpenCommand(editingDomain, hyperlinkObject));
+ } else {
+ hyperlinkObject.openLink();
+ }
+ }
+
+ if (openLinksCommand.isEmpty()) {
+ return;
+ }
+
+ openLinksCommand.execute(new NullProgressMonitor(), null);
+ } catch (ServiceException | ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ @Override
+ public void undo() {
+ if (openLinksCommand != null && openLinksCommand.canUndo()) {
+ try {
+ openLinksCommand.undo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (openLinksCommand != null && openLinksCommand.canRedo()) {
+ try {
+ openLinksCommand.redo(new NullProgressMonitor(), null);
+ } catch (ExecutionException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+ }
+ ;
+
+ return new NavigateHyperlinksCommand();
+ }
+
+ // No default hyperlinks, so we open the manager shell if the clicked-on object is not a diagram shotcut
+ if (!(semanticElement instanceof Diagram)) {
+ if (defaultHyperLinkObject.size() == 0) {
+ class AddHyperlinkCommand extends Command {
+ private Command addLinkCommand;
+
+ private AddHyperlinkCommand() {
+ super("Add hyperlink");
+ }
+
+ @Override
+ public void execute() {
+ addLinkCommand = new Command("Add Hyperlink") {
+ @Override
+ public void execute() {
+ Shell parentShell = EditorHelper.getActiveShell();
+ if (((IGraphicalEditPart) getHost()).getNotationView().getElement() instanceof EModelElement) {
+ HyperLinkManagerShell hyperLinkManagerShell = new HyperLinkManagerShell(parentShell, createEditorRegistry(), ((IGraphicalEditPart) getHost()).getEditingDomain(),
+
+ (EModelElement) ((IGraphicalEditPart) getHost()).getNotationView().getElement(),
+ ((IGraphicalEditPart) getHost()).getNotationView(), hyperlinkHelperFactory);
+ hyperLinkManagerShell.setInput(hyperLinkObjectList);
+ hyperLinkManagerShell.open();
+ }
+ }
+ };
+ addLinkCommand.execute();
+ }
+
+ @Override
+ public void undo() {
+ if (addLinkCommand != null && addLinkCommand.canUndo()) {
+ addLinkCommand.undo();
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (addLinkCommand != null && addLinkCommand.canRedo()) {
+ addLinkCommand.redo();
+ }
+ }
+
+ @Override
+ public void dispose() {
+ if (addLinkCommand != null) {
+ addLinkCommand.dispose();
+ addLinkCommand = null;
+ }
+
+ super.dispose();
+ }
+ }
+ ;
+
+ return new AddHyperlinkCommand();
+ }
+ }
+ } catch (Exception e) {
+ Activator.log.error("Impossible to load hyperlinks", e);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * Return the EditorRegistry for nested editor descriptors. Subclass should
+ * implements this method in order to return the registry associated to the
+ * extension point namespace.
+ *
+ * @return the EditorRegistry for nested editor descriptors
+ */
+ protected IPageIconsRegistry createEditorRegistry() {
+ try {
+ return ServiceUtilsForEditPart.getInstance().getService(IPageIconsRegistry.class, getHost());
+ } catch (ServiceException e) {
+ // Return an empty registry always providing null;
+ return new PageIconsRegistry();
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ class OpenCommand extends AbstractTransactionalCommand implements INonDirtying {
+ private final HyperLinkObject hyperlinkObject;
+
+ OpenCommand(TransactionalEditingDomain editingDomain, HyperLinkObject hyperlinkObject) {
+ super(editingDomain, "Navigate hyperlink", null);
+
+ this.hyperlinkObject = hyperlinkObject;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ hyperlinkObject.openLink();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+ /**
+ * The Class OpenDiagramCommand.
+ */
+ private static class OpenDiagramCommand extends AbstractTransactionalCommand {
+
+ /** The diagram to open. */
+ private Diagram diagramToOpen = null;
+
+ /**
+ * Instantiates a new open diagram command.
+ *
+ * @param domain
+ * the domain
+ * @param diagram
+ * the diagram
+ */
+ public OpenDiagramCommand(TransactionalEditingDomain domain, Diagram diagram) {
+ super(domain, "open diagram", null);
+ diagramToOpen = diagram;
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ try {
+ IPageManager pageMngr = ServiceUtilsForEObject.getInstance().getService(IPageManager.class, diagramToOpen);
+ if (pageMngr.isOpen(diagramToOpen)) {
+ pageMngr.selectPage(diagramToOpen);
+ } else {
+ pageMngr.openPage(diagramToOpen);
+ }
+ return CommandResult.newOKCommandResult();
+ } catch (Exception e) {
+ throw new ExecutionException("Can't open diagram", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+
+ /**
+ * Get the open command previously defined by ShortCutEditPolicy
+ *
+ * @param request
+ * @return
+ */
+ protected Command getShortCutOpenCommand(Request request) {
+ IGraphicalEditPart host = (IGraphicalEditPart) getHost();
+ View view = host.getNotationView();
+ EObject element = (view == null) ? null : view.getElement();
+ if ((element instanceof Diagram) && (element.eResource() != null)) {
+ OpenDiagramCommand openDiagramCommand = new OpenDiagramCommand(host.getEditingDomain(), (Diagram) element);
+ return new ICommandProxy(openDiagramCommand);
+ } else {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigationEditPolicyProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigationEditPolicyProvider.java
new file mode 100755
index 0000000..bb15fed
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/NavigationEditPolicyProvider.java
@@ -0,0 +1,69 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.ui.internal.edit.policies.AbstractCreateEditPolicyProvider;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * The Class MyCreateEditPolicyProvider.
+ *
+ * @author Aurélien Didier (Artal Technologies)
+ */
+@SuppressWarnings("restriction")
+public class NavigationEditPolicyProvider extends AbstractCreateEditPolicyProvider {
+
+ /**
+ * Creates the edit policies.
+ *
+ * @param arg0 the arg 0
+ * @see org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider#createEditPolicies(org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ public void createEditPolicies(EditPart editpart) {
+
+ editpart.installEditPolicy(EditPolicyRoles.OPEN_ROLE, new NavigationEditPolicy());
+ }
+
+ /**
+ * Checks if is valid edit part.
+ *
+ * @param editPart the edit part
+ * @return true, if is valid edit part
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.policies.AbstractCreateEditPolicyProvider#isValidEditPart(org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ protected boolean isValidEditPart(EditPart editPart) {
+
+ Object model = editPart.getModel();
+ if (model instanceof NodeImpl) {
+ EObject element = ((NodeImpl) model).getElement();
+ if (element instanceof DNode) {
+ EObject target = ((DNode) element).getTarget();
+ if (!(target instanceof Element)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/OpenDiagramEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/OpenDiagramEditPolicy.java
new file mode 100755
index 0000000..957807f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/OpenDiagramEditPolicy.java
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.OpenDiagramCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * Edit Policy which opens the diagram corresponding to the host's semantic model.
+ *
+ * @author jcorchis
+ */
+public class OpenDiagramEditPolicy extends OpenEditPolicy {
+
+ /**
+ * Returns a Command to open a diagram for the given NalDiagramView.
+ * @return Command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy#getOpenCommand(org.eclipse.gef.Request)
+ */
+ protected Command getOpenCommand(Request request) {
+ EditPart targetEditPart = getTargetEditPart(request);
+ if (targetEditPart instanceof IGraphicalEditPart) {
+ IGraphicalEditPart editPart = (IGraphicalEditPart)targetEditPart;
+ View view = editPart.getNotationView();
+ if (view !=null){
+ EObject element = ViewUtil.resolveSemanticElement(view);
+ if (element instanceof Diagram) {
+ return new ICommandProxy(
+ new OpenDiagramCommand(element));
+ }
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/OpenEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/OpenEditPolicy.java
new file mode 100755
index 0000000..8496de4
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/OpenEditPolicy.java
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.AbstractEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+
+/** Open Shape Edit Policy
+ * <p>
+ * This edit policy handles double click (open) gestures on shapes. When the user
+ * double clicks on an edit part, GEF creates a REQ_OPEN request and subclasses of this
+ * edit policy should handle that request. This policy should be installed with the
+ * policy role OPEN_ROLE. Normally, the corresponding edit policy role
+ * would be defined in {@link org.eclipse.gef.EditPolicy}, but no such role currently exists.
+ * <p>
+ * This edit policy is different from "DirectEditPolicy" even though both are a result of
+ * a double click on a representation in a diagram. With the DIRECT_EDIT_ROLE, some type
+ * of in-diagram editing is performed (e.g., modify a text label, move line segment nodes,
+ * etc.). The OPEN_ROLE policy is typically installed on edit part whose underlying data
+ * can only be examined/modified by opening another editor window. For example, if an edit
+ * part represented another diagram, then an "open" request on that edit part should result
+ * in the corresponding diagram being opened in another editor window.
+ * <p>
+ * Although edit policies for both DIRECT_EDIT_ROLE and OPEN_ROLE could be installed on
+ * an edit part, typically only one of these roles is appropriate.
+ * <p>
+ * @author Kevin Cornell
+ */
+public abstract class OpenEditPolicy extends AbstractEditPolicy {
+
+ /**
+ * Returns the <code>Command</code> to perform the open request.
+ * @param request the Request
+ * @return the command to perform the open
+ */
+ protected abstract Command getOpenCommand(Request request);
+
+ /**
+ * Intercept a command request for REQ_OPEN.
+ * <p>
+ * @see org.eclipse.gef.EditPolicy#getCommand(org.eclipse.gef.Request)
+ */
+ public Command getCommand(Request request) {
+ if (RequestConstants.REQ_OPEN.equals(request.getType()))
+ return getOpenCommand(request);
+ return null;
+ }
+
+ /**
+ * Determine if the request type is supported by this edit policy.
+ * <p>
+ * @see org.eclipse.gef.EditPolicy#understandsRequest(org.eclipse.gef.Request)
+ */
+ public boolean understandsRequest(Request request) {
+ if (RequestConstants.REQ_OPEN.equals(request.getType()))
+ return true;
+ return false;
+ }
+
+ /**
+ * By default, the target edit part is the host edit part.
+ * <p>
+ * @see org.eclipse.gef.EditPolicy#getTargetEditPart(Request)
+ */
+ public EditPart getTargetEditPart(Request request) {
+
+ if (understandsRequest(request))
+ return getHost();
+
+ return null;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutDiagramEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutDiagramEditPolicy.java
new file mode 100755
index 0000000..cf579fe
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutDiagramEditPolicy.java
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+
+/**
+ * This class is used to open a new diagram when the double click is detected.
+ * It is dependent of papyrus environment
+ *
+ * @deprecated since 1.0.2 / use org.eclipse.papyrus.infra.gmfdiag.hyperlink.editpolicies.NavigationEditPolicy
+ *
+ */
+@Deprecated
+public class SiriusShortCutDiagramEditPolicy extends OpenEditPolicy {
+
+ /**
+ * The Class OpenDiagramCommand.
+ */
+ private static class OpenDiagramCommand extends AbstractTransactionalCommand {
+
+ /** The diagram to open. */
+ private Diagram diagramToOpen = null;
+
+ /**
+ * Instantiates a new open diagram command.
+ *
+ * @param domain
+ * the domain
+ * @param diagram
+ * the diagram
+ */
+ public OpenDiagramCommand(TransactionalEditingDomain domain, Diagram diagram) {
+ super(domain, "open diagram", null);
+ diagramToOpen = diagram;
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ try {
+ IPageManager pageMngr = ServiceUtilsForEObject.getInstance().getService(IPageManager.class, diagramToOpen);
+ if (pageMngr.isOpen(diagramToOpen)) {
+ pageMngr.selectPage(diagramToOpen);
+ } else {
+ pageMngr.openPage(diagramToOpen);
+ }
+ return CommandResult.newOKCommandResult();
+ } catch (Exception e) {
+ throw new ExecutionException("Can't open diagram", e);
+ }
+ }
+ }
+
+ /**
+ * {@inheritedDoc}
+ */
+ @Override
+ protected Command getOpenCommand(Request request) {
+ if (((GraphicalEditPart) getHost()).getNotationView().getElement() instanceof Diagram && ((GraphicalEditPart) getHost()).getNotationView().getElement().eResource() != null) {
+ Diagram diagram = (Diagram) ((GraphicalEditPart) getHost()).getNotationView().getElement();
+ OpenDiagramCommand openDiagramCommand = new OpenDiagramCommand(((GraphicalEditPart) getHost()).getEditingDomain(), diagram);
+ return new ICommandProxy(openDiagramCommand);
+ } else {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutEditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutEditPart.java
new file mode 100755
index 0000000..3785287
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutEditPart.java
@@ -0,0 +1,251 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNode3EditPart;
+
+/**
+ * @generated
+ */
+public class SiriusShortCutEditPart extends DNode3EditPart {
+
+ public SiriusShortCutEditPart(View view) {
+ super(view);
+ }
+//
+//
+// /**
+// * @generated
+// */
+// public static final String VISUAL_ID = "Diagram_ShortcutShape";
+//
+// /**
+// * @generated
+// */
+// protected IFigure contentPane;
+//
+// /**
+// * @generated
+// */
+// protected IFigure primaryShape;
+//
+// /**
+// * @generated
+// */
+// public SiriusShortCutEditPart(View view) {
+// super(view);
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected void createDefaultEditPolicies() {
+// super.createDefaultEditPolicies();
+//// installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+////
+//// installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+////
+//// installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+// installEditPolicy(EditPolicyRoles.OPEN_ROLE, new ShortCutDiagramEditPolicy());
+// // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+// // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+// }
+//
+// /**
+// * @generated
+// */
+// protected LayoutEditPolicy createLayoutEditPolicy() {
+// org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+//
+// @Override
+// protected EditPolicy createChildEditPolicy(EditPart child) {
+// View childView = (View) child.getModel();
+// String vid = UMLVisualIDRegistry.getVisualID(childView);
+// if (vid != null) {
+// switch (vid) {
+// case DiagramNameEditPart.VISUAL_ID:
+// return new BorderItemSelectionEditPolicy() {
+//
+// @Override
+// protected List<?> createSelectionHandles() {
+// MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+// mh.setBorder(null);
+// return Collections.singletonList(mh);
+// }
+// };
+// }
+// }
+// EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+// if (result == null) {
+// result = new NonResizableEditPolicy();
+// }
+// return result;
+// }
+//
+// @Override
+// protected Command getMoveChildrenCommand(Request request) {
+// return null;
+// }
+//
+// @Override
+// protected Command getCreateCommand(CreateRequest request) {
+// return null;
+// }
+// };
+// return lep;
+// }
+//
+// /**
+// * Papyrus codeGen
+// *
+// * @generated
+// **/
+// @Override
+// protected void handleNotificationEvent(Notification event) {
+// /*
+// * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+// * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+// */
+// if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+// Object notifier = event.getNotifier();
+// List<?> modelChildren = ((View) getModel()).getChildren();
+// if (false == notifier instanceof Edge
+// && false == notifier instanceof BasicCompartment) {
+// if (modelChildren.contains(event.getNotifier())) {
+// return;
+// }
+// }
+// }
+// super.handleNotificationEvent(event);
+//
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected IFigure createNodeShape() {
+// return primaryShape = new DiagramNodeFigure();
+// }
+//
+// /**
+// * org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure
+// *
+// * @generated
+// */
+// @Override
+// public DiagramNodeFigure getPrimaryShape() {
+// return (DiagramNodeFigure) primaryShape;
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+// if (borderItemEditPart instanceof DiagramNameEditPart) {
+// BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+// locator.setBorderItemOffset(new Dimension(-20, -20));
+// borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+// } else {
+// super.addBorderItem(borderItemContainer, borderItemEditPart);
+// }
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected NodeFigure createNodePlate() {
+// RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+// return result;
+// }
+//
+// /**
+// * Creates figure for this edit part.
+// *
+// * Body of this method does not depend on settings in generation model
+// * so you may safely remove <i>generated</i> tag and modify it.
+// *
+// * @generated
+// */
+// @Override
+// protected NodeFigure createMainFigure() {
+// return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+//
+// }
+//
+// /**
+// * Default implementation treats passed figure as content pane.
+// * Respects layout one may have set for generated figure.
+// *
+// * @param nodeShape
+// * instance of generated figure class
+// * @generated
+// */
+// @Override
+// protected IFigure setupContentPane(IFigure nodeShape) {
+// return nodeShape; // use nodeShape itself as contentPane
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// public IFigure getContentPane() {
+// if (contentPane != null) {
+// return contentPane;
+// }
+// return super.getContentPane();
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected void setForegroundColor(Color color) {
+// if (primaryShape != null) {
+// primaryShape.setForegroundColor(color);
+// }
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected void setLineWidth(int width) {
+// super.setLineWidth(width);
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// protected void setLineType(int style) {
+// if (primaryShape instanceof IPapyrusNodeFigure) {
+// ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+// }
+// }
+//
+// /**
+// * @generated
+// */
+// @Override
+// public EditPart getPrimaryChildEditPart() {
+// return getChildBySemanticHint(UMLVisualIDRegistry.getType(DiagramNameEditPart.VISUAL_ID));
+// }
+//
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutPreviewEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutPreviewEditPolicy.java
new file mode 100755
index 0000000..12a8146
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortCutPreviewEditPolicy.java
@@ -0,0 +1,228 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import java.util.List;
+
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.MouseEvent;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.render.util.DiagramRenderUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusPopupBarEditPolicy;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.uml.sirius.common.diagram.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * This class is used to open a popup containing a preview of the diagram shortcut
+ * when the mouse hovers over the shortcut
+ *
+ */
+public class SiriusShortCutPreviewEditPolicy extends PapyrusPopupBarEditPolicy {
+ private final double SCALE_FACTOR = 0.5;
+ private int CUSTOM_ITEM_WIDTH;
+ private int CUSTOM_ITEM_HEIGHT;
+
+ private Diagram diagram;
+ private Image previewImage;
+ private Image scaledPreviewImage;
+ private int maxHeight;
+ private int maxWidth;
+
+ public SiriusShortCutPreviewEditPolicy() {
+ super();
+ maxHeight = 0;
+ maxWidth = 0;
+ }
+
+ @Override
+ public void activate() {
+ super.activate();
+ if (getHost() instanceof GraphicalEditPart) {
+ if (((GraphicalEditPart) getHost()).getNotationView() != null
+ && ((GraphicalEditPart) getHost()).getNotationView().getElement() instanceof Diagram) {
+ diagram = (Diagram) ((GraphicalEditPart) getHost()).getNotationView().getElement();
+ }
+ }
+ }
+
+ @Override
+ public void deactivate() {
+ super.deactivate();
+ if (previewImage != null) {
+ previewImage.dispose();
+ }
+
+ if (scaledPreviewImage != null) {
+ scaledPreviewImage.dispose();
+ }
+ }
+
+ @Override
+ protected void showDiagramAssistant(Point referencePoint) {
+ if (diagram != null) {
+ if (previewImage == null) {
+ try {
+ previewImage = DiagramRenderUtil.renderToSWTImage(diagram);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ } else {
+ int optimalWidth = (int) (this.getHost().getRoot().getViewer().getControl().getBounds().width * SCALE_FACTOR);
+ int optimalHeight = (int) (this.getHost().getRoot().getViewer().getControl().getBounds().height * SCALE_FACTOR);
+
+ if (scaledPreviewImage == null || optimalWidth != maxWidth || optimalHeight != maxHeight) {
+ maxHeight = optimalHeight;
+ maxWidth = optimalWidth;
+ if (scaledPreviewImage != null) {
+ scaledPreviewImage.dispose();
+ }
+ scaledPreviewImage = resize(previewImage, maxHeight, maxWidth);
+ }
+
+ CUSTOM_ITEM_WIDTH = scaledPreviewImage.getBounds().width;
+ CUSTOM_ITEM_HEIGHT = scaledPreviewImage.getBounds().height;
+
+ super.showDiagramAssistant(referencePoint);
+ }
+ }
+ }
+
+ /**
+ * initialize the popup bars from the list of action descriptors.
+ */
+ @Override
+ protected void initPopupBars() {
+
+ List<PopupBarDescriptor> theList = getPopupBarDescriptors();
+ if (theList.isEmpty()) {
+ return;
+ }
+ myBalloon = createPopupBarFigure();
+
+ int iTotal = CUSTOM_ITEM_WIDTH * theList.size() + ACTION_MARGIN_RIGHT;
+
+ getBalloon().setSize(
+ iTotal,
+ CUSTOM_ITEM_HEIGHT + 2 * ACTION_BUTTON_START_Y);
+
+ int xLoc = ACTION_BUTTON_START_X;
+ int yLoc = ACTION_BUTTON_START_Y;
+
+ for (PopupBarDescriptor theDesc : theList) {
+ // Button b = new Button(theDesc.myButtonIcon);
+ PreviewPopupBarLabelHandle b = new PreviewPopupBarLabelHandle(theDesc.getIcon());
+
+ Rectangle r1 = new Rectangle();
+ r1.setLocation(xLoc, yLoc);
+ xLoc += CUSTOM_ITEM_WIDTH;
+ r1.setSize(CUSTOM_ITEM_WIDTH, CUSTOM_ITEM_HEIGHT - ACTION_MARGIN_RIGHT);
+
+ Label l = new Label();
+ l.setText(theDesc.getToolTip());
+
+ b.setToolTip(l);
+ b.setPreferredSize(CUSTOM_ITEM_WIDTH, CUSTOM_ITEM_HEIGHT);
+ b.setBounds(r1);
+
+ getBalloon().add(b);
+
+ b.addMouseMotionListener(this);
+ b.addMouseListener(this.myMouseKeyListener);
+ }
+ }
+
+ @Override
+ protected void appendPopupBarDescriptors() {
+ addPopupBarDescriptor(null, scaledPreviewImage, null, "Preview of " + LabelInternationalization.getInstance().getDiagramLabel(diagram)); // IElementType, Image, DragTracker, String
+ }
+
+ private Image resize(Image image, int maxWidth, int maxHeight) {
+ double widthD = image.getBounds().width;
+ double heightD = image.getBounds().height;
+ double maxWidthD = maxWidth;
+ double maxHeightD = maxHeight;
+
+ if (widthD > maxWidthD || heightD > maxHeightD) {
+ Double scale = 1.0;
+
+ if (widthD > maxWidthD && heightD > maxHeightD) {
+ if (widthD >= heightD) {
+ scale = maxWidthD / widthD;
+ } else {
+ scale = maxHeightD / heightD;
+ }
+ } else {
+ if (widthD > maxWidthD) {
+ scale = maxWidthD / widthD;
+ } else {
+ scale = maxHeightD / heightD;
+ }
+ }
+
+ int scaledWidth = (int) (widthD * scale);
+ int scaledHeight = (int) (heightD * scale);
+
+ Image scaled = new Image(Display.getDefault(), scaledWidth, scaledHeight);
+ GC gc = new GC(scaled);
+ gc.setAntialias(SWT.ON);
+ gc.setInterpolation(SWT.HIGH);
+ gc.drawImage(image, 0, 0,
+ image.getBounds().width, image.getBounds().height,
+ 0, 0, scaledWidth, scaledHeight);
+ gc.dispose();
+
+ return scaled;
+ } else {
+ return image;
+ }
+ }
+
+ /**
+ * The preview image handler
+ *
+ */
+ private class PreviewPopupBarLabelHandle extends PopupBarLabelHandle {
+ public PreviewPopupBarLabelHandle(Image theImage) {
+ super(null, theImage);
+ }
+
+ /**
+ * @see org.eclipse.draw2d.IFigure#handleMouseEntered(org.eclipse.draw2d.MouseEvent)
+ * flip myMouseOver bit and repaint
+ */
+ @Override
+ public void handleMouseEntered(MouseEvent event) {
+ calculateEnabled();
+ super.handleMouseEntered(event);
+ myMouseOver = true;
+ }
+
+ /**
+ * @see org.eclipse.draw2d.IFigure#handleMouseExited(org.eclipse.draw2d.MouseEvent)
+ * flip myMouseOver bit and repaint
+ */
+ @Override
+ public void handleMouseExited(MouseEvent event) {
+ super.handleMouseExited(event);
+ myMouseOver = false;
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortcutEditPartProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortcutEditPartProvider.java
new file mode 100755
index 0000000..45af402
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShortcutEditPartProvider.java
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
+
+/**
+ * An EditPolicyProvider for Papyrus
+ *
+ * @author Shuai Li
+ *
+ */
+public class SiriusShortcutEditPartProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ /**
+ * {@inheritDoc}
+ *
+ * This provider can handle GraphicalEditParts
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateEditPoliciesOperation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ EditPart editPart = epOperation.getEditPart();
+ try {
+ ServicesRegistry registry = ServiceUtilsForEditPart.getInstance().getServiceRegistry(editPart);
+ if (registry == null) {
+ // We're not in the Papyrus context
+ return false;
+ }
+ } catch (ServiceException ex) {
+ // We're not in the Papyrus context
+ // Ignore the exception and do not provide the EditPolicy
+ return false;
+ }
+ return editPart instanceof IGraphicalEditPart;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Installs the Papyrus edit policy
+ */
+ @Override
+ public void createEditPolicies(EditPart editPart) {
+ if (editPart instanceof IPrimaryEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new SiriusShortCutPreviewEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.OPEN_ROLE, new SiriusShortCutDiagramEditPolicy());
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShowViewEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShowViewEditPolicy.java
new file mode 100755
index 0000000..7ae14a8
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/hyperlink/SiriusShowViewEditPolicy.java
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.hyperlink;
+
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The Class ShowViewEditPolicy.
+ */
+public class SiriusShowViewEditPolicy {
+
+ /** The policy. */
+ private static OpenEditPolicy policy = null;
+
+ /**
+ * Gets the open edit policy.
+ *
+ * @return the open edit policy
+ */
+ private static OpenEditPolicy getOpenEditPolicy() {
+ if (policy == null) {
+ policy = new OpenEditPolicy() {
+
+ @Override
+ protected Command getOpenCommand(Request request) {
+
+ String viewId = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewId);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+ };
+ }
+ return policy;
+ }
+
+ /**
+ * Listens to double-click event over some element of the diagram and shows
+ * properties tab.
+ *
+ * @return the open edit policy
+ */
+ // @unused
+ public static OpenEditPolicy createOpenEditPolicy() {
+ return getOpenEditPolicy();
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/refresh/CommonDiagramRefreshExtension.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/refresh/CommonDiagramRefreshExtension.java
new file mode 100755
index 0000000..2fcfef0
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/refresh/CommonDiagramRefreshExtension.java
@@ -0,0 +1,476 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.refresh;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.eclipse.draw2d.AbstractPointListShape;
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.draw2d.ui.geometry.LineSeg;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.DisplayLabelSwitch;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.FilterService;
+import org.eclipse.papyrus.uml.sirius.common.diagram.services.DiagramServices;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.common.tools.api.util.RefreshIdsHolder;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DragAndDropTarget;
+import org.eclipse.sirius.diagram.ResizeKind;
+import org.eclipse.sirius.diagram.business.api.componentization.DiagramMappingsManager;
+import org.eclipse.sirius.diagram.business.api.componentization.DiagramMappingsManagerRegistry;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtension;
+import org.eclipse.sirius.diagram.business.internal.sync.DDiagramElementSynchronizer;
+import org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer;
+import org.eclipse.sirius.diagram.business.internal.sync.DNodeCandidate;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+import org.eclipse.sirius.diagram.description.DiagramElementMapping;
+import org.eclipse.sirius.diagram.description.NodeMapping;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusGMFHelper;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusLayoutDataManager;
+import org.eclipse.sirius.diagram.ui.business.internal.view.RootLayoutData;
+import org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.sirius.ext.base.Option;
+import org.eclipse.sirius.viewpoint.SiriusPlugin;
+import org.eclipse.sirius.viewpoint.description.RepresentationDescription;
+
+/**
+ *
+ * This class add the common bendpoints on sirius diagram
+ *
+ */
+public class CommonDiagramRefreshExtension implements IRefreshExtension {
+
+ private int bendpointDiameter = 7;
+
+ /**
+ * @see org.eclipse.sirius.business.api.refresh.IRefreshExtension#beforeRefresh(org.eclipse.sirius.DDiagram)
+ */
+ @Override
+ public void beforeRefresh(DDiagram diagram) {
+ DisplayLabelSwitch.setStereotypeFilter(FilterService.INSTANCE.isStereotypeFilterActivated(diagram));
+ DisplayLabelSwitch.setQualifiedNameFilter(FilterService.INSTANCE.isQualifiedNameFilterActivated(diagram));
+ }
+
+ /**
+ * @see org.eclipse.sirius.business.api.refresh.IRefreshExtension#postRefresh(org.eclipse.sirius.DDiagram)
+ */
+ @Override
+ public void postRefresh(DDiagram diagram) {
+
+ List<EObject> list = new ArrayList<>();
+ diagram.eAllContents().forEachRemaining(list::add);
+// ResetStyleHelper.resetStyle(list);
+ if (FilterService.INSTANCE.isBenpointFilterActivated(diagram)) {
+ Collection<Point> bendpointsToDraw = getCommonBenpointsToDraw(diagram);
+ Diagram gmfDiagram = SiriusGMFHelper.getGmfDiagram(diagram);
+ Option<GraphicalEditPart> gef = GMFHelper.getGraphicalEditPart(gmfDiagram);
+ if (gef.some()) {
+ if (bendpointsToDraw.size() > 0) {
+ drawCommonBendpoints((DSemanticDiagram) diagram, (IGraphicalEditPart) gef.get(), bendpointsToDraw);
+ }
+ }
+ }
+// Not this one : DiagramHelper.refresh(gmfDiagram.get,true);
+ }
+
+ /**
+ *
+ * @param diagram
+ *
+ */
+ protected Collection<Point> getCommonBenpointsToDraw(DDiagram diagram) {
+ final Collection<Point> commonBendpointsToDraw = new HashSet<>();
+
+ Diagram gmfDiagram = SiriusGMFHelper.getGmfDiagram(diagram);
+ EList<Edge> edges = gmfDiagram.getEdges();
+ for (Edge edge : edges) {
+ // recupérer la figure
+ GraphicalEditPart currentEditPart = GMFHelper.getGraphicalEditPart(edge).get();
+ IFigure currentEdgeFigure = ((IGraphicalEditPart) currentEditPart).getFigure();
+ if (currentEdgeFigure instanceof AbstractPointListShape) {
+ PointList bendPoints = ((AbstractPointListShape) currentEdgeFigure).getPoints();
+ EClass eClass = null;
+ if (currentEditPart instanceof IGraphicalEditPart) {
+ final EObject el = ((IGraphicalEditPart) currentEditPart).resolveSemanticElement();
+ if (el != null) {
+ eClass = el.eClass();
+
+ // 2. find all connections editpart with same source AND/OR same target than the
+ // current one
+ if (currentEditPart instanceof ConnectionEditPart && eClass != null) {
+ final EditPart sourceEP = ((ConnectionEditPart) currentEditPart).getSource();
+ final EditPart targetEP = ((ConnectionEditPart) currentEditPart).getTarget();
+ final Set<Object> allConnectionsEP = new HashSet<>();
+ // 2.1. get all potential editpart connections
+ if (sourceEP instanceof AbstractGraphicalEditPart
+ && targetEP instanceof AbstractGraphicalEditPart) {
+ allConnectionsEP.addAll(((AbstractGraphicalEditPart) sourceEP).getSourceConnections());
+ allConnectionsEP.addAll(((AbstractGraphicalEditPart) targetEP).getSourceConnections());
+ allConnectionsEP.addAll(((AbstractGraphicalEditPart) sourceEP).getTargetConnections());
+ allConnectionsEP.addAll(((AbstractGraphicalEditPart) targetEP).getTargetConnections());
+ allConnectionsEP.remove(currentEditPart);
+ }
+
+ // 2.2 get the figure for these connections and keep only figure when its
+ // editpart has the same kind than the current one
+ final Set<Connection> allConnections = new HashSet<>();
+ if (allConnectionsEP.size() > 0) {
+ for (final Object current : allConnectionsEP) {
+ // the editpart be instance of the same class
+ if (current.getClass().isInstance(currentEditPart)
+ && currentEditPart.getClass().isInstance(current)
+ && current instanceof IGraphicalEditPart) {
+ final EObject resolvedElement = ((IGraphicalEditPart) current)
+ .resolveSemanticElement();
+ if (resolvedElement != null && eClass != null
+ && resolvedElement.eClass() != eClass) {
+ continue;// we draw ben point only for elements which have the same eClass,
+ // when
+ // this
+ // eClass is not null
+ }
+ final IFigure currentFig = ((IGraphicalEditPart) current).getFigure();
+ if (currentFig instanceof Connection) {
+ allConnections.add((Connection) currentFig);
+ }
+ }
+ }
+ }
+
+ // 3. Create the list of the LineSeg of the current figure
+ final List<LineSeg> refs = new ArrayList<>();
+ for (int i = 0; i < bendPoints.size() - 1; i++) {
+ LineSeg seg = new LineSeg(bendPoints.getPoint(i), bendPoints.getPoint(i + 1));
+ refs.add(seg);
+ }
+
+ // 4. find common segments between the current figure and each others link
+ // we need to associate each common segment to the concerned link
+ final Map<Connection, Map<LineSeg, List<LineSeg>>> segs = new HashMap<>();
+ for (Connection currentConn : allConnections) {
+ final PointList currentPoints = currentConn.getPoints();
+ final Map<LineSeg, List<LineSeg>> mapSegs = new HashMap<>();
+ segs.put(currentConn, mapSegs);
+ for (LineSeg refSeg : refs) {
+ final List<LineSeg> commonSubSegs = new ArrayList<>();
+ mapSegs.put(refSeg, commonSubSegs);
+ for (int i = 0; i < currentPoints.size() - 1; i++) {
+ LineSeg tmp = new LineSeg(currentPoints.getPoint(i),
+ currentPoints.getPoint(i + 1));
+ PointList intersection = getCommonSegment(refSeg, tmp);
+ if (intersection.size() == 2) {
+ if (!intersection.getFirstPoint().equals(intersection.getLastPoint())) {
+ double distanceFromFirst = refSeg.getOrigin()
+ .getDistance(intersection.getFirstPoint());
+ double distanceFromSecond = refSeg.getOrigin()
+ .getDistance(intersection.getLastPoint());
+ final LineSeg commonSeg;
+ // we arrange the 2 points in order to have the first point nearest of
+ // the
+ // start
+ // of the current segment
+ if (distanceFromFirst < distanceFromSecond) {
+ commonSeg = new LineSeg(intersection.getFirstPoint(),
+ intersection.getLastPoint());
+ } else {
+ commonSeg = new LineSeg(intersection.getLastPoint(),
+ intersection.getFirstPoint());
+ }
+ commonSubSegs.add(commonSeg);
+ }
+ }
+ }
+ }
+ }
+
+ // 5. we look for the bendpoints crossing existing link on the model, then
+ // crossing their common segment with the current figure, to find bendpoints to
+ // draw
+ for (Entry<Connection, Map<LineSeg, List<LineSeg>>> entry : segs.entrySet()) {
+ final Map<LineSeg, List<LineSeg>> commonSegMap = entry.getValue();
+ for (int i = 0; i < refs.size(); i++) { // we iterate on the segments of the current
+ // figure
+
+ // 5.1 find required values to find bendpoints to draw
+ final LineSeg currentFigureSeg = refs.get(i);
+ final List<LineSeg> currentCommonSegs = commonSegMap.get(currentFigureSeg);
+
+ final LineSeg previousSeg;
+ final List<LineSeg> previousCommonSegs;
+
+ final LineSeg nextSeg;
+ final List<LineSeg> nextCommonSegs;
+
+ // obtain previous segs of the current figure
+ if (i != 0) {
+ previousSeg = refs.get(i - 1);
+ previousCommonSegs = commonSegMap.get(previousSeg);
+ } else {
+ previousSeg = null;
+ previousCommonSegs = null;
+ }
+
+ // obtain next segs of the current figure
+ if (i != refs.size() - 1) {
+ nextSeg = refs.get(i + 1);
+ nextCommonSegs = commonSegMap.get(nextSeg);
+ } else {
+ nextSeg = null;
+ nextCommonSegs = null;
+ }
+
+ LineSeg previousCommonSeg = null;
+ LineSeg nextCommonSeg = null;
+
+ // we iterate on the common subsegment shared with others link with the current
+ // figure
+ for (int a = 0; a < currentCommonSegs.size(); a++) {
+ final LineSeg curr = currentCommonSegs.get(a);
+ final Point first = curr.getOrigin();
+ final Point second = curr.getTerminus();
+ // obtain previous common seg
+ if (a == 0) {
+ if (previousCommonSegs != null && previousCommonSegs.size() > 0) {
+ previousCommonSeg = previousCommonSegs
+ .get(previousCommonSegs.size() - 1);
+ } else {
+ previousCommonSeg = null;
+ }
+ } else {
+ previousCommonSeg = currentCommonSegs.get(a - 1);
+ }
+
+ // obtain next common seg
+ if (a == currentCommonSegs.size() - 1) {
+ if (nextCommonSegs != null && nextCommonSegs.size() > 0) {
+ nextCommonSeg = nextCommonSegs.get(0);
+ } else {
+ nextCommonSeg = null;
+ }
+ } else {
+ nextCommonSeg = currentCommonSegs.get(a + 1);
+ }
+
+ // 5.2 calculates bendpoints visibility
+
+ // determining if we draw first point :
+ if (previousCommonSeg == null) {
+ if (i == 0) {// first segment of the figure
+ if (!bendPoints.getFirstPoint().equals(first)) {
+ // we draw the point when it is not the first anchor of the figure
+ commonBendpointsToDraw.add(first);
+ }
+ } else {
+ commonBendpointsToDraw.add(first);
+ }
+ } else if (!previousCommonSeg.getTerminus().equals(first)) {
+ // the previous common seg doesn't share this point with the current segment
+ // we draw the first point
+ commonBendpointsToDraw.add(first);
+ }
+
+ // determining if we draw the second point
+ if (nextCommonSeg == null) {
+ if (i == refs.size() - 1) {
+ if (!bendPoints.getLastPoint().equals(second)) {
+ // we draw the point when it is not the first anchor of the figure
+ commonBendpointsToDraw.add(second);
+ }
+ } else {
+ commonBendpointsToDraw.add(second);
+ }
+ } else if (!nextCommonSeg.getOrigin().equals(second)) {
+ // the next common seg doesn't share this point with the current segment
+ // we draw the second point
+ commonBendpointsToDraw.add(second);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return commonBendpointsToDraw;
+ }
+
+ /**
+ *
+ * @param seg1 the first segment
+ * @param seg2 the secong segment
+ * @return
+ */
+ public static final PointList getCommonSegment(final LineSeg seg1, final LineSeg seg2) {
+ final List<Point> list = new ArrayList<>();
+ list.add(seg1.getOrigin());
+ list.add(seg2.getOrigin());
+ list.add(seg1.getTerminus());
+ list.add(seg2.getTerminus());
+
+ List<Point> commonPoints = new ArrayList<>();
+ for (Point point : list) {
+ if (!commonPoints.contains(point)) {
+ if (seg1.containsPoint(point, 0) && seg2.containsPoint(point, 0)) {
+ commonPoints.add(point);
+ }
+ }
+ }
+
+ final PointList result = new PointList();
+ for (final Point point : commonPoints) {
+ result.addPoint(point);
+ }
+ return result;
+ }
+
+ /**
+ *
+ * @return <code>true</code> according to the preference store
+ */
+ protected boolean getDrawBendpointPreferenceValue() {
+ return true;
+ }
+
+ /**
+ * Calculate the best diameter and set the diameter value
+ *
+ * @param diameter the diameter of the bendpoints (if diameter<=1, we set the
+ * diameter to 0)
+ */
+ public void setBendPointDiameter(final int diameter) {
+ if (diameter <= 1) {
+ this.bendpointDiameter = 0;
+ }
+ if (diameter % 2 != 0) {
+ this.bendpointDiameter = diameter;
+ } else {
+ setBendPointDiameter(diameter + 1);
+ }
+ }
+
+ /**
+ *
+ * @return the bendpoint diameter
+ */
+ protected final int getBendPointDiameter() {
+ return bendpointDiameter;
+ }
+
+ /**
+ *
+ * @param figure graphics
+ * @param pointsToDraw the list of the points to draw
+ */
+ public void drawCommonBendpoints(DSemanticDiagram diagram, final IGraphicalEditPart gep,
+ final Collection<Point> bendPoints) {
+
+ // See PapyrusEdgeFigure for the initial algorithm.
+ final int diameter = getBendPointDiameter();
+ for (final Point point : bendPoints) {
+
+ Point adjustedPoint = new Point((double) point.x - (double) bendpointDiameter / 2,
+ (double) point.y - (double) bendpointDiameter / 2);
+ NodeMapping mapping = null;
+
+ // Before we were using
+ // NodeMapping mapping= (NodeMapping)
+ // DiagramServices.getDiagramServices().getMappingByName(diagram.getDescription(),
+ // "Bendpoint");
+ // but in papyrus context, description is not initialized as expected so we have
+ // to use DiagramMappingsManager
+ DiagramMappingsManager dmm = getMappingManager(diagram);
+ for (NodeMapping map : dmm.getNodeMappings()) {
+ if (map.getName().equals("Bendpoint")) {
+ mapping = map;
+ }
+ }
+// DNodeCandidate nodeCandidate = new DNodeCandidate(mapping, diagram.getTarget(), diagram, rId);
+ DNode node = createNode(mapping, diagram.getTarget(), diagram, diagram);
+ node.setResizeKind(ResizeKind.NONE_LITERAL);
+ // find how to set color
+ Dimension dim = new Dimension(bendpointDiameter, bendpointDiameter);
+ RootLayoutData layoutData = new RootLayoutData(node, adjustedPoint, dim);
+ SiriusLayoutDataManager.INSTANCE.addData(layoutData);
+
+ }
+ }
+
+ public DNode createNode(NodeMapping mapping, EObject modelElement, DragAndDropTarget container, DDiagram diagram) {
+ final DDiagram diag = diagram;
+
+ ModelAccessor accessor = SiriusPlugin.getDefault().getModelAccessorRegistry().getModelAccessor(modelElement);
+ IInterpreter interpreter = SiriusPlugin.getDefault().getInterpreterRegistry().getInterpreter(modelElement);
+ final DDiagramSynchronizer diagramSync = new DDiagramSynchronizer(interpreter, diag.getDescription(), accessor);
+ diagramSync.setDiagram((DSemanticDiagram) diagram);
+ final DDiagramElementSynchronizer elementSync = diagramSync.getElementSynchronizer();
+ RefreshIdsHolder rId = RefreshIdsHolder.getOrCreateHolder(diagram);
+
+ DNodeCandidate nodeCandidate = new DNodeCandidate(mapping, modelElement, container, rId);
+ return (DNode) elementSync.createNewNode(getMappingManager((DSemanticDiagram) diag), nodeCandidate, false);
+ }
+
+ private DiagramMappingsManager getMappingManager(final DSemanticDiagram diagram) {
+ Session session = SessionManager.INSTANCE.getSession(diagram.getTarget());
+ return DiagramMappingsManagerRegistry.INSTANCE.getDiagramMappingsManager(session, diagram);
+ }
+
+ /**
+ * @param targetDescription
+ * @param targetMappingName
+ * @return
+ */
+ public DiagramElementMapping getMappingByName(RepresentationDescription targetDescription,
+ String targetMappingName) {
+ DiagramElementMapping mapping = null;
+
+ if ((targetMappingName != null) && (targetDescription != null)
+ && (targetDescription instanceof DiagramDescription)) {
+ mapping = DiagramServices.getDiagramServices()
+ .getAbstractNodeMapping((DiagramDescription) targetDescription, targetMappingName);
+ if (mapping == null) {
+ mapping = DiagramServices.getDiagramServices().getEdgeMapping((DiagramDescription) targetDescription,
+ targetMappingName);
+ }
+ }
+
+ return mapping;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/refresh/CommonRefreshExtensionProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/refresh/CommonRefreshExtensionProvider.java
new file mode 100755
index 0000000..85464ec
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/refresh/CommonRefreshExtensionProvider.java
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.refresh;
+
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtension;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider;
+
+public class CommonRefreshExtensionProvider implements IRefreshExtensionProvider {
+
+ private static final CommonDiagramRefreshExtension REFRESH_EXTENSION = new CommonDiagramRefreshExtension();
+
+ public CommonRefreshExtensionProvider() {
+ // empty constructor
+ }
+
+ /**
+ * @see org.eclipse.sirius.business.api.refresh.IRefreshExtensionProvider#getRefreshExtension(org.eclipse.sirius.DDiagram)
+ */
+ public IRefreshExtension getRefreshExtension(DDiagram viewPoint_p) {
+ return REFRESH_EXTENSION;
+ }
+
+ /**
+ * @see org.eclipse.sirius.business.api.refresh.IRefreshExtensionProvider#provides(org.eclipse.sirius.DDiagram)
+ */
+ public boolean provides(DDiagram viewPoint_p) {
+ return true;
+ }
+
+ }
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/AbstractSemanticEditionService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/AbstractSemanticEditionService.java
new file mode 100755
index 0000000..d6fc41a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/AbstractSemanticEditionService.java
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.services;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+
+public abstract class AbstractSemanticEditionService {
+ protected final IElementEditService getCommandProvider(final EObject eobject) {
+ return ElementEditServiceUtils.getCommandProvider(eobject);
+ }
+ protected final ICommand getGMFEditCommand(final EObject eobject, final IEditCommandRequest request) {
+ final IElementEditService provider = getCommandProvider(eobject);
+ final ICommand cmd = provider.getEditCommand(request);
+ return cmd;
+ }
+ protected final Command getEMFEditCommand(final EObject eobject, final IEditCommandRequest request) {
+ final ICommand cmd = getGMFEditCommand(eobject, request);
+ return cmd == null ? null : GMFtoEMFCommandWrapper.wrap(cmd);
+ }
+ //
+ // protected final IElementType getElementType(EClass eClass) {
+ // IElementType elementType = ElementTypeRegistry.getInstance().getElementType(eClass);
+ // if(elementType==null) {
+ // ElementTypeSetConfigurationRegistry.getInstance();
+ // elementType = ElementTypeRegistry.getInstance().getElementType(eClass);
+ // }
+ // return elementType;
+ // }
+ protected final TransactionalEditingDomain getEditingDomain(final EObject eobject) {
+ return TransactionUtil.getEditingDomain(eobject);// TODO check another way in Papyrus
+ }
+ protected final boolean isPapyrusResource(final EObject eobject) {
+ final Resource res = eobject.eResource();
+ if (res != null) {
+ ResourceSet rset = res.getResourceSet();
+ return rset instanceof ModelSet;
+ }
+ return false;
+ }
+ protected final IElementType getElementType(final String elementTypeId) {
+ IElementType elementType = ElementTypeRegistry.getInstance().getType(elementTypeId);
+ if (elementType == null) { // initialize Papyrus element type when we are in a pure Sirius context
+ // si on initialise ça dans un context Sirius, la création depuis la palette d'un diagramme de Classe papyrus ne marche plus!!!
+ // mais ça marche presque parfaitement en Sirius natif...
+ // System.out.println("loading elementtypesetconfiguration");
+ // ElementTypeSetConfigurationRegistry.getInstance();
+ // elementType = ElementTypeRegistry.getInstance().getType(elementTypeId);
+ // System.out.println("loaded");
+ }
+ return elementType;
+ }
+// protected final boolean isInCurrentArchitecture(final EObject eobject, final IElementType elementType) {
+// if (isPapyrusResource(eobject)) {
+// MergedArchitectureContext str = new ArchitectureDescriptionUtils((ModelSet) eobject.eResource().getResourceSet()).getArchitectureContext();
+// for (ElementTypeSetConfiguration current : str.getElementTypes()) {
+// // if (!UML_METAMODEL_URI.equals(typeSet.getMetamodelNsURI())) {
+// // continue;
+// // }
+// for (ElementTypeConfiguration tmp : current.getElementTypeConfigurations()) {
+// String hint = tmp.getHint();
+// String id = tmp.getIdentifier();
+// String name = tmp.getName();
+// System.out.println("hint=" + hint);
+// System.out.println("id=" + id);
+// System.out.println("name=" + name);
+// }
+// }
+// // TODO : to be continued when we will be able to open sirius in papyrus
+// }
+// return false;
+// }
+}
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/ConstraintServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/ConstraintServices.java
new file mode 100755
index 0000000..5b25317
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/ConstraintServices.java
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.services;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Namespace;
+
+/**
+ */
+public class ConstraintServices {
+
+ /**
+ * Returns the associated Namespace element if found, <code>null</code> otherwise.
+ *
+ * @param object
+ * the object for which we want to find the associated Namespace.
+ * @return the associated Namespace element if found, <code>null</code> otherwise.
+ */
+ public Namespace getAssociatedNamespace(EObject object) {
+ final Namespace namespace;
+ if (object instanceof Namespace) {
+ namespace = (Namespace)object;
+ } else if (object != null) {
+ namespace = getAssociatedNamespace(object.eContainer());
+ } else {
+ namespace = null;
+ }
+ return namespace;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/DiagramHelper.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/DiagramHelper.java
new file mode 100755
index 0000000..ce34f6e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/DiagramHelper.java
@@ -0,0 +1,161 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.services;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.sirius.business.api.dialect.DialectManager;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.viewpoint.DRepresentation;
+import org.eclipse.sirius.viewpoint.DSemanticDecorator;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+import org.eclipse.sirius.viewpoint.description.RepresentationDescription;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+
+/**
+ *
+ */
+public class DiagramHelper {
+
+ private static DiagramHelper instance;
+
+ protected DiagramHelper() {
+ }
+
+ public static DiagramHelper getService() {
+ if (instance == null) {
+ instance = new DiagramHelper();
+ }
+ return instance;
+ }
+
+ public RepresentationDescription getDescription(DRepresentation representation) {
+ return DialectManager.INSTANCE.getDescription(representation);
+ }
+
+ /**
+ * Returns whether the given diagram use the given description
+ *
+ * @param diagram
+ * current diagram
+ * @param diagramDescriptionId_p
+ * a DiagramDescriptionConstants
+ */
+ public boolean isA(DRepresentation diagram, String descriptionId) {
+ if (diagram != null) {
+ RepresentationDescription description = getDescription(diagram);
+ return isA(description, descriptionId);
+ }
+ return false;
+ }
+
+ /**
+ * Returns whether the given diagram description is the given description
+ *
+ * @param diagram_p
+ * current diagram
+ * @param diagramDescriptionId
+ * a DiagramDescriptionConstants
+ */
+ public boolean isA(RepresentationDescription description, String diagramDescriptionId) {
+ if (description != null) {
+ if (diagramDescriptionId == null) {
+ return true;
+ }
+ return diagramDescriptionId.equals(description.getName());
+ }
+ return false;
+ }
+
+ public boolean hasKind(DRepresentation diagram, String diagramDescriptionId) {
+ if (diagram != null) {
+ RepresentationDescription description = getDescription(diagram);
+ return hasKind(description, diagramDescriptionId);
+ }
+ return false;
+ }
+
+ private boolean hasKind(RepresentationDescription description, String diagramDescriptionId) {
+ if (description != null) {
+ if (diagramDescriptionId == null) {
+ return true;
+ }
+ return description.getName().contains(diagramDescriptionId);
+ }
+ return false;
+ }
+
+ /**
+ * Returns the DDiagram owning the given element
+ *
+ * @param current
+ * @return
+ */
+ public DDiagram getDiagramContainer(EObject current) {
+ if (current instanceof DDiagram) {
+ return ((DDiagram) current);
+ }
+ return (DDiagram) EcoreUtil2.getFirstContainer(current, DiagramPackage.Literals.DDIAGRAM);
+ }
+
+ public RepresentationDescription getDescription(Session session, String descriptionId) {
+ Collection<Viewpoint> viewpoints = session.getSelectedViewpoints(true);
+ for (Viewpoint viewpoint : viewpoints) {
+ for (RepresentationDescription description : viewpoint.getOwnedRepresentations()) {
+ if (descriptionId.equals(description.getName())) {
+ return description;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the current session for the given diagram_p
+ *
+ * @param diagram
+ * @return
+ */
+ public Session getSession(DRepresentation diagram) {
+ if (diagram instanceof DSemanticDecorator) {
+ EObject target = ((DSemanticDecorator) diagram).getTarget();
+ if (target == null) {
+ return null;
+ }
+ return SessionManager.INSTANCE.getSession(target);
+ }
+ return null;
+ }
+
+ public DRepresentation createDRepresentation(String name, EObject semantic, RepresentationDescription description, Session session, IProgressMonitor monitor) {
+ return DialectManager.INSTANCE.createRepresentation(name, semantic, description, session, monitor);
+ }
+
+ /**
+ * @param decorator
+ * @return
+ */
+ public DRepresentation getRepresentation(DSemanticDecorator decorator) {
+ if (decorator instanceof DRepresentation) {
+ return ((DRepresentation) decorator);
+ }
+ return (DRepresentation) EcoreUtil2.getFirstContainer(decorator, ViewpointPackage.Literals.DREPRESENTATION);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/DiagramServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/DiagramServices.java
new file mode 100755
index 0000000..c94c30b
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/DiagramServices.java
@@ -0,0 +1,448 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.common.tools.api.util.RefreshIdsHolder;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DragAndDropTarget;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.api.componentization.DiagramMappingsManager;
+import org.eclipse.sirius.diagram.business.api.componentization.DiagramMappingsManagerRegistry;
+import org.eclipse.sirius.diagram.business.internal.helper.decoration.DecorationHelperInternal;
+import org.eclipse.sirius.diagram.business.internal.metamodel.helper.MappingHelper;
+import org.eclipse.sirius.diagram.business.internal.metamodel.operations.DDiagramSpecOperations;
+import org.eclipse.sirius.diagram.business.internal.sync.DDiagramElementSynchronizer;
+import org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer;
+import org.eclipse.sirius.diagram.business.internal.sync.DEdgeCandidate;
+import org.eclipse.sirius.diagram.business.internal.sync.DNodeCandidate;
+import org.eclipse.sirius.diagram.description.ContainerMapping;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+import org.eclipse.sirius.diagram.description.DiagramElementMapping;
+import org.eclipse.sirius.diagram.description.EdgeMapping;
+import org.eclipse.sirius.diagram.description.EdgeMappingImport;
+import org.eclipse.sirius.diagram.description.IEdgeMapping;
+import org.eclipse.sirius.diagram.description.MappingBasedDecoration;
+import org.eclipse.sirius.diagram.description.NodeMapping;
+import org.eclipse.sirius.diagram.description.filter.FilterDescription;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.sirius.viewpoint.SiriusPlugin;
+import org.eclipse.sirius.viewpoint.description.RepresentationDescription;
+import org.eclipse.sirius.viewpoint.description.SemanticBasedDecoration;
+
+public class DiagramServices {
+
+ private static DiagramServices singleton = null;
+
+ public static DiagramServices getDiagramServices() {
+ if (singleton == null) {
+ singleton = new DiagramServices();
+ }
+ return singleton;
+ }
+
+ /**
+ * @param pDiagram
+ * @param sourceNode
+ * @param targetNode
+ * @param semanticObject
+ * @param mapping
+ * @return
+ */
+ public DEdge findDEdgeElement(DDiagram pDiagram, EdgeTarget sourceNode, EdgeTarget targetNode,
+ EObject semanticObject, EdgeMapping mapping) {
+ for (DEdge anEdge : DDiagramSpecOperations.getEdgesFromMapping(pDiagram, mapping)) {
+ if ((anEdge.getTarget() != null) && anEdge.getTarget().equals(semanticObject)
+ && anEdge.getSourceNode().equals(sourceNode) && anEdge.getTargetNode().equals(targetNode)) {
+ return anEdge;
+ }
+ }
+ return null;
+ }
+
+ public DEdge createEdge(EdgeMapping mapping, EdgeTarget sourceView, EdgeTarget targetView, EObject semanticObject) {
+ ModelAccessor accessor = SiriusPlugin.getDefault().getModelAccessorRegistry().getModelAccessor(semanticObject);
+ IInterpreter interpreter = SiriusPlugin.getDefault().getInterpreterRegistry().getInterpreter(semanticObject);
+
+ if (mapping == null) {
+ return null;
+ }
+
+ if ((sourceView == null) || (targetView == null)) {
+ return null;
+ }
+
+ final DDiagram diagram = DiagramHelper.getService().getDiagramContainer(sourceView);
+ RefreshIdsHolder rId = RefreshIdsHolder.getOrCreateHolder(diagram);
+ DEdgeCandidate edgeCandidate = new DEdgeCandidate(mapping, semanticObject, sourceView, targetView, rId);
+
+ final DDiagramSynchronizer diagramSync = new DDiagramSynchronizer(interpreter, diagram.getDescription(),
+ accessor);
+ diagramSync.setDiagram((DSemanticDiagram) diagram);
+ final DDiagramElementSynchronizer elementSync = diagramSync.getElementSynchronizer();
+ /* maps for decorations */
+ final Map<EdgeMapping, Collection<MappingBasedDecoration>> edgeToMappingBasedDecoration = new HashMap<EdgeMapping, Collection<MappingBasedDecoration>>();
+ final Map<String, Collection<SemanticBasedDecoration>> edgeToSemanticBasedDecoration = new HashMap<String, Collection<SemanticBasedDecoration>>();
+
+ /* create the mapping to edge targets map */
+ final Map<DiagramElementMapping, Collection<EdgeTarget>> mappingsToEdgeTargets = new HashMap<DiagramElementMapping, Collection<EdgeTarget>>();
+
+ DDiagramElement sourceElement = null;
+ DDiagramElement targetElement = null;
+ DiagramElementMapping sourceMapping = null;
+ DiagramElementMapping targetMapping = null;
+
+ if (sourceView instanceof DDiagramElement) {
+ sourceElement = (DDiagramElement) sourceView;
+ sourceMapping = sourceElement.getDiagramElementMapping();
+ }
+
+ if (targetView instanceof DDiagramElement) {
+ targetElement = (DDiagramElement) targetView;
+ targetMapping = targetElement.getDiagramElementMapping();
+ }
+
+ if (sourceMapping != null) {
+ mappingsToEdgeTargets.put(sourceMapping, new ArrayList<EdgeTarget>());
+ }
+ if ((targetMapping != null) && !targetMapping.equals(sourceMapping)) {
+ mappingsToEdgeTargets.put(targetMapping, new ArrayList<EdgeTarget>());
+ }
+
+ if (sourceMapping != null) {
+ mappingsToEdgeTargets.get(sourceMapping).add(sourceView);
+ }
+ if ((targetMapping != null) && !sourceView.equals(targetView)) {
+ mappingsToEdgeTargets.get(targetMapping).add(targetView);
+ }
+ final DecorationHelperInternal decorationHelper = new DecorationHelperInternal(diagram, interpreter, accessor);
+ decorationHelper.computeDecorations(mappingsToEdgeTargets, edgeToSemanticBasedDecoration,
+ edgeToMappingBasedDecoration);
+ return elementSync.createNewEdge(getMappingManager((DSemanticDiagram) diagram), edgeCandidate,
+ mappingsToEdgeTargets, edgeToMappingBasedDecoration, edgeToSemanticBasedDecoration);
+ }
+
+ private DiagramMappingsManager getMappingManager(final DSemanticDiagram diagram) {
+ Session session = SessionManager.INSTANCE.getSession(diagram.getTarget());
+ return DiagramMappingsManagerRegistry.INSTANCE.getDiagramMappingsManager(session, diagram);
+ }
+
+ public Set<DEdge> getOutgoingEdges(EdgeTarget node) {
+ DDiagram diagram = DiagramHelper.getService().getDiagramContainer(node);
+ Set<DEdge> returnedSet = new HashSet<DEdge>();
+ returnedSet.addAll(node.getOutgoingEdges());
+ returnedSet.retainAll(diagram.getEdges());
+ return returnedSet;
+ }
+
+ public EdgeMapping getEdgeMapping(final DiagramDescription description, String mappingName) {
+ for (final EdgeMapping edgeMapping : description.getAllEdgeMappings()) {
+ if (edgeMapping.getName().equals(mappingName)) {
+ return edgeMapping;
+ }
+ }
+ return null;
+ }
+
+ public EdgeMapping getEdgeMapping(final DDiagram diagram, String mappingName) {
+ final DiagramDescription description = diagram.getDescription();
+ return getEdgeMapping(description, mappingName);
+ }
+
+ /**
+ * Returns a DiagramElementMapping from an edge (works with
+ * EdgeMappingImport)
+ *
+ * @param aEdge
+ */
+ public DiagramElementMapping getEdgeMapping(DEdge aEdge) {
+ if ((aEdge != null) && (aEdge.getActualMapping() != null)) {
+ IEdgeMapping mapping = aEdge.getActualMapping();
+ if ((mapping != null) && (mapping instanceof EdgeMappingImport)) {
+ mapping = MappingHelper.getEdgeMapping((EdgeMappingImport) mapping);
+ }
+
+ if ((mapping != null) && (mapping instanceof DiagramElementMapping)) {
+ return (DiagramElementMapping) mapping;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * This method tests if a Node is a BorderedNode
+ *
+ * @param node
+ * : a DNode in a diagram
+ * @return true if the current node is a borderedNode
+ */
+ public boolean isABorderedNode(AbstractDNode node) {
+ if (null == node) {
+ return false;
+ }
+ EObject container = node.eContainer();
+ if (null == container) {
+ return false;
+ }
+ if (container instanceof DDiagram) {
+ return false;
+ }
+ if (container instanceof AbstractDNode) {
+ AbstractDNode nodeContainer = (AbstractDNode) container;
+ return nodeContainer.getOwnedBorderedNodes().contains(node);
+ }
+ return false;
+ }
+
+ /**
+ * remove a Node view
+ *
+ * @param node
+ * a node
+ */
+ public void removeNodeView(DNode node) {
+ EObject container = node.eContainer();
+ if (container != null) {
+ if (container instanceof DDiagram) {
+ ((DDiagram) container).getOwnedDiagramElements().remove(node);
+ }
+ if (container instanceof DNodeContainer) {
+ DNodeContainer nodeContainer = (DNodeContainer) container;
+ if (nodeContainer.getOwnedDiagramElements().contains(node)) {
+ nodeContainer.getOwnedDiagramElements().remove(node);
+ }
+ if (nodeContainer.getOwnedBorderedNodes().contains(node)) {
+ nodeContainer.getOwnedBorderedNodes().remove(node);
+ }
+ }
+ if (container instanceof DNode) {
+ ((DNode) container).getOwnedBorderedNodes().remove(node);
+ }
+ }
+ }
+
+ public void removeNodeListElementView(AbstractDNode node) {
+ EObject container = node.eContainer();
+ if ((container != null) && (container instanceof DNodeList)) {
+ ((DNodeList) container).getOwnedElements().remove(node);
+ }
+ }
+
+ public void removeAbstractDNodeView(AbstractDNode node) {
+ EObject container = node.eContainer();
+ if (container != null) {
+ if (container instanceof DDiagram) {
+ ((DDiagram) container).getOwnedDiagramElements().remove(node);
+ } else if (container instanceof DNodeContainer) {
+ DNodeContainer nodeContainer = (DNodeContainer) container;
+ if (nodeContainer.getOwnedDiagramElements().contains(node)) {
+ nodeContainer.getOwnedDiagramElements().remove(node);
+ }
+ if (nodeContainer.getOwnedBorderedNodes().contains(node)) {
+ nodeContainer.getOwnedBorderedNodes().remove(node);
+ }
+ } else if (container instanceof DNode) {
+ ((DNode) container).getOwnedBorderedNodes().remove(node);
+ } else if (container instanceof DNodeList) {
+ ((DNodeList) container).getOwnedElements().remove(node);
+ }
+ }
+ }
+
+ /**
+ * remove a container View
+ *
+ * @param container
+ * a container
+ */
+ public void removeContainerView(EObject container) {
+ EObject owner = container.eContainer();
+ if (owner != null) {
+ if (owner instanceof DDiagram) {
+ ((DDiagram) owner).getOwnedDiagramElements().remove(container);
+ }
+ if (owner instanceof DNodeContainer) {
+ DNodeContainer nodeContainer = (DNodeContainer) owner;
+ if (nodeContainer.getOwnedDiagramElements().contains(container)) {
+ nodeContainer.getOwnedDiagramElements().remove(container);
+ }
+ }
+ }
+ }
+
+ public AbstractDNode createNode(NodeMapping mapping, EObject modelElement, DragAndDropTarget container,
+ DDiagram diagram) {
+ final DDiagram diag = diagram;
+
+ ModelAccessor accessor = SiriusPlugin.getDefault().getModelAccessorRegistry().getModelAccessor(modelElement);
+ IInterpreter interpreter = SiriusPlugin.getDefault().getInterpreterRegistry().getInterpreter(modelElement);
+ final DDiagramSynchronizer diagramSync = new DDiagramSynchronizer(interpreter, diag.getDescription(), accessor);
+ diagramSync.setDiagram((DSemanticDiagram) diagram);
+ final DDiagramElementSynchronizer elementSync = diagramSync.getElementSynchronizer();
+ RefreshIdsHolder rId = RefreshIdsHolder.getOrCreateHolder(diagram);
+
+ DNodeCandidate nodeCandidate = new DNodeCandidate(mapping, modelElement, container, rId);
+ return (AbstractDNode) elementSync.createNewNode(getMappingManager((DSemanticDiagram) diag), nodeCandidate,
+ false);
+ }
+
+ /**
+ * @param targetDescription
+ * @param targetMappingName
+ * @return
+ */
+ public DiagramElementMapping getMappingByName(RepresentationDescription targetDescription,
+ String targetMappingName) {
+ DiagramElementMapping mapping = null;
+
+ if ((targetMappingName != null) && (targetDescription != null)
+ && (targetDescription instanceof DiagramDescription)) {
+ mapping = DiagramServices.getDiagramServices()
+ .getAbstractNodeMapping((DiagramDescription) targetDescription, targetMappingName);
+ if (mapping == null) {
+ mapping = DiagramServices.getDiagramServices().getEdgeMapping((DiagramDescription) targetDescription,
+ targetMappingName);
+ }
+ }
+
+ return mapping;
+ }
+
+ //Problem: les mappings de la description sont toujours nuls.
+ public NodeMapping getAbstractNodeMapping(final DiagramDescription description, String mappingName) {
+
+ for (NodeMapping nodeMapping : description.getNodeMappings()) {
+ if (nodeMapping.getName().equals(mappingName)) {
+ return nodeMapping;
+ }
+ for (NodeMapping borderedMapping : nodeMapping.getBorderedNodeMappings()) {
+ if (borderedMapping.getName().equals(mappingName)) {
+ return borderedMapping;
+ }
+ }
+ }
+ for (ContainerMapping nodeMapping : description.getContainerMappings()) {
+ if (nodeMapping.getName().equals(mappingName)) {
+ return (NodeMapping) nodeMapping;
+ }
+ // recursively
+ List<ContainerMapping> visited = new ArrayList<ContainerMapping>();
+ NodeMapping anm = getAbstractNodeInSubMapping(mappingName, nodeMapping, visited);
+ if (anm!=null){
+ return anm;
+ }
+ }
+ return null;
+ }
+
+ private NodeMapping getAbstractNodeInSubMapping(String mappingName, ContainerMapping nodeMapping,
+ List<ContainerMapping> visited) {
+ visited.add(nodeMapping);
+ for (DiagramElementMapping mapping : nodeMapping.getSubNodeMappings()) {
+ if ((mapping instanceof NodeMapping)) {
+
+ if (mapping.getName().equals(mappingName)) {
+ return (NodeMapping) mapping;
+ }
+ for (NodeMapping borderedMapping : ((NodeMapping) mapping).getBorderedNodeMappings()) {
+ if (borderedMapping.getName().equals(mappingName)) {
+ return borderedMapping;
+ }
+ }
+ if (nodeMapping instanceof ContainerMapping && mapping instanceof ContainerMapping
+ && !visited.contains(mapping)) {
+ NodeMapping result = getAbstractNodeInSubMapping(mappingName, (ContainerMapping) mapping,
+ visited);
+ if (result != null) {
+ return result;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public ContainerMapping getContainerMapping(final DDiagram diagram, String mappingName) {
+ final DiagramDescription description = diagram.getDescription();
+ for (ContainerMapping aContainerMapping : description.getContainerMappings()) {
+ for (ContainerMapping aSubContainerMapping : getAllContainerMappings(aContainerMapping)) {
+ if (aSubContainerMapping.getName().equals(mappingName)) {
+ return aSubContainerMapping;
+ }
+ }
+ }
+ return null;
+ }
+
+ public List<ContainerMapping> getAllContainerMappings(ContainerMapping mapping) {
+ List<ContainerMapping> returnedList = new ArrayList<ContainerMapping>();
+ returnedList.add(mapping);
+ for (ContainerMapping aMapping : mapping.getSubContainerMappings()) {
+ returnedList.addAll(getAllContainerMappings(aMapping));
+ }
+ return returnedList;
+ }
+
+ /**
+ * remove an edge from a diagram
+ *
+ * @param anEdge
+ * the edge to remove from diagram
+ */
+ public void removeEdgeView(DEdge anEdge) {
+
+ EObject container = anEdge.eContainer();
+ if ((container != null) && (container instanceof DDiagram)) {
+ if (anEdge.getSourceNode() != null) {
+ anEdge.getSourceNode().getIncomingEdges().remove(anEdge);
+ anEdge.getSourceNode().getOutgoingEdges().remove(anEdge);
+ }
+ if (anEdge.getTargetNode() != null) {
+ anEdge.getTargetNode().getOutgoingEdges().remove(anEdge);
+ anEdge.getTargetNode().getIncomingEdges().remove(anEdge);
+ }
+ ((DDiagram) container).getOwnedDiagramElements().remove(anEdge);
+ }
+ }
+
+ public boolean isFilterActivate(String filterName, DDiagram ddiag){
+ EList<FilterDescription> activatedFilters = ddiag.getActivatedFilters();
+ for (FilterDescription filterDescription : activatedFilters) {
+ if (filterName.equalsIgnoreCase(filterDescription.getName())){
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/EcoreUtil2.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/EcoreUtil2.java
new file mode 100755
index 0000000..7282a75
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/EcoreUtil2.java
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.services;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * This class contains convenient static methods for working with EMF objects.
+ */
+public class EcoreUtil2 {
+ public static String defaultPattern = "{1} {0}"; //$NON-NLS-1$
+
+
+
+ /**
+ * Gets the first container with the specified class type of the specified
+ * element.
+ *
+ * @param elt
+ * The element to check container.
+ * @param cls
+ * The expected container class.
+ * @return The corresponding container elsewhere <code>null</code>.
+ */
+ public static EObject getFirstContainer(EObject elt, EClass cls) {
+ EObject container = null;
+
+ if (elt != null) {
+ container = elt.eContainer();
+ }
+
+ if (container == null) {
+ return null;
+ }
+
+ if (cls.isSuperTypeOf(container.eClass())) {
+ return container;
+ }
+
+ return getFirstContainer(container, cls);
+ }
+
+ /**
+ * Gets the first container with the specified class type of the specified
+ * elements.
+ *
+ * @param elt
+ * The element to check container.
+ * @param cls
+ * The expected container classes list.
+ * @return The corresponding container elsewhere <code>null</code>.
+ */
+ public static EObject getFirstContainer(EObject elt, List<EClass> cls) {
+ EObject container = null;
+
+ if (elt != null) {
+ container = elt.eContainer();
+ }
+
+ if (container == null) {
+ return null;
+ }
+
+ for (EClass c : cls) {
+ if (c.isSuperTypeOf(container.eClass())) {
+ return container;
+ }
+ }
+
+ return getFirstContainer(container, cls);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/SemanticDeletionService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/SemanticDeletionService.java
new file mode 100755
index 0000000..816dc4f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/services/SemanticDeletionService.java
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.services;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+/**
+ *
+ * use a change context object with a such query to call one of my method aql:self.createNewElementFromEClassName(containerView,'ownedType')
+ *
+ */
+public class SemanticDeletionService extends AbstractSemanticEditionService {
+
+ public EObject deleteElement(final EObject current, final EObject containerView) {
+ if (isPapyrusResource(current) || true) {//currently true to be able to test this method in a pure Sirius context
+ final DestroyElementRequest request = new DestroyElementRequest(current, false);
+ if (request != null) {
+ Command cmd = getEMFEditCommand(current, request);
+ final TransactionalEditingDomain domain = getEditingDomain(current);
+ if (domain != null) {
+ domain.getCommandStack().execute(cmd);
+
+ }
+ }
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/validation/Exception.txt b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/validation/Exception.txt
new file mode 100755
index 0000000..929bdbc
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/validation/Exception.txt
@@ -0,0 +1,80 @@
+
+!ENTRY org.eclipse.papyrus.uml.diagram.common 4 0 2021-12-03 14:09:36.272
+!MESSAGE ViewID access failure
+!STACK 0
+org.eclipse.papyrus.infra.core.services.ServiceNotFoundException: Can't find ServiceRegistry from 'org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain@3b210eb8'
+ at org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF.getServiceRegistry(ServiceUtilsForGMF.java:79)
+ at org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider$StatusDecorator.activate(ValidationDecoratorProvider.java:225)
+ at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusDecoratorEditPolicy.activate(SiriusDecoratorEditPolicy.java:64)
+ at org.eclipse.gef.editparts.AbstractEditPart.activateEditPolicies(AbstractEditPart.java:174)
+ at org.eclipse.gef.editparts.AbstractEditPart.activate(AbstractEditPart.java:156)
+ at org.eclipse.gef.editparts.AbstractGraphicalEditPart.activate(AbstractGraphicalEditPart.java:195)
+ at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$0(GraphicalEditPart.java:1)
+ at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.activate(GraphicalEditPart.java:206)
+ at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractBorderedDiagramElementEditPart.activate(AbstractBorderedDiagramElementEditPart.java:185)
+ at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:215)
+ at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.addChild(GraphicalEditPart.java:1317)
+ at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:781)
+ at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.refreshChild(GraphicalEditPart.java:1230)
+ at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.handleMajorSemanticChange(GraphicalEditPart.java:1256)
+ at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart.handleNotificationEvent(AbstractDiagramContainerEditPart.java:272)
+ at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.notifyChanged(GraphicalEditPart.java:1436)
+ at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.fireNotification(DiagramEventBroker.java:505)
+ at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.resourceSetChanged(DiagramEventBroker.java:400)
+ at org.eclipse.gmf.runtime.diagram.ui.DiagramEventBrokerThreadSafe.resourceSetChanged(DiagramEventBrokerThreadSafe.java:74)
+ at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
+ at org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:273)
+ at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
+ at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
+ at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
+ at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
+ at org.eclipse.papyrus.infra.core.utils.TransactionHelper.run(TransactionHelper.java:103)
+ at org.eclipse.papyrus.infra.core.utils.TransactionHelper.run(TransactionHelper.java:82)
+ at org.eclipse.papyrus.infra.core.utils.TransactionHelper.run(TransactionHelper.java:71)
+ at org.eclipse.papyrus.infra.editor.welcome.internal.WelcomePageService.trackActivePage(WelcomePageService.java:245)
+ at org.eclipse.papyrus.infra.editor.welcome.internal.WelcomePageService$SashListener.pageActivated(WelcomePageService.java:321)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.SashContainerEventsProvider.firePageActivatedEvent(SashContainerEventsProvider.java:105)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer.setActivePage(SashWindowsContainer.java:431)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.SashWindowsContainer.setActivePageRequest(SashWindowsContainer.java:409)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.TabFolderPart.pageChange(TabFolderPart.java:341)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.TabFolderPart$2.pageChangeEvent(TabFolderPart.java:147)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.PTabFolder$EventsManager.firePageChange(PTabFolder.java:558)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.PTabFolder.firePageChange(PTabFolder.java:401)
+ at org.eclipse.papyrus.infra.core.sasheditor.internal.PTabFolder$5.widgetSelected(PTabFolder.java:163)
+ at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
+ at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
+ at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
+ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
+ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1067)
+ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
+ at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:766)
+ at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3243)
+ at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1881)
+ at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:330)
+ at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
+ at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
+ at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
+ at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
+ at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
+ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
+ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
+ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
+ at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
+ at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
+ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
+ at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
+ at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
+ at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
+ at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:566)
+ at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
+ at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
+ at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
+ at org.eclipse.equinox.launcher.Main.main(Main.java:1434)
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/validation/SiriusValidationDecoratorProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/validation/SiriusValidationDecoratorProvider.java
new file mode 100755
index 0000000..aaecafb
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.common.diagram/src/org/eclipse/papyrus/uml/sirius/common/diagram/validation/SiriusValidationDecoratorProvider.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.common.diagram.validation;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
+import org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor;
+
+/**
+ * Adapted from Papyrus GMF Diagram code
+ */
+// TODO VL check we don't impact papyrus GMF Diagram or Sirius environnement
+// TODO we get the exception in the file Exception.txt probably due to this contribution
+public class SiriusValidationDecoratorProvider extends ValidationDecoratorProvider implements IDecoratorProvider {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider#createDecorators(org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget)
+ *
+ * @param decoratorTarget
+ */
+ @Override
+ public void createDecorators(IDecoratorTarget decoratorTarget) {
+ EditPart editPart = decoratorTarget.getAdapter(EditPart.class);
+ if (editPart instanceof GraphicalEditPart ||
+ editPart instanceof AbstractConnectionEditPart) {
+ Object model = editPart.getModel();
+ if ((model instanceof View)) {
+ View view = (View) model;
+ if (!(view instanceof Edge) && !view.isSetElement()) {
+ return;
+ }
+ }
+ EditDomain ed = editPart.getViewer().getEditDomain();
+ if (!(ed instanceof DiagramEditDomain)) {
+ return;
+ }
+ if (((DiagramEditDomain) ed).getEditorPart() instanceof DDiagramEditor) {
+ decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
+ }
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider#provides(org.eclipse.gmf.runtime.common.core.service.IOperation)
+ *
+ * @param operation
+ * @return
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (!(operation instanceof CreateDecoratorsOperation)) {
+ return false;
+ }
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ View view = decoratorTarget.getAdapter(
+ View.class);
+ return view != null /* && ModelEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view)) */;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.classpath b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.classpath
new file mode 100755
index 0000000..4a00bec
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.classpath
@@ -0,0 +1,11 @@
+<?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-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.project b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.project
new file mode 100755
index 0000000..a379ebf
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.sirius.diagram.architecture</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.core.resources.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.core.runtime.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..1a3bd02
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.pde.api.tools.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/META-INF/MANIFEST.MF b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..07fc1f3
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Papyrus- SiriusDiagram - Sirius Contribution for UML Architecture (Incubation)
+Bundle-SymbolicName: org.eclipse.papyrus.uml.sirius.diagram.architecture;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.sirius.diagram.architecture.Activator
+Bundle-Vendor: Eclipse Modeling Project
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.infra.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.0,7.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.activity;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.communication;bundle-version="[5.1.0,6.0.0)",
+ org.eclipse.papyrus.uml.diagram.component;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.composite;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.deployment;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.interactionoverview;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.profile;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.sequence;bundle-version="[6.1.0,7.0.0)",
+ org.eclipse.papyrus.uml.diagram.statemachine;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.diagram.timing;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.diagram.usecase;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer;bundle-version="[1.0.0,2.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.uml.sirius.diagram.architecture
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.sirius.diagram.architecture.internal.utils
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/about.html b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/about.html
new file mode 100755
index 0000000..867ae65
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/about.html
@@ -0,0 +1,37 @@
+#-------------------------------------------------------------------------------
+# Copyright (C) 2021 Aurélien Didier
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#-------------------------------------------------------------------------------
+<!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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/build.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/build.properties
new file mode 100755
index 0000000..2e4d537
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ resources/
+src.includes = about.html
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/plugin.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/plugin.xml
new file mode 100755
index 0000000..7eed07f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.architecture.models">
+ <model
+ path="resources/sirius-diagram.architecture">
+ </model>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/pom.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/pom.xml
new file mode 100755
index 0000000..5497079
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/pom.xml
@@ -0,0 +1,11 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.sirius.diagram.architecture</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/resources/sirius-diagram.architecture b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/resources/sirius-diagram.architecture
new file mode 100755
index 0000000..b0c2e24
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/resources/sirius-diagram.architecture
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDomain xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:description="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:representation="http://www.eclipse.org/papyrus/sirius/integration/1.0.0/emf/siriusdiagram/representation" xmlns:representation_1="http://www.eclipse.org/papyrus/infra/core/architecture/representation" xmi:id="_pNW38LaHEeiKuPQLywy7Og" id="org.eclipse.papyrus.softwareEngineering" name="Software Engineering" description="The domain of developing software systems" icon="platform:/plugin/org.eclipse.papyrus.uml.architecture/icons/domain.gif">
+ <contexts xmi:type="architecture:ArchitectureDescriptionLanguage" xmi:id="_-tAb0Lp2EeiViqj5DY8SRQ" id="org.eclipse.papyrus.infra.services.edit.TypeContext" name="UML" creationCommandClass="org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand">
+ <viewpoints xmi:type="architecture:ArchitectureViewpoint" xmi:id="_1tp4cOEIEeiLVapXeWCJtQ" id="org.eclipse.papyrus.uml.analysis" name="Software Analysis" icon="platform:/plugin/org.eclipse.papyrus.uml.architecture/icons/viewpoint.gif" representationKinds="_v6j60Ci7EeuXVsN3JsOSRg __pWwYBnpEey3SZW9Qc4G9Q _Lt0sUA68EeyT-6l_Qn7xWQ"/>
+ <viewpoints xmi:type="architecture:ArchitectureViewpoint" xmi:id="_dmWHgLp3EeiViqj5DY8SRQ" id="org.eclipse.papyrus.uml.design" name="Software Design" description="" icon="platform:/plugin/org.eclipse.papyrus.uml.architecture/icons/viewpoint.gif" representationKinds="_v6j60Ci7EeuXVsN3JsOSRg _Lt0sUA68EeyT-6l_Qn7xWQ __pWwYBnpEey3SZW9Qc4G9Q"/>
+ <representationKinds xmi:type="representation:SiriusDiagramPrototype" xmi:id="_v6j60Ci7EeuXVsN3JsOSRg" id="org.eclipse.papyrus.infra.siriusdiag.class" name="New Class Diagram" description="Create a new class diagram." icon="platform:/plugin/org.eclipse.papyrus.uml.architecture/icons/viewpoint.gif" grayedIcon="" implementationID="Sirius" creationCommandClass="org.eclipse.papyrus.infra.siriusdiag.representation.architecture.CreatePapyrusSiriusClassDiagramEditorCommand">
+ <modelRules xmi:type="representation_1:ModelRule" xmi:id="_yQX7oCi7EeuXVsN3JsOSRg" permit="true" elementMultiplicity="1" multiplicity="-1">
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </modelRules>
+ <owningRules xmi:type="representation_1:OwningRule" xmi:id="_zeWKoCi7EeuXVsN3JsOSRg" permit="true" multiplicity="-1">
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </owningRules>
+ <diagramDescription xmi:type="description:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ </representationKinds>
+ <representationKinds xmi:type="representation:SiriusDiagramPrototype" xmi:id="_Lt0sUA68EeyT-6l_Qn7xWQ" id="org.eclipse.papyrus.infra.siriusdiag.statemachine" name="New State Machine Diagram" description="Create a new state machine diagram." icon="platform:/plugin/org.eclipse.papyrus.uml.architecture/icons/viewpoint.gif" grayedIcon="" implementationID="Sirius" creationCommandClass="org.eclipse.papyrus.infra.siriusdiag.representation.architecture.CreatePapyrusSiriusStateMachineDiagramEditorCommand">
+ <modelRules xmi:type="representation_1:ModelRule" xmi:id="_Lt0sUQ68EeyT-6l_Qn7xWQ" permit="true" elementMultiplicity="1" multiplicity="-1">
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </modelRules>
+ <owningRules xmi:type="representation_1:OwningRule" xmi:id="_Lt0sUg68EeyT-6l_Qn7xWQ" permit="true" multiplicity="-1">
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </owningRules>
+ <diagramDescription xmi:type="description:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ </representationKinds>
+ <representationKinds xmi:type="representation:SiriusDiagramPrototype" xmi:id="__pWwYBnpEey3SZW9Qc4G9Q" id="org.eclipse.papyrus.infra.siriusdiag.sequence" name="New Sequence Diagram" description="Create a new sequence diagram." icon="platform:/plugin/org.eclipse.papyrus.uml.architecture/icons/viewpoint.gif" grayedIcon="" implementationID="Sirius" creationCommandClass="org.eclipse.papyrus.infra.siriusdiag.representation.architecture.CreatePapyrusSiriusSequenceDiagramEditorCommand">
+ <modelRules xmi:type="representation_1:ModelRule" xmi:id="__pWwYRnpEey3SZW9Qc4G9Q" permit="true" elementMultiplicity="1" multiplicity="-1">
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </modelRules>
+ <owningRules xmi:type="representation_1:OwningRule" xmi:id="__pWwYhnpEey3SZW9Qc4G9Q" permit="true" multiplicity="-1">
+ <element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </owningRules>
+ <diagramDescription xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ </representationKinds>
+ <metamodel xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+ </contexts>
+</architecture:ArchitectureDomain>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/src/org/eclipse/papyrus/uml/sirius/diagram/architecture/Activator.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/src/org/eclipse/papyrus/uml/sirius/diagram/architecture/Activator.java
new file mode 100755
index 0000000..9b785f8
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/src/org/eclipse/papyrus/uml/sirius/diagram/architecture/Activator.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.diagram.architecture;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.sirius.diagram.architecture"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/src/org/eclipse/papyrus/uml/sirius/diagram/architecture/internal/utils/Sirius_Diagram_Constants.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/src/org/eclipse/papyrus/uml/sirius/diagram/architecture/internal/utils/Sirius_Diagram_Constants.java
new file mode 100755
index 0000000..e89bb7e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.diagram.architecture/src/org/eclipse/papyrus/uml/sirius/diagram/architecture/internal/utils/Sirius_Diagram_Constants.java
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.diagram.architecture.internal.utils;
+
+/**
+ * Constants used by UML Docx template
+ */
+public final class Sirius_Diagram_Constants {
+
+ private Sirius_Diagram_Constants() {
+ // to prevent instanciation
+ }
+
+ public static final String UML_SIRIUS_DIAGRAM_TYPE = "UMLSiriusDiagramType"; //$NON-NLS-1$
+
+ public static final String EMPTY_UML_SIRIUS_DIAGRAM_TYPE = "EmptyUMLSiriusDiagramType"; //$NON-NLS-1$
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/.classpath b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/.classpath
new file mode 100755
index 0000000..e801ebf
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/.project b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/.project
new file mode 100755
index 0000000..e4b6f51
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.sirius.sequence.diagram</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/META-INF/MANIFEST.MF b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..76eb58e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.sirius.sequence.diagram;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.100,4.0.0)",
+ org.eclipse.sirius;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.sequence;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ com.google.guava;bundle-version="[27.1.0,31.0.0)",
+ org.eclipse.papyrus.uml.sirius.common.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.sequence.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.common;bundle-version="[6.4.2,7.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-Activator: org.eclipse.papyrus.uml.sirius.sequence.diagram.Activator
+Export-Package: org.eclipse.papyrus.uml.sirius.sequence.diagram,org.eclipse.papyrus.uml.sirius.sequence.diagram.services
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Automatic-Module-Name: org.eclipse.papyrus.uml.sirius.sequence.diagram
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/about.html b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/about.html
new file mode 100755
index 0000000..164f781
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/about.html
@@ -0,0 +1,36 @@
+<!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>November 30, 2017</p>
+ <h3>License</h3>
+
+ <p>
+ The Eclipse Foundation makes available all content in this plug-in
+ ("Content"). Unless otherwise indicated below, the Content
+ is provided to you under the terms and conditions of the Eclipse
+ Public License Version 2.0 ("EPL"). A copy of the EPL is
+ available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
+ For purposes of the EPL, "Program" 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
+ ("Redistributor") 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/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/build.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/build.properties
new file mode 100755
index 0000000..f565f0a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ description/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+src.includes = description/
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign
new file mode 100755
index 0000000..ea47677
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign
@@ -0,0 +1,971 @@
+<?xml version="1.0" encoding="ASCII"?>
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:filter="http://www.eclipse.org/sirius/diagram/description/filter/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/diagram/sequence/description/tool/2.0.0" xmlns:tool_1="http://www.eclipse.org/sirius/description/tool/1.1.0" xmlns:tool_2="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" name="papyrus" version="12.0.0.2017041100">
+ <ownedViewpoints endUserDocumentation="To work on the fine grained structure and the behaviours of the application." name="SequenceDiagram" modelFileExtension="uml">
+ <ownedRepresentations xsi:type="description_1:SequenceDiagramDescription" dropDescriptions="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='AddHyperlinkView']" documentation="@generated" name="SequenceDiagram" titleExpression="service:getSequenceDiagramName" domainClass="uml::Element" endsOrdering="service:getFragmentsOrderingEnds()" instanceRolesOrdering="feature:lifeline">
+ <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+ <metamodel href="http://www.eclipse.org/sirius/diagram/1.1.0#/"/>
+ <metamodel href="http://www.eclipse.org/sirius/1.1.0#/"/>
+ <metamodel href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ <filters xsi:type="filter:CompositeFilterDescription" name="Hide Observation Point">
+ <filters xsi:type="filter:MappingFilter" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </filters>
+ <defaultLayer name="Sequence">
+ <nodeMappings xsi:type="description_1:InstanceRoleMapping" name="SD_LifelineRole" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:lifeline" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" synchronizationLock="true" documentation="@generated" domainClass="uml.Lifeline">
+ <borderedNodeMappings xsi:type="description_1:ExecutionMapping" name="SD_Lifeline" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="var:self" semanticElements="var:self" synchronizationLock="true" documentation="@generated" domainClass="uml.Lifeline" startingEndFinderExpression="var:self" finishingEndFinderExpression="var:self">
+ <borderedNodeMappings xsi:type="description_1:ExecutionMapping" name="SD_ExecutionSpecificationNode" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getExecutionSpecifications" semanticElements="service:computeSemanticElements" documentation="@generated" domainClass="ExecutionSpecification" reusedBorderedNodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']" startingEndFinderExpression="aql:self.getStart()" finishingEndFinderExpression="aql:self.getFinish()">
+ <borderedNodeMappings xsi:type="description_1:ObservationPointMapping" name="TimeConstraint" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getTimeConstraints()" domainClass="TimeConstraint">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" sizeComputationExpression="5" labelPosition="node" resizeKind="EAST_WEST" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <forbiddenSides>WEST</forbiddenSides>
+ <forbiddenSides>EAST</forbiddenSides>
+ </style>
+ </borderedNodeMappings>
+ <borderedNodeMappings xsi:type="description_1:ObservationPointMapping" name="TimeObservation" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getTimeObservations()" synchronizationLock="true" domainClass="TimeObservation">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" sizeComputationExpression="5" labelPosition="node" resizeKind="EAST_WEST" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <forbiddenSides>WEST</forbiddenSides>
+ <forbiddenSides>EAST</forbiddenSides>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:SquareDescription" labelSize="12" showIcon="false" labelExpression="" resizeKind="NORTH_SOUTH" width="2" height="5" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='Execution%20Color']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <borderedNodeMappings xsi:type="description_1:StateMapping" name="StateInvariant" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:coveredBy" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="StateInvariant" startingEndFinderExpression="var:self" finishingEndFinderExpression="var:self">
+ <style xsi:type="style:EllipseNodeDescription" labelSize="12" labelPosition="node" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='Execution%20Color']" horizontalDiameterComputationExpression="15" verticalDiameterComputationExpression="7">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <borderedNodeMappings xsi:type="description_1:EndOfLifeMapping" name="SD_LifelineEOL" preconditionExpression="service:eolPrecondition" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="var:self" semanticElements="var:self" documentation="@generated" domainClass="uml.Lifeline">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" labelExpression="" sizeComputationExpression="5" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/eol.png">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" showIcon="false" labelExpression="" resizeKind="NSEW" width="1" height="40">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:SquareDescription" labelSize="9" labelExpression="service:computeUmlLabel" labelPosition="node" resizeKind="NSEW" width="10" height="4">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ <conditionnalStyles predicateExpression="service:isRepresentingProperty">
+ <style xsi:type="style:SquareDescription" labelSize="9" labelExpression="service:computeUmlLabel" labelPosition="node" resizeKind="NSEW" width="10" height="4">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </conditionnalStyles>
+ </nodeMappings>
+ <nodeMappings name="Gate" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:formalGate" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="Gate">
+ <style xsi:type="style:SquareDescription" labelSize="12" sizeComputationExpression="" labelPosition="node" resizeKind="NSEW" width="2" height="2" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='Execution%20Color']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="LostFound" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="aql:self.message->select(message|message.sendEvent = null and message.receiveEvent != null or message.sendEvent != null and message.receiveEvent = null)" synchronizationLock="true" domainClass="Message">
+ <style xsi:type="style:DotDescription" labelSize="12" showIcon="false" labelExpression="" sizeComputationExpression="1" resizeKind="NSEW" strokeSizeComputationExpression="1">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings xsi:type="description_1:ObservationPointMapping" name="Observation" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:makeUnion()" synchronizationLock="true" domainClass="InteractionFragment">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" labelExpression="" sizeComputationExpression="1" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="Constraint" preconditionExpression="aql:not self.oclIsTypeOf(uml::InteractionConstraint)" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='ConstraintEdit']" createElements="false" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="Constraint">
+ <style xsi:type="style:NoteDescription" labelSize="12" labelExpression="service:getConstraintLabel()" sizeComputationExpression="9" labelPosition="node" resizeKind="NSEW" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='ConstrainedColor']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <edgeMappings xsi:type="description_1:BasicMessageMapping" name="SD_Message" preconditionExpression="aql:self.preConditionMessageBasic()" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" semanticElements="service:getSemanticElements" synchronizationLock="true" documentation="@generated" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@borderedNodeMappings[name='GateBorder'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']/@borderedNodeMappings[name='GateBorder']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@borderedNodeMappings[name='GateBorder'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']/@borderedNodeMappings[name='GateBorder']" targetFinderExpression="service:findOccurrenceSpecificationContextForReceiveEvent" sourceFinderExpression="service:findOccurrenceSpecificationContextForSendEvent" domainClass="Message" useDomainElement="true" reconnections="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='ConnectEvent']" sendingEndFinderExpression="feature:sendEvent" receivingEndFinderExpression="feature:receiveEvent">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ <conditionnalStyles predicateExpression="service:isSynchCall">
+ <style targetArrow="InputFillClosedArrow" sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </conditionnalStyles>
+ </edgeMappings>
+ <edgeMappings name="Basic Message Standard" preconditionExpression="aql:self.preConditionNotMessageBasic()" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@borderedNodeMappings[name='GateBorder'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']/@borderedNodeMappings[name='GateBorder']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@borderedNodeMappings[name='GateBorder'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']/@borderedNodeMappings[name='GateBorder']" targetFinderExpression="service:findOccurrenceSpecificationContextForReceiveEvent" sourceFinderExpression="service:findOccurrenceSpecificationContextForSendEvent" domainClass="Message" useDomainElement="true">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ <conditionnalStyles predicateExpression="service:isSynchCall">
+ <style targetArrow="InputFillClosedArrow" sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </conditionnalStyles>
+ </edgeMappings>
+ <edgeMappings xsi:type="description_1:ReturnMessageMapping" name="MessageReply" preconditionExpression="aql:self.messageSort == uml::MessageSort::reply" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" semanticElements="service:getSemanticElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate']" targetFinderExpression="service:findOccurrenceSpecificationContextForReceiveEvent" sourceFinderExpression="service:findOccurrenceSpecificationContextForSendEvent" domainClass="Message" useDomainElement="true" sendingEndFinderExpression="feature:sendEvent" receivingEndFinderExpression="feature:receiveEvent" invocationMessageFinderExpression="aql:self.getInvocationMessage()">
+ <style lineStyle="dash" sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelExpression="service:computeUmlLabel">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings xsi:type="description_1:CreationMessageMapping" name="CreateMessage" preconditionExpression="aql:self.messageSort == uml::MessageSort::createMessage" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate']" targetFinderExpression="service:findOccurrenceSpecificationContextForReceiveEvent" sourceFinderExpression="service:findOccurrenceSpecificationContextForSendEvent" domainClass="Message" useDomainElement="true" sendingEndFinderExpression="feature:sendEvent" receivingEndFinderExpression="feature:receiveEvent">
+ <style lineStyle="dash" sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings xsi:type="description_1:DestructionMessageMapping" name="DeleteMessage" preconditionExpression="aql:self.messageSort == uml::MessageSort::deleteMessage" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" semanticElements="service:getMessageAssociatedElements" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_LifelineEOL']" targetFinderExpression="service:findOccurrenceSpecificationContextForReceiveEvent" sourceFinderExpression="service:findOccurrenceSpecificationContextForSendEvent" domainClass="Message" useDomainElement="true" sendingEndFinderExpression="feature:sendEvent" receivingEndFinderExpression="feature:receiveEvent">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription showIcon="false" labelExpression="feature:name">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings xsi:type="description_1:BasicMessageMapping" name="MessageLost" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='LostFound']" targetFinderExpression="aql:self" sourceFinderExpression="service:findOccurrenceSpecificationContextForSendEvent" domainClass="Message" useDomainElement="true" sendingEndFinderExpression="feature:sendEvent" receivingEndFinderExpression="service:getLostReceiveAnnotation()">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings xsi:type="description_1:BasicMessageMapping" name="MessageFound" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:message" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='LostFound']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']" targetFinderExpression="service:findOccurrenceSpecificationContextForReceiveEvent" sourceFinderExpression="var:self" domainClass="Message" useDomainElement="true" sendingEndFinderExpression="feature:receiveEvent" receivingEndFinderExpression="feature:receiveEvent">
+ <style>
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="GeneralOrdering" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:eAllContents" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate']" targetFinderExpression="aql:self.after.execution" sourceFinderExpression="aql:self.before.execution" domainClass="GeneralOrdering" useDomainElement="true">
+ <style sizeComputationExpression="2" endsCentering="Both">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="DurationObservation" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="aql:self.getAllDurationObservation()" synchronizationLock="true" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']" targetFinderExpression="aql:self.getTargetObservation()" sourceFinderExpression="aql:self.getSourceObservation()" domainClass="DurationObservation" useDomainElement="true">
+ <style xsi:type="style:BracketEdgeStyleDescription" sourceArrow="InputArrow">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelSize="12" labelExpression="feature:name">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="Duration Constraint" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:eAllContents" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']" targetFinderExpression="aql:self.getTargetConstrainedElement()" sourceFinderExpression="aql:self.getSourceConstrainedElement()" domainClass="DurationConstraint" useDomainElement="true">
+ <style xsi:type="style:BracketEdgeStyleDescription" lineStyle="dot" sourceArrow="InputArrow">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="Comment Link" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='Rename']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='CreateMessage'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='DeleteMessage'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='Duration%20Constraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='DurationObservation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='GeneralOrdering'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='LostFound'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageFound'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageLost'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageReply'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeConstraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeObservation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_LifelineEOL'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='SD_Message']" targetFinderExpression="aql:self.targetFinderExpression()" reconnections="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='Reconnect%20Source%20Link'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='Reconnect%20Target%20Link']">
+ <style lineStyle="dot" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="Constraint Link" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='Rename']" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='CreateMessage'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='DeleteMessage'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='Duration%20Constraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='DurationObservation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='GeneralOrdering'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='LostFound'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageFound'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageLost'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageReply'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeConstraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeObservation'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_LifelineEOL'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='SD_Message']" targetFinderExpression="aql:self.targetFinderExpression()" reconnections="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='Reconnect%20Source%20Link'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.0/@subSections[name='edit']/@ownedTools[name='Reconnect%20Target%20Link']">
+ <style lineStyle="dot" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <containerMappings xsi:type="description_1:CombinedFragmentMapping" name="SD_CombinedFragment" label="Combined Fragment" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:fragment" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" synchronizationLock="true" domainClass="uml.CombinedFragment" dropDescriptions="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" startingEndFinderExpression="aql:self.getStart()" finishingEndFinderExpression="aql:self.getFinish()" coveredLifelinesExpression="feature:covered">
+ <borderedNodeMappings name="GateBorder" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:cfragmentGate" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="Gate">
+ <style xsi:type="style:SquareDescription" labelSize="12" sizeComputationExpression="" labelPosition="node" resizeKind="NSEW" width="2" height="2" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='Execution%20Color']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <subContainerMappings xsi:type="description_1:OperandMapping" name="SD_Operand" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:operand" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.InteractionOperand" dropDescriptions="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" startingEndFinderExpression="aql:self.getStart()" finishingEndFinderExpression="aql:self.getFinish()">
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="1" arcHeight="1" borderSizeComputationExpression="1" labelSize="12" showIcon="false" labelAlignment="LEFT">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="1" arcHeight="1" borderSizeComputationExpression="1" labelSize="12" showIcon="false" labelExpression="feature:interactionOperator" labelAlignment="LEFT">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.0"/>
+ </style>
+ </containerMappings>
+ <containerMappings xsi:type="description_1:InteractionUseMapping" name="InteractionUse" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:eAllContents" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" synchronizationLock="true" domainClass="InteractionUse" dropDescriptions="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" startingEndFinderExpression="var:self" finishingEndFinderExpression="var:self" coveredLifelinesExpression="aql:self.covered">
+ <borderedNodeMappings name="GateBorder" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:actualGate" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="Gate">
+ <style xsi:type="style:SquareDescription" labelSize="12" sizeComputationExpression="" labelPosition="node" resizeKind="NSEW" width="2" height="2" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='Execution%20Color']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" showIcon="false" labelAlignment="LEFT" widthComputationExpression="5" heightComputationExpression="10" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name='UMLPalette']/@entries[name='Execution%20Color']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.0"/>
+ </style>
+ </containerMappings>
+ <toolSections name="Tools">
+ <subSections name="edit">
+ <ownedTools xsi:type="tool:InstanceRoleReorderTool" name="REO_Lifeline" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']">
+ <predecessorBefore name="predecessorBefore"/>
+ <predecessorAfter name="predecessorAfter"/>
+ <instanceRoleMoved>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:reorderLifeline(predecessorBefore, predecessorAfter)"/>
+ </instanceRoleMoved>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="DEL_Execution">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:deleteExecution()"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="DEL_Message">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:self">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="service:element.isNotReply"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:delete"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ReorderTool" name="REO_Fragment" precondition="aql:container.clearRegistry()" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='SD_Message'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageFound'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageLost'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageReply']">
+ <startingEndPredecessorAfter name="startingEndPredecessorAfter"/>
+ <finishingEndPredecessorAfter name="finishingEndPredecessorAfter"/>
+ <onEventMovedOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:reorderFragment(startingEndPredecessorAfter,finishingEndPredecessorAfter)"/>
+ </onEventMovedOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="DEL_Lifeline">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:delete"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="DEL_CombinedFragment">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:deleteCombinedFragment()"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:ReconnectEdgeDescription" name="ConnectEvent" reconnectionKind="RECONNECT_BOTH">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.connectToEvent(edgeView, sourceView, targetView)"/>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="Comment">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DirectEditLabel" name="ConstraintEdit" inputLabelExpression="service:getBodyFromConstraint()">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:setBody(arg0)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:ReconnectEdgeDescription" name="Reconnect Source Link" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:source">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:source.oclIsTypeOf(uml::Constraint)">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:target">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="constrainedElement" valueExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:Unset" featureName="constrainedElement" elementExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:source.oclIsTypeOf(uml::Comment)">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:target">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="annotatedElement" valueExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:Unset" featureName="annotatedElement" elementExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:ReconnectEdgeDescription" name="Reconnect Target Link" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:edgeView.sourceNode.target">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:self.oclIsTypeOf(uml::Constraint)">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="constrainedElement" valueExpression="aql:target"/>
+ <subModelOperations xsi:type="tool_1:Unset" featureName="constrainedElement" elementExpression="aql:source"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:self.oclIsTypeOf(uml::Comment)">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="annotatedElement" valueExpression="aql:target"/>
+ <subModelOperations xsi:type="tool_1:Unset" featureName="annotatedElement" elementExpression="aql:source"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DirectEditLabel" name="Rename" forceRefresh="true">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ </subSections>
+ </toolSections>
+ <toolSections documentation="Create new elements" name="SD_CreateNodes" label="Nodes" icon="/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <ownedTools xsi:type="tool:InstanceRoleCreationTool" name="Lifeline" label="Lifeline" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']" iconPath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/LifelineCreation.gif">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.eContainerOrSelf(uml::Interaction)">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="uml.Lifeline" referenceName="lifeline">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.reorderNewLifeline(instance,predecessor)"/>
+ </firstModelOperations>
+ </initialOperation>
+ <predecessor name="predecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ExecutionCreationTool" name="Action Execution Specification" label="Action Execution Specification" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.eContainerOrSelf(uml::Interaction)">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="ExecutionOccurrenceSpecification" referenceName="fragment" variableName="start">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()+'start'"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="ActionExecutionSpecification" referenceName="fragment">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="ExecutionOccurrenceSpecification" referenceName="fragment" variableName="finish">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()+'finish'"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:viewVariable.target.applyExecution(instance,start,finish)"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:reorderNewFragments(startingEndPredecessor,finishingEndPredecessor,start,finish,instance)"/>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ExecutionCreationTool" name="Behavior Execution Specification" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.interaction">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="ExecutionOccurrenceSpecification" referenceName="fragment" variableName="start">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()+'start'"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="BehaviorExecutionSpecification" referenceName="fragment">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="ExecutionOccurrenceSpecification" referenceName="fragment" variableName="finish">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()+'finish'"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:viewVariable.target.applyExecution(instance,start,finish)"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:reorderNewFragments(startingEndPredecessor,finishingEndPredecessor,start,finish,instance)"/>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:CombinedFragmentCreationTool" name="CombinedFragment" forceRefresh="true" containerMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.econtainer()">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="uml.CombinedFragment" referenceName="fragment" variableName="fragment">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="covered" valueExpression="var:coveredLifelines"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createEAnnotations"/>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="uml.InteractionOperand" referenceName="operand" variableName="operand">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="covered" valueExpression="var:coveredLifelines"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createEAnnotations"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:manageOperandFragment(startingEndPredecessor,finishingEndPredecessor)"/>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="uml.InteractionConstraint" referenceName="guard" variableName="guard">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.reorderNewCombinedFragment(startingEndPredecessor,finishingEndPredecessor,fragment)"/>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ <coveredLifelines name="coveredLifelines"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ReorderTool" name="Reorder Executions Fragment" forceRefresh="true" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand']">
+ <startingEndPredecessorAfter name="startingEndPredecessorAfter"/>
+ <finishingEndPredecessorAfter name="finishingEndPredecessorAfter"/>
+ <onEventMovedOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:self">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.reorderNewFragments(startingEndPredecessorAfter,finishingEndPredecessorAfter)"/>
+ </firstModelOperations>
+ </onEventMovedOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:InteractionUseCreationTool" name="Interaction Use" forceRefresh="true" containerMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="InteractionUse" referenceName="fragment">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="covered" valueExpression="var:coveredLifelines"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ <coveredLifelines name="coveredLifelines"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:OperandCreationTool" name="Interaction Operand" containerMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="InteractionOperand" referenceName="operand" variableName="operand">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="covered" valueExpression="aql:container.covered"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createEAnnotations"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:StateCreationTool" name="State Invariant" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.interaction">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="StateInvariant" referenceName="fragment">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:viewVariable.target">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="coveredBy" valueExpression="aql:instance"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:reorderNewFragments(startingEndPredecessor,finishingEndPredecessor,instance)"/>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:NodeCreationDescription" name="Gate" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@borderedNodeMappings[name='GateBorder'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']/@borderedNodeMappings[name='GateBorder']" extraMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:self">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:containerView.description.name == 'SequenceDiagram'">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="Gate" referenceName="formalGate">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:containerView.actualMapping.name == 'Combined Fragment'">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="Gate" referenceName="cfragmentGate">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:containerView.actualMapping.name == 'InteractionUse'">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="Gate" referenceName="actualGate">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:containerView.actualMapping.name == 'SD_Operand'">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:container.eContainer()">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="Gate" referenceName="cfragmentGate">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ObservationPointCreationTool" name="Time Constraint" precondition="aql:container.oclAsType(uml::OccurrenceSpecification)" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeConstraint']" extraMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.getEnclosingFragment()">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="TimeConstraint" referenceName="ownedRule">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="constrainedElement" valueExpression="aql:variable"/>
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="TimeInterval" referenceName="specification"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ObservationPointCreationTool" name="Time Observation" precondition="aql:container.oclAsType(uml::OccurrenceSpecification)" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeObservation']" extraMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']">
+ <variable name="variable"/>
+ <viewVariable name="viewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.getModel()">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="TimeObservation" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="aql:self.computeDefaultName()"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="event" valueExpression="aql:variable"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:NodeCreationDescription" name="Constraint" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" iconPath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Constraint.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:container.getStateParent()">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="Constraint" referenceName="ownedRule">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:instance">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="uml::OpaqueExpression" referenceName="specification">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="language" valueExpression="OCL"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="body" valueExpression="true"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="constraintSpec"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DirectEditLabel" name="CommentEdit" forceRefresh="true">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:SetValue" featureName="body" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <toolSections name="SD_createEdgeGroup" label="Edges" icon="/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <ownedTools xsi:type="tool:MessageCreationTool" documentation="Create a new synchronous operation" name="CR_Synchronous_Operation" label="Synchronous Message" precondition="service:preTarget.isValidMessageEnd" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='SD_Message']" iconPath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageSynchCallCreation.gif" extraSourceMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']" extraTargetMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']" connectionStartPrecondition="service:preSource.isValidMessageEnd">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.eContainerOrSelf(uml::Interaction)">
+ <subModelOperations xsi:type="tool_1:Let" variableName="isGateOrOcc" valueExpression="aql: sourceView.checkIsGateSelection(targetView) or sourceView.checkIsOccurenceSpecSelection(targetView)">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:isGateOrOcc">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:target.createSynchronousMessage(source)"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:not (isGateOrOcc)">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:target.createOperationAndSynchMessage(source,startingEndPredecessor,finishingEndPredecessor)"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" documentation="Create a new asynchronous operation" name="CR_Asynchronous_Operation" label="Asynchronous Message" precondition="service:preTarget.isValidMessageEnd" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='SD_Message']" iconPath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageAsynchCallCreation.gif" extraSourceMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']" extraTargetMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:self.eContainerOrSelf(uml::Interaction)">
+ <subModelOperations xsi:type="tool_1:Let" variableName="isGateOrOcc" valueExpression="aql: sourceView.checkIsGateSelection(targetView) or sourceView.checkIsOccurenceSpecSelection(targetView)">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:isGateOrOcc">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:target.createASynchronousMessage(source)"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:not (isGateOrOcc)">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:target.createOperationAndAsynchMessage(source,startingEndPredecessor,finishingEndPredecessor)"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" name="Message Create" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='CreateMessage']" extraTargetMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']">
+ <sourceVariable name="sourceVariable"/>
+ <targetVariable name="targetVariable"/>
+ <sourceViewVariable name="sourceViewVariable"/>
+ <targetViewVariable name="targetViewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql: not ( sourceViewVariable.actualMapping.name.equalsIgnoreCase('Observation') and targetViewVariable.actualMapping.name.equalsIgnoreCase('Observation'))">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createMessage(sourceVariable, targetVariable,startingEndPredecessor,finishingEndPredecessor)"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:sourceViewVariable.actualMapping.name.equalsIgnoreCase('Observation') and targetViewVariable.actualMapping.name.equalsIgnoreCase('Observation')">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:targetVariable.createMessage(sourceVariable)"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" name="Message Delete" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='DeleteMessage']" extraTargetMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']">
+ <sourceVariable name="sourceVariable"/>
+ <targetVariable name="targetVariable"/>
+ <sourceViewVariable name="sourceViewVariable"/>
+ <targetViewVariable name="targetViewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:deleteMessage(sourceVariable, targetVariable,startingEndPredecessor,finishingEndPredecessor)">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:targetVariable">
+ <subModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:targetViewVariable.log()"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" name="Message Reply" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='MessageReply']" extraTargetMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']">
+ <sourceVariable name="sourceVariable"/>
+ <targetVariable name="targetVariable"/>
+ <sourceViewVariable name="sourceViewVariable"/>
+ <targetViewVariable name="targetViewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createReplyMessage(sourceVariable, targetVariable, startingEndPredecessor,finishingEndPredecessor)"/>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ToolDescription" name="Message Lost" precondition="aql:element.isLostFoundTargetValid()">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:lostMessage(element)">
+ <subModelOperations xsi:type="tool_1:ExternalJavaAction" name="Adjust message position 2" id="org.eclipse.sirius.business.api.action.moveElement">
+ <parameters name="referenceOwner" value="aql:self.eContainerOrSelf(uml::Interaction)"/>
+ <parameters name="referenceName" value="message"/>
+ <parameters name="element" value="var:self"/>
+ <parameters name="predecessor" value="aql:self.getPredecessor()"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:ExternalJavaActionCall" name="Adjust new call message position" action="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Message%20Lost']/@initialOperation/@firstModelOperations/@subModelOperations.0"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ToolDescription" name="Message Found" precondition="aql:element.isLostFoundTargetValid()">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:foundMessage(element)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" name="General Ordering" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='GeneralOrdering']">
+ <sourceVariable name="sourceVariable"/>
+ <targetVariable name="targetVariable"/>
+ <sourceViewVariable name="sourceViewVariable"/>
+ <targetViewVariable name="targetViewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createGeneralOrdering(sourceVariable, targetVariable)"/>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" name="Duration Constraint" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='Duration%20Constraint']">
+ <sourceVariable name="sourceVariable"/>
+ <targetVariable name="targetVariable"/>
+ <sourceViewVariable name="sourceViewVariable"/>
+ <targetViewVariable name="targetViewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createDurationConstraint(sourceVariable, targetVariable)"/>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool:MessageCreationTool" name="Duration Observation" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='DurationObservation']">
+ <sourceVariable name="sourceVariable"/>
+ <targetVariable name="targetVariable"/>
+ <sourceViewVariable name="sourceViewVariable"/>
+ <targetViewVariable name="targetViewVariable"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:createDurationObservation(sourceVariable, targetVariable)"/>
+ </initialOperation>
+ <startingEndPredecessor name="startingEndPredecessor"/>
+ <finishingEndPredecessor name="finishingEndPredecessor"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:EdgeCreationDescription" name="Comment Link" precondition="aql:true" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='Comment%20Link']" iconPath="/org.eclipse.papyrus.uml.sirius.common.diagram/icons/Link.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:source">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:source.oclIsTypeOf(uml::Comment)">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="annotatedElement" valueExpression="aql:target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:EdgeCreationDescription" name="Constraint Link" precondition="aql:true" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@edgeMappings[name='Constraint%20Link']" iconPath="/org.eclipse.papyrus.uml.sirius.common.diagram/icons/Link.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:source">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:source.oclIsTypeOf(uml::Constraint)">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="constrainedElement" valueExpression="aql:target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <customization>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeConstraint']/@style //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@borderedNodeMappings[name='TimeObservation']/@style" attributeName="forbiddenSides" value="service:getSide()"/>
+ </vsmElementCustomizations>
+ </customization>
+ </defaultLayer>
+ <additionalLayers name="Common" optional="false">
+ <nodeMappings name="Bendpoint" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="aql:diagram.getCommonBendpointsToDraw()" synchronizationLock="true" domainClass="uml.Element">
+ <style xsi:type="style:DotDescription" labelSize="12" showIcon="false" labelExpression="" hideLabelByDefault="true" sizeComputationExpression="aql:self.getBenpointDiameter()">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="Hyperlink" preconditionExpression="aql:self.isNotSemanticElement()" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="aql:self.allAvailableViews()" createElements="false" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Hyperlink%20View']" domainClass="EObject">
+ <style xsi:type="style:SquareDescription" labelSize="12" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ </style>
+ </nodeMappings>
+ <toolSections name="Common">
+ <ownedTools xsi:type="tool_2:DoubleClickDescription" name="Open Hyperlink" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='Comment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Informations']/@nodeMappings[name='LifelineComment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Gate'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='InteractionUse']/@borderedNodeMappings[name='GateBorder'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='StateInvariant'] //@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@borderedNodeMappings[name='GateBorder']">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:elementView.createOrOpenHyperlink()"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="PapyrusDelete">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:element.deleteElement(elementView)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:PopupMenu" name="Sirius View Deletion">
+ <menuItemDescription xsi:type="tool_1:OperationAction" name="Delete View">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:DeleteView"/>
+ </initialOperation>
+ </menuItemDescription>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:ContainerDropDescription" name="AddHyperlinkView" precondition="aql:element.isNotSemanticElement()" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_2:CreateView" mapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DoubleClickDescription" name="Hyperlink View" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:ContainerDropDescription" name="Constraint from Model" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_2:CreateView" mapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:ContainerDropDescription" name="Comment from Model" mappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='Comment']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_2:CreateView" mapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='Comment']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DirectEditLabel" name="CommentEdit">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:SetValue" featureName="body" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DirectEditLabel" name="ConstraintEdit" inputLabelExpression="service:getBody()">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="service:setConstraintBody(arg0)"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <decorationDescriptionsSet>
+ <decorationDescriptions xsi:type="description:SemanticBasedDecoration"/>
+ </decorationDescriptionsSet>
+ </additionalLayers>
+ <additionalLayers name="Informations" icon="/org.eclipse.sirius.ui/icons/full/others/information.gif">
+ <nodeMappings name="LifelineComment" preconditionExpression="aql:self.clientDependency->size()>0 or self.represents.eContainer()->size() > 0" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Informations']/@toolSections.0/@ownedTools[name='LifelineCommentEditLabel']" semanticCandidatesExpression="feature:lifeline" semanticElements="var:self" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Lifeline">
+ <style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" borderColor="//@userColorsPalettes[name='UMLPalette']/@entries[name='InformationBorder']" showIcon="false" labelExpression="service:computeLifelineCommentLabel" sizeComputationExpression="" labelPosition="node" resizeKind="NSEW" width="16" height="5" color="//@userColorsPalettes[name='UMLPalette']/@entries[name='InformationBackground']">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <edgeMappings name="LifelineCommentLink" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticElements="var:self" sourceMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Informations']/@nodeMappings[name='LifelineComment']" targetMapping="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']" targetFinderExpression="var:self">
+ <style lineStyle="dot" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription showIcon="false">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <toolSections name="Informations">
+ <ownedTools xsi:type="tool_2:DirectEditLabel" name="LifelineCommentEditLabel">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_2:DeleteElementDescription" name="LifelineCommentDelete">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </additionalLayers>
+ <additionalLayers name="Comment" activeByDefault="true">
+ <nodeMappings name="Comment" deletionDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='CommentEdit']" createElements="false" doubleClickDescription="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Open%20Hyperlink']" domainClass="uml.Comment">
+ <style xsi:type="style:NoteDescription" labelSize="9" showIcon="false" labelExpression="feature:body" sizeComputationExpression="9" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='yellow']"/>
+ </style>
+ </nodeMappings>
+ <toolSections name="Nodes">
+ <ownedTools xsi:type="tool_2:NodeCreationDescription" documentation="Create a new literal" name="Comment" nodeMappings="//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='Comment']" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/Comment.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="uml.Comment" referenceName="ownedComment">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </additionalLayers>
+ </ownedRepresentations>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.SequenceDiagramServices"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.common.diagram.core.services.AbstractDiagramServices"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.LifelineService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.FragmentsService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.GeneralOrderingService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.MessageService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.ExecutionService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.CombinedAndOperandService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.CommentService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.ConstraintService"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.sequence.diagram.services.TimeObservationConstraintService"/>
+ </ownedViewpoints>
+ <userColorsPalettes name="UMLPalette">
+ <entries xsi:type="description:UserFixedColor" red="235" green="235" blue="235" name="Nested Package Foreground"/>
+ <entries xsi:type="description:UserFixedColor" name="ComponentColor"/>
+ <entries xsi:type="description:InterpolatedColor" name="Component Background Color" colorValueComputationExpression="aql:self.ancestors()->size()">
+ <colorSteps associatedValue="0">
+ <associatedColor href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
+ </colorSteps>
+ <colorSteps associatedValue="4">
+ <associatedColor href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/>
+ </colorSteps>
+ </entries>
+ <entries xsi:type="description:UserFixedColor" red="232" green="239" blue="247" name="lighter blue"/>
+ <entries xsi:type="description:UserFixedColor" red="236" green="250" blue="222" name="lighter green"/>
+ <entries xsi:type="description:UserFixedColor" red="245" green="239" blue="244" name="lighter purple"/>
+ <entries xsi:type="description:UserFixedColor" red="254" green="238" blue="214" name="lighter orange"/>
+ <entries xsi:type="description:UserFixedColor" red="255" green="249" blue="218" name="lighter yellow"/>
+ <entries xsi:type="description:UserFixedColor" red="228" green="249" blue="239" name="lagune"/>
+ <entries xsi:type="description:UserFixedColor" red="110" green="132" blue="132" name="dark lagune"/>
+ <entries xsi:type="description:UserFixedColor" red="238" green="249" blue="244" name="light lagune"/>
+ <entries xsi:type="description:UserFixedColor" red="246" green="253" blue="255" name="InformationBackground"/>
+ <entries xsi:type="description:UserFixedColor" red="12" green="92" blue="159" name="InformationBorder"/>
+ <entries xsi:type="description:UserFixedColor" red="230" green="230" blue="230" name="very light gray"/>
+ <entries xsi:type="description:InterpolatedColor" name="Containment Background" colorValueComputationExpression="aql:self.ancestors()->size()">
+ <colorSteps associatedValue="0" associatedColor="//@userColorsPalettes[name='UMLPalette']/@entries[name='light%20lagune']"/>
+ <colorSteps associatedValue="15" associatedColor="//@userColorsPalettes[name='UMLPalette']/@entries[name='dark%20lagune']"/>
+ </entries>
+ <entries xsi:type="description:UserFixedColor" red="250" green="190" blue="190" name="MomentInterval"/>
+ <entries xsi:type="description:UserFixedColor" red="250" green="240" blue="180" name="Role"/>
+ <entries xsi:type="description:UserFixedColor" red="180" green="230" blue="180" name="PlaceThing"/>
+ <entries xsi:type="description:UserFixedColor" red="180" green="200" blue="210" name="Description"/>
+ <entries xsi:type="description:UserFixedColor" red="241" green="243" blue="254" name="QualifierBackground"/>
+ <entries xsi:type="description:UserFixedColor" red="195" green="209" blue="213" name="Execution Color"/>
+ <entries xsi:type="description:UserFixedColor" red="200" green="255" blue="230" name="ConstrainedColor"/>
+ </userColorsPalettes>
+</description:Group>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Comment.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Comment.gif
new file mode 100755
index 0000000..c495731
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Comment.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Constraint.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Constraint.gif
new file mode 100755
index 0000000..eed6ace
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Constraint.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Execution.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Execution.svg
new file mode 100755
index 0000000..5e52be4
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/Execution.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="4mm"
+ height="16mm"
+ viewBox="0 0 4 16"
+ version="1.1"
+ id="svg1427"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Execution.svg">
+ <defs
+ id="defs1421">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2006">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0"
+ id="stop2002" />
+ <stop
+ style="stop-color:#c3d1d5;stop-opacity:1"
+ offset="1"
+ id="stop2004" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2006"
+ id="linearGradient2008"
+ x1="2.6458333"
+ y1="0"
+ x2="2.6458333"
+ y2="15.875"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="4.9091137"
+ inkscape:cx="9.5420681"
+ inkscape:cy="64.577876"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1001"
+ inkscape:window-x="-9"
+ inkscape:window-y="-9"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid1429" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata1424">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="fill:url(#linearGradient2008);stroke:#000000;stroke-width:0.065;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ id="rect1431"
+ width="3.96875"
+ height="15.875"
+ x="0"
+ y="0" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/LifelineCreation.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/LifelineCreation.gif
new file mode 100755
index 0000000..cbf5687
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/LifelineCreation.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageAsynchCallCreation.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageAsynchCallCreation.gif
new file mode 100755
index 0000000..ffb326a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageAsynchCallCreation.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageSynchCallCreation.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageSynchCallCreation.gif
new file mode 100755
index 0000000..41164d5
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/MessageSynchCallCreation.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/eol.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/eol.png
new file mode 100755
index 0000000..2854b88
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/eol.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation.svg
new file mode 100755
index 0000000..5a29207
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="6"
+ height="6"
+ id="svg2998"
+ sodipodi:docname="observation.svg"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)">
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview2997"
+ showgrid="false"
+ inkscape:document-rotation="0"
+ inkscape:zoom="138.33333"
+ inkscape:cx="3"
+ inkscape:cy="3"
+ inkscape:window-width="1632"
+ inkscape:window-height="1030"
+ inkscape:window-x="2496"
+ inkscape:window-y="96"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="layer1" />
+ <defs
+ id="defs3000" />
+ <metadata
+ id="metadata3003">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="matrix(1.3259643,0,0,1.3288229,1.0041881,-16.27222)"
+ id="layer1">
+ <path
+ d="m 3.767682,14.503566 a 2.2625044,2.2576372 0 0 1 -4.52500857,0 2.2625044,2.2576372 0 1 1 4.52500857,0 z"
+ id="path3010"
+ style="fill:#999999;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:0.99970406;stroke-miterlimit:4;stroke-dasharray:none" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg
new file mode 100755
index 0000000..f6405b1
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="6"
+ height="6"
+ id="svg2998"
+ sodipodi:docname="observation_opaque.svg"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)">
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview2997"
+ showgrid="false"
+ inkscape:document-rotation="0"
+ inkscape:zoom="138.33333"
+ inkscape:cx="3"
+ inkscape:cy="3"
+ inkscape:window-width="1632"
+ inkscape:window-height="1030"
+ inkscape:window-x="2464"
+ inkscape:window-y="64"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2998" />
+ <defs
+ id="defs3000" />
+ <metadata
+ id="metadata3003">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="matrix(1.3259643,0,0,1.3288229,1.0041881,-16.27222)"
+ id="layer1">
+ <path
+ d="m 3.767682,14.503566 a 2.2625044,2.2576372 0 0 1 -4.52500857,0 2.2625044,2.2576372 0 1 1 4.52500857,0 z"
+ id="path3010"
+ style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.png
new file mode 100755
index 0000000..c926758
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.svg
new file mode 100755
index 0000000..eefd282
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/stroke.svg
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="15"
+ height="1.0015748"
+ viewBox="0 0 3.9687499 0.26499999"
+ version="1.1"
+ id="svg841"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="stroke.svg">
+ <defs
+ id="defs835" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="90.509668"
+ inkscape:cx="2.4419236"
+ inkscape:cy="1.0482973"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ units="px"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1647"
+ inkscape:window-height="1030"
+ inkscape:window-x="2688"
+ inkscape:window-y="223"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid1404"
+ originx="0"
+ originy="0.13249999" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata838">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,0.13249999)">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.265;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 0,0 H 3.96875"
+ id="path1406" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/plugin.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/plugin.properties
new file mode 100755
index 0000000..41cba9d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/plugin.properties
@@ -0,0 +1,2 @@
+pluginName = Papyrus-SiriusDiagram - Sirius sequence diagram implementation
+providerName = Eclipse Modeling Project
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/plugin.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/plugin.xml
new file mode 100755
index 0000000..b6a5194
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/plugin.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ Copyright (c) 2021 ARTAL, CEA LIST
+ This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ ARTAL - Initial API and implementation
+-->
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.papyrus.uml.sirius.sequence.diagram.Startup">
+ </startup>
+ </extension>
+<extension
+ point="org.eclipse.sirius.componentization">
+ <component
+ class="org.eclipse.papyrus.uml.sirius.sequence.diagram.Activator"
+ id="org.eclipse.papyrus.uml.sirius.sequence.diagram"
+ name="Sequence Diagram">
+ </component>
+ </extension>
+<extension
+ point="org.eclipse.sirius.refreshExtensionProvider">
+ <refreshExtensionProvider
+ providerClass="org.eclipse.papyrus.uml.sirius.sequence.diagram.provider.RefreshSequenceExtensionProvider">
+ </refreshExtensionProvider>
+</extension>
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.uml.sirius.sequence.diagram.provider.SequenceEditPartProvider">
+ <Priority
+ name="High">
+ </Priority>
+ </editpartProvider>
+</extension>
+</plugin>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/pom.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/pom.xml
new file mode 100755
index 0000000..26e5d37
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/pom.xml
@@ -0,0 +1,11 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.sirius.sequence.diagram</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/Activator.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/Activator.java
new file mode 100755
index 0000000..d3be49f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/Activator.java
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.sirius.business.api.componentization.ViewpointRegistry;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends Plugin {
+ /** The plug-in ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.sirius.sequence.diagram"; //$NON-NLS-1$
+
+ /** This plug-in's shared instance. */
+ private static Activator plugin;
+
+ private static Set<Viewpoint> viewpoints;
+
+ /**
+ * Default constructor for the plug-in.
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ viewpoints = new HashSet<Viewpoint>();
+ viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/papyrus_sequence.odesign"));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ if (viewpoints != null) {
+ for (Viewpoint viewpoint : viewpoints) {
+ ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
+ }
+ viewpoints.clear();
+ viewpoints = null;
+ }
+ super.stop(context);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/Startup.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/Startup.java
new file mode 100755
index 0000000..616b3bb
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/Startup.java
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * Early start-up hook for the externalized profile applications subsystem.
+ */
+public class Startup implements IStartup {
+
+ public Startup() {
+ super();
+ }
+
+ @Override
+ public void earlyStartup() {
+ Activator.getDefault();
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/RefreshSequenceExtensionProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/RefreshSequenceExtensionProvider.java
new file mode 100755
index 0000000..06f4c02
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/RefreshSequenceExtensionProvider.java
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.provider;
+
+import org.eclipse.papyrus.uml.sirius.sequence.diagram.utils.ReorderSequenceRegistry;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtension;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider;
+
+/**
+ * The Class RefreshSequenceExtensionProvider.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class RefreshSequenceExtensionProvider implements IRefreshExtensionProvider {
+
+ /**
+ * Constructor.
+ *
+ */
+ public RefreshSequenceExtensionProvider() {
+ }
+
+ /**
+ * Provides Refresh Extension for Sequence Diagram.
+ *
+ * @param viewPoint
+ * the view point
+ * @return true, if successful
+ * @see org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider#provides(org.eclipse.sirius.diagram.DDiagram)
+ */
+
+ @Override
+ public boolean provides(DDiagram viewPoint) {
+ return viewPoint.getDescription().getName().equals("SequenceDiagram");
+ }
+
+ /**
+ * Gets the refresh extension.
+ *
+ * @param viewPoint the view point
+ * @return the refresh extension
+ * @see org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider#getRefreshExtension(org.eclipse.sirius.diagram.DDiagram)
+ */
+
+ @Override
+ public IRefreshExtension getRefreshExtension(DDiagram viewPoint) {
+ return new IRefreshExtension() {
+
+ @Override
+ public void postRefresh(DDiagram dDiagram) {
+ ReorderSequenceRegistry.getInstance().clear();
+
+ }
+
+ @Override
+ public void beforeRefresh(DDiagram dDiagram) {
+
+ }
+ };
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SequenceEditPartProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SequenceEditPartProvider.java
new file mode 100755
index 0000000..084e0ff
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SequenceEditPartProvider.java
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.provider;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.ObservationPointEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.provider.SequenceDiagramEditPartProvider;
+
+/**
+ * The Class SequenceEditPartProvider.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class SequenceEditPartProvider extends SequenceDiagramEditPartProvider {
+
+
+ /**
+ * Gets the node edit part class.
+ *
+ * @param view the view
+ * @return the node edit part class
+ * @see org.eclipse.sirius.diagram.sequence.ui.tool.internal.provider.SequenceDiagramEditPartProvider#getNodeEditPartClass(org.eclipse.gmf.runtime.notation.View)
+ */
+
+ @Override
+ protected Class<?> getNodeEditPartClass(View view) {
+ // int visualID = SiriusVisualIDRegistry.getVisualID(view);
+ // if (visualID == 2001) {
+ // return SiriusObservationPointPart.class;
+ // }
+
+ Class<?> nodeEditPartClass = super.getNodeEditPartClass(view);
+
+
+ return nodeEditPartClass;
+ }
+
+ /**
+ * Creates the graphic edit part.
+ *
+ * @param view the view
+ * @return the i graphical edit part
+ * @see org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider#createGraphicEditPart(org.eclipse.gmf.runtime.notation.View)
+ */
+
+ @Override
+ public IGraphicalEditPart createGraphicEditPart(View view) {
+ Class editpartClass = getEditPartClass(view);
+ if (editpartClass.isAssignableFrom(ObservationPointEditPart.class)) {
+ IGraphicalEditPart graphicEditPart = new ObservationPointEditPart(view) {
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SiriusGraphicalNodeEditPolicy());
+
+ }
+ };
+ return graphicEditPart;
+ }
+
+
+
+ return super.createGraphicEditPart(view);
+ }
+
+ /**
+ * Gets an editpart class for the given view.
+ *
+ * @param view the view
+ * @return <code>Class</code>
+ */
+ private Class getEditPartClass(View view) {
+ if (view instanceof Diagram)
+ return getDiagramEditPartClass(view);
+ else if (view instanceof Edge)
+ return getEdgeEditPartClass(view);
+ else if (view instanceof Node)
+ return getNodeEditPartClass(view);
+ return null;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SetReconnectingConnectionBendpointsCommand.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SetReconnectingConnectionBendpointsCommand.java
new file mode 100755
index 0000000..0a2cb2e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SetReconnectingConnectionBendpointsCommand.java
@@ -0,0 +1,159 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.provider;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.sirius.diagram.description.tool.ReconnectionKind;
+import org.eclipse.sirius.diagram.ui.graphical.edit.policies.SetConnectionBendpointsAndLabelCommmand;
+import org.eclipse.sirius.diagram.ui.internal.operation.CenterEdgeEndModelChangeOperation;
+import org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper;
+
+/**
+ * This {@link SetConnectionBendpointsAndLabelCommmand} overrides the execution
+ * in order to set the {@link RelativeBendpoint} of the edge resulting of the
+ * reconnection.
+ *
+ *
+ */
+@SuppressWarnings("restriction")
+public class SetReconnectingConnectionBendpointsCommand extends SetConnectionBendpointsAndLabelCommmand {
+
+ /**
+ * Helper used to access the edge after reconnection.
+ */
+ private SiriusEdgeReconnectionHelper reconnectingEdgeHelper;
+
+ /**
+ * Default constructor to set {@link RelativeBendpoint} on the reconnected
+ * edge.
+ *
+ * @param editingDomain
+ * current {@link TransactionalEditingDomain}
+ * @param reconnectionTarget
+ * Reconnection target
+ * @param reconnectionTargetEdges
+ * List of incoming/outgoing edges on the targeted edge before
+ * reconnection
+ * @param reconnectionKind
+ * Reuse ReconnectionKind to save if reconnecting the source or
+ * the target of the edge.
+ */
+ public SetReconnectingConnectionBendpointsCommand(TransactionalEditingDomain editingDomain, View reconnectionTarget, List<Edge> reconnectionTargetEdges, ReconnectionKind reconnectionKind) {
+ super(editingDomain);
+ this.reconnectingEdgeHelper = new SiriusEdgeReconnectionHelper(reconnectionTarget, reconnectionTargetEdges, reconnectionKind);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * This method has been overridden in order to compute the sourceRefPoint
+ * using the reconnected edge instead of the previous, under reconnection,
+ * edge.
+ */
+ @Override
+ public Point getSourceRefPoint() {
+ if (reconnectingEdgeHelper.isReconnectingSource()) {
+ Edge edge = reconnectingEdgeHelper.getReconnectedEdge();
+ if (edge != null) {
+ Connection connection = (Connection) GMFHelper.getGraphicalEditPart(edge).get().getFigure();
+
+ Point sourceRefPoint = connection.getSourceAnchor().getReferencePoint();
+ connection.translateToRelative(sourceRefPoint);
+ return sourceRefPoint;
+ }
+ }
+ return super.getSourceRefPoint();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * This method has been overridden in order to compute the targetRefPoint
+ * using the reconnected edge instead of the previous, under reconnection,
+ * edge.
+ */
+ @Override
+ public Point getTargetRefPoint() {
+ if (reconnectingEdgeHelper.isReconnectingTarget()) {
+ Edge edge = reconnectingEdgeHelper.getReconnectedEdge();
+ if (edge != null) {
+ Connection connection = (Connection) GMFHelper.getGraphicalEditPart(edge).get().getFigure();
+
+ Point targetRefPoint = connection.getTargetAnchor().getReferencePoint();
+ connection.translateToRelative(targetRefPoint);
+ return targetRefPoint;
+ }
+ }
+ return super.getTargetRefPoint();
+ }
+
+ /**
+ * Do execute with result.
+ *
+ * @param progressMonitor the progress monitor
+ * @param info the info
+ * @return the command result
+ * @throws ExecutionException the execution exception
+ * @see org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ */
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Assert.isNotNull(getNewPointList());
+ Point sourceRefPoint = getSourceRefPoint();
+ Assert.isNotNull(sourceRefPoint);
+ Point targetRefPoint = getTargetRefPoint();
+ Assert.isNotNull(targetRefPoint);
+
+ // The edge recovery is the difference with the parent command
+ Edge edge = reconnectingEdgeHelper.getReconnectedEdge();
+
+ // if the reconnected edge do not exist, there is nothing to do here.
+ if (edge != null) {
+ List newBendpoints = new ArrayList();
+ int numOfPoints = getNewPointList().size();
+ for (short i = 0; i < numOfPoints; i++) {
+ // The sourceRefPoint and targetRefPoint will be recovered from
+ // the
+ // reconnected edge
+ Dimension s = getNewPointList().getPoint(i).getDifference(sourceRefPoint);
+ Dimension t = getNewPointList().getPoint(i).getDifference(targetRefPoint);
+ newBendpoints.add(new RelativeBendpoint(s.width, s.height, t.width, t.height));
+ }
+
+ RelativeBendpoints points = (RelativeBendpoints) edge.getBendpoints();
+ points.setPoints(newBendpoints);
+
+ CenterEdgeEndModelChangeOperation centerEdgeEndModelChangeOperation = new CenterEdgeEndModelChangeOperation(edge, false);
+ centerEdgeEndModelChangeOperation.execute();
+ }
+ return CommandResult.newOKCommandResult();
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusEdgeReconnectionHelper.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusEdgeReconnectionHelper.java
new file mode 100755
index 0000000..9b929ee
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusEdgeReconnectionHelper.java
@@ -0,0 +1,157 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.business.api.query.EObjectQuery;
+import org.eclipse.sirius.diagram.description.tool.ReconnectionKind;
+import org.eclipse.sirius.diagram.ui.provider.Messages;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+/**
+ * The Class SiriusEdgeReconnectionHelper.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class SiriusEdgeReconnectionHelper {
+
+ /** List of incoming/outgoing edges on the targeted edge before reconnection. */
+ private List<Edge> reconnectionTargetEdges;
+
+ /** Reconnection target. */
+ private View reconnectionTarget;
+
+ /**
+ * Reuse ReconnectionKind to save if reconnecting the source or the target
+ * of the edge.
+ */
+ private ReconnectionKind reconnectionKind;
+
+ /**
+ * Default constructor of this query.
+ *
+ * @param reconnectionTarget
+ * Reconnection target
+ * @param reconnectionTargetEdges
+ * List of incoming/outgoing edges on the targeted edge before
+ * reconnection
+ * @param reconnectionKind
+ * Reuse ReconnectionKind to save if reconnecting the source or
+ * the target of the edge.
+ */
+ public SiriusEdgeReconnectionHelper(View reconnectionTarget, List<Edge> reconnectionTargetEdges, ReconnectionKind reconnectionKind) {
+ this.reconnectionTarget = reconnectionTarget;
+ this.reconnectionTargetEdges = new ArrayList<Edge>(reconnectionTargetEdges);
+ assert reconnectionKind == ReconnectionKind.RECONNECT_SOURCE_LITERAL || reconnectionKind == ReconnectionKind.RECONNECT_TARGET_LITERAL : Messages.EdgeReconnectionHelper_invalidReconnectionKind;
+ this.reconnectionKind = reconnectionKind;
+ }
+
+
+ /**
+ * Gets the reconnected edge.
+ *
+ * @return the reconnected edge
+ */
+ public Edge getReconnectedEdge() {
+ Edge edge = null;
+ if (reconnectionKind == ReconnectionKind.RECONNECT_SOURCE_LITERAL) {
+ final List<Edge> sourceEdges = new ArrayList<Edge>(reconnectionTarget.getSourceEdges());
+ Iterables.removeAll(sourceEdges, reconnectionTargetEdges);
+ Predicate<Edge> notToReconnectingEdge = new Predicate<Edge>() {
+
+ @Override
+ public boolean apply(Edge input) {
+ return !sourceEdges.contains(input.getTarget());
+ }
+ };
+ // For case with reconnect edge source from borderedNode to
+ // borderedNode
+ // when borderedNode is mapping with EReference
+ if (sourceEdges.isEmpty() && reconnectionTarget.getElement() instanceof AbstractDNode) {
+ AbstractDNode abstractDNode = (AbstractDNode) reconnectionTarget.getElement();
+ List<DNode> borderedNodes = abstractDNode.getOwnedBorderedNodes();
+ if (!borderedNodes.isEmpty()) {
+ DNode borderedNode = borderedNodes.get(borderedNodes.size() - 1);
+ Collection<EObject> inverseReferences = new EObjectQuery(borderedNode).getInverseReferences(NotationPackage.eINSTANCE.getView_Element());
+ Node nodeSource = Iterables.getOnlyElement(Iterables.filter(inverseReferences, Node.class));
+ List<Edge> sourceEdgesOfBorderedNode = new ArrayList<Edge>(nodeSource.getSourceEdges());
+ edge = Iterables.getOnlyElement(Iterables.filter(sourceEdgesOfBorderedNode, notToReconnectingEdge));
+ }
+ } else {
+ if (reconnectionTarget.getElement() != null) {
+ edge = Iterables.getOnlyElement(Iterables.filter(sourceEdges, notToReconnectingEdge));
+ }
+ }
+ } else {
+ final List<Edge> targetEdges = new ArrayList<Edge>(reconnectionTarget.getTargetEdges());
+ Iterables.removeAll(targetEdges, reconnectionTargetEdges);
+ Predicate<Edge> notFromReconnectingEdge = new Predicate<Edge>() {
+
+ @Override
+ public boolean apply(Edge input) {
+ return !targetEdges.contains(input.getSource());
+ }
+ };
+ // For case with reconnect edge target from borderedNode to
+ // borderedNode
+ // when borderedNode is mapping with EReference
+ if (targetEdges.isEmpty() && reconnectionTarget.getElement() instanceof AbstractDNode) {
+ AbstractDNode abstractDNode = (AbstractDNode) reconnectionTarget.getElement();
+ List<DNode> borderedNodes = abstractDNode.getOwnedBorderedNodes();
+ if (!borderedNodes.isEmpty()) {
+ DNode borderedNode = borderedNodes.get(borderedNodes.size() - 1);
+ Collection<EObject> inverseReferences = new EObjectQuery(borderedNode).getInverseReferences(NotationPackage.eINSTANCE.getView_Element());
+ Node nodeTarget = Iterables.getOnlyElement(Iterables.filter(inverseReferences, Node.class));
+ List<Edge> targetEdgesOfBorderedNode = new ArrayList<Edge>(nodeTarget.getTargetEdges());
+ edge = Iterables.getOnlyElement(Iterables.filter(targetEdgesOfBorderedNode, notFromReconnectingEdge));
+ }
+ } else {
+ if (reconnectionTarget.getElement() != null) {
+ edge = Iterables.getOnlyElement(Iterables.filter(targetEdges, notFromReconnectingEdge));
+ }
+ }
+ }
+ return edge;
+ }
+
+ /**
+ * Checks if is reconnecting source.
+ *
+ * @return true, if is reconnecting source
+ */
+ public boolean isReconnectingSource() {
+ return reconnectionKind.equals(ReconnectionKind.RECONNECT_SOURCE_LITERAL);
+ }
+
+ /**
+ * Checks if is reconnecting target.
+ *
+ * @return true, if is reconnecting target
+ */
+ public boolean isReconnectingTarget() {
+ return reconnectionKind.equals(ReconnectionKind.RECONNECT_TARGET_LITERAL);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusGraphicalNodeEditPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusGraphicalNodeEditPolicy.java
new file mode 100755
index 0000000..8c2190a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusGraphicalNodeEditPolicy.java
@@ -0,0 +1,1662 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+/**
+ *
+ */
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.provider;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Optional;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PolylineDecoration;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gef.requests.DropRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.IdentityCommand;
+import org.eclipse.gmf.runtime.common.core.util.StringStatics;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionAnchorsCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionEndsCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetPropertyCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.TreeGraphicalNodeEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.diagram.ui.internal.properties.Properties;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
+import org.eclipse.gmf.runtime.notation.Anchor;
+import org.eclipse.gmf.runtime.notation.Bendpoints;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.Routing;
+import org.eclipse.gmf.runtime.notation.RoutingStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.sirius.business.api.logger.RuntimeLoggerManager;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreterSiriusVariables;
+import org.eclipse.sirius.common.tools.api.util.StringUtil;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.EdgeRouting;
+import org.eclipse.sirius.diagram.EdgeStyle;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.api.query.EdgeCreationDescriptionQuery;
+import org.eclipse.sirius.diagram.business.api.query.IEdgeMappingQuery;
+import org.eclipse.sirius.diagram.business.api.query.ReconnectEdgeDescriptionQuery;
+import org.eclipse.sirius.diagram.description.CenteringStyle;
+import org.eclipse.sirius.diagram.description.CompositeLayout;
+import org.eclipse.sirius.diagram.description.EdgeMapping;
+import org.eclipse.sirius.diagram.description.Layout;
+import org.eclipse.sirius.diagram.description.OrderedTreeLayout;
+import org.eclipse.sirius.diagram.description.tool.EdgeCreationDescription;
+import org.eclipse.sirius.diagram.description.tool.ReconnectEdgeDescription;
+import org.eclipse.sirius.diagram.description.tool.ReconnectionKind;
+import org.eclipse.sirius.diagram.tools.api.command.IDiagramCommandFactory;
+import org.eclipse.sirius.diagram.tools.api.command.IDiagramCommandFactoryProvider;
+import org.eclipse.sirius.diagram.ui.business.api.query.ConnectionEditPartQuery;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusLayoutDataManager;
+import org.eclipse.sirius.diagram.ui.business.internal.command.TreeLayoutSetConnectionAnchorsCommand;
+import org.eclipse.sirius.diagram.ui.business.internal.helper.CreateConnectionRequestHelper;
+import org.eclipse.sirius.diagram.ui.business.internal.query.DEdgeQuery;
+import org.eclipse.sirius.diagram.ui.business.internal.query.RequestQuery;
+import org.eclipse.sirius.diagram.ui.business.internal.view.EdgeLayoutData;
+import org.eclipse.sirius.diagram.ui.business.internal.view.LayoutData;
+import org.eclipse.sirius.diagram.ui.business.internal.view.RootLayoutData;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart.ViewEdgeFigure;
+import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramEdgeEditPart;
+import org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramEdgeEditPartOperation;
+import org.eclipse.sirius.diagram.ui.graphical.edit.policies.SetConnectionBendpointsAndLabelCommmand;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.policies.InitialPointsOfRequestDataManager;
+import org.eclipse.sirius.diagram.ui.tools.api.command.GMFCommandWrapper;
+import org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor;
+import org.eclipse.sirius.diagram.ui.tools.api.util.GMFNotationHelper;
+import org.eclipse.sirius.ext.base.Option;
+import org.eclipse.sirius.ext.gmf.runtime.editparts.GraphicalHelper;
+import org.eclipse.sirius.viewpoint.DMappingBased;
+import org.eclipse.sirius.viewpoint.DSemanticDecorator;
+import org.eclipse.sirius.viewpoint.SiriusPlugin;
+import org.eclipse.sirius.viewpoint.description.tool.ToolPackage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * This class manages the reconnection of an edge.
+ *
+ */
+@SuppressWarnings("restriction")
+public class SiriusGraphicalNodeEditPolicy extends TreeGraphicalNodeEditPolicy {
+
+ /**
+ * Constant used to store a {@link EdgeCreationDescription} in a Request.getExtendedData().
+ */
+ public static final String GMF_EDGE_CREATION_DESCRIPTION = "edge.creation.description"; //$NON-NLS-1$
+
+ /**
+ * Constant used to store the {@link EdgeTarget} source.
+ */
+ public static final String GMF_EDGE_TARGET_SOURCE = "edgeTarget.source"; //$NON-NLS-1$
+
+ /**
+ * Constant used to store the location in GMF relative coordinates of the click on the {@link EdgeTarget} source.
+ */
+ public static final String GMF_EDGE_LOCATION_SOURCE = "edge.location.source"; //$NON-NLS-1$
+
+ /**
+ * Constant use to store source terminal.
+ */
+ public static final String GMF_EDGE_SOURCE_TERMINAL = "edge.newSourceTerminal"; //$NON-NLS-1$
+
+ /**
+ * Constant use to store the feedback figure. This feedback figure is used only when necessary (detection of
+ * potential straightened edge feedback).
+ */
+ public static final String GMF_EDGE_FEEDBACK = "edge.feedback.figure"; //$NON-NLS-1$
+
+ /**
+ * Extra width edge for this feedback.
+ */
+ private static final int WIDTH_FEEDBACK = 2;
+
+ /**
+ * Figure for highlight figure feedback.
+ */
+ private RectangleFigure highlightFigure;
+
+ /**
+ * Gets the reconnect source command.
+ *
+ * @param request the request
+ * @return the reconnect source command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
+ */
+
+ @Override
+ protected Command getReconnectSourceCommand(final ReconnectRequest request) {
+ if (request.getConnectionEditPart().getModel() instanceof Edge) {
+ final Edge edge = (Edge) request.getConnectionEditPart().getModel();
+ if (GMFNotationHelper.isNoteAttachment(edge)) {
+ return super.getReconnectSourceCommand(request);
+ }
+ }
+ DEdge edge = null;
+ EdgeTarget target = null;
+ final ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
+ if (connectionEditPart.getModel() instanceof View && ((View) connectionEditPart.getModel()).getElement() instanceof DEdge) {
+ edge = (DEdge) ((View) connectionEditPart.getModel()).getElement();
+ }
+ EdgeTarget source = null;
+ if (edge != null) {
+ source = edge.getSourceNode();
+ }
+ if (request.getTarget().getModel() instanceof View && ((View) request.getTarget().getModel()).getElement() instanceof EdgeTarget) {
+ target = (EdgeTarget) ((View) request.getTarget().getModel()).getElement();
+ }
+
+ Command cmd = UnexecutableCommand.INSTANCE;
+
+ if (source != null && target != null) {
+ if (target != source) {
+ Option<EdgeMapping> edgeMapping = new IEdgeMappingQuery(edge.getActualMapping()).getEdgeMapping();
+ final ReconnectEdgeDescription tool = edgeMapping.some() ? getBestTool(edgeMapping.get(), true, source, target, edge, true) : null;
+ if (tool != null) {
+ final CompoundCommand result = new CompoundCommand();
+ result.add(this.getToolCommand(tool, edge, source, target));
+ result.add(getReconnectSourceCommandAfterTool(request));
+ cmd = result;
+ }
+ } else if (isCenteredEnd(connectionEditPart, edge, CenteringStyle.SOURCE)) {
+ cmd = UnexecutableCommand.INSTANCE;
+ } else if (applySpecificTreeLayout(request.getConnectionEditPart())) {
+ cmd = getReconnectSourceForTreeLayoutCommand(request);
+ } else {
+ ConnectionEditPartQuery cepq = new ConnectionEditPartQuery(request.getConnectionEditPart());
+ if (cepq.isEdgeWithObliqueRoutingStyle() || cepq.isEdgeWithRectilinearRoutingStyle()) {
+ cmd = getReconnectSourceOrTargetForObliqueOrRectilinearCommand(request, true);
+ } else {
+ cmd = super.getReconnectSourceCommand(request);
+ }
+ }
+
+ }
+
+ return cmd;
+ }
+
+ /**
+ * Same behavior has super.getReconnectSourceCommand but using a custom
+ * SetConnectionAnchorsCommand because modification on reconnected edge are
+ * now done in precommit.
+ *
+ * @param request the request
+ * @return the reconnect source command after tool
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
+ */
+ private Command getReconnectSourceCommandAfterTool(ReconnectRequest request) {
+ INodeEditPart node = getConnectableEditPart();
+ if (node == null) {
+ return null;
+ }
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ ConnectionAnchor sourceAnchor = node.getSourceConnectionAnchor(request);
+ View sourceView = (View) request.getTarget().getModel();
+ SiriusSetConnectionAnchorsCommand scaCommand = new SiriusSetConnectionAnchorsCommand(editingDomain, DiagramUIMessages.Commands_SetConnectionEndsCommand_Source, sourceView,
+ sourceView.getSourceEdges(), ReconnectionKind.RECONNECT_SOURCE_LITERAL);
+ scaCommand.setNewSourceTerminal(node.mapConnectionAnchorToTerminal(sourceAnchor));
+
+ // We retrieve the current target anchor and set it in the
+ // SiriusSetConnectionAnchorsCommand. when reconnecting the edge, a new
+ // edge is created and the anchor is lost, we need to set it back.
+ Connection connection = (Connection) ((GraphicalEditPart) request.getConnectionEditPart()).getFigure();
+ ConnectionAnchor connectionAnchor = connection.getTargetAnchor();
+ if (connectionAnchor instanceof BaseSlidableAnchor) {
+ String targetTerminal = ((BaseSlidableAnchor) connectionAnchor).getTerminal();
+ scaCommand.setNewTargetTerminal(targetTerminal);
+ }
+
+ CompositeCommand cc = new CompositeCommand(DiagramUIMessages.Commands_SetConnectionEndsCommand_Source);
+ cc.compose(scaCommand);
+
+ // The router is the same, therefore the bendpoint of the new
+ // reconnected edge are set accordingly to the feedback of the
+ // previous edge under reconnection
+
+ // Set points of Edge as they are graphically
+ Point tempSourceRefPoint = connection.getSourceAnchor().getReferencePoint();
+ connection.translateToRelative(tempSourceRefPoint);
+
+ Point tempTargetRefPoint = connection.getTargetAnchor().getReferencePoint();
+ connection.translateToRelative(tempTargetRefPoint);
+
+ PointList connectionPointList = connection.getPoints().getCopy();
+
+ restoreMissingBendpointOverCandidate(request, connectionPointList);
+
+ // Set the connection bendpoints with a PointList using a command
+ SetReconnectingConnectionBendpointsCommand sbbCommand = new SetReconnectingConnectionBendpointsCommand(editingDomain, sourceView, sourceView.getSourceEdges(),
+ ReconnectionKind.RECONNECT_SOURCE_LITERAL);
+ sbbCommand.setNewPointList(connectionPointList, tempSourceRefPoint, tempTargetRefPoint);
+ if (request.getConnectionEditPart() instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) {
+ sbbCommand.setLabelsToUpdate((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) request.getConnectionEditPart());
+ }
+
+ cc.compose(sbbCommand);
+ return new ICommandProxy(cc);
+ }
+
+ /**
+ * Gets the reconnect target command.
+ *
+ * @param request the request
+ * @return the reconnect target command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
+ */
+
+ @Override
+ protected Command getReconnectTargetCommand(final ReconnectRequest request) {
+ if (request.getConnectionEditPart().getModel() instanceof Edge) {
+ final Edge edge = (Edge) request.getConnectionEditPart().getModel();
+ if (GMFNotationHelper.isNoteAttachment(edge)) {
+ return super.getReconnectTargetCommand(request);
+ }
+ }
+ DEdge edge = null;
+ EdgeTarget target = null;
+ final ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
+ if (connectionEditPart.getModel() instanceof View && ((View) connectionEditPart.getModel()).getElement() instanceof DEdge) {
+ edge = (DEdge) ((View) connectionEditPart.getModel()).getElement();
+ }
+ EdgeTarget source = null;
+ if (edge != null) {
+ source = edge.getTargetNode();
+ }
+ if (request.getTarget().getModel() instanceof View && ((View) request.getTarget().getModel()).getElement() instanceof EdgeTarget) {
+ target = (EdgeTarget) ((View) request.getTarget().getModel()).getElement();
+ }
+
+ Command cmd = UnexecutableCommand.INSTANCE;
+ if (source != null && target != null) {
+ if (target != source) {
+ Option<EdgeMapping> edgeMapping = new IEdgeMappingQuery(edge.getActualMapping()).getEdgeMapping();
+ final ReconnectEdgeDescription tool = edgeMapping.some() ? getBestTool(edgeMapping.get(), false, source, target, edge, true) : null;
+ if (tool != null) {
+ final CompoundCommand result = new CompoundCommand();
+ result.add(this.getToolCommand(tool, edge, source, target));
+ result.add(getReconnectTargetCommandAfterTool(request));
+ cmd = result;
+ }
+ } else if (isCenteredEnd(connectionEditPart, edge, CenteringStyle.TARGET)) {
+ cmd = UnexecutableCommand.INSTANCE;
+ } else {
+ ConnectionEditPartQuery cepq = new ConnectionEditPartQuery(request.getConnectionEditPart());
+ if (cepq.isEdgeWithTreeRoutingStyle() && applySpecificTreeLayout(request.getConnectionEditPart())) {
+ cmd = getReconnectTargetForTreeLayoutCommand(request);
+ } else if (cepq.isEdgeWithObliqueRoutingStyle() || cepq.isEdgeWithRectilinearRoutingStyle()) {
+ cmd = getReconnectSourceOrTargetForObliqueOrRectilinearCommand(request, false);
+ } else {
+ cmd = super.getReconnectTargetCommand(request);
+ }
+ }
+ }
+ return cmd;
+ }
+
+ /**
+ * Gets the reconnect source or target for oblique or rectilinear command.
+ *
+ * @param request the request
+ * @param source the source
+ * @return the reconnect source or target for oblique or rectilinear command
+ */
+ private Command getReconnectSourceOrTargetForObliqueOrRectilinearCommand(ReconnectRequest request, boolean source) {
+ INodeEditPart node = getConnectableEditPart();
+ INodeEditPart targetEP = getConnectionCompleteEditPart(request);
+ if (node == null || targetEP == null) {
+ return null;
+ }
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ ConnectionAnchor targetAnchor = getConnectionTargetAnchor(request);
+
+ // Creation of the command that set the connection end points (source
+ // and target)
+ SetConnectionEndsCommand sceCommand = new SetConnectionEndsCommand(editingDomain, StringStatics.BLANK);
+ sceCommand.setEdgeAdaptor(new EObjectAdapter((EObject) request.getConnectionEditPart().getModel()));
+ if (source) {
+ sceCommand.setNewSourceAdaptor(targetEP);
+ } else {
+ sceCommand.setNewTargetAdaptor(targetEP);
+ }
+ // Creation of the command that set the connection anchors (also source
+ // and target)
+ SetConnectionAnchorsCommand scaCommand = new SetConnectionAnchorsCommand(editingDomain, StringStatics.BLANK);
+ scaCommand.setEdgeAdaptor(new EObjectAdapter((EObject) request.getConnectionEditPart().getModel()));
+ if (source) {
+ scaCommand.setNewSourceTerminal(targetEP.mapConnectionAnchorToTerminal(targetAnchor));
+ } else {
+ scaCommand.setNewTargetTerminal(targetEP.mapConnectionAnchorToTerminal(targetAnchor));
+ }
+ // Both command are composed in a composite command
+ CompositeCommand cc = new CompositeCommand(DiagramUIMessages.Commands_SetConnectionEndsCommand_Target);
+ cc.compose(sceCommand);
+ cc.compose(scaCommand);
+ // Set points of Edge as they are graphically
+ Connection connection = (Connection) ((GraphicalEditPart) request.getConnectionEditPart()).getFigure();
+ Point tempSourceRefPoint = connection.getSourceAnchor().getReferencePoint();
+ connection.translateToRelative(tempSourceRefPoint);
+
+ Point tempTargetRefPoint = connection.getTargetAnchor().getReferencePoint();
+ connection.translateToRelative(tempTargetRefPoint);
+
+ PointList connectionPointList = connection.getPoints().getCopy();
+
+ // Set the connection bendpoints with a PointList using a command
+ SetConnectionBendpointsAndLabelCommmand sbbCommand = new SetConnectionBendpointsAndLabelCommmand(editingDomain);
+ sbbCommand.setEdgeAdapter(request.getConnectionEditPart());
+ sbbCommand.setNewPointList(connectionPointList, tempSourceRefPoint, tempTargetRefPoint);
+ if (request.getConnectionEditPart() instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) {
+ sbbCommand.setLabelsToUpdate((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) request.getConnectionEditPart(),
+ InitialPointsOfRequestDataManager.getOriginalPoints(request));
+ }
+ cc.compose(sbbCommand);
+
+ return new ICommandProxy(cc);
+ }
+
+ /**
+ * Checks if is centered end.
+ *
+ * @param connectionEditPart the connection edit part
+ * @param edge the edge
+ * @param centeringStyle the centering style
+ * @return true, if is centered end
+ */
+ private boolean isCenteredEnd(ConnectionEditPart connectionEditPart, DEdge edge, CenteringStyle centeringStyle) {
+ boolean returnValue = false;
+ EdgeStyle edgeStyle = edge.getOwnedStyle();
+ if (edgeStyle != null) {
+ returnValue = edgeStyle.getCentered() == CenteringStyle.BOTH || edgeStyle.getCentered() == centeringStyle;
+ // if the edge is rectilinear and has only two bendpoints, we
+ // also forbid to move the opposite end, otherwise all the segment
+ // move.
+ if (!returnValue && EdgeRouting.MANHATTAN_LITERAL.getLiteral().equals(edgeStyle.getRoutingStyle().getLiteral())) {
+ IFigure figure = connectionEditPart.getFigure();
+ if (figure instanceof Connection) {
+ returnValue = ((Connection) figure).getPoints().size() <= 2;
+ }
+ }
+ }
+
+ return returnValue;
+ }
+
+ /**
+ * Same behavior has super.getReconnectTargetCommand but using a custom
+ * SetConnectionAnchorsCommand because modification on reconnected edge are
+ * now done in precommit.
+ *
+ * @param request the request
+ * @return the reconnect target command after tool
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
+ */
+ private Command getReconnectTargetCommandAfterTool(ReconnectRequest request) {
+ INodeEditPart node = getConnectableEditPart();
+ if (node == null || getConnectionCompleteEditPart(request) == null) {
+ return null;
+ }
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ ConnectionAnchor targetAnchor = getConnectionTargetAnchor(request);
+ INodeEditPart targetEP = getConnectionCompleteEditPart(request);
+
+ View targetView = (View) targetEP.getModel();
+ SiriusSetConnectionAnchorsCommand scaCommand = new SiriusSetConnectionAnchorsCommand(editingDomain, DiagramUIMessages.Commands_SetConnectionEndsCommand_Target, targetView,
+ targetView.getTargetEdges(), ReconnectionKind.RECONNECT_TARGET_LITERAL);
+ scaCommand.setNewTargetTerminal(targetEP.mapConnectionAnchorToTerminal(targetAnchor));
+
+ // We retrieve the current source anchor and set it in the
+ // SiriusSetConnectionAnchorsCommand. when reconnecting the edge, a new
+ // edge is created and the anchor is lost, we need to set it back.
+ ConnectionEditPart cep = request.getConnectionEditPart();
+ Connection connection = (Connection) cep.getFigure();
+ ConnectionAnchor connectionAnchor = connection.getSourceAnchor();
+ if (connectionAnchor instanceof BaseSlidableAnchor) {
+ String sourceTerminal = ((BaseSlidableAnchor) connectionAnchor).getTerminal();
+ scaCommand.setNewSourceTerminal(sourceTerminal);
+ }
+
+ Command cmd = new ICommandProxy(scaCommand);
+
+ RoutingStyle style = (RoutingStyle) ((View) cep.getModel()).getStyle(NotationPackage.eINSTANCE.getRoutingStyle());
+ Routing currentRouter = Routing.MANUAL_LITERAL;
+ if (style != null) {
+ currentRouter = style.getRouting();
+ }
+ Command cmdRouter = getRoutingAdjustment(request.getConnectionEditPart(), getSemanticHint(request), currentRouter, request.getTarget());
+ if (cmdRouter != null) {
+ // The router has changed, therefore bendpoints are "reset" to only
+ // source and target
+ cmd = cmd.chain(cmdRouter);
+ // reset the bendpoints
+ ConnectionAnchor sourceAnchor = node.getSourceConnectionAnchor(request);
+ PointList pointList = new PointList();
+ pointList.addPoint(sourceAnchor.getLocation(targetAnchor.getReferencePoint()));
+ pointList.addPoint(targetAnchor.getLocation(sourceAnchor.getReferencePoint()));
+
+ SetReconnectingConnectionBendpointsCommand sbbCommand = new SetReconnectingConnectionBendpointsCommand(editingDomain, targetView, targetView.getTargetEdges(),
+ ReconnectionKind.RECONNECT_TARGET_LITERAL);
+ sbbCommand.setNewPointList(pointList, sourceAnchor.getReferencePoint(), targetAnchor.getReferencePoint());
+ if (request.getConnectionEditPart() instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) {
+ sbbCommand.setLabelsToUpdate((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) request.getConnectionEditPart());
+ }
+ Command cmdBP = new ICommandProxy(sbbCommand);
+ if (cmdBP != null) {
+ cmd = cmd.chain(cmdBP);
+ }
+ } else {
+ // The router is the same, therefore the bendpoint of the new
+ // reconnected edge are set accordingly to the feedback of the
+ // previous edge under reconnection
+
+ // Set points of Edge as they are graphically
+ Point tempSourceRefPoint = connection.getSourceAnchor().getReferencePoint();
+ connection.translateToRelative(tempSourceRefPoint);
+
+ Point tempTargetRefPoint = connection.getTargetAnchor().getReferencePoint();
+ connection.translateToRelative(tempTargetRefPoint);
+
+ PointList connectionPointList = connection.getPoints().getCopy();
+
+ restoreMissingBendpointOverCandidate(request, connectionPointList);
+
+ // Set the connection bendpoints with a PointList using a command
+ SetReconnectingConnectionBendpointsCommand sbbCommand = new SetReconnectingConnectionBendpointsCommand(editingDomain, targetView, targetView.getTargetEdges(),
+ ReconnectionKind.RECONNECT_TARGET_LITERAL);
+ sbbCommand.setNewPointList(connectionPointList, tempSourceRefPoint, tempTargetRefPoint);
+ if (request.getConnectionEditPart() instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) {
+ sbbCommand.setLabelsToUpdate((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) request.getConnectionEditPart());
+ }
+
+ Command cmdBP = new ICommandProxy(sbbCommand);
+ if (cmdBP != null) {
+ cmd = cmd == null ? cmdBP : cmd.chain(cmdBP);
+ }
+
+ }
+ return cmd;
+ }
+
+ /**
+ * Because the feedback is handled by SiriusConnectionEndPointEditPolicy and
+ * the reconnection is handled by the current policy, when the reconnection
+ * switch to another target candidate some bendpoints can be missing on
+ * reconnection. The missing bendpoints are the result of the ObliqueRouter
+ * that removes bendpoints over the target candidate.
+ *
+ * @param request
+ * current {@link ReconnectRequest}
+ * @param connectionPointList
+ * Bendpoint location of the edge under reconnection
+ */
+ private void restoreMissingBendpointOverCandidate(ReconnectRequest request, PointList connectionPointList) {
+ Edge edge = (Edge) request.getConnectionEditPart().getModel();
+ Bendpoints bendpoints = edge.getBendpoints();
+ Point sourceEndAnchorLocation = null;
+ Point targetEndAnchorLocation = null;
+ DEdge dedge = (DEdge) edge.getElement();
+
+ if (!EdgeRouting.STRAIGHT_LITERAL.equals(((EdgeStyle) dedge.getStyle()).getRoutingStyle())
+ || bendpoints instanceof RelativeBendpoints && connectionPointList.size() == ((RelativeBendpoints) bendpoints).getPoints().size()) {
+ // Only the oblique router can remove bendpoints or there is no
+ // missing bendpoint here. Move Along.
+ return;
+ }
+
+ // Computation of the location of the anchor on the end that is not
+ // under reconnection
+ sourceEndAnchorLocation = getAnchorLocation(((GraphicalEditPart) request.getConnectionEditPart().getSource()).getFigure().getBounds(), edge.getSourceAnchor());
+ targetEndAnchorLocation = getAnchorLocation(((GraphicalEditPart) request.getConnectionEditPart().getTarget()).getFigure().getBounds(), edge.getTargetAnchor());
+
+ // Computation of the bendpoints locations before reconnection using
+ // data from the gmf model instead of the figure (unreliable as it
+ // updates during reconnection)
+ ArrayList<Point> previousBendpoints = Lists.<Point> newArrayList();
+ if (bendpoints instanceof RelativeBendpoints && sourceEndAnchorLocation != null && targetEndAnchorLocation != null) {
+ RelativeBendpoints relativeBendpoints = (RelativeBendpoints) bendpoints;
+ List<?> points = relativeBendpoints.getPoints();
+ for (RelativeBendpoint rbp : Iterables.filter(points, RelativeBendpoint.class)) {
+ Point benpointLocationFromSource = sourceEndAnchorLocation.getTranslated(rbp.getSourceX(), rbp.getSourceY());
+ Point benpointLocationFromTarget = targetEndAnchorLocation.getTranslated(rbp.getTargetX(), rbp.getTargetY());
+ if (!benpointLocationFromSource.equals(benpointLocationFromTarget)) {
+ // if bendpoint location computed from source and target are
+ // different, the edge is an average of both. We don't have
+ // reliable coordinates to process here but these
+ // coordinates will be matching after reconnection.
+ return;
+ }
+ previousBendpoints.add(benpointLocationFromSource);
+ }
+ }
+
+ // Detection of bendpoints missing in the current connectionPointList
+ // compare to the original bendpoints
+ LinkedHashMap<Integer, Point> pointToAddByIndexMap = Maps.<Integer, Point> newLinkedHashMap();
+ // We ignore the first and last bendpoints as they can't be hidden
+ for (int i = 1; i <= previousBendpoints.size() - 2; i++) {
+ // When a missing bendpoint is found the index must only increase
+ // for the list containing all bendpoints
+ if (connectionPointList.size() > i - pointToAddByIndexMap.keySet().size() && !connectionPointList.getPoint(i - pointToAddByIndexMap.keySet().size()).equals(previousBendpoints.get(i))) {
+ // Note that we could exclude the bendpoint over the target
+ // candidate but it will be handled by the ObliqueRouteur
+ pointToAddByIndexMap.put(i, previousBendpoints.get(i));
+ }
+ }
+
+ // Addition of the missing bendpoint at the expected index
+ pointToAddByIndexMap.forEach((index, point) -> connectionPointList.insertPoint(point, index));
+ }
+
+ /**
+ * Compute anchor location using its end bounds.
+ *
+ * @param untouchedEndBounds
+ * bounds of the element on which is the anchor
+ * @param previousAnchor
+ * the Anchor used to compute location
+ * @return the location of the anchor
+ */
+ private Point getAnchorLocation(Rectangle untouchedEndBounds, Anchor previousAnchor) {
+ Point result = null;
+ PrecisionPoint rel = new PrecisionPoint(0.5, 0.5);
+ // Note that the anchor will be null if it is centered
+ if (previousAnchor instanceof IdentityAnchor) {
+ rel = BaseSlidableAnchor.parseTerminalString(((IdentityAnchor) previousAnchor).getId());
+ }
+ result = new PrecisionPoint(untouchedEndBounds.getLocation().x + untouchedEndBounds.width * rel.preciseX(), untouchedEndBounds.getLocation().y + untouchedEndBounds.height * rel.preciseY());
+ return result;
+ }
+
+ /**
+ * Gets the best tool.
+ *
+ * @param mapping the mapping
+ * @param source the source
+ * @param oldTarget the old target
+ * @param newTarget the new target
+ * @param edge the edge
+ * @param computePreCondition the compute pre condition
+ * @return the best tool
+ */
+ private ReconnectEdgeDescription getBestTool(final EdgeMapping mapping, final boolean source, final EdgeTarget oldTarget, final EdgeTarget newTarget, final DEdge edge,
+ boolean computePreCondition) {
+ final List<ReconnectEdgeDescription> candidateTool = new ArrayList<ReconnectEdgeDescription>(mapping.getReconnections());
+
+ ReconnectEdgeDescription bestTool = null;
+ EObject semanticSource = null;
+ EObject semanticTarget = null;
+ EObject semanticElement = null;
+
+ if (oldTarget instanceof DSemanticDecorator) {
+ semanticSource = ((DSemanticDecorator) oldTarget).getTarget();
+ }
+ if (newTarget instanceof DSemanticDecorator) {
+ semanticTarget = ((DSemanticDecorator) newTarget).getTarget();
+ }
+ semanticElement = ((DSemanticDecorator) edge).getTarget();
+
+ // get the tool that applies on source or target.
+ selectReconnectionToolCandidates(candidateTool, source);
+
+ if (!candidateTool.isEmpty()) {
+ Iterator<ReconnectEdgeDescription> toolIterator = candidateTool.iterator();
+ // Check precondtion
+ while (toolIterator.hasNext()) {
+ final ReconnectEdgeDescription myTool = toolIterator.next();
+ final String precondition = myTool.getPrecondition();
+ if (computePreCondition && precondition != null && !StringUtil.isEmpty(precondition)) {
+
+ final IInterpreter interpreter = SiriusPlugin.getDefault().getInterpreterRegistry().getInterpreter(semanticElement);
+
+ interpreter.setVariable(IInterpreterSiriusVariables.DIAGRAM, edge.getParentDiagram());
+ interpreter.setVariable(IInterpreterSiriusVariables.SOURCE, semanticSource);
+ interpreter.setVariable(IInterpreterSiriusVariables.SOURCE_VIEW, oldTarget);
+ interpreter.setVariable(IInterpreterSiriusVariables.TARGET, semanticTarget);
+ interpreter.setVariable(IInterpreterSiriusVariables.TARGET_VIEW, newTarget);
+ interpreter.setVariable(IInterpreterSiriusVariables.ELEMENT, semanticElement);
+
+ final boolean preconditionOK = RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateBoolean(semanticElement, myTool,
+ ToolPackage.eINSTANCE.getAbstractToolDescription_Precondition());
+ if (!preconditionOK) {
+ toolIterator.remove();
+ }
+
+ interpreter.unSetVariable(IInterpreterSiriusVariables.SOURCE);
+ interpreter.unSetVariable(IInterpreterSiriusVariables.TARGET);
+ interpreter.unSetVariable(IInterpreterSiriusVariables.ELEMENT);
+ interpreter.unSetVariable(IInterpreterSiriusVariables.DIAGRAM);
+ interpreter.unSetVariable(IInterpreterSiriusVariables.SOURCE_VIEW);
+ interpreter.unSetVariable(IInterpreterSiriusVariables.TARGET_VIEW);
+ }
+ }
+ // Check that the mapping of the new end is in the
+ // authorized list.
+ toolIterator = candidateTool.iterator();
+ while (toolIterator.hasNext()) {
+ final ReconnectEdgeDescription myTool = toolIterator.next();
+ if (!new ReconnectEdgeDescriptionQuery(myTool).isEndAuthorized(source, newTarget)) {
+ toolIterator.remove();
+ }
+ }
+
+ }
+ if (!candidateTool.isEmpty()) {
+ bestTool = candidateTool.get(0);
+ }
+
+ return bestTool;
+
+ }
+
+ /**
+ * Select reconnection tool candidates.
+ *
+ * @param candidateTool the candidate tool
+ * @param source the source
+ */
+ private void selectReconnectionToolCandidates(final List<ReconnectEdgeDescription> candidateTool, final boolean source) {
+ final Iterator<ReconnectEdgeDescription> iterTools = candidateTool.iterator();
+ while (iterTools.hasNext()) {
+ final ReconnectEdgeDescription currentTool = iterTools.next();
+ if ((source && currentTool.getReconnectionKind() == ReconnectionKind.RECONNECT_TARGET_LITERAL)
+ || (!source && currentTool.getReconnectionKind() == ReconnectionKind.RECONNECT_SOURCE_LITERAL)) {
+ iterTools.remove();
+ }
+ }
+ }
+
+ /**
+ * Gets the tool command.
+ *
+ * @param tool the tool
+ * @param edge the edge
+ * @param source the source
+ * @param target the target
+ * @return the tool command
+ */
+ private Command getToolCommand(final ReconnectEdgeDescription tool, final DEdge edge, final EdgeTarget source, final EdgeTarget target) {
+ final DDiagramEditor diagramEditor = (DDiagramEditor) this.getHost().getViewer().getProperty(DDiagramEditor.EDITOR_ID);
+ if (diagramEditor != null) {
+ final Object adapter = diagramEditor.getAdapter(IDiagramCommandFactoryProvider.class);
+ final IDiagramCommandFactoryProvider cmdFactoryProvider = (IDiagramCommandFactoryProvider) adapter;
+ final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(source);
+ final IDiagramCommandFactory emfCommandFactory = cmdFactoryProvider.getCommandFactory(domain);
+ return new ICommandProxy(new GMFCommandWrapper(domain, emfCommandFactory.buildReconnectEdgeCommandFromTool(tool, edge, source, target)));
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * Gets the connection create command.
+ *
+ * @param request the request
+ * @return the connection create command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
+ */
+
+ @Override
+ protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
+ Command connectionCreateCommand = null;
+ if (request instanceof CreateConnectionViewRequest) {
+ connectionCreateCommand = super.getConnectionCreateCommand(request);
+ } else {
+ if (CreateConnectionRequestHelper.computeConnectionStartExtendedData(request, getConnectableEditPart())) {
+ connectionCreateCommand = new ICommandProxy(IdentityCommand.INSTANCE);
+ }
+ }
+ if (connectionCreateCommand == null) {
+ connectionCreateCommand = super.getConnectionCreateCommand(request);
+ }
+ return connectionCreateCommand;
+ }
+
+ /**
+ * Gets the connection complete command.
+ *
+ * @param request the request
+ * @return the connection complete command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.TreeGraphicalNodeEditPolicy#getConnectionCompleteCommand(org.eclipse.gef.requests.CreateConnectionRequest)
+ */
+
+ @Override
+ protected Command getConnectionCompleteCommand(final CreateConnectionRequest request) {
+ Command connectionCompleteCommand = null;
+
+ if (new RequestQuery(request).isNoteAttachmentCreationRequest()) {
+ connectionCompleteCommand = super.getConnectionCompleteCommand(request);
+ } else {
+ connectionCompleteCommand = buildSiriusConnectionCreationCmd(request);
+ }
+ return connectionCompleteCommand;
+ }
+
+ /**
+ * Builds the sirius connection creation cmd.
+ *
+ * @param request the request
+ * @return the command
+ */
+ private Command buildSiriusConnectionCreationCmd(CreateConnectionRequest request) {
+ Command viewpointConnectionCreationCmd = null;
+ INodeEditPart targetEP = getConnectionCompleteEditPart(request);
+ if (targetEP != null) {
+
+ INodeEditPart sourceEditPart = (INodeEditPart) request.getSourceEditPart();
+
+ // Location relative to the source: Position where the user
+ // clicked, but snapped to grid if this feature is enabled
+ Point sourceLocation = getEdgeLocationSource(request);
+ // Location relative to the target: Position where the user
+ // clicked, but snapped to grid if this feature is enabled
+ Point targetLocation = getConvertedLocation(request);
+ EdgeLayoutData edgeLayoutData;
+ if (GraphicalHelper.isSnapToGridEnabled(sourceEditPart)) {
+ edgeLayoutData = getEdgeLayoutDataWithSnapToGrid(request, sourceEditPart, targetEP, sourceLocation, targetLocation);
+ } else {
+ edgeLayoutData = getEdgeLayoutData(request, sourceEditPart, targetEP, sourceLocation, targetLocation);
+ }
+
+ DSemanticDecorator decorateSemanticElement = null;
+ if (this.getHost().getModel() instanceof View) {
+ View view = (View) this.getHost().getModel();
+ if (view.getElement() instanceof DSemanticDecorator) {
+ decorateSemanticElement = (DSemanticDecorator) view.getElement();
+ }
+ }
+ if (decorateSemanticElement instanceof EdgeTarget && request.getExtendedData().get(GMF_EDGE_CREATION_DESCRIPTION) instanceof EdgeCreationDescription) {
+ EdgeTarget source = (EdgeTarget) request.getExtendedData().get(GMF_EDGE_TARGET_SOURCE);
+ if (source != null) {
+ EdgeTarget target = (EdgeTarget) decorateSemanticElement;
+ EdgeCreationDescription edgeCreationDescription = (EdgeCreationDescription) request.getExtendedData().get(GMF_EDGE_CREATION_DESCRIPTION);
+ boolean canCreate = new EdgeCreationDescriptionQuery(edgeCreationDescription).canBeAppliedOn((DMappingBased) source, (DMappingBased) target);
+ if (canCreate) {
+ DDiagramEditor diagramEditor = (DDiagramEditor) this.getHost().getViewer().getProperty(DDiagramEditor.EDITOR_ID);
+ IDiagramCommandFactoryProvider cmdFactoryProvider = diagramEditor.getAdapter(IDiagramCommandFactoryProvider.class);
+ viewpointConnectionCreationCmd = buildCreateEdgeCommand(request, source, target, edgeCreationDescription, cmdFactoryProvider, edgeLayoutData);
+ }
+ }
+ }
+ }
+ return viewpointConnectionCreationCmd;
+ }
+
+ /**
+ * Create the edge layout data that will be used later after the refresh.
+ *
+ * @param request
+ * The original creation request
+ * @param sourceEditPart
+ * the {@link EditPart} that the source end of the connection
+ * should be connected to.
+ * @param targetEditPart
+ * the {@link EditPart} that the target end of the connection
+ * should be connected to.
+ * @param sourceLocation
+ * the location of the first click (relative to the source edit
+ * part)
+ * @param targetLocation
+ * the location of the second click (relative to the target edit
+ * part)
+ * @return The edge layout data corresponding to the creation request.
+ */
+ protected EdgeLayoutData getEdgeLayoutData(CreateConnectionRequest request, INodeEditPart sourceEditPart, INodeEditPart targetEditPart, Point sourceLocation, Point targetLocation) {
+ String newSourceTerminal = getEdgeTerminalSource(request);
+ ConnectionAnchor sourceAnchor = sourceEditPart.mapTerminalToConnectionAnchor(newSourceTerminal);
+
+ ConnectionAnchor targetAnchor = targetEditPart.getTargetConnectionAnchor(request);
+ String newTargetTerminal = targetEditPart.mapConnectionAnchorToTerminal(targetAnchor);
+
+ Point sourceRefPoint = sourceAnchor.getReferencePoint();
+ Point targetRefPoint = targetAnchor.getReferencePoint();
+
+ PointList pointList = new PointList();
+ if (request.getLocation() == null) {
+ pointList.addPoint(sourceAnchor.getLocation(targetAnchor.getReferencePoint()));
+ pointList.addPoint(targetAnchor.getLocation(sourceAnchor.getReferencePoint()));
+ } else {
+ pointList.addPoint(sourceAnchor.getLocation(request.getLocation()));
+ pointList.addPoint(targetAnchor.getLocation(request.getLocation()));
+ }
+
+ final LayoutData sourceLayoutData = new RootLayoutData(sourceEditPart, sourceLocation.getCopy(), null);
+ final LayoutData targetLayoutData = new RootLayoutData(targetEditPart, targetLocation.getCopy(), null);
+ EdgeLayoutData edgeLayoutData = new EdgeLayoutData(sourceLayoutData, targetLayoutData);
+
+ edgeLayoutData.setSourceTerminal("" + newSourceTerminal); //$NON-NLS-1$
+ edgeLayoutData.setTargetTerminal("" + newTargetTerminal); //$NON-NLS-1$
+
+ edgeLayoutData.setPointList(pointList.getCopy());
+ edgeLayoutData.setSourceRefPoint(sourceRefPoint.getCopy());
+ edgeLayoutData.setTargetRefPoint(targetRefPoint.getCopy());
+ return edgeLayoutData;
+ }
+
+ /**
+ * Create the edge layout data that will be used later after the refresh.
+ * According to
+ * {@link #getEdgeLayoutData(CreateConnectionRequest, INodeEditPart, INodeEditPart, Point, Point)}
+ * this method ensures that the first point and the last point of the edge
+ * will be snap to the grid (at least one of there coordinates. The other is
+ * constrained by the side of the source (or the target).<BR>
+ * This is not possible to do it earlier (in feedback for example) because
+ * we should know source and target data to compute the new source and
+ * target location.
+ *
+ * @param request
+ * The original creation request
+ * @param sourceEditPart
+ * the {@link EditPart} that the source end of the connection
+ * should be connected to.
+ * @param targetEditPart
+ * the {@link EditPart} that the target end of the connection
+ * should be connected to.
+ * @param sourceLocation
+ * the location of the first click (relative to the source edit part), snapped to grid if feature enabled
+ * @param targetLocation
+ * the location of the second click (relative to the target edit part), snapped to grid if feature
+ * enabled
+ * @return The edge layout data corresponding to the creation request and to
+ * the snapToGrid state.
+ */
+ protected EdgeLayoutData getEdgeLayoutDataWithSnapToGrid(CreateConnectionRequest request, INodeEditPart sourceEditPart, INodeEditPart targetEditPart, Point sourceLocation, Point targetLocation) {
+ IGraphicalEditPart srcEditPart = (IGraphicalEditPart) sourceEditPart;
+ IGraphicalEditPart tgtEditPart = (IGraphicalEditPart) targetEditPart;
+
+ // Get the absolute source and target location but in 100% to facilitate
+ // the computing
+ Rectangle absoluteSourceBoundsIn100Percent = GraphicalHelper.getAbsoluteBoundsIn100Percent(sourceEditPart);
+ Point absoluteSourceLocationIn100Percent = sourceLocation.getTranslated(absoluteSourceBoundsIn100Percent.getTopLeft());
+ Rectangle absoluteTargetBoundsIn100Percent = GraphicalHelper.getAbsoluteBoundsIn100Percent(targetEditPart);
+ Point absoluteTargetLocationIn100Percent = targetLocation.getTranslated(absoluteTargetBoundsIn100Percent.getTopLeft());
+
+ // Compute intersection between the line (source location<-->target
+ // location) and the source node
+ Optional<Point> intersectionSourcePoint = GraphicalHelper.getIntersection(absoluteSourceLocationIn100Percent, absoluteTargetLocationIn100Percent, srcEditPart, false, true);
+ // Compute intersection between the line (source location<-->target
+ // location) and the target node
+ Optional<Point> intersectionTargetPoint = GraphicalHelper.getIntersection(absoluteSourceLocationIn100Percent, absoluteTargetLocationIn100Percent, tgtEditPart, true, true);
+ // Compute the snap source location and the snap target location
+ if (intersectionSourcePoint.isPresent() && intersectionTargetPoint.isPresent()) {
+ PointList sourceSnappedPoints = snapLocationToGridAndToParentBorder(absoluteSourceLocationIn100Percent, absoluteSourceBoundsIn100Percent, intersectionSourcePoint.get());
+ PointList targetSnappedPoints = snapLocationToGridAndToParentBorder(absoluteTargetLocationIn100Percent, absoluteTargetBoundsIn100Percent, intersectionTargetPoint.get());
+ EdgeLayoutData edgeLayoutData = createEdgeLayoutData(srcEditPart, tgtEditPart, absoluteSourceBoundsIn100Percent, absoluteTargetBoundsIn100Percent, sourceSnappedPoints.getFirstPoint(),
+ targetSnappedPoints.getFirstPoint());
+ EdgeLayoutData edgeLayoutData2 = createEdgeLayoutData(srcEditPart, tgtEditPart, absoluteSourceBoundsIn100Percent, absoluteTargetBoundsIn100Percent, sourceSnappedPoints.getLastPoint(),
+ targetSnappedPoints.getLastPoint());
+ edgeLayoutData.setEdgeLayoutDataForBorderNodes(edgeLayoutData2);
+ return edgeLayoutData;
+ } else {
+ // There is probably a case not handle, use the default layout data
+ return getEdgeLayoutData(request, sourceEditPart, targetEditPart, sourceLocation, targetLocation);
+ }
+ }
+
+ /**
+ * Creates the edge layout data.
+ *
+ * @param sourceEditPart the source edit part
+ * @param targetEditPart the target edit part
+ * @param absoluteSourceBoundsIn100Percent the absolute source bounds in 100 percent
+ * @param absoluteTargetBoundsIn100Percent the absolute target bounds in 100 percent
+ * @param absoluteSourceLocationSnapIn100Percent the absolute source location snap in 100 percent
+ * @param absoluteTargetLocationSnapIn100Percent the absolute target location snap in 100 percent
+ * @return the edge layout data
+ */
+ private EdgeLayoutData createEdgeLayoutData(IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart, Rectangle absoluteSourceBoundsIn100Percent,
+ Rectangle absoluteTargetBoundsIn100Percent, Point absoluteSourceLocationSnapIn100Percent, Point absoluteTargetLocationSnapIn100Percent) {
+ EdgeLayoutData edgeLayoutData;
+ // Make snap source point relative to the source edit part
+ Point sourceLocationSnapIn100Percent = getTranslatedToRelative(absoluteSourceLocationSnapIn100Percent, absoluteSourceBoundsIn100Percent);
+ final LayoutData sourceLayoutData = new RootLayoutData(sourceEditPart, sourceLocationSnapIn100Percent, null);
+ // Make snap target point relative to the source edit part
+ Point targetLocationSnapIn100Percent = getTranslatedToRelative(absoluteTargetLocationSnapIn100Percent, absoluteTargetBoundsIn100Percent);
+ final LayoutData targetLayoutData = new RootLayoutData(targetEditPart, targetLocationSnapIn100Percent, null);
+ edgeLayoutData = new EdgeLayoutData(sourceLayoutData, targetLayoutData);
+ // Compute the new source terminal anchor
+ PrecisionPoint sourceTerminalPosition = new PrecisionPoint((double) sourceLocationSnapIn100Percent.x / absoluteSourceBoundsIn100Percent.width,
+ (double) sourceLocationSnapIn100Percent.y / absoluteSourceBoundsIn100Percent.height);
+ String sourceTerminal = new SlidableAnchor(null, sourceTerminalPosition).getTerminal();
+ edgeLayoutData.setSourceTerminal("" + sourceTerminal); //$NON-NLS-1$
+ // Compute the new target terminal anchor
+ PrecisionPoint targetTerminalPosition = new PrecisionPoint((double) targetLocationSnapIn100Percent.x / absoluteTargetBoundsIn100Percent.width,
+ (double) targetLocationSnapIn100Percent.y / absoluteTargetBoundsIn100Percent.height);
+ String targetTerminal = new SlidableAnchor(null, targetTerminalPosition).getTerminal();
+ edgeLayoutData.setTargetTerminal("" + targetTerminal); //$NON-NLS-1$
+ // Applied the zoom of the current diagram to set the pointList, the
+ // source reference point and the target reference point.
+ PrecisionPoint absoluteSourceLocationSnap = new PrecisionPoint(absoluteSourceLocationSnapIn100Percent);
+ GraphicalHelper.logical2screen(absoluteSourceLocationSnap, sourceEditPart);
+ PrecisionPoint absoluteTargteLoactionSnap = new PrecisionPoint(absoluteTargetLocationSnapIn100Percent);
+ GraphicalHelper.logical2screen(absoluteTargteLoactionSnap, targetEditPart);
+
+ edgeLayoutData.setSourceRefPoint(absoluteSourceLocationSnap);
+ edgeLayoutData.setTargetRefPoint(absoluteTargteLoactionSnap);
+
+ PointList pointList = new PointList();
+ pointList.addPoint(absoluteSourceLocationSnap.getCopy());
+ pointList.addPoint(absoluteTargteLoactionSnap.getCopy());
+ edgeLayoutData.setPointList(pointList.getCopy());
+ return edgeLayoutData;
+ }
+
+ /**
+ * Snap location to grid and to parent border.
+ *
+ * @param absoluteLocation The location in absolute coordinates (and in 100%)
+ * @param absoluteParentBounds The parent bounds in absolute coordinates (and in 100%)
+ * @param intersectionPoint The intersection location in absolute coordinates (and in 100%)
+ * @return a list of 2 points: the first is the intersection point snap to grid and to parent border, the second is
+ * snap to grid but on the nearest side of the parent border according to the click location
+ */
+ private PointList snapLocationToGridAndToParentBorder(Point absoluteLocation, Rectangle absoluteParentBounds, Point intersectionPoint) {
+ PointList result = new PointList();
+ Point absoluteLocationSnapIn100PercentOnIntersection;
+ Point absoluteLocationSnapIn100PercentOnNearestSide;
+ if (intersectionPoint.x == absoluteParentBounds.x || intersectionPoint.x == (absoluteParentBounds.x + absoluteParentBounds.width)) {
+ int yCoordinate = absoluteLocation.y;
+ // If y coordinate of absoluteLocation is outside the parent
+ // (possible if the snapToGrid "has attached" the location outside),
+ // we use the nearer parent side has coordinate.
+ if (absoluteParentBounds.y > yCoordinate) {
+ yCoordinate = absoluteParentBounds.y;
+ } else if (yCoordinate > (absoluteParentBounds.y + absoluteParentBounds.height)) {
+ yCoordinate = absoluteParentBounds.y + absoluteParentBounds.height;
+ }
+ absoluteLocationSnapIn100PercentOnIntersection = new Point(intersectionPoint.x, yCoordinate);
+ // Compute the x coordinate according to the nearest parent side
+ int xCoordinate = intersectionPoint.x;
+ if (absoluteLocation.x - absoluteParentBounds.x > absoluteParentBounds.getRight().x - absoluteLocation.x) {
+ xCoordinate = absoluteParentBounds.getRight().x;
+ }
+ absoluteLocationSnapIn100PercentOnNearestSide = absoluteLocation.getCopy();
+ } else {
+ int xCoordinate = absoluteLocation.x;
+ // If x coordinate of absoluteLocation is outside the parent
+ // (possible if the snapToGrid "has attached" the location outside),
+ // we use the nearer parent side has coordinate.
+ if (absoluteParentBounds.x > xCoordinate) {
+ xCoordinate = absoluteParentBounds.x;
+ } else if (xCoordinate > (absoluteParentBounds.x + absoluteParentBounds.width)) {
+ xCoordinate = absoluteParentBounds.x + absoluteParentBounds.width;
+ }
+ absoluteLocationSnapIn100PercentOnIntersection = new Point(xCoordinate, intersectionPoint.y);
+ // Compute the y coordinate according to the nearest parent side
+ int yCoordinate = absoluteLocation.y;
+ if (absoluteLocation.y - absoluteParentBounds.y > absoluteParentBounds.getBottom().y - absoluteLocation.y) {
+ yCoordinate = absoluteParentBounds.getBottom().y;
+ }
+ absoluteLocationSnapIn100PercentOnNearestSide = absoluteLocation.getCopy();
+ }
+ result.addPoint(absoluteLocationSnapIn100PercentOnIntersection);
+ result.addPoint(absoluteLocationSnapIn100PercentOnNearestSide);
+ return result;
+ }
+
+ /**
+ * Get a new location point relative to the parent.
+ *
+ * @param absoluteLocation
+ * The location in absolute coordinates (and in 100%)
+ * @param absoluteParentBounds
+ * The parent bounds in absolute coordinates (and in 100%)
+ * @return The location relative to the parent
+ */
+ private Point getTranslatedToRelative(Point absoluteLocation, Rectangle absoluteParentBounds) {
+ return new Point(absoluteLocation.x - absoluteParentBounds.x, absoluteLocation.y - absoluteParentBounds.y);
+ }
+
+ /**
+ * Gets the converted location.
+ *
+ * @param request the request
+ * @return the converted location
+ */
+ private Point getConvertedLocation(final CreateRequest request) {
+ return getConvertedLocation(request.getLocation().getCopy(), getHost(), false);
+ }
+
+ /**
+ * Convert a location to a location relative to its parent (
+ * <code>referencePart</code>).
+ *
+ * @param pointToConvert
+ * The point to convert
+ * @param referencePart
+ * The reference edit part.
+ * @param feedbackCoordinates
+ * true if the pointToConvert is from feedback, false otherwise
+ * (coordinates from request). The coordinates from feedback must
+ * be first adapted to remove diagram scrollbar to retrieve same
+ * coordinates as from request.
+ * @return The converted point.
+ */
+ private Point getConvertedLocation(Point pointToConvert, EditPart referencePart, boolean feedbackCoordinates) {
+ Point realLocation;
+ if (pointToConvert != null && referencePart instanceof GraphicalEditPart) {
+ final IFigure fig = ((GraphicalEditPart) referencePart).getFigure();
+ if (feedbackCoordinates) {
+ // Remove diagram scrollbar
+ pointToConvert.translate(GraphicalHelper.getScrollSize((GraphicalEditPart) referencePart).negate());
+ }
+ fig.translateToRelative(pointToConvert);
+ final Point containerLocation = fig.getBounds().getLocation();
+ realLocation = new Point(pointToConvert.x - containerLocation.x, pointToConvert.y - containerLocation.y);
+ if (fig instanceof ResizableCompartmentFigure) {
+ final Point scrollOffset = ((ResizableCompartmentFigure) fig).getScrollPane().getViewport().getViewLocation();
+ realLocation = new Point(realLocation.x + scrollOffset.x, realLocation.y + scrollOffset.y);
+ }
+
+ } else {
+ realLocation = pointToConvert;
+ }
+ return realLocation;
+ }
+
+ /**
+ * Gets the edge terminal source.
+ *
+ * @param request the request
+ * @return the edge terminal source
+ */
+ private String getEdgeTerminalSource(CreateConnectionRequest request) {
+ // By default take the source terminal put in request.getExtendedData()
+ // by the getConnectionCreateCommand()
+ String edgeTerminalSource = (String) request.getExtendedData().get(GMF_EDGE_SOURCE_TERMINAL);
+ if (edgeTerminalSource == null) {
+ // else take the one set in SetConnectionAnchorsCommand by the GMF
+ // GraphicalNodeEditPolicy
+ Command startCommand = request.getStartCommand();
+ if (startCommand instanceof ICommandProxy) {
+ ICommandProxy commandProxy = (ICommandProxy) startCommand;
+ if (commandProxy.getICommand() instanceof CompositeCommand) {
+ CompositeCommand compositeCommand = (CompositeCommand) commandProxy.getICommand();
+ Iterator<?> iterator = compositeCommand.iterator();
+ while (iterator.hasNext()) {
+ Object cmd = iterator.next();
+ if (cmd instanceof SetConnectionAnchorsCommand) {
+ SetConnectionAnchorsCommand setConnectionAnchorsCommand = (SetConnectionAnchorsCommand) cmd;
+ edgeTerminalSource = setConnectionAnchorsCommand.getNewSourceTerminal();
+ }
+ }
+ }
+ }
+ }
+ return edgeTerminalSource;
+ }
+
+ /**
+ * Gets the edge location source.
+ *
+ * @param request the request
+ * @return the edge location source
+ */
+ private Point getEdgeLocationSource(CreateConnectionRequest request) {
+ // By default take the location of the first click of the edge creation
+ // put in request.getExtendedData() by the getConnectionCreateCommand()
+ Point edgeLocationSource = (Point) request.getExtendedData().get(GMF_EDGE_LOCATION_SOURCE);
+ return edgeLocationSource;
+ }
+
+ /**
+ * . @ param request .
+ *
+ * @param request the request
+ * @param source .
+ * @param target .
+ * @param edgeCreationDescription .
+ * @param cmdFactoryProvider .
+ * @param edgeLayoutData the edge layout data
+ * @return .
+ *
+ * {@inheritDoc}
+ */
+ protected Command buildCreateEdgeCommand(final CreateConnectionRequest request, EdgeTarget source, EdgeTarget target, EdgeCreationDescription edgeCreationDescription,
+ IDiagramCommandFactoryProvider cmdFactoryProvider, EdgeLayoutData edgeLayoutData) {
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(source);
+ CompoundCommand result = new CompoundCommand(edgeCreationDescription.getName());
+ // Store location hints so that the new view can be put as the proper
+ // location after the refresh.
+ addStoreLayoutDataCommand(result, edgeLayoutData, request);
+ // Create the actual edge
+ org.eclipse.emf.common.command.Command emfCommand = cmdFactoryProvider.getCommandFactory(domain).buildCreateEdgeCommandFromTool(source, target, edgeCreationDescription);
+ result.add(new ICommandProxy(new GMFCommandWrapper(domain, emfCommand)));
+ return result;
+ }
+
+ /**
+ * Add a command to store the edge layout data.
+ *
+ * @param result
+ * The compound command
+ * @param edgeLayoutData
+ * The layout data to add to the SiriusLayoutDataManager
+ */
+ protected void addStoreLayoutDataCommand(CompoundCommand result, final EdgeLayoutData edgeLayoutData) {
+ addStoreLayoutDataCommand(result, edgeLayoutData, null);
+ }
+
+ /**
+ * Add a command to store the edge layout data. The edgeLayoutData can be
+ * override by another one extract from the feedback data stored in the
+ * request if necessary. The connection feedback of the request is used only
+ * if:
+ * <ul>
+ * <li>it is available in the extendedData of the request (key
+ * {@link #GMF_EDGE_FEEDBACK}).</li>
+ * <li>there is a potential straightened edge feedback (edge with only two
+ * points and with same x or same y).</li>
+ * </ul>
+ * .
+ *
+ * @param result
+ * The compound command
+ * @param edgeLayoutData
+ * The layout data to add to the SiriusLayoutDataManager
+ * @param request
+ * the CreateConnectionRequest
+ */
+ protected void addStoreLayoutDataCommand(CompoundCommand result, final EdgeLayoutData edgeLayoutData, final CreateConnectionRequest request) {
+ result.add(new Command() {
+ @Override
+ public void execute() {
+ EdgeLayoutData feedbackEdgeLayoutData = null;
+ if (request != null) {
+ Connection connectionFeedback = (Connection) request.getExtendedData().get(SiriusGraphicalNodeEditPolicy.GMF_EDGE_FEEDBACK);
+ // The connection feedback is used only if we detect a
+ // potential straightened edge feedback.
+ if (connectionFeedback != null && connectionFeedback.getPoints().size() == 2
+ && ((connectionFeedback.getPoints().getFirstPoint().x == connectionFeedback.getPoints().getLastPoint().x
+ || connectionFeedback.getPoints().getFirstPoint().y == connectionFeedback.getPoints().getLastPoint().y))) {
+ // Override edgeLayoutData
+ Point sourceLocationFromFeedback = connectionFeedback.getPoints().getFirstPoint();
+ sourceLocationFromFeedback = getConvertedLocation(sourceLocationFromFeedback, request.getSourceEditPart(), true);
+ if (sourceLocationFromFeedback != null) {
+ Point targetLocationFromFeedback = connectionFeedback.getPoints().getLastPoint();
+ targetLocationFromFeedback = getConvertedLocation(targetLocationFromFeedback, request.getTargetEditPart(), true);
+ if (GraphicalHelper.isSnapToGridEnabled(request.getSourceEditPart())) {
+ feedbackEdgeLayoutData = getEdgeLayoutDataWithSnapToGrid(request, (INodeEditPart) request.getSourceEditPart(), (INodeEditPart) request.getTargetEditPart(),
+ sourceLocationFromFeedback, targetLocationFromFeedback);
+ } else {
+ feedbackEdgeLayoutData = getEdgeLayoutData(request, (INodeEditPart) request.getSourceEditPart(), (INodeEditPart) request.getTargetEditPart(),
+ sourceLocationFromFeedback, targetLocationFromFeedback);
+ }
+ }
+ }
+ }
+ if (feedbackEdgeLayoutData != null) {
+ SiriusLayoutDataManager.INSTANCE.addData(feedbackEdgeLayoutData);
+ } else {
+ SiriusLayoutDataManager.INSTANCE.addData(edgeLayoutData);
+ }
+ }
+ });
+ }
+
+ /**
+ * Gets the routing adjustment.
+ *
+ * @param connection the connection
+ * @param connectionHint the connection hint
+ * @param currentRouterType the current router type
+ * @param target the target
+ * @return the routing adjustment
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy#getRoutingAdjustment(org.eclipse.core.runtime.IAdaptable, java.lang.String, org.eclipse.gmf.runtime.notation.Routing, org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ protected Command getRoutingAdjustment(IAdaptable connection, String connectionHint, Routing currentRouterType, EditPart target) {
+ Command cmd = null;
+ if (connectionHint == null || target == null || target.getModel() == null || ((View) target.getModel()).getElement() == null) {
+ return null;
+ }
+ // check if router needs to change type due to reorient.
+ Routing newRouterType = null;
+ if (connection instanceof IDiagramEdgeEditPart) {
+ DDiagramElement element = ((IDiagramEdgeEditPart) connection).resolveDiagramElement();
+ if (element instanceof DEdge) {
+ DEdge dEdge = (DEdge) element;
+ newRouterType = new DEdgeQuery(dEdge).getRouting();
+ if (newRouterType != null && !currentRouterType.equals(newRouterType)) {
+ // add commands for line routing. Convert the new connection
+ // and also the targeted connection.
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(element);
+ ICommand spc = new SetPropertyCommand(domain, connection, Properties.ID_ROUTING, StringStatics.BLANK, newRouterType);
+ Command cmdRouter = new ICommandProxy(spc);
+ if (cmdRouter != null) {
+ cmd = cmdRouter;
+ }
+ }
+ }
+ } else {
+ cmd = super.getRoutingAdjustment(connection, connectionHint, currentRouterType, target);
+ }
+ return cmd;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Overridden to be able to slide the target bendpoint of an edge when
+ * targeting another edge. This is the same code as in the super super class
+ * GraphicalNodeEditPolicy.
+ */
+ @Override
+ protected ConnectionAnchor getConnectionTargetAnchor(Request request) {
+ if (request instanceof ReconnectRequest) {
+ ReconnectRequest reconnectRequest = (ReconnectRequest) request;
+ if (reconnectRequest.getTarget() instanceof DEdgeEditPart && reconnectRequest.getConnectionEditPart() instanceof DEdgeEditPart) {
+ INodeEditPart node = getConnectableEditPart();
+ if (node != null) {
+ return node.getTargetConnectionAnchor(request);
+ }
+ }
+ }
+ return super.getConnectionTargetAnchor(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * Overridden to be able to slide the target bendpoint of an edge when
+ * targeting another edge. This is the same code as in the super super class
+ * GraphicalNodeEditPolicy.
+ */
+ @Override
+ protected INodeEditPart getConnectionCompleteEditPart(Request request) {
+ if (request instanceof ReconnectRequest) {
+ ReconnectRequest reconnectRequest = (ReconnectRequest) request;
+ if (reconnectRequest.getTarget() instanceof DEdgeEditPart && reconnectRequest.getConnectionEditPart() instanceof DEdgeEditPart) {
+ if (getHost() instanceof INodeEditPart) {
+ return (INodeEditPart) getHost();
+ }
+ }
+ }
+ return super.getConnectionCompleteEditPart(request);
+ }
+
+ /**
+ * Show target connection feedback.
+ *
+ * @param request the request
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#showTargetConnectionFeedback(org.eclipse.gef.requests.DropRequest)
+ */
+
+ @Override
+ protected void showTargetConnectionFeedback(DropRequest request) {
+ removeHighlight();
+ addHighlight(request);
+ }
+
+ /**
+ * Add a highlight feedback figure on element reconnect. Change too the edge
+ * (highlight blue) if there is a reconnect on edge.
+ *
+ * @param request the request
+ */
+ private void addHighlight(DropRequest request) {
+ Rectangle bounds = getHostFigure().getBounds().getCopy();
+ getHostFigure().getParent().translateToAbsolute(bounds);
+ getFeedbackLayer().translateToRelative(bounds);
+ if (getHostFigure() instanceof ViewEdgeFigure) {
+ if (getHostFigure() != null && Display.getCurrent() != null && shouldBeHighlighted(request)) {
+ getHostFigure().setForegroundColor(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION));
+ ((ViewEdgeFigure) getHostFigure()).setLineWidth(DiagramEdgeEditPartOperation.getLineWidth((IDiagramEdgeEditPart) getHost()) + WIDTH_FEEDBACK);
+ for (final Object child : getHostFigure().getChildren()) {
+ if (child instanceof PolylineDecoration) {
+ final PolylineDecoration decoration = (PolylineDecoration) child;
+ decoration.setLineWidth(DiagramEdgeEditPartOperation.getLineWidth((IDiagramEdgeEditPart) getHost()) + WIDTH_FEEDBACK);
+ }
+ }
+ }
+ } else {
+
+ highlightFigure = new RectangleFigure() {
+ @Override
+ public void paint(Graphics graphics) {
+ graphics.setAlpha(128);
+ super.paint(graphics);
+ }
+ };
+ highlightFigure.setBounds(bounds);
+ highlightFigure.setBackgroundColor(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION));
+ addFeedback(highlightFigure);
+ }
+ }
+
+ /**
+ * Should be highlighted.
+ *
+ * @param request the request
+ * @return true, if successful
+ */
+ private boolean shouldBeHighlighted(DropRequest request) {
+ if (request instanceof ReconnectRequest) {
+ boolean returnValue = false;
+ DEdge dEdge = getCurrentDEdge((ReconnectRequest) request);
+ if (dEdge != null) {
+ Option<EdgeMapping> edgeMapping = new IEdgeMappingQuery(dEdge.getActualMapping()).getEdgeMapping();
+ if (edgeMapping.some()) {
+ returnValue = canCreateNewEdge(request, dEdge, edgeMapping.get());
+ }
+ }
+ return returnValue;
+ }
+ // If the request is not a Reconnect one, we do not change the highlight
+ // behavior.
+ return true;
+ }
+
+ /**
+ * Can create new edge.
+ *
+ * @param request the request
+ * @param dEdge the d edge
+ * @param actualIEdgeMapping the actual I edge mapping
+ * @return true, if successful
+ */
+ private boolean canCreateNewEdge(DropRequest request, DEdge dEdge, EdgeMapping actualIEdgeMapping) {
+ ReconnectEdgeDescription bestTool = null;
+ EdgeTarget reconnectionTarget = getTargetElement((ReconnectRequest) request);
+ if (reconnectionTarget != null) {
+ // If we are reconnecting the source
+ if (RequestConstants.REQ_RECONNECT_SOURCE.equals(((ReconnectRequest) request).getType())) {
+ bestTool = getBestTool(actualIEdgeMapping, true, dEdge.getSourceNode(), reconnectionTarget, dEdge, false);
+ }
+ // Or the target
+ else if (RequestConstants.REQ_RECONNECT_TARGET.equals(((ReconnectRequest) request).getType())) {
+ bestTool = getBestTool(actualIEdgeMapping, false, dEdge.getTargetNode(), reconnectionTarget, dEdge, false);
+ }
+ }
+ return bestTool != null;
+ }
+
+ /**
+ * Gets the target element.
+ *
+ * @param request the request
+ * @return the target element
+ */
+ private EdgeTarget getTargetElement(ReconnectRequest request) {
+ EditPart target = request.getTarget();
+ if (target instanceof IGraphicalEditPart) {
+ EObject element = ((IGraphicalEditPart) target).resolveSemanticElement();
+ if (element instanceof EdgeTarget) {
+ return (EdgeTarget) element;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Provides the current reconnected DEdge.
+ *
+ * @param request
+ * the Reconnect Request.
+ * @return the reconnected DEdge or null if not found.
+ */
+ private DEdge getCurrentDEdge(ReconnectRequest request) {
+ ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
+ if (connectionEditPart instanceof IGraphicalEditPart) {
+ EObject semanticElement = ((IGraphicalEditPart) connectionEditPart).resolveSemanticElement();
+ if (semanticElement instanceof DEdge) {
+ return (DEdge) semanticElement;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Erase target connection feedback.
+ *
+ * @param request the request
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#eraseTargetConnectionFeedback(org.eclipse.gef.requests.DropRequest)
+ */
+
+ @Override
+ protected void eraseTargetConnectionFeedback(DropRequest request) {
+ removeHighlight();
+ }
+
+ /**
+ * Deactivate.
+ *
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#deactivate()
+ */
+
+ @Override
+ public void deactivate() {
+ // Last chance to remove the existing high light
+ removeHighlight();
+ super.deactivate();
+ }
+
+ /**
+ * Remove hightLight Figure.
+ */
+ private void removeHighlight() {
+ if (highlightFigure != null) {
+ removeFeedback(highlightFigure);
+ highlightFigure = null;
+ }
+ if (getHostFigure() instanceof ViewEdgeFigure) {
+ ((IDiagramEdgeEditPart) getHost()).refreshForegroundColor();
+ ((IDiagramEdgeEditPart) getHost()).refreshLineStyle();
+ }
+ }
+
+ /**
+ * Check if this connectionEditPart has been described in the VSM with in a
+ * diagram with orderedTreeLayout or with compositeLayout and that it does
+ * not have another edge as extremity.
+ *
+ * @param connectionEditPart
+ * the edit part to check
+ * @return true if a specific tree layout must be apply (to compute GMF
+ * constraints according to draw2d), false otherwise
+ */
+ private boolean applySpecificTreeLayout(ConnectionEditPart connectionEditPart) {
+ boolean isLayoutComponent = false;
+ if (!isSourceOrTargetIsEdge(connectionEditPart)) {
+ Diagram diagram = getDiagram(connectionEditPart);
+ if (diagram != null && diagram.getElement() instanceof DSemanticDiagram) {
+ DSemanticDiagram dSemanticDiagram = (DSemanticDiagram) diagram.getElement();
+ Layout layout = dSemanticDiagram.getDescription().getLayout();
+ isLayoutComponent = isOrderedTreeLayoutOrCompositeLayout(layout);
+ }
+ }
+ return isLayoutComponent;
+ }
+
+ /**
+ * Check if the source or the target of this connection is another
+ * connection.
+ *
+ * @param connectionEditPart
+ * the edit part to check
+ * @return true if the source or the target of this connection is another
+ * connection, false otherwise.
+ */
+ private boolean isSourceOrTargetIsEdge(ConnectionEditPart connectionEditPart) {
+ return connectionEditPart.getSource() instanceof ConnectionEditPart || connectionEditPart.getTarget() instanceof ConnectionEditPart;
+ }
+
+ /**
+ * Gets the diagram.
+ *
+ * @param connectionEditPart the connection edit part
+ * @return the diagram
+ */
+ private Diagram getDiagram(ConnectionEditPart connectionEditPart) {
+ Diagram diagram = null;
+ if (connectionEditPart.getParent() instanceof DiagramRootEditPart) {
+ DiagramRootEditPart diagramRootEditPart = (DiagramRootEditPart) connectionEditPart.getParent();
+ if (diagramRootEditPart.getChildren().get(0) instanceof DiagramEditPart) {
+ DiagramEditPart diagramEditPart = (DiagramEditPart) diagramRootEditPart.getChildren().get(0);
+ if (diagramEditPart.getModel() instanceof Diagram) {
+ diagram = (Diagram) diagramEditPart.getModel();
+ }
+ }
+ }
+ return diagram;
+ }
+
+ /**
+ * Check if this layout corresponds to tree so code must be call to modify
+ * GMF edges according to draw2d points.
+ *
+ * @param layout
+ * The layout to check
+ * @return true if this layout is an OrderedTreeLayout or a CompositeLayout,
+ * false otherwise
+ */
+ private boolean isOrderedTreeLayoutOrCompositeLayout(Layout layout) {
+ return layout instanceof OrderedTreeLayout || layout instanceof CompositeLayout;
+ }
+
+ /**
+ * Launch a specific command ({@link TreeLayoutSetConnectionAnchorsCommand}
+ * instead of the classical {@link SetConnectionAnchorsCommand}) to handle
+ * with tree layout and setting correctly all the anchors of the edge of the
+ * same tree.
+ *
+ * @param request
+ * The ReconnectRequest
+ * @return a Command
+ */
+ private Command getReconnectTargetForTreeLayoutCommand(ReconnectRequest request) {
+ INodeEditPart node = getConnectableEditPart();
+ Command cmd = null;
+ if (node != null) {
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ ConnectionAnchor targetAnchor = getConnectionTargetAnchor(request);
+ INodeEditPart targetEP = getConnectionCompleteEditPart(request);
+ if (targetEP != null) {
+ SetConnectionEndsCommand sceCommand = new SetConnectionEndsCommand(editingDomain, StringStatics.BLANK);
+ sceCommand.setEdgeAdaptor(new EObjectAdapter((EObject) request.getConnectionEditPart().getModel()));
+ sceCommand.setNewTargetAdaptor(targetEP);
+ TreeLayoutSetConnectionAnchorsCommand scaCommand = new TreeLayoutSetConnectionAnchorsCommand(editingDomain, StringStatics.BLANK);
+ scaCommand.setEdgeAdaptor(request.getConnectionEditPart());
+ scaCommand.setNewTargetTerminal(targetEP.mapConnectionAnchorToTerminal(targetAnchor));
+ CompositeCommand cc = new CompositeCommand(DiagramUIMessages.Commands_SetConnectionEndsCommand_Target);
+ cc.compose(sceCommand);
+ cc.compose(scaCommand);
+ cmd = new ICommandProxy(cc);
+ }
+ }
+ return cmd;
+ }
+
+ /**
+ * Launch a specific command ({@link TreeLayoutSetConnectionAnchorsCommand}
+ * instead of the classical {@link SetConnectionAnchorsCommand}) to handle
+ * with tree layout and setting correctly all the anchors of the edge of the
+ * same tree.
+ *
+ * @param request
+ * The ReconnectRequest
+ * @return a Command
+ */
+ private Command getReconnectSourceForTreeLayoutCommand(ReconnectRequest request) {
+ INodeEditPart node = getConnectableEditPart();
+ if (node == null) {
+ return null;
+ }
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ ConnectionAnchor sourceAnchor = node.getSourceConnectionAnchor(request);
+ SetConnectionEndsCommand sceCommand = new SetConnectionEndsCommand(editingDomain, StringStatics.BLANK);
+ sceCommand.setEdgeAdaptor(new EObjectAdapter((View) request.getConnectionEditPart().getModel()));
+ sceCommand.setNewSourceAdaptor(new EObjectAdapter((View) node.getModel()));
+ TreeLayoutSetConnectionAnchorsCommand scaCommand = new TreeLayoutSetConnectionAnchorsCommand(editingDomain, StringStatics.BLANK);
+ scaCommand.setEdgeAdaptor(request.getConnectionEditPart());
+ scaCommand.setNewSourceTerminal(node.mapConnectionAnchorToTerminal(sourceAnchor));
+ CompositeCommand cc = new CompositeCommand(DiagramUIMessages.Commands_SetConnectionEndsCommand_Source);
+ cc.compose(sceCommand);
+ cc.compose(scaCommand);
+ return new ICommandProxy(cc);
+ }
+
+ /**
+ * Show creation feedback.
+ *
+ * @param request the request
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#showCreationFeedback(org.eclipse.gef.requests.CreateConnectionRequest)
+ */
+
+ @Override
+ protected void showCreationFeedback(CreateConnectionRequest request) {
+ super.showCreationFeedback(request);
+ // Add the connection feedback figure to the request to use it during
+ // the execution of the command. It is needed to not use the real mouse
+ // click locations but the feedback data instead.
+ request.getExtendedData().put(SiriusGraphicalNodeEditPolicy.GMF_EDGE_FEEDBACK, connectionFeedback);
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusSetConnectionAnchorsCommand.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusSetConnectionAnchorsCommand.java
new file mode 100755
index 0000000..7304db2
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/provider/SiriusSetConnectionAnchorsCommand.java
@@ -0,0 +1,158 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.provider;
+
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionAnchorsCommand;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.sirius.diagram.description.tool.ReconnectionKind;
+import org.eclipse.sirius.diagram.ui.business.api.query.EdgeQuery;
+import org.eclipse.sirius.diagram.ui.internal.operation.CenterEdgeEndModelChangeOperation;
+import org.eclipse.sirius.ext.base.Option;
+
+/**
+ * A custom SetConnectionAnchorsCommand used when edge reconnection is applied
+ * by a reconnection tool (now executed in precommit).
+ *
+ */
+public class SiriusSetConnectionAnchorsCommand extends SetConnectionAnchorsCommand {
+
+ /**
+ * Helper used to access the edge after reconnection.
+ */
+ private SiriusEdgeReconnectionHelper reconnectingEdgeHelper;
+
+ /**
+ * SiriusSetConnectionAnchorsCommand constructor.
+ *
+ * @param editingDomain
+ * the current editing domain
+ * @param label
+ * command label
+ * @param reconnectionTarget
+ * the edge on which we are reconnecting
+ * @param reconnectionTargetEdges
+ * the incoming(reconnectingSource as
+ * false)/outgoing(reconnectingSource as true) edges of the edge
+ * on which we are reconnecting
+ * @param reconnectionKind
+ * indicates if it is a reconnection of the
+ * source(ReconnectionKind.RECONNECT_SOURCE) or the
+ * target(ReconnectionKind.RECONNECT_TARGET)
+ */
+ public SiriusSetConnectionAnchorsCommand(TransactionalEditingDomain editingDomain, String label, View reconnectionTarget, List<Edge> reconnectionTargetEdges, ReconnectionKind reconnectionKind) {
+ super(editingDomain, label);
+ this.reconnectingEdgeHelper = new SiriusEdgeReconnectionHelper(reconnectionTarget, reconnectionTargetEdges, reconnectionKind);
+ }
+
+ /**
+ * Overridden because the tool execution is now done in precommit.
+ * Therefore, we can not use the getEdgeAdaptor() anymore.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ CommandResult commandResult = CommandResult.newOKCommandResult();
+ if (getEdgeAdaptor() != null) {
+ commandResult = super.doExecuteWithResult(progressMonitor, info);
+ } else {
+
+ Edge edge = reconnectingEdgeHelper.getReconnectedEdge();
+
+ // The reconnect tool did not necessary reconnect the edge with the
+ // expected new source or target. In the case where we did not find
+ // out the
+ // reconnected edge, there is nothing to do here.
+ if (edge != null) {
+
+ // If there is tree brothers on the new source, we must use the
+ // existing sourceAnchor instead of the
+ // <code>newSourceTerminal</code> parameter
+ EdgeQuery edgeQuery = new EdgeQuery(edge);
+ if (edgeQuery.isEdgeOnTreeOnSourceSide()) {
+ Option<IdentityAnchor> optionalSourceBortherAnchor = edgeQuery.getSourceAnchorOfFirstBrotherWithSameSource();
+ if (optionalSourceBortherAnchor.some()) {
+ setNewSourceTerminal(optionalSourceBortherAnchor.get().getId());
+ }
+ }
+ updateSourceAnchor(edge);
+ // If there is tree brothers on the new target, we must use the
+ // existing targetAnchor instead of the
+ // <code>newTargetTerminal</code> parameter
+ if (edgeQuery.isEdgeOnTreeOnTargetSide()) {
+ Option<IdentityAnchor> optionalTargetBortherAnchor = edgeQuery.getTargetAnchorOfFirstBrotherWithSameTarget();
+ if (optionalTargetBortherAnchor.some()) {
+ setNewTargetTerminal(optionalTargetBortherAnchor.get().getId());
+ }
+ }
+ updateTargetAnchor(edge);
+
+ CenterEdgeEndModelChangeOperation centerEdgeEndModelChangeOperation = new CenterEdgeEndModelChangeOperation(edge);
+ centerEdgeEndModelChangeOperation.execute();
+ }
+ }
+ return commandResult;
+ }
+
+ /**
+ * Update source anchor.
+ *
+ * @param edge
+ * the edge
+ */
+ private void updateSourceAnchor(Edge edge) {
+ if (getNewSourceTerminal() != null) {
+ if (getNewSourceTerminal().length() == 0)
+ edge.setSourceAnchor(null);
+ else {
+ IdentityAnchor a = (IdentityAnchor) edge.getSourceAnchor();
+ if (a == null)
+ a = NotationFactory.eINSTANCE.createIdentityAnchor();
+ a.setId(getNewSourceTerminal());
+ edge.setSourceAnchor(a);
+ }
+ }
+ }
+
+ /**
+ * Update target anchor.
+ *
+ * @param edge
+ * the edge
+ */
+ private void updateTargetAnchor(Edge edge) {
+ if (getNewTargetTerminal() != null) {
+ if (getNewTargetTerminal().length() == 0)
+ edge.setTargetAnchor(null);
+ else {
+ IdentityAnchor a = (IdentityAnchor) edge.getTargetAnchor();
+ if (a == null)
+ a = NotationFactory.eINSTANCE.createIdentityAnchor();
+ a.setId(getNewTargetTerminal());
+ edge.setTargetAnchor(a);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/CombinedAndOperandService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/CombinedAndOperandService.java
new file mode 100755
index 0000000..a8ee027
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/CombinedAndOperandService.java
@@ -0,0 +1,176 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.sirius.diagram.sequence.ordering.EventEnd;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+
+/**
+ * The Class CombinedAndOperandService provides services to manage CombinedFragment and InteractionOperand.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class CombinedAndOperandService {
+
+
+ /** The service. */
+ static private CombinedAndOperandService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private CombinedAndOperandService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public CombinedAndOperandService getInstance() {
+ if (service == null) {
+ service = new CombinedAndOperandService();
+ }
+ return service;
+ }
+
+ /**
+ * Delete combined fragment.
+ *
+ * @param combinedFragment
+ * the combined fragment
+ */
+ public void deleteCombinedFragment(CombinedFragment combinedFragment) {
+
+ Interaction enclosingInteraction = combinedFragment.getEnclosingInteraction();
+ EList<InteractionFragment> fragments = enclosingInteraction.getFragments();
+ OccurrenceSpecification startOC = null;
+ OccurrenceSpecification endOC = null;
+ for (InteractionFragment interactionFragment : fragments) {
+ if (interactionFragment instanceof OccurrenceSpecification) {
+ EList<EAnnotation> eAnnotations = interactionFragment.getEAnnotations();
+ for (EAnnotation annotation : eAnnotations) {
+ if (annotation.getSource().equals(combinedFragment.getName() + "_start")) {
+ startOC = (OccurrenceSpecification) interactionFragment;
+ }
+ if (annotation.getSource().equals(combinedFragment.getName() + "_end")) {
+ endOC = (OccurrenceSpecification) interactionFragment;
+ }
+ }
+ }
+ }
+
+ fragments.remove(startOC);
+ fragments.remove(endOC);
+
+ int indexOfFragment = fragments.indexOf(combinedFragment);
+
+
+ EList<InteractionOperand> operands = combinedFragment.getOperands();
+ List<InteractionFragment> opeFragmentToMove = new ArrayList<>();
+ for (InteractionOperand interactionOperand : operands) {
+
+ EList<InteractionFragment> fragmentsOperand = interactionOperand.getFragments();
+ OccurrenceSpecification operandStart = null;
+ for (InteractionFragment fragmentOperand : fragmentsOperand) {
+ List<EAnnotation> annotationsOperand = fragmentOperand.getEAnnotations();
+ for (EAnnotation annotatationOp : annotationsOperand) {
+ if (annotatationOp.getSource().equals(interactionOperand.getName() + "_start")) {
+ operandStart = (OccurrenceSpecification) fragmentOperand;
+ break;
+ }
+ }
+ }
+ fragmentsOperand.remove(operandStart);
+ opeFragmentToMove.addAll(fragmentsOperand);
+ }
+
+ fragments.addAll(indexOfFragment, opeFragmentToMove);
+ fragments.remove(combinedFragment);
+
+ }
+
+
+ /**
+ * Creates the E annotations.
+ * These EAnnotations allow to have Ends around the context element.
+ *
+ * @param context
+ * the context the element to have need EAnnotations ends
+ */
+ public void createEAnnotations(EObject context) {
+ if (context instanceof EModelElement) {
+ EAnnotation annotStart = EcoreFactory.eINSTANCE.createEAnnotation();
+ annotStart.setSource(((NamedElement) context).getName() + "_start");
+ ((EModelElement) context).getEAnnotations().add(annotStart);
+
+ EAnnotation annotEnd = EcoreFactory.eINSTANCE.createEAnnotation();
+ annotEnd.setSource(((NamedElement) context).getName() + "_end");
+ ((EModelElement) context).getEAnnotations().add(annotEnd);
+ }
+ }
+
+ /**
+ * Manage operand fragment.
+ *
+ * @param context
+ * the context
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ */
+ public void manageOperandFragment(EObject context, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ Element startingEndPredecessorSemanticEnd = null;
+ if (startingEndPredecessor != null) {
+ startingEndPredecessorSemanticEnd = (Element) startingEndPredecessor.getSemanticEnd();
+ }
+ Element finishingEndPredecessorSemanticEnd = null;
+ if (finishingEndPredecessor != null) {
+ finishingEndPredecessorSemanticEnd = (Element) finishingEndPredecessor.getSemanticEnd();
+ }
+ if (context instanceof InteractionOperand) {
+ Interaction interaction = ((OccurrenceSpecification) finishingEndPredecessorSemanticEnd).getEnclosingInteraction();
+ List<EObject> fragments = FragmentsService.getInstance().getFragmentsAndAnnotation(interaction);
+ int fromIndex = startingEndPredecessorSemanticEnd != null ? fragments.indexOf(startingEndPredecessorSemanticEnd) + 1 : 0;
+ int toIndex = fragments.indexOf(finishingEndPredecessorSemanticEnd);
+ List<EObject> subList = new ArrayList<>(fragments.subList(fromIndex, toIndex + 1));
+ fragments.removeAll(subList);
+ for (EObject object : subList) {
+ if (object instanceof InteractionFragment) {
+ ((InteractionOperand) context).getFragments().add((InteractionFragment) object);
+ }
+ }
+ }
+
+ }
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/CommentService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/CommentService.java
new file mode 100755
index 0000000..2cf145a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/CommentService.java
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * The Class CommentService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class CommentService {
+ /** The service. */
+ static private CommentService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private CommentService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public CommentService getInstance() {
+ if (service == null) {
+ service = new CommentService();
+ }
+ return service;
+ }
+
+ /**
+ * Return all constriantedElement for given Constraint <b> Exception for PartDeploymentLink (return its
+ * DeployedElement) <b>.
+ *
+ * @param comment the comment
+ * @return the list
+ */
+ public List<?> targeFinderExpressionForComment(Comment comment) {
+ List<EObject> result = new ArrayList<>();
+ EList<Element> annotatedElements = comment.getAnnotatedElements();
+ for (Element element : annotatedElements) {
+ result.add(element);
+ }
+
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ConstraintService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ConstraintService.java
new file mode 100755
index 0000000..74c9413
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ConstraintService.java
@@ -0,0 +1,233 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.DurationObservation;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.eclipse.uml2.uml.TimeConstraint;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * The Class ConstraintService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class ConstraintService {
+
+ /** The service. */
+ static private ConstraintService service = null;
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private ConstraintService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public ConstraintService getInstance() {
+ if (service == null) {
+ service = new ConstraintService();
+ }
+ return service;
+ }
+
+ /**
+ * Return all constriantedElement for given Constraint <b> Exception for
+ * PartDeploymentLink (return its DeployedElement) <b>.
+ *
+ * @param constraint the constraint
+ * @return the list
+ */
+ public List<?> targeFinderExpressionForConstraint(Constraint constraint) {
+ List<EObject> result = new ArrayList<>();
+ EList<Element> constrainedElements = constraint.getConstrainedElements();
+ result.addAll(constrainedElements);
+ return result;
+ }
+
+ /**
+ * Gets the constraint label.
+ *
+ * @param object the object
+ * @return the constraint label
+ */
+ public String getConstraintLabel(EObject object) {
+
+ if (object instanceof Constraint) {
+
+ String name = ((Constraint) object).getName();
+ EList<String> languages = null;
+ EList<String> bodies = null;
+ ValueSpecification specification = ((Constraint) object).getSpecification();
+ if (specification instanceof OpaqueExpression) {
+ languages = ((OpaqueExpression) specification).getLanguages();
+ bodies = ((OpaqueExpression) specification).getBodies();
+ }
+ String langage = "";
+ if (languages != null && !languages.isEmpty()) {
+ langage = languages.get(0);
+ }
+ String body = "";
+ if (bodies != null && !bodies.isEmpty()) {
+ body = bodies.get(0);
+ }
+
+ String result = name + "\n" + "{{" + langage + "}" + body + "}";
+ return result;
+
+ }
+ return "";
+ }
+
+ /**
+ * Gets the source constrained element.
+ *
+ * @param context the context
+ * @return the source constrained element
+ */
+ public EObject getSourceConstrainedElement(EObject context) {
+
+ if (context instanceof DurationConstraint) {
+
+ EList<Element> constrainedElements = ((DurationConstraint) context).getConstrainedElements();
+ Element element = constrainedElements.get(0);
+
+ if (element instanceof MessageOccurrenceSpecification) {
+ return ReorderService.getInstance()
+ .getExecutionFromMessageOccurence((MessageOccurrenceSpecification) element);
+ }
+ if (element instanceof ExecutionOccurrenceSpecification) {
+ return ((ExecutionOccurrenceSpecification) element).getExecution();
+ }
+
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the target constrained element.
+ *
+ * @param context the context
+ * @return the target constrained element
+ */
+ public EObject getTargetConstrainedElement(EObject context) {
+
+ if (context instanceof DurationConstraint) {
+
+ EList<Element> constrainedElements = ((DurationConstraint) context).getConstrainedElements();
+ Element element = constrainedElements.get(constrainedElements.size() - 1);
+
+ if (element instanceof MessageOccurrenceSpecification) {
+ return ReorderService.getInstance()
+ .getExecutionFromMessageOccurence((MessageOccurrenceSpecification) element);
+ }
+ if (element instanceof ExecutionOccurrenceSpecification) {
+ return ((ExecutionOccurrenceSpecification) element).getExecution();
+ }
+
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the source observation.
+ *
+ * @param context the context
+ * @return the source observation
+ */
+ public EObject getSourceObservation(EObject context) {
+ if (context instanceof DurationObservation) {
+ EList<NamedElement> events = ((DurationObservation) context).getEvents();
+
+ Element element = events.get(0);
+ if (element instanceof MessageOccurrenceSpecification) {
+ return ReorderService.getInstance()
+ .getExecutionFromMessageOccurence((MessageOccurrenceSpecification) element);
+ }
+ if (element instanceof ExecutionOccurrenceSpecification) {
+ return ((ExecutionOccurrenceSpecification) element).getExecution();
+ }
+
+ }
+ return null;
+ }
+
+ /**
+ * Gets the target observation.
+ *
+ * @param context the context
+ * @return the target observation
+ */
+ public EObject getTargetObservation(EObject context) {
+ if (context instanceof DurationObservation) {
+ EList<NamedElement> events = ((DurationObservation) context).getEvents();
+
+ Element element = events.get(events.size() - 1);
+ if (element instanceof MessageOccurrenceSpecification) {
+ return ReorderService.getInstance()
+ .getExecutionFromMessageOccurence((MessageOccurrenceSpecification) element);
+ }
+ if (element instanceof ExecutionOccurrenceSpecification) {
+ return ((ExecutionOccurrenceSpecification) element).getExecution();
+ }
+
+ }
+ return null;
+ }
+
+ /**
+ * Checks if is constrained time.
+ *
+ * @param context the context
+ * @return true, if is constrained time
+ */
+ public boolean isConstrainedTime(EObject context) {
+ if (context instanceof Element) {
+ Model model = ((Element) context).getModel();
+ TreeIterator<EObject> eAllContents = model.eAllContents();
+ while (eAllContents.hasNext()) {
+ EObject next = eAllContents.next();
+ if (next instanceof TimeConstraint) {
+ EList<Element> constrainedElements = ((TimeConstraint) next).getConstrainedElements();
+ if (constrainedElements.contains(context)) {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ExecutionService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ExecutionService.java
new file mode 100755
index 0000000..44fe107
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ExecutionService.java
@@ -0,0 +1,464 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ActionExecutionSpecification;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * The Class ExecutionService.
+ */
+public class ExecutionService {
+
+ /**
+ * Execution end suffix.
+ */
+ public static final String EXECUTION_END_SUFFIX = "_finish"; //$NON-NLS-1$
+
+
+ /** The service. */
+ static private ExecutionService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private ExecutionService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public ExecutionService getInstance() {
+ if (service == null) {
+ service = new ExecutionService();
+ }
+ return service;
+ }
+
+
+ /**
+ * Gets the execution specifications.
+ *
+ * @param object
+ * the object
+ * @return the execution specifications
+ */
+ public List<ExecutionSpecification> getExecutionSpecifications(EObject object) {
+ List<ExecutionSpecification> results = new ArrayList<ExecutionSpecification>();
+ if (object instanceof Lifeline) {
+ Lifeline lifeline = (Lifeline) object;
+ Interaction interaction = lifeline.getInteraction();
+ LifelineService.getInstance().getFragmentsFromLifeline(results, lifeline, interaction);
+ }
+ if (object instanceof ActionExecutionSpecification) {
+
+ List<ExecutionSpecification> containedNestedExecution = containedNestedExecution((ActionExecutionSpecification) object);
+ results.addAll(containedNestedExecution);
+ }
+ return results;
+ }
+
+
+
+
+
+
+ /**
+ * Get the execution associated to a fragment.
+ *
+ * @param message
+ * Message
+ * @return Execution
+ */
+ public BehaviorExecutionSpecification getExecution(Message message) {
+ if (message == null) {
+ return null;
+ }
+ final Map<Message, BehaviorExecutionSpecification> behaviors = new HashMap<Message, BehaviorExecutionSpecification>();
+ for (final InteractionFragment fragment : message.getInteraction().getFragments()) {
+ if (fragment instanceof BehaviorExecutionSpecification) {
+ final BehaviorExecutionSpecification behavior = (BehaviorExecutionSpecification) fragment;
+ final OccurrenceSpecification behaviorStart = behavior.getStart();
+ if (behaviorStart instanceof MessageOccurrenceSpecification
+ && message.equals(((MessageOccurrenceSpecification) behaviorStart).getMessage())) {
+ behaviors.put(message, behavior);
+ }
+ }
+ }
+ return behaviors.get(message);
+ }
+
+ /**
+ * Get the execution associated to a fragment.
+ *
+ * @param occurence
+ * Occurence
+ * @return Execution
+ */
+ public BehaviorExecutionSpecification getExecution(EObject occurence) {
+ if (occurence == null) {
+ return null;
+ }
+ final Map<InteractionFragment, BehaviorExecutionSpecification> behaviors = new HashMap<InteractionFragment, BehaviorExecutionSpecification>();
+
+ // final Interaction interaction = getEnclosingInteraction(occurence);
+ List<EObject> fragments = FragmentsService.getInstance().getEnclosingFragments(occurence);
+ for (final EObject fragment : fragments) {
+ if (fragment instanceof BehaviorExecutionSpecification) {
+ final BehaviorExecutionSpecification behavior = (BehaviorExecutionSpecification) fragment;
+ // Get start
+ behaviors.put(behavior.getStart(), behavior);
+ // Get finish
+ behaviors.put(behavior.getFinish(), behavior);
+ }
+ }
+ return behaviors.get(occurence);
+ }
+
+ /**
+ * Create a typed execution. Execution could be created on lifeline or other parent execution.
+ *
+ * @param interaction
+ * Interaction
+ * @param fragment
+ * Lifeline or parent execution
+ * @param operation
+ * Operation associated to execution
+ * @param startingEndPredecessor
+ * Starting end predecessor
+ */
+ public void createExecution(Interaction interaction, NamedElement fragment, Operation operation,
+ NamedElement startingEndPredecessor) {
+ final Lifeline lifeline = LifelineService.getInstance().getLifeline(fragment);
+
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+ StringBuffer executionName;
+ if (operation == null) {
+ final List<BehaviorExecutionSpecification> behaviors = new ArrayList<BehaviorExecutionSpecification>();
+ for (final InteractionFragment behavior : interaction.getFragments()) {
+ if (behavior instanceof BehaviorExecutionSpecification) {
+ behaviors.add((BehaviorExecutionSpecification) behavior);
+ }
+ }
+ executionName = new StringBuffer("BehaviorExecution_").append(behaviors.size()); //$NON-NLS-1$
+ } else {
+ executionName = new StringBuffer(operation.getName());
+ }
+
+ // Create execution start
+ final ExecutionOccurrenceSpecification startExec = factory.createExecutionOccurrenceSpecification();
+ final StringBuffer startExecName = new StringBuffer(executionName).append("_start"); //$NON-NLS-1$
+ startExec.setName(startExecName.toString());
+ startExec.getCovereds().add(lifeline);
+
+ // Create behavior
+ final OpaqueBehavior behavior = factory.createOpaqueBehavior();
+ behavior.setName(executionName.toString());
+ behavior.setSpecification(operation);
+ interaction.getOwnedBehaviors().add(behavior);
+ final BehaviorExecutionSpecification execution = factory.createBehaviorExecutionSpecification();
+ execution.setName(executionName.toString());
+ execution.getCovereds().add(lifeline);
+ execution.setBehavior(behavior);
+
+ execution.setStart(startExec);
+ startExec.setExecution(execution);
+
+ // Create execution end
+ final ExecutionOccurrenceSpecification endExec = factory.createExecutionOccurrenceSpecification();
+ final StringBuffer endExecName = new StringBuffer(executionName).append(EXECUTION_END_SUFFIX);
+ endExec.setName(endExecName.toString());
+ endExec.getCovereds().add(lifeline);
+ endExec.setExecution(execution);
+ execution.setFinish(endExec);
+
+ // Add and order fragments under the interaction
+ final EList<InteractionFragment> fragments = interaction.getFragments();
+
+ // Ordered fragments
+ fragments.add(startExec);
+
+ // If execution starts from an execution, add the new execution start
+ // after the execution
+ // specification
+ if (startingEndPredecessor instanceof OccurrenceSpecification
+ && ExecutionService.getInstance().getExecution(startingEndPredecessor) != null
+ && startingEndPredecessor
+ .equals(ExecutionService.getInstance().getExecution(startingEndPredecessor).getStart())) {
+ fragments.move(fragments.indexOf(startingEndPredecessor) + 2, startExec);
+ } else {
+ // Message starts from a lifeline, add the message start after the
+ // last starting predecessor
+ // (message)
+ fragments.move(fragments.indexOf(startingEndPredecessor) + 1, startExec);
+ }
+ fragments.add(execution);
+ fragments.move(fragments.indexOf(startExec) + 1, execution);
+ fragments.add(endExec);
+ fragments.move(fragments.indexOf(execution) + 1, endExec);
+ }
+
+ /**
+ * Create execution.
+ *
+ * @param covered
+ * Lifeline
+ * @param message
+ * Message
+ * @return Execution
+ */
+ public BehaviorExecutionSpecification createExecution(
+ final Lifeline covered, final Message message) {
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+ final OpaqueBehavior behavior = factory.createOpaqueBehavior();
+
+ behavior.setName(message.getName());
+
+ final BehaviorExecutionSpecification execution = factory.createBehaviorExecutionSpecification();
+ execution.setName(message.getName());
+ execution.getCovereds().add(covered);
+ execution.setBehavior(behavior);
+
+ return execution;
+ }
+
+ /**
+ * Create a typed execution. Execution could be created on lifeline or other parent execution.
+ *
+ * @param interaction
+ * Interaction
+ * @param fragment
+ * Lifeline or parent execution
+ * @param startingEndPredecessor
+ * Starting end predecessor
+ */
+ public void createExecution(Interaction interaction, NamedElement fragment,
+ NamedElement startingEndPredecessor) {
+ createExecution(interaction, fragment, null, startingEndPredecessor);
+ }
+
+ /**
+ * Delete execution.
+ *
+ * @param execution
+ * Execution to delete
+ */
+ public void deleteExecution(ExecutionSpecification execution) {
+ if (execution == null) {
+ return;
+ }
+
+ // Get fragments
+ final InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(execution);
+
+ // Delete opaque behavior
+ if (execution instanceof BehaviorExecutionSpecification) {
+ removeBehavior((BehaviorExecutionSpecification) execution);
+ }
+
+ // Delete start and finish behavior
+ final List<InteractionFragment> fragments = interaction instanceof Interaction ? ((Interaction) interaction).getFragments() : ((InteractionOperand) interaction).getFragments();
+ final OccurrenceSpecification start = execution.getStart();
+ if (start instanceof ExecutionOccurrenceSpecification) {
+ fragments.remove(start);
+ }
+ final OccurrenceSpecification finish = execution.getFinish();
+ if (finish instanceof ExecutionOccurrenceSpecification) {
+ fragments.remove(finish);
+ }
+ // Delete execution
+ fragments.remove(execution);
+ }
+
+
+
+ /**
+ * Checks if is nested execution.
+ *
+ * @param exec
+ * the exec
+ * @return true, if is nested execution
+ */
+ public boolean isNestedExecution(ExecutionSpecification exec) {
+
+ List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(exec);
+
+ OccurrenceSpecification start = exec.getStart();
+ OccurrenceSpecification finish = exec.getFinish();
+
+ int indexOfStart = enclosingFragments.indexOf(start);
+ int indexOfFinish = enclosingFragments.indexOf(finish);
+
+ for (EObject exec2 : enclosingFragments) {
+ EList<Lifeline> covereds = exec.getCovereds();
+ if (covereds != null && !covereds.isEmpty()) {
+ if (!exec2.equals(exec) && exec2 instanceof ExecutionSpecification && !((ExecutionSpecification) exec2).getCovereds().isEmpty() && covereds.get(0).equals(((ExecutionSpecification) exec2).getCovereds().get(0))) {
+
+ OccurrenceSpecification start2 = ((ExecutionSpecification) exec2).getStart();
+ OccurrenceSpecification finish2 = ((ExecutionSpecification) exec2).getFinish();
+
+ int indexOfStart2 = enclosingFragments.indexOf(start2);
+ int indexOfFinish2 = enclosingFragments.indexOf(finish2);
+
+
+ if (indexOfStart2 < indexOfStart && indexOfFinish2 > indexOfFinish) {
+ return true;
+ }
+
+
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Apply execution.
+ *
+ * @param context
+ * the context
+ * @param exe
+ * the exe
+ * @param start
+ * the start
+ * @param finish
+ * the finish
+ */
+ public void applyExecution(EObject context, ExecutionSpecification exe, ExecutionOccurrenceSpecification start, ExecutionOccurrenceSpecification finish) {
+ if (context instanceof Lifeline) {
+ ((Lifeline) context).getCoveredBys().add(start);
+ ((Lifeline) context).getCoveredBys().add(exe);
+ ((Lifeline) context).getCoveredBys().add(finish);
+ }
+ if (context instanceof ActionExecutionSpecification) {
+ EList<Lifeline> covereds = ((ActionExecutionSpecification) context).getCovereds();
+ (covereds.get(0)).getCoveredBys().add(start);
+ (covereds.get(0)).getCoveredBys().add(exe);
+ (covereds.get(0)).getCoveredBys().add(finish);
+ }
+
+ start.setExecution(exe);
+ finish.setExecution(exe);
+
+ exe.setStart(start);
+ exe.setFinish(finish);
+
+
+ }
+
+
+ /**
+ * Creates the execution occurrence specification.
+ *
+ * @param exec
+ * the exec
+ * @param isStart
+ * the is start
+ * @return the execution occurrence specification
+ */
+ public ExecutionOccurrenceSpecification createExecutionOccurrenceSpecification(ExecutionSpecification exec, boolean isStart) {
+ ExecutionOccurrenceSpecification createExecutionOccurrenceSpecification = UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification();
+ if (isStart) {
+ exec.setStart(createExecutionOccurrenceSpecification);
+ } else {
+ exec.setFinish(createExecutionOccurrenceSpecification);
+ }
+ return createExecutionOccurrenceSpecification;
+ }
+
+ /**
+ * Checks if is nested execution.
+ *
+ * @param execParent
+ * the exec
+ * @return true, if is nested execution
+ */
+ private List<ExecutionSpecification> containedNestedExecution(ExecutionSpecification execParent) {
+ List<ExecutionSpecification> results = new ArrayList<>();
+
+ List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(execParent);
+
+ OccurrenceSpecification start = execParent.getStart();
+ OccurrenceSpecification finish = execParent.getFinish();
+
+ int indexOfStart = enclosingFragments.indexOf(start);
+ int indexOfFinish = enclosingFragments.indexOf(finish);
+
+ for (EObject exec2 : enclosingFragments) {
+ if (!exec2.equals(execParent) && exec2 instanceof ExecutionSpecification && !execParent.getCovereds().isEmpty() && !((ExecutionSpecification) exec2).getCovereds().isEmpty()
+ && execParent.getCovereds().get(0).equals(((ExecutionSpecification) exec2).getCovereds().get(0))) {
+
+ OccurrenceSpecification start2 = ((ExecutionSpecification) exec2).getStart();
+ OccurrenceSpecification finish2 = ((ExecutionSpecification) exec2).getFinish();
+
+ int indexOfStart2 = enclosingFragments.indexOf(start2);
+ int indexOfFinish2 = enclosingFragments.indexOf(finish2);
+
+
+ if (indexOfStart2 > indexOfStart && indexOfFinish2 < indexOfFinish) {
+ results.add((ExecutionSpecification) exec2);
+ }
+
+
+ }
+ }
+
+ return results;
+ }
+
+
+ /**
+ * Removes the behavior.
+ *
+ * @param execution
+ * the execution
+ */
+ private void removeBehavior(BehaviorExecutionSpecification execution) {
+ final Behavior behavior = execution.getBehavior();
+ if (behavior != null) {
+ FragmentsService.getInstance().getParentInteraction(execution).getOwnedBehaviors().remove(behavior);
+ }
+ }
+
+
+
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/FragmentsService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/FragmentsService.java
new file mode 100755
index 0000000..f53bcf8
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/FragmentsService.java
@@ -0,0 +1,557 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Gate;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+
+/**
+ * The Class FragmentsService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class FragmentsService {
+
+ /** The service. */
+ static private FragmentsService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private FragmentsService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public FragmentsService getInstance() {
+ if(service==null) {
+ service = new FragmentsService();
+ }
+ return service;
+ }
+
+
+
+
+
+ /**
+ * Gets the finish.
+ *
+ * @param o
+ * the o
+ * @return the finish
+ */
+ public EObject getFinish(EObject o) {
+ if (o instanceof ExecutionSpecification) {
+ return ((ExecutionSpecification) o).getFinish();
+ }
+ if (o instanceof CombinedFragment) {
+
+ EList<EAnnotation> eAnnotations = ((CombinedFragment) o).getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((CombinedFragment) o).getName() + "_end")) {
+ return annot;
+ }
+ }
+ }
+ }
+ if (o instanceof InteractionOperand) {
+ EList<EAnnotation> eAnnotations = ((InteractionOperand) o).getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((InteractionOperand) o).getName() + "_end")) {
+ return annot;
+ }
+ }
+ }
+ }
+ return o;
+ }
+
+
+ /**
+ * Gets the start.
+ *
+ * @param o
+ * the o
+ * @return the start
+ */
+ public EObject getStart(EObject o) {
+ if (o instanceof ExecutionSpecification) {
+ return ((ExecutionSpecification) o).getStart();
+ }
+ if (o instanceof CombinedFragment) {
+
+
+ EList<EAnnotation> eAnnotations = ((CombinedFragment) o).getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((CombinedFragment) o).getName() + "_start")) {
+ return annot;
+ }
+ }
+ }
+ }
+ if (o instanceof InteractionOperand) {
+ EList<EAnnotation> eAnnotations = ((InteractionOperand) o).getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((InteractionOperand) o).getName() + "_start")) {
+ return annot;
+ }
+ }
+ }
+ }
+ return o;
+ }
+
+ /**
+ * Gets the fragments ordering ends.
+ *
+ * @param object
+ * the object
+ * @return the fragments ordering ends
+ */
+ public List<EObject> getFragmentsOrderingEnds(EObject object) {
+ List<EObject> results = new ArrayList<>();
+ if (object instanceof Interaction) {
+
+ fillFragmentOrderingInteraction(object, results);
+ }
+ if (object instanceof InteractionOperand) {
+ fillFragmentOrderingInteractionOperand(object, results);
+ }
+ if (object instanceof CombinedFragment) {
+ fillFragmentOrderingCombinedFragment(object, results);
+ }
+
+ return results;
+ }
+
+ /**
+ * Fill fragment ordering combined fragment.
+ *
+ * @param object the object
+ * @param results the results
+ */
+ private void fillFragmentOrderingCombinedFragment(EObject object, List<EObject> results) {
+ EList<InteractionOperand> operands = ((CombinedFragment) object).getOperands();
+ for (InteractionOperand interactionOperand : operands) {
+ results.addAll(getFragmentsOrderingEnds(interactionOperand));
+ }
+ }
+
+ /**
+ * Fill fragment ordering interaction operand.
+ *
+ * @param object the object
+ * @param results the results
+ */
+ private void fillFragmentOrderingInteractionOperand(EObject object, List<EObject> results) {
+ EList<InteractionFragment> fragments = ((InteractionOperand) object).getFragments();
+ EList<EAnnotation> eAnnotations = ((InteractionOperand) object).getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((InteractionOperand) object).getName() + "_start")) {
+ results.add(annot);
+ }
+ }
+ }
+ for (InteractionFragment interactionFragment : fragments) {
+ fillIInteractionFragment(results, interactionFragment);
+ if (interactionFragment instanceof CombinedFragment) {
+ results.addAll(getFragmentsOrderingEnds(interactionFragment));
+ }
+ }
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((InteractionOperand) object).getName() + "_end")) {
+ results.add(annot);
+ }
+ }
+ }
+ }
+
+ /**
+ * Fill fragment ordering interaction.
+ *
+ * @param object the object
+ * @param results the results
+ */
+ private void fillFragmentOrderingInteraction(EObject object, List<EObject> results) {
+ EList<InteractionFragment> fragments = ((Interaction) object).getFragments();
+ for (InteractionFragment interactionFragment : fragments) {
+ if (interactionFragment instanceof CombinedFragment) {
+ EList<EAnnotation> eAnnotations = interactionFragment.getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((CombinedFragment) interactionFragment).getName() + "_start")) {
+ results.add(annot);
+ }
+ }
+ }
+ }
+ fillIInteractionFragment(results, interactionFragment);
+ if (interactionFragment instanceof CombinedFragment) {
+
+ results.addAll(getFragmentsOrderingEnds(interactionFragment));
+ EList<EAnnotation> eAnnotations = interactionFragment.getEAnnotations();
+ if (eAnnotations != null && !eAnnotations.isEmpty()) {
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((CombinedFragment) interactionFragment).getName() + "_end")) {
+ results.add(annot);
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Fill I interaction fragment.
+ *
+ * @param results the results
+ * @param interactionFragment the interaction fragment
+ */
+ private void fillIInteractionFragment(List<EObject> results, InteractionFragment interactionFragment) {
+
+ results.add(interactionFragment);
+ if (interactionFragment instanceof MessageOccurrenceSpecification) {
+ EList<EAnnotation> eAnnotations = interactionFragment.getEAnnotations();
+ for (EAnnotation eAnnotation : eAnnotations) {
+ if (eAnnotation.getSource().equals(interactionFragment.getName() + "LOSTMESSAGE")) {
+ results.add(eAnnotation);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the enclosing fragments.
+ *
+ * @param interactionFragment
+ * the interaction fragment
+ * @return the enclosing fragments
+ */
+ public List<EObject> getEnclosingFragments(EObject interactionFragment) {
+ final InteractionFragment enclosingFragment = getEnclosingFragment(interactionFragment);
+ List<EObject> fragments = null;
+ if (enclosingFragment instanceof Interaction) {
+ fragments = getFragmentsAndAnnotation(enclosingFragment);
+ }
+ if (enclosingFragment instanceof InteractionOperand) {
+ fragments = getFragmentsAndAnnotation(enclosingFragment);
+ }
+ return fragments;
+ }
+
+ /**
+ * Gets the fragments and annotation.
+ *
+ * @param root
+ * the root
+ * @return the fragments and annotation
+ */
+ public List<EObject> getFragmentsAndAnnotation(InteractionFragment root) {
+ List<EObject> results = new ArrayList<>();
+ if (root instanceof Interaction) {
+ EList<InteractionFragment> fragments = ((Interaction) root).getFragments();
+ getFragmentsAndAnnotations(results, fragments);
+ }
+ if (root instanceof InteractionOperand) {
+
+ EList<InteractionFragment> fragments = ((InteractionOperand) root).getFragments();
+ getFragmentsAndAnnotations(results, fragments);
+
+ }
+
+ return results;
+ }
+
+ /**
+ * Gets the enclosing fragment.
+ *
+ * @param fragment
+ * the fragment
+ * @return the enclosing fragment
+ */
+ public InteractionFragment getEnclosingFragment(EObject fragment) {
+ if (fragment instanceof Interaction || fragment instanceof InteractionOperand) {
+ return (InteractionFragment) fragment;
+ }
+
+ if (fragment instanceof InteractionFragment) {
+ Interaction enclosingInteraction = ((InteractionFragment) fragment).getEnclosingInteraction();
+ if (enclosingInteraction == null) {
+ return ((InteractionFragment) fragment).getEnclosingOperand();
+ }
+ return enclosingInteraction;
+ }
+ if (fragment instanceof EAnnotation) {
+ return getEnclosingFragment(fragment.eContainer());
+ }
+ if (fragment instanceof Lifeline) {
+ return ((Lifeline) fragment).getInteraction();
+ }
+ if (fragment instanceof Message) {
+ return ((Message) fragment).getInteraction();
+ }
+ if (fragment instanceof Gate) {
+ InteractionOperand operand = ((Gate) fragment).getOperand();
+ if (operand == null) {
+ return getEnclosingFragment(fragment.eContainer());
+ }
+ return operand;
+ }
+ return null;
+
+ }
+
+ /**
+ * Gets the parent interaction.
+ *
+ * @param interactionFragment
+ * the interaction fragment
+ * @return the parent interaction
+ */
+ public Interaction getParentInteraction(InteractionFragment interactionFragment) {
+ if (interactionFragment instanceof InteractionOperand) {
+ return getParentInteraction((InteractionFragment) interactionFragment.eContainer());
+ }
+ Interaction enclosingInteraction = interactionFragment.getEnclosingInteraction();
+ if (enclosingInteraction == null) {
+ InteractionOperand enclosingOperand = interactionFragment.getEnclosingOperand();
+ return getParentInteraction((InteractionFragment) enclosingOperand.eContainer());
+ }
+ return enclosingInteraction;
+ }
+
+ /**
+ * Get the index of a predecessor fragment.
+ *
+ * @param fragment
+ * Fragment to search
+ * @param fragments
+ * List of fragments
+ * @return Index of fragment if exists otherwise 0
+ */
+ public int getFragmentIndex(EObject fragment, final List<EObject> fragments) {
+ if (fragment != null) {
+ return fragments.indexOf(fragment);
+ }
+ return -1;
+ }
+
+ /**
+ * Make union.
+ *
+ * @param context
+ * the context
+ * @return the list
+ */
+ public List<InteractionFragment> makeUnion(EObject context) {
+ List<InteractionFragment> results = new ArrayList<>();
+ EList<InteractionFragment> fragments = null;
+ if (context instanceof Interaction) {
+ fragments = ((Interaction) context).getFragments();
+ }
+ if (context instanceof InteractionOperand) {
+ fragments = ((InteractionOperand) context).getFragments();
+ }
+
+ for (InteractionFragment interactionFragment : fragments) {
+
+ if (interactionFragment instanceof ExecutionSpecification) {
+
+ results.add(((ExecutionSpecification) interactionFragment).getStart());
+ results.add(((ExecutionSpecification) interactionFragment).getFinish());
+ }
+ if (interactionFragment instanceof CombinedFragment) {
+ EList<InteractionOperand> operands = ((CombinedFragment) interactionFragment).getOperands();
+ for (InteractionOperand operand : operands) {
+ results.addAll(makeUnion(operand));
+ }
+ }
+
+ }
+
+
+
+ return results;
+ }
+
+
+
+ /**
+ * Eol precondition.
+ *
+ * @param p
+ * the p
+ * @return true, if successful
+ */
+ public boolean eolPrecondition(Lifeline p) {
+ Interaction i = p.getInteraction();
+ EList<InteractionFragment> fragments = i.getFragments();
+ for (InteractionFragment interactionFragment : fragments) {
+ if (interactionFragment instanceof DestructionOccurrenceSpecification) {
+ Lifeline covered = ((DestructionOccurrenceSpecification) interactionFragment).getCovered();
+ if (covered != null && covered.equals(p)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Compute fragments.
+ *
+ * @param execution
+ * the execution
+ * @param startingEndPredecessorAfter
+ * the starting end predecessor after
+ * @param parentInteraction
+ * the parent interaction
+ * @return the list
+ */
+ public List<EObject> computeFragments(EObject execution, EObject startingEndPredecessorAfter, InteractionFragment parentInteraction) {
+ List<EObject> fragmentsource = FragmentsService.getInstance().getEnclosingFragments(execution);
+ List<EObject> fragments = null;
+ if (startingEndPredecessorAfter != null) {
+ fragments = FragmentsService.getInstance().getEnclosingFragments(startingEndPredecessorAfter);
+ } else {
+
+ fragments = /* getParentInteraction(execution).getFragments() */FragmentsService.getInstance().getFragmentsAndAnnotation(parentInteraction);
+ }
+ if (!fragmentsource.equals(fragments)/* && execution instanceof ExecutionSpecification */) {
+ if (execution instanceof ExecutionSpecification) {
+ fragmentsource.remove(((ExecutionSpecification) execution).getStart());
+ }
+ fragmentsource.remove(execution);
+ if (execution instanceof ExecutionSpecification) {
+ fragmentsource.remove(((ExecutionSpecification) execution).getFinish());
+
+
+ fragments.add(((ExecutionSpecification) execution).getStart());
+ }
+ fragments.add(execution);
+ if (execution instanceof ExecutionSpecification) {
+ fragments.add(((ExecutionSpecification) execution).getFinish());
+ }
+ }
+ return fragments;
+ }
+
+
+
+ /**
+ * Update fragment list.
+ *
+ * @param startingEndPredecessorAfter
+ * the starting end predecessor after
+ * @param fragments
+ * the fragments
+ */
+ public void updateFragmentList(EObject startingEndPredecessorAfter, List<EObject> fragments) {
+ InteractionFragment enclosingFragment = FragmentsService.getInstance().getEnclosingFragment(startingEndPredecessorAfter);
+ List<InteractionFragment> fragmentToUpdate = new ArrayList<>();
+ if (enclosingFragment instanceof Interaction) {
+ fragmentToUpdate = ((Interaction) enclosingFragment).getFragments();
+ }
+ if (enclosingFragment instanceof InteractionOperand) {
+ fragmentToUpdate = ((InteractionOperand) enclosingFragment).getFragments();
+ }
+ fragmentToUpdate.clear();
+ for (EObject interactionFragment : fragments) {
+ if (interactionFragment instanceof InteractionFragment) {
+ fragmentToUpdate.add((InteractionFragment) interactionFragment);
+ }
+ }
+ }
+
+ /**
+ * Check if fragment is an execution finish.
+ *
+ * @param endCandidate
+ * Element to check
+ * @param fragments
+ * Defined fragments
+ * @return True if element is the end of an execution
+ */
+ public boolean isEnd(InteractionFragment endCandidate, List<InteractionFragment> fragments) {
+ final List<InteractionFragment> executionFinishes = new ArrayList<InteractionFragment>();
+ for (final InteractionFragment fragment : fragments) {
+ if (fragment instanceof BehaviorExecutionSpecification) {
+ // Get start
+ final BehaviorExecutionSpecification behavior = (BehaviorExecutionSpecification) fragment;
+ // Get finish
+ executionFinishes.add(behavior.getFinish());
+ }
+ }
+ return executionFinishes.contains(endCandidate);
+ }
+
+ /**
+ * Gets the fragments and annotations.
+ *
+ * @param results
+ * the results
+ * @param fragments
+ * the fragments
+ * @return the fragments and annotations
+ */
+ private void getFragmentsAndAnnotations(List<EObject> results, EList<InteractionFragment> fragments) {
+ for (InteractionFragment interactionFragment : fragments) {
+ if (interactionFragment instanceof CombinedFragment) {
+ EList<EAnnotation> eAnnotations = interactionFragment.getEAnnotations();
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((CombinedFragment) interactionFragment).getName() + "_start")) {
+ results.add(annot);
+ }
+ }
+ fillIInteractionFragment(results, interactionFragment);
+ for (EAnnotation annot : eAnnotations) {
+ if (annot.getSource().equals(((CombinedFragment) interactionFragment).getName() + "_end")) {
+ results.add(annot);
+ }
+ }
+ } else {
+ fillIInteractionFragment(results, interactionFragment);
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/GeneralOrderingService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/GeneralOrderingService.java
new file mode 100755
index 0000000..0672ced
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/GeneralOrderingService.java
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.LabelServices;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.GeneralOrdering;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * The Class GeneralOrderingService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class GeneralOrderingService {
+
+ /** The service. */
+ static private GeneralOrderingService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private GeneralOrderingService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public GeneralOrderingService getInstance() {
+ if (service == null) {
+ service = new GeneralOrderingService();
+ }
+ return service;
+ }
+
+
+ /**
+ * Creates the general ordering.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @return the general ordering
+ */
+ public GeneralOrdering createGeneralOrdering(EObject context, EObject sourceVariable, EObject targetVariable) {
+ if (context instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) context).getTarget();
+ if (target instanceof ExecutionSpecification) {
+ InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+
+ GeneralOrdering generalOrdering = UMLFactory.eINSTANCE.createGeneralOrdering();
+ interaction.getGeneralOrderings().add(generalOrdering);
+ generalOrdering.setName(computeDefaultName(generalOrdering));
+
+
+ generalOrdering.setBefore(((ExecutionSpecification) sourceVariable).getFinish());
+ generalOrdering.setAfter(((ExecutionSpecification) targetVariable).getStart());
+
+ return generalOrdering;
+ }
+ }
+ return null;
+ }
+
+
+
+ /**
+ * Compute default name.
+ *
+ * @param element
+ * New element
+ * @return Name for the new element, he name will looks like
+ * 'ElementType'+total of existing elements of the same type.
+ */
+ private String computeDefaultName(final EObject element) {
+ return LabelServices.INSTANCE.computeDefaultName(element);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/LifelineService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/LifelineService.java
new file mode 100755
index 0000000..8171bd9
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/LifelineService.java
@@ -0,0 +1,341 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * The Class LifelineService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class LifelineService {
+
+
+ /** The service. */
+ static private LifelineService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private LifelineService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public LifelineService getInstance() {
+ if (service == null) {
+ service = new LifelineService();
+ }
+ return service;
+ }
+
+
+ /**
+ * Get type associated to a lifeline.
+ *
+ * @param target
+ * Lifeline
+ * @return Type
+ */
+ public Type getType(Lifeline target) {
+ if (target.getRepresents() != null) {
+ return target.getRepresents().getType();
+ }
+
+ if (target.getClientDependencies() != null && !target.getClientDependencies().isEmpty()) {
+ return ((InstanceSpecification) target.getClientDependencies().get(0).getSuppliers().get(0))
+ .getClassifiers().get(0);
+ }
+ return null;
+
+ }
+
+ /**
+ * Gets the fragments.
+ *
+ * @param results
+ * the results
+ * @param lifeline
+ * the lifeline
+ * @param interaction
+ * the interaction
+ * @return the fragments
+ */
+ public void getFragmentsFromLifeline(List<ExecutionSpecification> results, Lifeline lifeline, EObject interaction) {
+ EList<InteractionFragment> fragments = null;
+ if (interaction instanceof Interaction) {
+ fragments = ((Interaction) interaction).getFragments();
+ }
+ if (interaction instanceof InteractionOperand) {
+ fragments = ((InteractionOperand) interaction).getFragments();
+ }
+ for (InteractionFragment interactionFragment : fragments) {
+ if (interactionFragment instanceof ExecutionSpecification) {
+ if (interactionFragment.getCovereds().contains(lifeline)) {
+ if (!ExecutionService.getInstance().isNestedExecution((ExecutionSpecification) interactionFragment)) {
+ results.add((ExecutionSpecification) interactionFragment);
+ }
+ }
+ }
+ if (interactionFragment instanceof CombinedFragment) {
+ EList<InteractionOperand> operands = ((CombinedFragment) interactionFragment).getOperands();
+ for (InteractionOperand interactionOperand : operands) {
+ getFragmentsFromLifeline(results, lifeline, interactionOperand);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Get the lifeline associated to a fragment.
+ *
+ * @param fragment
+ * Fragment
+ * @return Lifeline if exists otherwise null
+ */
+ public Lifeline getLifeline(EObject fragment) {
+ if (fragment instanceof Lifeline) {
+ return (Lifeline) fragment;
+ } else if (fragment instanceof InteractionFragment) {
+ final List<Lifeline> lifelines = ((InteractionFragment) fragment).getCovereds();
+ if (lifelines != null && !lifelines.isEmpty()) {
+ return lifelines.get(0);
+ }
+ }
+ return null;
+ }
+
+
+
+
+
+ /**
+ * Compute lifeline comment label.
+ *
+ * @param lifeline
+ * Lifeline
+ * @return LAbel
+ */
+ public String computeLifelineCommentLabel(Lifeline lifeline) {
+ final ConnectableElement represent = lifeline.getRepresents();
+ // ['current container :
+ // '+self.oclAsType(uml::Lifeline).represents.eContainer().oclAsType(uml::NamedElement).name/]
+ final EList<Dependency> dependencies = lifeline.getClientDependencies();
+
+ if (represent != null) {
+ final EObject container = represent.eContainer();
+ if (dependencies.size() == 0) {
+ if (container != null && container instanceof NamedElement) {
+ return "current container : " + ((NamedElement) container).getName(); //$NON-NLS-1$
+ }
+ } else {
+ // ['current container :
+ // '+self.oclAsType(uml::Lifeline).represents.eContainer().name+'\n
+ // context dependency:
+ // '+self.oclAsType(uml::Lifeline).clientDependency.supplier.name->sep('::')/]
+ if (container != null && container instanceof NamedElement) {
+ final EList<NamedElement> suppliers = dependencies.get(0).getSuppliers();
+ if (suppliers != null && suppliers.size() > 0) {
+ final EObject supplier = suppliers.get(0);
+ if (supplier != null && supplier instanceof NamedElement) {
+ return "current container : " + ((NamedElement) container).getName() //$NON-NLS-1$
+ + " context dependency: " + ((NamedElement) supplier).getName(); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ } else {
+ if (dependencies != null) {
+ final EList<NamedElement> suppliers = dependencies.get(0).getSuppliers();
+ if (dependencies.size() > 1) {
+ // ['context dependency:
+ // '+self.oclAsType(uml::Lifeline).clientDependency.supplier.name->sep('::')/]
+ if (suppliers != null && suppliers.size() > 0) {
+ final EObject supplier = suppliers.get(0);
+ if (supplier != null && supplier instanceof NamedElement) {
+ return "context dependency: " + ((NamedElement) supplier).getName(); //$NON-NLS-1$
+ }
+ }
+ } else if (dependencies.size() == 1) {
+ // ['current container :
+ // '+self.oclAsType(uml::Lifeline).clientDependency.supplier.eContainer().name/]
+ if (suppliers != null && suppliers.size() > 0) {
+ final EObject supplier = suppliers.get(0);
+ if (supplier != null) {
+ final EObject container = supplier.eContainer();
+ if (container != null && container instanceof NamedElement) {
+ return "current container : " + ((NamedElement) container).getName(); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Check if lifeline is representing a property.
+ *
+ * @param element
+ * Lifeline
+ * @return True iflifeline is representing a property
+ */
+ public boolean isRepresentingProperty(Lifeline element) {
+ return false;
+ }
+
+ /**
+ * Delete lifeline.
+ *
+ * @param lifeline
+ * Lifeline to delete
+ */
+ public void delete(Lifeline lifeline) {
+ if (lifeline == null) {
+ return;
+ }
+ // Delete dependency
+ deleteContext(lifeline);
+
+ // Delete all executions
+ for (final ExecutionSpecification execution : executionSemanticCandidates(lifeline)) {
+ if (execution instanceof ExecutionSpecification) {
+ ExecutionService.getInstance().deleteExecution(execution);
+ }
+ }
+
+ // Delete all messages
+ for (final Message message : getAllMessages(lifeline)) {
+ MessageService.getInstance().delete(message);
+ }
+
+ // Delete lifeline
+ lifeline.destroy();
+ }
+
+ /**
+ * Find the first level of {@link ExecutionSpecification} in the given {@link InteractionFragment} list.
+ *
+ * @param lifeline
+ * the {@link Lifeline} which is covered by the searched {@link ExecutionSpecification}
+ * @param candidateFragments
+ * a sub-list of {@link InteractionFragment} to inspect for the first
+ * {@link ExecutionSpecification} level.
+ * @return {@link List} of the {@link ExecutionSpecification}
+ */
+ private List<ExecutionSpecification> getFirstLevelExecutions(Lifeline lifeline,
+ final List<InteractionFragment> candidateFragments) {
+ final List<ExecutionSpecification> executions = new ArrayList<ExecutionSpecification>();
+ ExecutionSpecification subExec = null;
+ for (final InteractionFragment fragment : candidateFragments) {
+ if (fragment instanceof ExecutionSpecification && fragment.getCovereds().contains(lifeline)) {
+ // Element on the same lifeline
+ if (subExec == null) {
+ subExec = (ExecutionSpecification) fragment;
+ }
+ } else if (fragment instanceof OccurrenceSpecification && subExec != null
+ && fragment.equals(subExec.getFinish())) {
+ executions.add(subExec);
+ subExec = null;
+ }
+ if (fragment instanceof CombinedFragment) {
+ EList<InteractionOperand> operands = ((CombinedFragment) fragment).getOperands();
+ for (InteractionOperand operand : operands) {
+ executions.addAll(getFirstLevelExecutions(lifeline, operand.getFragments()));
+ }
+
+ }
+ }
+
+ return executions;
+ }
+
+ /**
+ * Finds the first level of {@link ExecutionSpecification} in the context of the given {@link Lifeline}.
+ *
+ * @param lifeline
+ * the context.
+ * @return the {@link ExecutionSpecification} semantic candidates.
+ */
+ private List<ExecutionSpecification> executionSemanticCandidates(Lifeline lifeline) {
+ return getFirstLevelExecutions(lifeline, lifeline.getInteraction().getFragments());
+ }
+
+ /**
+ * Get all messages associated to lifeline.
+ *
+ * @param lifeline
+ * Lifeline
+ * @return Messages associated to lifeline
+ */
+ private List<Message> getAllMessages(Lifeline lifeline) {
+ final List<Message> messages = new ArrayList<Message>();
+ if (lifeline != null && lifeline.getInteraction() != null) {
+ for (final Message message : lifeline.getInteraction().getMessages()) {
+ for (final Lifeline coveredLifeline : ((MessageOccurrenceSpecification) message.getSendEvent())
+ .getCovereds()) {
+ if (lifeline.equals(coveredLifeline)) {
+ messages.add(message);
+ }
+ }
+ }
+ }
+ return messages;
+ }
+
+
+ /**
+ * Delete the client dependency used for the context.
+ *
+ * @param lifeline
+ * the lifeline
+ */
+ // add an eannotation
+ private void deleteContext(Lifeline lifeline) {
+ final Object[] dependencies = lifeline.getClientDependencies().toArray();
+
+ for (int i = 0; i < dependencies.length; i++) {
+ EcoreUtil.delete((Dependency) dependencies[i]);
+ }
+
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/MessageService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/MessageService.java
new file mode 100755
index 0000000..b73b363
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/MessageService.java
@@ -0,0 +1,1737 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Stack;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.LabelServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.OperationServices;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.ordering.EventEnd;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
+import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Gate;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.InteractionUse;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageSort;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.StateInvariant;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * The Class MessageService.
+ */
+@SuppressWarnings("restriction")
+public class MessageService {
+
+
+ /**
+ * Signal name suffix.
+ */
+ public static final String SIGNAL_SUFFIX = "_signal"; //$NON-NLS-1$
+
+ /**
+ * Sender message name suffix.
+ */
+ public static final String SENDER_MESSAGE_SUFFIX = "_sender"; //$NON-NLS-1$
+
+ /**
+ * Receiver message name suffix.
+ */
+ public static final String RECEIVER_MESSAGE_SUFFIX = "_receiver"; //$NON-NLS-1$
+
+
+ /** The service. */
+ static private MessageService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private MessageService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public MessageService getInstance() {
+ if (service == null) {
+ service = new MessageService();
+ }
+ return service;
+ }
+
+
+ /**
+ * Delete message.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @return the message
+ */
+ public Message foundMessage(EObject context, EObject sourceVariable) {
+ EObject target = null;
+ if (context instanceof DNodeSpec) {
+ target = ((DNodeSpec) context).getTarget();
+ }
+ if (context instanceof Lifeline) {
+ target = context;
+ }
+ if (context instanceof ExecutionOccurrenceSpecification) {
+ Lifeline lifeline = ((ExecutionOccurrenceSpecification) context).getCovered();
+ Message deleteMessage = createFoundMessage(lifeline, (ExecutionOccurrenceSpecification) context);
+ return deleteMessage;
+ }
+ if (target instanceof Lifeline) {
+ Lifeline lifeline = (Lifeline) target;
+ Message deleteMessage = createFoundMessage(lifeline, null);
+
+ return deleteMessage;
+ }
+
+ return null;
+ }
+
+ /**
+ * Creates the found message.
+ *
+ * @param lifeline
+ * the lifeline
+ * @param occ
+ * the occ
+ * @return the message
+ */
+ private Message createFoundMessage(Lifeline lifeline, ExecutionOccurrenceSpecification occ) {
+
+ Interaction interaction = lifeline.getInteraction();
+ Message deleteMessage = UMLFactory.eINSTANCE.createMessage();
+ interaction.getMessages().add(deleteMessage);
+ deleteMessage.setName(computeDefaultName(deleteMessage));
+
+ MessageOccurrenceSpecification occurenceMessageSend = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+ if (occ != null) {
+ ReorderService.getInstance().replaceExecByMessage(occurenceMessageSend, interaction.getFragments(), occ);
+
+ } else {
+ interaction.getFragments().add(occurenceMessageSend);
+ }
+ lifeline.getCoveredBys().add(occurenceMessageSend);
+ occurenceMessageSend.setName(computeDefaultName(occurenceMessageSend) + "ReceiveEvent");
+
+
+ deleteMessage.setMessageSort(MessageSort.SYNCH_CALL_LITERAL);
+ deleteMessage.setReceiveEvent(occurenceMessageSend);
+ return deleteMessage;
+ }
+
+
+
+ /**
+ * Checks if is lost found target valid.
+ *
+ * @param context
+ * the context
+ * @return true, if is lost found target valid
+ */
+ public boolean isLostFoundTargetValid(EObject context) {
+
+ if (context instanceof Lifeline) {
+ return true;
+ }
+ if (context instanceof ExecutionOccurrenceSpecification) {
+ return true;
+ }
+ return false;
+
+
+ }
+
+
+
+
+ /**
+ * Delete message.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @return the message
+ */
+ public Message lostMessage(EObject context, EObject sourceVariable) {
+ EObject target = null;
+ if (context instanceof DNodeSpec) {
+ target = ((DNodeSpec) context).getTarget();
+ }
+
+ if (context instanceof ExecutionOccurrenceSpecification) {
+ Lifeline lifeline = ((ExecutionOccurrenceSpecification) context).getCovered();
+ Message deleteMessage = createLostMessage(lifeline, (ExecutionOccurrenceSpecification) context);
+ return deleteMessage;
+ }
+
+ if (context instanceof Lifeline) {
+ target = context;
+ }
+ if (target instanceof Lifeline) {
+ Lifeline lifeline = (Lifeline) target;
+ Message deleteMessage = createLostMessage(lifeline, null);
+
+ return deleteMessage;
+ }
+
+ return null;
+ }
+
+ /**
+ * Creates the lost message.
+ *
+ * @param lifeline
+ * the lifeline
+ * @param occ
+ * the occ
+ * @return the message
+ */
+ private Message createLostMessage(Lifeline lifeline, ExecutionOccurrenceSpecification occ) {
+ Interaction interaction = lifeline.getInteraction();
+
+ Message deleteMessage = UMLFactory.eINSTANCE.createMessage();
+ interaction.getMessages().add(deleteMessage);
+ deleteMessage.setName(computeDefaultName(deleteMessage));
+
+ MessageOccurrenceSpecification occurenceMessageSend = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+
+ if (occ != null) {
+ ReorderService.getInstance().replaceExecByMessage(occurenceMessageSend, interaction.getFragments(), occ);
+
+ } else {
+ interaction.getFragments().add(occurenceMessageSend);
+ }
+ lifeline.getCoveredBys().add(occurenceMessageSend);
+ occurenceMessageSend.setName(computeDefaultName(occurenceMessageSend) + "SendEvent");
+ EAnnotation annotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ annotation.setSource(occurenceMessageSend.getName() + "LOSTMESSAGE");
+ occurenceMessageSend.getEAnnotations().add(annotation);
+
+ deleteMessage.setMessageSort(MessageSort.SYNCH_CALL_LITERAL);
+ deleteMessage.setSendEvent(occurenceMessageSend);
+ return deleteMessage;
+ }
+
+
+ /**
+ * Gets the lost receive annotation.
+ *
+ * @param context
+ * the context
+ * @return the lost receive annotation
+ */
+ public EObject getLostReceiveAnnotation(EObject context) {
+ if (context instanceof Message) {
+ MessageEnd sendEvent = ((Message) context).getSendEvent();
+ EList<EAnnotation> eAnnotations = sendEvent.getEAnnotations();
+ for (EAnnotation eAnnotation : eAnnotations) {
+ if (eAnnotation.getSource().equals(sendEvent.getName() + "LOSTMESSAGE")) {
+ return eAnnotation;
+ }
+ }
+ return sendEvent;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Creates the reply message.
+ *
+ * @param context
+ * the context
+ * @param sourceFragment
+ * the source fragment
+ * @param targetFragment
+ * the target fragment
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ */
+ public void createReplyMessage(EObject context, NamedElement sourceFragment,
+ NamedElement targetFragment, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ EObject startingEndPredecessorSemanticEnd = null;
+ EObject finishingEndPredecessorSemanticEnd = null;
+ InteractionFragment interaction = null;
+ if (targetFragment instanceof Lifeline) {
+ interaction = ((Lifeline) targetFragment).getInteraction();
+ } else {
+ interaction = FragmentsService.getInstance().getEnclosingFragment(targetFragment);
+ }
+ if (startingEndPredecessor != null) {
+ startingEndPredecessorSemanticEnd = startingEndPredecessor.getSemanticEnd();
+ }
+ if (finishingEndPredecessor != null) {
+ finishingEndPredecessorSemanticEnd = finishingEndPredecessor.getSemanticEnd();
+ }
+ Message replyMessage = createReplyMessage(interaction, targetFragment, sourceFragment,
+ startingEndPredecessorSemanticEnd, finishingEndPredecessorSemanticEnd, null);
+ getMessages(interaction).add(replyMessage);
+
+ final MessageOccurrenceSpecification senderEventMessage = (MessageOccurrenceSpecification) replyMessage
+ .getSendEvent();
+ final MessageOccurrenceSpecification receiverEventMessage = (MessageOccurrenceSpecification) replyMessage
+ .getReceiveEvent();
+
+ final List<EObject> fragments = FragmentsService.getInstance().getFragmentsAndAnnotation(interaction);
+ final BehaviorExecutionSpecification predecessorExecution = ExecutionService.getInstance().getExecution(
+ startingEndPredecessorSemanticEnd);
+ // If predecessor is the beginning of an execution add message after the
+ // execution
+ if (startingEndPredecessorSemanticEnd != null && startingEndPredecessorSemanticEnd instanceof OccurrenceSpecification
+ && predecessorExecution != null
+ && startingEndPredecessorSemanticEnd.equals(predecessorExecution.getStart())) {
+ fragments.add(fragments.indexOf(predecessorExecution) + 1, senderEventMessage);
+ }
+ // Else set it directly after the predecessor
+ else {
+ fragments.add(fragments.indexOf(startingEndPredecessorSemanticEnd) + 1, senderEventMessage);
+ }
+
+ fragments.add(fragments.indexOf(senderEventMessage) + 1, receiverEventMessage);
+
+ FragmentsService.getInstance().updateFragmentList(startingEndPredecessorSemanticEnd != null ? startingEndPredecessorSemanticEnd : interaction, fragments);
+ }
+
+
+
+ /**
+ * Create Delete message.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @return the message
+ */
+ public Message deleteMessage(EObject context, EObject sourceVariable, Lifeline targetVariable, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ EObject startingEndPredecessorSemanticEnd = null;
+ if (startingEndPredecessor != null) {
+ startingEndPredecessorSemanticEnd = startingEndPredecessor.getSemanticEnd();
+ }
+
+ if (context instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) context).getTarget();
+ Interaction interaction = null;
+ if (target instanceof InteractionFragment) {
+ interaction = FragmentsService.getInstance().getParentInteraction((InteractionFragment) target);
+ }
+ if (target instanceof Lifeline) {
+ interaction = ((Lifeline) target).getInteraction();
+ }
+ Message deleteMessage = UMLFactory.eINSTANCE.createMessage();
+ interaction.getMessages().add(deleteMessage);
+ deleteMessage.setName(computeDefaultName(deleteMessage));
+
+ MessageOccurrenceSpecification occurenceMessageSend = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+ interaction.getFragments().add(occurenceMessageSend);
+ LifelineService.getInstance().getLifeline(sourceVariable).getCoveredBys().add(occurenceMessageSend);
+ occurenceMessageSend.setName(computeDefaultName(occurenceMessageSend) + "SendEvent");
+
+ DestructionOccurrenceSpecification occurenceMessageReceive = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
+ interaction.getFragments().add(occurenceMessageReceive);
+ occurenceMessageReceive.setName(computeDefaultName(occurenceMessageReceive) + "ReceiveEvent");
+ targetVariable.getCoveredBys().add(occurenceMessageReceive);
+
+ deleteMessage.setMessageSort(MessageSort.DELETE_MESSAGE_LITERAL);
+ deleteMessage.setSendEvent(occurenceMessageSend);
+ deleteMessage.setReceiveEvent(occurenceMessageReceive);
+
+
+ List<EObject> fragments = FragmentsService.getInstance().getEnclosingFragments(interaction);
+ if (sourceVariable instanceof ExecutionOccurrenceSpecification) {
+ MessageOccurrenceSpecification sendEvent = (MessageOccurrenceSpecification) deleteMessage.getSendEvent();
+
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) sourceVariable).getExecution();
+
+ fragments.remove(sendEvent);
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) sourceVariable, fragments, sendEvent, sourceExecution);
+ if (startingEndPredecessorSemanticEnd != null && startingEndPredecessorSemanticEnd.equals(sourceVariable)) {
+ startingEndPredecessorSemanticEnd = sendEvent;
+ }
+ }
+
+ boolean startOfExecution = startingEndPredecessorSemanticEnd == null ? true : ReorderService.getInstance().isStartOfExecution(startingEndPredecessorSemanticEnd, fragments);
+ int index = -1;
+ if (startingEndPredecessorSemanticEnd == null) {
+ index = 0;
+ } else {
+ index = startingEndPredecessorSemanticEnd.equals(deleteMessage.getSendEvent()) ? fragments.indexOf(startingEndPredecessorSemanticEnd) : fragments.indexOf(startingEndPredecessorSemanticEnd) + (startOfExecution ? 1 : 2);
+ }
+
+ /////////////////////////
+
+ fragments.remove(
+ deleteMessage.getSendEvent());
+ fragments.add(index,
+ deleteMessage.getSendEvent());
+
+ fragments.remove(
+ deleteMessage.getReceiveEvent());
+ fragments.add(fragments.indexOf(deleteMessage.getSendEvent()) + 1,
+ deleteMessage.getReceiveEvent());
+
+
+ FragmentsService.getInstance().updateFragmentList(interaction, fragments);
+
+
+ ///////////////////////
+
+
+
+ return deleteMessage;
+ }
+ return null;
+ }
+
+ /**
+ * Creates the message.
+ *
+ * @param context
+ * the context
+ * @param sourceV
+ * the source V
+ * @param targetV
+ * the target V
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @return the message
+ */
+ public Message createMessage(EObject context, EObject sourceV, Lifeline targetV, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+
+ Element startingEndPredecessorSemanticEnd = null;
+ if (startingEndPredecessor != null) {
+ startingEndPredecessorSemanticEnd = (Element) startingEndPredecessor.getSemanticEnd();
+ }
+
+ if (context instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) context).getTarget();
+ Interaction interaction = null;
+ if (target instanceof InteractionFragment) {
+ interaction = FragmentsService.getInstance().getParentInteraction((InteractionFragment) target);
+ } else if (target instanceof Lifeline) {
+ interaction = ((Lifeline) target).getInteraction();
+ }
+
+ Message createMessage = createMessage(interaction, sourceV, targetV);
+ List<EObject> fragments = FragmentsService.getInstance().getEnclosingFragments(interaction);
+ if (sourceV instanceof ExecutionOccurrenceSpecification) {
+ MessageOccurrenceSpecification sendEvent = (MessageOccurrenceSpecification) createMessage.getSendEvent();
+
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) sourceV).getExecution();
+
+ fragments.remove(sendEvent);
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) sourceV, fragments, sendEvent, sourceExecution);
+ if (startingEndPredecessorSemanticEnd != null && startingEndPredecessorSemanticEnd.equals(sourceV)) {
+ startingEndPredecessorSemanticEnd = sendEvent;
+ }
+ }
+
+ /////////////////////////
+
+ boolean startOfExecution = startingEndPredecessorSemanticEnd == null ? true : ReorderService.getInstance().isStartOfExecution(startingEndPredecessorSemanticEnd, fragments);
+ int index = -1;
+ if (startingEndPredecessorSemanticEnd == null) {
+ index = 0;
+ } else {
+ index = startingEndPredecessorSemanticEnd.equals(createMessage.getSendEvent()) ? fragments.indexOf(startingEndPredecessorSemanticEnd) : fragments.indexOf(startingEndPredecessorSemanticEnd) + (startOfExecution ? 1 : 2);
+ }
+
+ fragments.remove(
+ createMessage.getSendEvent());
+ fragments.add(index,
+ createMessage.getSendEvent());
+
+ fragments.remove(
+ createMessage.getReceiveEvent());
+ fragments.add(fragments.indexOf(createMessage.getSendEvent()) + 1,
+ createMessage.getReceiveEvent());
+
+
+
+
+
+ ///////////////////////
+
+
+
+ FragmentsService.getInstance().updateFragmentList(interaction, fragments);
+
+ return createMessage;
+ }
+ return null;
+ }
+
+
+
+ /**
+ * Creates the synchronous message.
+ *
+ * @param source
+ * the source
+ * @param target
+ * the target
+ * @return the message
+ */
+ public Message createMessage(EObject source, Lifeline target) {
+
+ if (source instanceof ExecutionOccurrenceSpecification) {
+ InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+ final Message message = createMessage((Interaction) interaction, source, target);
+ List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(target);
+
+ MessageOccurrenceSpecification sendEvent = (MessageOccurrenceSpecification) message.getSendEvent();
+
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) source).getExecution();
+
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) source, enclosingFragments, sendEvent, sourceExecution);
+
+ FragmentsService.getInstance().updateFragmentList(interaction, enclosingFragments);
+ return message;
+ }
+ return null;
+ }
+
+ /**
+ * Creates the message.
+ *
+ * @param interaction
+ * the interaction
+ * @param sourceV
+ * the source V
+ * @param targetV
+ * the target V
+ * @return the message
+ */
+ private Message createMessage(Interaction interaction, EObject sourceV, Lifeline targetV) {
+ Message createMessage = UMLFactory.eINSTANCE.createMessage();
+ interaction.getMessages().add(createMessage);
+ createMessage.setName(computeDefaultName(createMessage));
+ MessageOccurrenceSpecification occurenceMessageSend = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+ interaction.getFragments().add(occurenceMessageSend);
+ LifelineService.getInstance().getLifeline(sourceV).getCoveredBys().add(occurenceMessageSend);
+ occurenceMessageSend.setName(computeDefaultName(occurenceMessageSend) + "SendEvent");
+ MessageOccurrenceSpecification occurenceMessageReceive = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+ interaction.getFragments().add(occurenceMessageReceive);
+ occurenceMessageReceive.setName(computeDefaultName(occurenceMessageReceive) + "ReceiveEvent");
+ targetV.getCoveredBys().add(occurenceMessageReceive);
+
+ createMessage.setMessageSort(MessageSort.CREATE_MESSAGE_LITERAL);
+ createMessage.setSendEvent(occurenceMessageSend);
+ createMessage.setReceiveEvent(occurenceMessageReceive);
+ return createMessage;
+ }
+
+
+ /**
+ * Creates the synchronous message.
+ *
+ * @param target
+ * the target
+ * @param source
+ * the source
+ */
+ public void createSynchronousMessage(NamedElement target, NamedElement source) {
+
+ InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+
+ final Message message = createSynchronousMessage(interaction, source, target,
+ null, null, null);
+
+ getMessages(interaction).add(message);
+
+
+
+
+ manageMessageEnds(target, source, message);
+
+
+ }
+
+
+
+
+ /**
+ * Create an operation and an asynchronous message from a lifeline or an execution. Create the operation
+ * in the class and the asynchronous message in the interaction.
+ *
+ * @param target
+ * Target message element, it could be a lifeline or an execution
+ * @param source
+ * Source message element, it could be a lifeline or an execution
+ * @param startingEndPredecessor
+ * Start predecessor
+ * @param finishingEndPredecessor
+ * Finish predecessor
+ */
+ public void createOperationAndAsynchMessage(NamedElement target, NamedElement source,
+ EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ Element startingEndPredecessorSemanticEnd = null;
+ if (startingEndPredecessor != null) {
+ startingEndPredecessorSemanticEnd = (Element) startingEndPredecessor.getSemanticEnd();
+ }
+ Element finishingEndPredecessorSemanticEnd = null;
+ if (finishingEndPredecessor != null) {
+ finishingEndPredecessorSemanticEnd = (Element) finishingEndPredecessor.getSemanticEnd();
+ }
+ // Get associated class and interaction
+ org.eclipse.uml2.uml.Type type;
+ InteractionFragment interaction;
+ if (target instanceof Lifeline) {
+ type = LifelineService.getInstance().getType((Lifeline) target);
+ interaction = ((Lifeline) target).getInteraction();
+ } else {
+ type = LifelineService.getInstance().getType(((ExecutionSpecification) target).getCovereds().get(0));
+ interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+ }
+ final Operation operation = OperationServices.INSTANCE.createOperation(type);
+ // Create message
+
+ createAsynchronousMessage(interaction, source, target, false,
+ startingEndPredecessorSemanticEnd, finishingEndPredecessorSemanticEnd, operation);
+ }
+
+
+ /**
+ * Gets the behaviors.
+ *
+ * @param interaction
+ * the interaction
+ * @return the behaviors
+ */
+ public List<Behavior> getBehaviors(InteractionFragment interaction) {
+ if (interaction instanceof InteractionOperand) {
+ return FragmentsService.getInstance().getParentInteraction(interaction).getOwnedBehaviors();
+ }
+ if (interaction instanceof Interaction) {
+ return ((Interaction) interaction).getOwnedBehaviors();
+ }
+ return null;
+ }
+
+ /**
+ * Gets the messages.
+ *
+ * @param interaction
+ * the interaction
+ * @return the messages
+ */
+ public List<Message> getMessages(InteractionFragment interaction) {
+ if (interaction instanceof InteractionOperand) {
+ return FragmentsService.getInstance().getParentInteraction(interaction).getMessages();
+ }
+ if (interaction instanceof Interaction) {
+ return ((Interaction) interaction).getMessages();
+ }
+ return null;
+ }
+
+
+
+ /**
+ * Create asynchronous message.
+ *
+ * @param interaction
+ * Interaction
+ * @param createOperation
+ * Operation must be created true otherwise false
+ * @param sourceFragment
+ * Source
+ * @param targetFragment
+ * Target
+ * @param operation
+ * Operation
+ * @return Message
+ */
+ public Message createAsynchronousMessage(InteractionFragment interaction, boolean createOperation,
+ NamedElement sourceFragment, NamedElement targetFragment, Operation operation) {
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+
+ boolean createSourceMessOcc = !(sourceFragment instanceof Gate);
+ boolean createTargetMessOcc = !(targetFragment instanceof Gate);
+
+ final Message message = factory.createMessage();
+
+ final Lifeline source = LifelineService.getInstance().getLifeline(sourceFragment);
+ final Lifeline target = LifelineService.getInstance().getLifeline(targetFragment);
+
+ String messageName = ""; //$NON-NLS-1$
+ if (operation == null) {
+ messageName = "Message_" + Integer.toString(getMessages(interaction).size()); //$NON-NLS-1$
+ } else {
+ messageName = operation.getName();
+ }
+
+ message.setName(messageName);
+ message.setMessageSort(MessageSort.ASYNCH_CALL_LITERAL);
+
+ // Create message send event
+ if (createSourceMessOcc) {
+ final MessageOccurrenceSpecification senderEventMessage = factory
+ .createMessageOccurrenceSpecification();
+ senderEventMessage.setName(message.getName() + SENDER_MESSAGE_SUFFIX);
+ senderEventMessage.getCovereds().add(source);
+ senderEventMessage.setMessage(message);
+ message.setSendEvent(senderEventMessage);
+ } else {
+ message.setSendEvent((Gate) sourceFragment);
+ }
+
+ if (createTargetMessOcc) {
+ // Create message receive event
+ final MessageOccurrenceSpecification receiverEventMessage = factory
+ .createMessageOccurrenceSpecification();
+ receiverEventMessage.setName(message.getName() + RECEIVER_MESSAGE_SUFFIX);
+ receiverEventMessage.getCovereds().add(target);
+ receiverEventMessage.setMessage(message);
+
+
+ message.setReceiveEvent(receiverEventMessage);
+ } else {
+ message.setReceiveEvent((Gate) targetFragment);
+ }
+
+ return message;
+ }
+
+ /**
+ * Creates the synchronous message.
+ *
+ * @param target
+ * the target
+ * @param source
+ * the source
+ */
+ public void createASynchronousMessage(NamedElement target, NamedElement source) {
+ InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+ final Message message = createAsynchronousMessage(interaction, false, source, target, null);
+ getMessages(interaction).add(message);
+ manageMessageEnds(target, source, message);
+ }
+
+ /**
+ * Manage message ends.
+ *
+ * @param target the target
+ * @param source the source
+ * @param message the message
+ */
+ private void manageMessageEnds(NamedElement target, NamedElement source, final Message message) {
+ if (source instanceof ExecutionOccurrenceSpecification) {
+ List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(source);
+ MessageOccurrenceSpecification sendEvent = (MessageOccurrenceSpecification) message.getSendEvent();
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) source).getExecution();
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) source, enclosingFragments, sendEvent, sourceExecution);
+ FragmentsService.getInstance().updateFragmentList(FragmentsService.getInstance().getEnclosingFragment(source), enclosingFragments);
+ }
+ if (source instanceof Gate) {
+
+ }
+ if (target instanceof ExecutionOccurrenceSpecification) {
+ List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(target);
+ MessageOccurrenceSpecification receiveEvent = (MessageOccurrenceSpecification) message.getReceiveEvent();
+ ExecutionSpecification targetExecution = ((ExecutionOccurrenceSpecification) target).getExecution();
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) target, enclosingFragments, receiveEvent, targetExecution);
+ FragmentsService.getInstance().updateFragmentList(FragmentsService.getInstance().getEnclosingFragment(target), enclosingFragments);
+ }
+ if (target instanceof Gate) {
+
+
+ }
+ }
+
+ /**
+ * Create an operation and an synchronous message from a lifeline or an execution. Create the operation in
+ * the class and the synchronous message in the interaction.
+ *
+ * @param target
+ * Target message element, it could be a lifeline or an execution
+ * @param source
+ * Source message element, it could be a lifeline or an execution
+ * @param startingEndPredecessor
+ * Start predecessor
+ * @param finishingEndPredecessor
+ * Finish predecessor
+ */
+ public void createOperationAndSynchMessage(NamedElement target, NamedElement source,
+ EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ Element startingEndPredecessorSemanticEnd = null;
+ if (startingEndPredecessor != null) {
+ startingEndPredecessorSemanticEnd = (Element) startingEndPredecessor.getSemanticEnd();
+ }
+ Element finishingEndPredecessorSemanticEnd = null;
+ if (finishingEndPredecessor != null) {
+ finishingEndPredecessorSemanticEnd = (Element) finishingEndPredecessor.getSemanticEnd();
+ }
+ // Get associated class and interaction
+ org.eclipse.uml2.uml.Type type;
+ InteractionFragment interaction;
+ boolean createExecution = false;
+ if (target instanceof Lifeline) {
+ createExecution = true;
+ type = LifelineService.getInstance().getType((Lifeline) target);
+ interaction = ((Lifeline) target).getInteraction();
+ } else {
+ type = LifelineService.getInstance().getType(((InteractionFragment) target).getCovereds().get(0));
+ interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+ ;
+ }
+ final Operation operation = OperationServices.INSTANCE.createOperation(type);
+ // Create message
+ createSynchronousMessage(interaction, source, target, createExecution, true,
+ startingEndPredecessorSemanticEnd, finishingEndPredecessorSemanticEnd, operation);
+ }
+
+
+ /**
+ * Check if element is a valid message end.
+ *
+ * @param element
+ * Element
+ * @return True if element is a valid message end
+ */
+ public boolean isValidMessageEnd(Element element) {
+ // [preTarget->filter(uml::Lifeline).represents.type<>null or
+ // preTarget->filter(uml::ExecutionSpecification).covered.represents.type<>null
+ // or
+ // preTarget->filter(uml::Lifeline).clientDependency.supplier.oclAsType(uml::Property).classifier<>null
+ // or
+ // preTarget->filter(uml::ExecutionSpecification).covered.clientDependency.supplier.classifier<>null/]
+ return element instanceof Lifeline /* && ((Lifeline)element).getRepresents() != null */
+ || element instanceof ExecutionSpecification
+ && isCoveredTypeSet((ExecutionSpecification) element)
+ || element instanceof Lifeline /* && ((Lifeline)element).getRepresents() != null */
+ || element instanceof Gate
+ || element instanceof StateInvariant
+ || element instanceof InteractionUse
+ || element instanceof OccurrenceSpecification;
+ }
+
+ /**
+ * Check if element is a valid message end.
+ *
+ * @param preTarget
+ * Element
+ * @return True if element is a valid message end
+ */
+ public boolean isValidMessageEnd(EObject preTarget) {
+ if (preTarget == null) {
+ return false;
+ }
+
+ if (preTarget instanceof Lifeline) {
+ return isValidMessageEndForLifeline(preTarget);
+
+ } else if (preTarget instanceof ExecutionSpecification) {
+ for (final Lifeline lifeline : ((ExecutionSpecification) preTarget).getCovereds()) {
+ final boolean result = isValidMessageEndForLifeline(lifeline);
+ if (result) {
+ return true;
+ }
+ }
+ } else if (preTarget instanceof StateInvariant) {
+ return true;
+
+ } else if (preTarget instanceof InteractionUse) {
+ return true;
+ } else if (preTarget instanceof ExecutionOccurrenceSpecification) {
+ return true;
+ } else if (preTarget instanceof Gate) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if message is not a reply message.
+ *
+ * @param message
+ * Message
+ * @return True if message is not a reply message
+ */
+ public boolean isNotReply(Message message) {
+ return !isReply(message);
+ }
+
+ /**
+ * Check if message is a reply message.
+ *
+ * @param message
+ * Message
+ * @return True if message is a reply message
+ */
+ public boolean isReply(Message message) {
+ if (message == null) {
+ return false;
+ }
+ return MessageSort.REPLY_LITERAL.equals(message.getMessageSort());
+ }
+
+
+ /**
+ * Checks if is receive message event.
+ *
+ * @param event
+ * the event
+ * @return true, if is receive message event
+ */
+ public boolean isReceiveMessageEvent(MessageOccurrenceSpecification event) {
+ Message message = event.getMessage();
+ MessageEnd receiveEvent = message.getReceiveEvent();
+ if (receiveEvent.equals(event)) {
+ return true;
+ }
+ return false;
+ }
+
+
+ /**
+ * Find occurrence specification context for a receive event.
+ *
+ * @param message
+ * Message
+ * @return Occurrence specification context
+ */
+ public NamedElement findOccurrenceSpecificationContextForReceiveEvent(Message message) {
+
+
+ MessageEnd receiveEvent = message.getReceiveEvent();
+ if (receiveEvent == null) {
+ return null;
+ }
+ if (receiveEvent instanceof Gate) {
+ return receiveEvent;
+ }
+ if (receiveEvent instanceof Gate) {
+ return message.getReceiveEvent();
+ }
+ if (message.getSendEvent() instanceof Gate) {
+ return message.getReceiveEvent();
+ }
+ return findOccurrenceSpecificationContext((OccurrenceSpecification) receiveEvent);
+ }
+
+
+ /**
+ * Find occurrence specification context for a send event.
+ *
+ * @param message
+ * Message
+ * @return Occurrence specification context
+ */
+ public NamedElement findOccurrenceSpecificationContextForSendEvent(Message message) {
+ if (message.getReceiveEvent() instanceof Gate) {
+ return message.getSendEvent();
+ }
+ if (message.getSendEvent() instanceof Gate) {
+ return message.getSendEvent();
+ }
+ return findOccurrenceSpecificationContext((OccurrenceSpecification) message.getSendEvent());
+ }
+
+
+ /**
+ * Check if message is a synchronous call.
+ *
+ * @param message
+ * Message
+ * @return True if message is a synchronous call
+ */
+ public boolean isSynchCall(Message message) {
+ if (message == null) {
+ return false;
+ }
+ return MessageSort.ASYNCH_CALL_LITERAL.equals(message.getMessageSort());
+ }
+
+ /**
+ * Gets the invocation message.
+ *
+ * @param object
+ * the object
+ * @return the invocation message
+ */
+ public Message getInvocationMessage(EObject object) {
+
+ if (object instanceof Message) {
+ EObject eContainer = object.eContainer();
+ String name = ((Message) object).getName();
+ if (eContainer instanceof Interaction) {
+ // TODO, il faut trouver une autre solution pour trouver le message d'invokation que par le nom. Car celui ci pourrait etre changé par l'utilisateur apres coup.
+ String invokationName = name.replace("_reply", "");
+ return ((Interaction) eContainer).getMessage(invokationName);
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * Gets the message associated elements.
+ *
+ * @param msg
+ * the msg
+ * @return the message associated elements
+ */
+ public Collection<EObject> getMessageAssociatedElements(Message msg) {
+ Collection<EObject> messageAssociatedElements = new LinkedHashSet<EObject>();
+ messageAssociatedElements.add(msg);
+ messageAssociatedElements.add(msg.getSendEvent());
+ messageAssociatedElements.add(msg.getReceiveEvent());
+ messageAssociatedElements.add(((MessageOccurrenceSpecification) msg.getSendEvent()).getCovered());
+ messageAssociatedElements.add(((DestructionOccurrenceSpecification) msg.getReceiveEvent()).getCovered());
+ return messageAssociatedElements;
+ }
+
+ /**
+ * Delete message.
+ *
+ * @param message
+ * Message to delete
+ */
+ public void delete(Message message) {
+ if (message == null) {
+ return;
+ }
+
+ // Get fragments
+ final Interaction interaction = (Interaction) message.eContainer();
+ final List<InteractionFragment> fragments = interaction.getFragments();
+
+ // Delete start and finish message and if an execution is associated to
+ // the message remove also the
+ // execution
+ final MessageOccurrenceSpecification receiveMessage = (MessageOccurrenceSpecification) message
+ .getReceiveEvent();
+ if (receiveMessage != null) {
+ // If message is a synchronous message delete also the reply message
+// if (MessageSort.SYNCH_CALL_LITERAL.equals(message.getMessageSort())) {
+// final Message reply = getReplyMessage(message);
+// if (reply != null) {
+// delete(reply);
+// }
+// }
+
+ final BehaviorExecutionSpecification execution = ExecutionService.getInstance().getExecution(receiveMessage);
+ if (execution != null) {
+ ExecutionService.getInstance().deleteExecution(execution);
+ }
+ fragments.remove(receiveMessage);
+ }
+ final MessageOccurrenceSpecification sendMessage = (MessageOccurrenceSpecification) message
+ .getSendEvent();
+ if (sendMessage != null) {
+ final BehaviorExecutionSpecification execution = ExecutionService.getInstance().getExecution(sendMessage);
+ if (execution != null) {
+ ExecutionService.getInstance().deleteExecution(execution);
+ }
+ // Delete signal
+ final List<PackageableElement> packagedElements = new ArrayList<PackageableElement>();
+ packagedElements.addAll(message.getNearestPackage().getPackagedElements());
+ for (final PackageableElement packageableElement : packagedElements) {
+ if (packageableElement instanceof Signal) {
+ final Signal signal = (Signal) packageableElement;
+ if (signal.getName().startsWith(message.getName())) {
+ signal.destroy();
+ }
+ }
+ }
+ fragments.remove(message.getSendEvent());
+ }
+ // Delete message
+ interaction.getMessages().remove(message);
+ }
+
+
+ /**
+ * Get the reply message associated to a message.
+ *
+ * @param message
+ * Message
+ * @return Reply message if exists otherwise null
+ */
+ public Message getReplyMessage(Message message) {
+ // To get the reply message associated to a message
+ // Get the execution associated to message if exists
+ final BehaviorExecutionSpecification execution = ExecutionService.getInstance().getExecution(message);
+ if (execution != null) {
+ // Get the end execution occurrence
+ final OccurrenceSpecification end = execution.getFinish();
+ if (end instanceof MessageOccurrenceSpecification) {
+ // Get the message
+ return ((MessageOccurrenceSpecification) end).getMessage();
+ }
+ }
+ // else in case of message without execution search by name
+ for (final Message messageReply : message.getInteraction().getMessages()) {
+ if (MessageSort.REPLY_LITERAL.equals(messageReply.getMessageSort())
+ && messageReply.getName().startsWith(message.getName())) {
+ return messageReply;
+ }
+ }
+ return null;
+ }
+
+
+
+
+
+ ////// private method
+
+ /**
+ * create a reply message for a synchronous message.
+ *
+ * @param interaction
+ * interaction.
+ * @param sourceFragment
+ * source
+ * @param targetFragment
+ * target
+ * @param startingEndPredecessor
+ * starting end predecessor
+ * @param finishingEndPredecessor
+ * finishing end predecessor
+ * @param message
+ * a synchronous message
+ * @return a reply message
+ */
+ private Message createReplyMessage(InteractionFragment interaction, NamedElement sourceFragment,
+ NamedElement targetFragment, EObject startingEndPredecessor, EObject finishingEndPredecessor,
+ Message message) {
+
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+
+ final Lifeline source = LifelineService.getInstance().getLifeline(sourceFragment);
+ final Lifeline target = LifelineService.getInstance().getLifeline(targetFragment);
+
+ // Create reply message
+ final Message replyMessage = factory.createMessage();
+ String replyName = "";
+ if (message == null) {
+ replyName = "Message_" + getMessages(interaction).size();
+ } else {
+ replyName = message.getName();
+ }
+ replyMessage.setName(replyName + "_reply"); //$NON-NLS-1$
+ replyMessage.setMessageSort(MessageSort.REPLY_LITERAL);
+ getMessages(interaction).add(replyMessage);
+
+ // Create reply message send event
+ final MessageOccurrenceSpecification senderEventReplyMessage = factory
+ .createMessageOccurrenceSpecification();
+ senderEventReplyMessage.setName(replyMessage.getName() + SENDER_MESSAGE_SUFFIX);
+ senderEventReplyMessage.getCovereds().add(target);
+ senderEventReplyMessage.setMessage(replyMessage);
+
+ // Create reply message receive event
+ final MessageOccurrenceSpecification receiverEventReplyMessage = factory
+ .createMessageOccurrenceSpecification();
+ receiverEventReplyMessage.setName(replyMessage.getName() + RECEIVER_MESSAGE_SUFFIX);
+ receiverEventReplyMessage.getCovereds().add(source);
+ receiverEventReplyMessage.setMessage(replyMessage);
+
+ replyMessage.setSendEvent(senderEventReplyMessage);
+ replyMessage.setReceiveEvent(receiverEventReplyMessage);
+
+ return replyMessage;
+ }
+
+ /**
+ * Replace by message occurrence.
+ *
+ * @param execOcc
+ * the exec occ
+ * @param enclosingFragments
+ * the enclosing fragments
+ * @param event
+ * the event
+ * @param execution
+ * the execution
+ */
+ private void replaceByMessageOccurrence(ExecutionOccurrenceSpecification execOcc, List<EObject> enclosingFragments, MessageOccurrenceSpecification event, ExecutionSpecification execution) {
+ if (execOcc.getName().endsWith("start")) {
+ int indexOfSource = enclosingFragments.indexOf(execOcc);
+ enclosingFragments.remove(execOcc);
+ enclosingFragments.add(indexOfSource, event);
+ execution.setStart(event);
+ execOcc.setCovered(null);
+ }
+ if (execOcc.getName().endsWith("finish")) {
+ int indexOfSource = enclosingFragments.indexOf(execOcc);
+ enclosingFragments.remove(execOcc);
+ enclosingFragments.add(indexOfSource, event);
+ execution.setFinish(event);
+ execOcc.setCovered(null);
+ }
+ }
+
+ /**
+ * Create asynchronous typed message.
+ *
+ * @param interaction
+ * Interaction
+ * @param sourceFragment
+ * Source
+ * @param targetFragment
+ * Target
+ * @param createExecution
+ * Set to true to create an execution
+ * @param startingEndPredecessor
+ * Starting end predecessor
+ * @param finishingEndPredecessor
+ * Finishing end predecessor
+ * @param operation
+ * Operation associated to message
+ * @return the message
+ */
+ private Message createAsynchronousMessage(InteractionFragment interaction, NamedElement sourceFragment,
+ NamedElement targetFragment, boolean createExecution, Element startingEndPredecessor,
+ Element finishingEndPredecessor, Operation operation) {
+ final Lifeline target = LifelineService.getInstance().getLifeline(targetFragment);
+
+ final BehaviorExecutionSpecification predecessorExecution = ExecutionService.getInstance().getExecution(
+ startingEndPredecessor);
+
+
+
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+ List<EObject> fragments = FragmentsService.getInstance().computeFragments(sourceFragment, startingEndPredecessor, interaction);
+
+ // Create message
+ final Message message = createAsynchronousMessage(interaction, createExecution, sourceFragment,
+ targetFragment, operation);
+
+ if (null != operation) {
+ message.setSignature(operation);
+ }
+
+ getMessages(interaction).add(message);
+
+ // Create execution or signal
+ BehaviorExecutionSpecification execution = null;
+ if (createExecution) {
+ execution = ExecutionService.getInstance().createExecution(/* operation, */target, message);
+ getBehaviors(interaction).add(execution.getBehavior());
+ } else {
+ final Signal signal = factory.createSignal();
+ signal.setName(message.getName() + SIGNAL_SUFFIX);
+ message.getNearestPackage().getPackagedElements().add(signal);
+ }
+
+
+
+ final MessageOccurrenceSpecification senderEventMessage = (MessageOccurrenceSpecification) message
+ .getSendEvent();
+ final MessageOccurrenceSpecification receiverEventMessage = (MessageOccurrenceSpecification) message
+ .getReceiveEvent();
+
+ ExecutionOccurrenceSpecification endExec = null;
+ if (execution != null) {
+ execution.setStart(receiverEventMessage);
+ endExec = factory.createExecutionOccurrenceSpecification();
+ endExec.setName(execution.getName() + ExecutionService.EXECUTION_END_SUFFIX);
+ endExec.getCovereds().add(target);
+ endExec.setExecution(execution);
+ execution.setFinish(endExec);
+ }
+
+ // If predecessor is the beginning of an execution add message after the
+ // execution
+ if (sourceFragment instanceof OccurrenceSpecification) {
+ // List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(sourceFragment);
+ MessageOccurrenceSpecification sendEvent = (MessageOccurrenceSpecification) message.getSendEvent();
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) sourceFragment).getExecution();
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) sourceFragment, fragments, sendEvent, sourceExecution);
+ } else {
+ if (startingEndPredecessor != null && startingEndPredecessor instanceof OccurrenceSpecification
+ && predecessorExecution != null
+ && startingEndPredecessor.equals(predecessorExecution.getStart())) {
+ fragments.add(fragments.indexOf(predecessorExecution) + 1, senderEventMessage);
+ }
+ // Else set it directly after the predecessor
+ else {
+ fragments.add(fragments.indexOf(startingEndPredecessor) + 1, senderEventMessage);
+ }
+ }
+
+ // fragments.add(receiverEventMessage);
+ if (targetFragment instanceof OccurrenceSpecification) {
+ // List<EObject> enclosingFragments = FragmentsService.getInstance().getEnclosingFragments(sourceFragment);
+ MessageOccurrenceSpecification receiveEvent = (MessageOccurrenceSpecification) message.getReceiveEvent();
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) sourceFragment).getExecution();
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) targetFragment, fragments, receiveEvent, sourceExecution);
+ } else {
+ fragments.add(fragments.indexOf(senderEventMessage) + 1, receiverEventMessage);
+ }
+ if (execution != null) {
+ // fragments.add(execution);
+ // fragments.add(endExec);
+ fragments.add(fragments.indexOf(receiverEventMessage) + 1, execution);
+ fragments.add(fragments.indexOf(execution) + 1, endExec);
+ }
+ FragmentsService.getInstance().updateFragmentList(startingEndPredecessor != null ? startingEndPredecessor : interaction, fragments);
+
+ return message;
+ }
+
+ /**
+ * Create synchronous typed message.
+ *
+ * @param interaction
+ * Interaction
+ * @param sourceFragment
+ * Source
+ * @param targetFragment
+ * Target
+ * @param createReply
+ * the create reply
+ * @param createExecution
+ * set to true to create an execution
+ * @param startingEndPredecessor
+ * Starting end predecessor
+ * @param finishingEndPredecessor
+ * Finishing end predecessor
+ * @param operation
+ * Operation associated with the message
+ */
+ private void createSynchronousMessage(InteractionFragment interaction, NamedElement sourceFragment,
+ NamedElement targetFragment, boolean createReply, boolean createExecution, Element startingEndPredecessor,
+ Element finishingEndPredecessor, Operation operation) {
+ final Lifeline target = LifelineService.getInstance().getLifeline(targetFragment);
+ final BehaviorExecutionSpecification predecessorExecution = ExecutionService.getInstance().getExecution(
+ startingEndPredecessor);
+
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+ List<EObject> fragments = FragmentsService.getInstance().computeFragments(sourceFragment, startingEndPredecessor, interaction);
+ final Message message = createSynchronousMessage(interaction, sourceFragment, targetFragment,
+ startingEndPredecessor, finishingEndPredecessor, operation);
+
+ getMessages(interaction).add(message);
+
+ if (null != operation) {
+ message.setSignature(operation);
+ }
+
+
+ ExecutionSpecification execution = targetFragment instanceof ExecutionSpecification ? (ExecutionSpecification) targetFragment : null;
+ Message replyMessage = null;
+ if (createReply) {
+
+
+ // Create behavior
+ // ExecutionSpecification execution = null;
+ if (createExecution) {
+ execution = ExecutionService.getInstance().createExecution(/* operation, */target, message);
+ getBehaviors(interaction).add(((BehaviorExecutionSpecification) execution).getBehavior());
+ } else {
+ // Create signal
+ final Signal signal = factory.createSignal();
+ signal.setName(message.getName() + SIGNAL_SUFFIX);
+ message.getNearestPackage().getPackagedElements().add(signal);
+ }
+ if (execution != null) {
+ execution.setStart((MessageOccurrenceSpecification) message.getReceiveEvent());
+ }
+
+ replyMessage = createReplyMessage(interaction, sourceFragment, targetFragment,
+ startingEndPredecessor, finishingEndPredecessor, message);
+ getMessages(interaction).add(replyMessage);
+
+ if (execution != null) {
+ execution.setFinish((MessageOccurrenceSpecification) replyMessage.getSendEvent());
+ }
+ }
+ // Add and order fragments under the interaction
+ // If predecessor is the beginning of an execution add message after the
+ // execution
+ if (sourceFragment instanceof OccurrenceSpecification) {
+ MessageOccurrenceSpecification sendEvent = (MessageOccurrenceSpecification) message.getSendEvent();
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) sourceFragment).getExecution();
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) sourceFragment, fragments, sendEvent, sourceExecution);
+ } else {
+ if (startingEndPredecessor != null && startingEndPredecessor instanceof OccurrenceSpecification
+ && predecessorExecution != null
+ && startingEndPredecessor.equals(predecessorExecution.getStart())) {
+ fragments.add(fragments.indexOf(predecessorExecution) + 1,
+ message.getSendEvent());
+ // Else set it directly after the predecessor
+ } else {
+ fragments.add(fragments.indexOf(startingEndPredecessor) + 1,
+ message.getSendEvent());
+ }
+ }
+ if (targetFragment instanceof OccurrenceSpecification) {
+ MessageOccurrenceSpecification receiveEvent = (MessageOccurrenceSpecification) message.getReceiveEvent();
+ ExecutionSpecification sourceExecution = ((ExecutionOccurrenceSpecification) sourceFragment).getExecution();
+ replaceByMessageOccurrence((ExecutionOccurrenceSpecification) targetFragment, fragments, receiveEvent, sourceExecution);
+ } else {
+ fragments.add(fragments.indexOf(message.getSendEvent()) + 1,
+ message.getReceiveEvent());
+ }
+ if (replyMessage != null) {
+ fragments.add(replyMessage.getSendEvent());
+ }
+ if (execution != null) {
+ if (fragments.contains(execution)) {
+ fragments.remove(execution);
+ fragments.add(fragments.indexOf(message.getReceiveEvent()) + 1, execution);
+ } else {
+ fragments.add(fragments.indexOf(message.getReceiveEvent()) + 1, execution);
+ }
+ if (replyMessage != null) {
+ fragments.remove(replyMessage.getSendEvent());
+ fragments.add(fragments.indexOf(execution) + 1,
+ replyMessage.getSendEvent());
+ }
+ } else {
+ {
+ fragments.remove(replyMessage.getSendEvent());
+ fragments.add(fragments.indexOf(message.getReceiveEvent()) + 1,
+ replyMessage.getSendEvent());
+ }
+ }
+ if (replyMessage != null) {
+ if (fragments.contains(
+ replyMessage.getReceiveEvent())) {
+ fragments.remove(replyMessage.getReceiveEvent());
+ fragments.add(fragments.indexOf(replyMessage.getSendEvent()) + 1,
+ replyMessage.getReceiveEvent());
+ } else {
+ fragments.add(fragments.indexOf(replyMessage.getSendEvent()) + 1,
+ replyMessage.getReceiveEvent());
+ }
+ }
+ FragmentsService.getInstance().updateFragmentList(startingEndPredecessor != null ? startingEndPredecessor : interaction, fragments);
+ }
+
+ /**
+ * Create synchronous typed message.
+ *
+ * @param interaction
+ * interaction
+ * @param sourceFragment
+ * source
+ * @param targetFragment
+ * target
+ * @param startingEndPredecessor
+ * starting end predecessor
+ * @param finishingEndPredecessor
+ * finishing end predecessor
+ * @param operation
+ * operation associated with the message
+ * @return a synchronous message
+ */
+ private Message createSynchronousMessage(InteractionFragment interaction, NamedElement sourceFragment,
+ NamedElement targetFragment, Element startingEndPredecessor, Element finishingEndPredecessor,
+ Operation operation) {
+
+ final UMLFactory factory = UMLFactory.eINSTANCE;
+
+ boolean createSourceMessOcc = !(sourceFragment instanceof Gate);
+ boolean createTargetMessOcc = !(targetFragment instanceof Gate);
+
+
+ final Lifeline source = LifelineService.getInstance().getLifeline(sourceFragment);
+ final Lifeline target = LifelineService.getInstance().getLifeline(targetFragment);
+
+ String messageName = ""; //$NON-NLS-1$
+ if (operation == null) {
+ messageName = "Message_" + getMessages(interaction).size(); //$NON-NLS-1$
+ } else {
+ messageName = operation.getName();
+ }
+
+ final Message message = factory.createMessage();
+ message.setName(messageName);
+ message.setMessageSort(MessageSort.SYNCH_CALL_LITERAL);
+
+ // Create message send event
+ if (createSourceMessOcc) {
+ final MessageOccurrenceSpecification senderEventMessage = factory
+ .createMessageOccurrenceSpecification();
+ senderEventMessage.setName(message.getName() + SENDER_MESSAGE_SUFFIX);
+ if (source != null) {
+ senderEventMessage.getCovereds().add(source);
+ }
+ senderEventMessage.setMessage(message);
+ message.setSendEvent(senderEventMessage);
+ } else {
+ message.setSendEvent((Gate) sourceFragment);
+ }
+ // Create message receive event
+ if (createTargetMessOcc) {
+ final MessageOccurrenceSpecification receiverEventMessage = factory
+ .createMessageOccurrenceSpecification();
+ receiverEventMessage.setName(message.getName() + RECEIVER_MESSAGE_SUFFIX);
+ if (target != null) {
+ receiverEventMessage.getCovereds().add(target);
+ }
+ receiverEventMessage.setMessage(message);
+ message.setReceiveEvent(receiverEventMessage);
+ } else {
+ message.setReceiveEvent((Gate) targetFragment);
+ }
+ return message;
+
+ }
+
+ /**
+ * Check if is covered type.
+ *
+ * @param element
+ * Execution specification
+ * @return True if is a covered type
+ */
+ private boolean isCoveredTypeSet(ExecutionSpecification element) {
+ if (element == null) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Checks if is valid message end for lifeline.
+ *
+ * @param preTarget
+ * the pre target
+ * @return true, if is valid message end for lifeline
+ */
+ private boolean isValidMessageEndForLifeline(EObject preTarget) {
+ return true;
+ }
+
+ /**
+ * Retrieves the context element ({@link Lifeline} or {@link ExecutionSpecification}) of the given
+ * {@link OccurrenceSpecification}.
+ *
+ * @param occurrenceSpecification
+ * the {@link OccurrenceSpecification} for which to find the context
+ * @return the {@link ExecutionSpecification} on which the given {@link OccurrenceSpecification} is
+ * attached or otherwise, the {@link Lifeline}otherwise it is attached to.
+ */
+ private NamedElement findOccurrenceSpecificationContext(OccurrenceSpecification occurrenceSpecification) {
+ if (occurrenceSpecification == null) {
+ return null;
+ }
+ EList<Lifeline> covereds = occurrenceSpecification.getCovereds();
+ if (covereds == null || covereds.isEmpty()) {
+ return null;
+ }
+ final Lifeline lifeline = covereds.get(0);
+ final Stack<NamedElement> context = new Stack<NamedElement>();
+ context.add(lifeline);
+
+ final List<EObject> allFragments = FragmentsService.getInstance().getEnclosingFragments(occurrenceSpecification);
+
+ final List<InteractionFragment> fragments = new ArrayList<InteractionFragment>();
+ for (final EObject fragment : allFragments) {
+ if (fragment instanceof InteractionFragment) {
+ if (((InteractionFragment) fragment).getCovered(lifeline.getName()) != null) {
+ fragments.add((InteractionFragment) fragment);
+ }
+ }
+ }
+
+ for (int i = 0; i < fragments.size(); i++) {
+ final InteractionFragment e = fragments.get(i);
+ InteractionFragment en;
+ if (i + 1 < fragments.size()) {
+ en = fragments.get(i + 1);
+ } else {
+ en = null;
+ }
+
+ if (e instanceof MessageOccurrenceSpecification && en != null
+ && en instanceof ExecutionSpecification) {
+ context.add(en);
+ }
+
+ if (e instanceof ExecutionOccurrenceSpecification) {
+ if (en == null || !(en instanceof ExecutionSpecification)) {
+ if (!context.isEmpty()) {
+ context.pop();
+ }
+ }
+ }
+
+ // Found our element
+ if (e == occurrenceSpecification) {
+ if (!context.isEmpty()) {
+ return context.peek();
+ }
+ }
+
+ if (e instanceof ExecutionOccurrenceSpecification) {
+ if (en != null && en instanceof ExecutionSpecification) {
+ context.add(fragments.get(i + 1));
+ }
+ }
+
+ if (e instanceof MessageOccurrenceSpecification && FragmentsService.getInstance().isEnd(e, fragments)) {
+ context.pop();
+ }
+ }
+
+ return lifeline;
+ }
+
+
+
+
+
+ /**
+ * Check is selection.
+ *
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean checkIsOccurenceSpecSelection(EObject sourceView, EObject targetView) {
+ if (sourceView instanceof DNodeSpec && targetView instanceof DNodeSpec) {
+ String nameSource = ((DNodeSpec) sourceView).getActualMapping().getName();
+ String nameTarget = ((DNodeSpec) targetView).getActualMapping().getName();
+ return nameSource.equalsIgnoreCase("Observation") && nameTarget.equals("Observation");
+ }
+
+
+ return false;
+ }
+
+
+ /**
+ * Check is gate selection.
+ *
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean checkIsGateSelection(EObject sourceView, EObject targetView) {
+
+ if (sourceView instanceof DNodeSpec && targetView instanceof DNodeSpec) {
+ String nameSource = ((DNodeSpec) sourceView).getActualMapping().getName();
+ String nameTarget = ((DNodeSpec) targetView).getActualMapping().getName();
+ boolean isGateSource = nameSource.equalsIgnoreCase("Gate") || nameSource.equalsIgnoreCase("GateBorder");
+ boolean isGateTarget = nameTarget.equalsIgnoreCase("Gate") || nameTarget.equalsIgnoreCase("GateBorder");
+ return isGateSource || isGateTarget;
+ }
+
+
+ return false;
+
+ }
+
+
+ /**
+ * Check is exection selection.
+ *
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean checkIsExecutionSelection(EObject sourceView, EObject targetView) {
+
+ return !checkIsGateSelection(sourceView, targetView) && !checkIsOccurenceSpecSelection(sourceView, targetView);
+ }
+
+
+
+
+ /**
+ * Pre condition message basic.
+ *
+ * @param object
+ * the object
+ * @return true, if successful
+ */
+ public boolean preConditionMessageBasic(EObject object) {
+ if (object instanceof Message) {
+ MessageSort messageSort = ((Message) object).getMessageSort();
+ MessageEnd sendEvent = ((Message) object).getSendEvent();
+ MessageEnd receiveEvent = ((Message) object).getReceiveEvent();
+
+ return (messageSort == MessageSort.SYNCH_CALL_LITERAL || messageSort == MessageSort.ASYNCH_CALL_LITERAL) && (receiveEvent instanceof MessageOccurrenceSpecification) && (sendEvent instanceof MessageOccurrenceSpecification);
+
+ }
+
+
+ return false;
+ }
+
+
+
+ /**
+ * Compute default name.
+ *
+ * @param element
+ * New element
+ * @return Name for the new element, he name will looks like
+ * 'ElementType'+total of existing elements of the same type.
+ */
+ private String computeDefaultName(final EObject element) {
+ return LabelServices.INSTANCE.computeDefaultName(element);
+ }
+
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ReorderService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ReorderService.java
new file mode 100755
index 0000000..4e0db7e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/ReorderService.java
@@ -0,0 +1,963 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.LabelServices;
+import org.eclipse.papyrus.uml.sirius.sequence.diagram.utils.ReorderSequenceRegistry;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.ordering.EventEnd;
+import org.eclipse.sirius.diagram.sequence.ordering.SingleEventEnd;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageSort;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.StateInvariant;
+
+/**
+ * The Class ReorderService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ * @author Aurélien Didier (Artal Technologies)
+ */
+public class ReorderService {
+
+ /** The fragment service. */
+ private final FragmentsService fragmentService = FragmentsService.getInstance();
+
+ /** The service. */
+ static private ReorderService service = null;
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private ReorderService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public ReorderService getInstance() {
+ if (service == null) {
+ service = new ReorderService();
+ }
+ return service;
+ }
+
+ /**
+ * Reorder new fragments.
+ *
+ * @param object the object
+ * @param startingEndPredecessor the starting end predecessor
+ * @param finishingEndPredecessor the finishing end predecessor
+ */
+ public void reorderNewFragments(EObject object, EObject startingEndPredecessor, EObject finishingEndPredecessor) {
+ if (object instanceof ExecutionSpecification) {
+ OccurrenceSpecification start = ((ExecutionSpecification) object).getStart();
+ OccurrenceSpecification finish = ((ExecutionSpecification) object).getFinish();
+ Interaction interaction = ((ExecutionSpecification) object).getEnclosingInteraction();
+ reorderNewFragments(interaction, (SingleEventEnd) startingEndPredecessor,
+ (SingleEventEnd) finishingEndPredecessor, (InteractionFragment) start, (InteractionFragment) finish,
+ object);
+ }
+
+ }
+
+ /**
+ * Reorder new fragments.
+ *
+ * @param object the object
+ * @param startingEndPredecessor the starting end predecessor
+ * @param finishingEndPredecessor the finishing end predecessor
+ * @param instance the instance
+ */
+ public void reorderNewFragments(EObject object, EObject startingEndPredecessor, EObject finishingEndPredecessor,
+ EObject instance) {
+ reorderNewFragments(object, (EventEnd) startingEndPredecessor, (EventEnd) finishingEndPredecessor, null, null,
+ instance);
+ }
+
+ /**
+ * Reorder new fragments.
+ *
+ * @param object the object
+ * @param startingEndPredecessor the starting end predecessor
+ * @param finishingEndPredecessor the finishing end predecessor
+ * @param start the start
+ * @param finish the finish
+ * @param instance the instance
+ */
+ public void reorderNewFragments(EObject object, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor,
+ EObject start, EObject finish, EObject instance) {
+ if (object instanceof Interaction) {
+
+ EObject startSemanticEnd = startingEndPredecessor != null ? startingEndPredecessor.getSemanticEnd() : null;
+ EObject finishSemanticEnd = finishingEndPredecessor != null ? finishingEndPredecessor.getSemanticEnd()
+ : null;
+
+ List<EObject> fragmentsource = fragmentService.getEnclosingFragments(instance);
+ List<EObject> fragments = null;
+ Interaction parentInteraction = null;
+ if (startSemanticEnd != null) {
+ fragments = fragmentService.getEnclosingFragments(startSemanticEnd);
+ } else {
+ parentInteraction = getParentInteraction(instance);
+ fragments = fragmentService.getFragmentsAndAnnotation(parentInteraction);
+ }
+ if (!fragmentsource.equals(fragments) && instance instanceof ExecutionSpecification) {
+ fragmentsource.remove(((ExecutionSpecification) instance).getStart());
+ fragmentsource.remove(instance);
+ fragmentsource.remove(((ExecutionSpecification) instance).getFinish());
+
+ fragments.add(((ExecutionSpecification) instance).getStart());
+ fragments.add(instance);
+ fragments.add(((ExecutionSpecification) instance).getFinish());
+ }
+
+ // add new Execution case
+ if ((startSemanticEnd == null && finishSemanticEnd == null)
+ || ((startSemanticEnd != null && finishSemanticEnd != null)
+ && (startSemanticEnd.equals(finishSemanticEnd)))) {
+ int indexOf = fragments.indexOf(startSemanticEnd);
+ if (indexOf < fragments.size()) {
+ int index = 0;
+ if (start != null) {
+ index++;
+ fragments.remove(start);
+ fragments.add(indexOf + index, start);
+ }
+ index++;
+ fragments.remove(instance);
+ fragments.add(indexOf + index, instance);
+ if (finish != null) {
+ index++;
+ fragments.remove(finish);
+ fragments.add(indexOf + index, finish);
+ }
+ } else {
+ if (start != null) {
+ fragments.remove(start);
+ }
+ fragments.remove(instance);
+ if (finish != null) {
+ fragments.remove(finish);
+ }
+ if (start != null) {
+ fragments.add(start);
+ }
+ fragments.add(instance);
+ if (finish != null) {
+ fragments.add(finish);
+ }
+ }
+ }
+ fragmentService.updateFragmentList(parentInteraction != null ? parentInteraction : startSemanticEnd,
+ fragments);
+ }
+
+ }
+
+ /**
+ * Reorder.
+ *
+ * @param associedElements the associed elements
+ * @param startingEndPredecessorAfterSemanticEnd the starting end predecessor
+ * after semantic end
+ * @param finishingEndPredecessorAfterSemanticEnd the finishing end predecessor
+ * after semantic end
+ */
+ public void reorder(List<Element> associedElements, EObject startingEndPredecessorAfterSemanticEnd,
+ EObject finishingEndPredecessorAfterSemanticEnd) {
+ Element element = associedElements.get(0);
+ Interaction interaction = null;
+ List<EObject> fragments = null;
+ if (element instanceof Message) {
+ interaction = ((Message) element).getInteraction();
+ fragments = fragmentService.computeFragments(((Message) element).getSendEvent(),
+ startingEndPredecessorAfterSemanticEnd, interaction);
+ }
+ if (element instanceof InteractionFragment) {
+ interaction = fragmentService.getParentInteraction((InteractionFragment) element);
+ fragments = fragmentService.computeFragments(element, startingEndPredecessorAfterSemanticEnd, interaction);
+ }
+
+ Map<Element, Integer> map = new HashMap<>();
+
+ for (Element associated : associedElements) {
+ if (associated instanceof ExecutionSpecification) {
+ OccurrenceSpecification start = ((ExecutionSpecification) associated).getStart();
+ OccurrenceSpecification finish = ((ExecutionSpecification) associated).getFinish();
+ map.put(start, fragments.indexOf(start));
+ map.put(associated, fragments.indexOf(associated));
+ map.put(finish, fragments.indexOf(finish));
+ }
+ }
+ List<Element> values = new ArrayList<Element>(map.keySet());
+ Collections.sort(values, new Comparator<Element>() {
+
+ @Override
+ public int compare(Element o1, Element o2) {
+ return map.get(o1).compareTo(map.get(o2));
+ }
+
+ });
+
+ int indexOfStart = fragments.indexOf(startingEndPredecessorAfterSemanticEnd);
+ for (Element element2 : values) {
+ int indexOf = fragments.indexOf(element2);
+ if (indexOf <= indexOfStart) {
+ indexOfStart--;
+ }
+ fragments.remove(element2);
+ }
+
+ fragments.addAll(indexOfStart + 1, values);
+
+ fragmentService.updateFragmentList(
+ startingEndPredecessorAfterSemanticEnd != null ? startingEndPredecessorAfterSemanticEnd : interaction,
+ fragments);
+ }
+
+ /**
+ * Reorder new combined fragment.
+ *
+ * @param object the object
+ * @param startingEndPredecessor the starting end predecessor
+ * @param finishingEndPredecessor the finishing end predecessor
+ * @param instance the instance
+ */
+ public void reorderNewCombinedFragment(EObject object, SingleEventEnd startingEndPredecessor,
+ SingleEventEnd finishingEndPredecessor, EObject instance/* , EObject ocStart, EObject oc */) {
+ if (object instanceof Interaction) {
+ Interaction interaction = (Interaction) object;
+ List<EObject> fragments = fragmentService.getFragmentsAndAnnotation(interaction);
+
+ EObject startSemanticEnd = startingEndPredecessor != null ? startingEndPredecessor.getSemanticEnd() : null;
+
+ // add new Execution case
+ int indexOf = fragments.indexOf(startSemanticEnd);
+ if (indexOf < fragments.size()) {
+ int index = 0;
+ index++;
+ fragments.remove(instance);
+ fragments.add(indexOf + index, instance);
+ } else {
+ fragments.remove(instance);
+ fragments.add(instance);
+ }
+ fragmentService.updateFragmentList(startSemanticEnd != null ? startSemanticEnd : interaction, fragments);
+ }
+
+ }
+
+ /**
+ *
+ * @param container the InstanceRole
+ * @param newLifeline the lifeline to create
+ * @param predecessor the lifeline that is right after the one we are adding
+ */
+ public void reorderNewLifeline(EObject self,EObject variable,Object op) {
+ if (self instanceof Interaction) {
+ final Interaction ownedInteraction = (Interaction) self;
+ final EList<Lifeline> lifelines = ownedInteraction.getLifelines();
+ if (op == null) {
+ lifelines.move(0, (Lifeline) variable);
+ } else {
+ int pos = lifelines.indexOf(op);
+ lifelines.move(pos + 1, (Lifeline) variable);
+ }
+ }
+ }
+
+ /**
+ *
+ * @param container the InstanceRole
+ * @param newLifeline the lifeline to create
+ * @param predecessor the lifeline that is right after the one we are adding
+ */
+ public void reorderNewLifeline(EObject self,Lifeline variable,Object op) {
+ if (op instanceof Lifeline) {
+ if (self instanceof Interaction) {
+ final Interaction ownedInteraction = (Interaction) self;
+ final EList<Lifeline> lifelines = ownedInteraction.getLifelines();
+ if (op == null) {
+ lifelines.add(0, (Lifeline) variable);
+ } else {
+ int pos = lifelines.indexOf(op);
+ lifelines.add(pos + 1, (Lifeline) variable);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Reorder lifeline horizontally.
+ *
+ * @param movedLifeline moved lifeline
+ * @param predecessorBefore lifeline predecessor before
+ * @param predecessorAfter lifeline predecessor after
+ */
+ public void reorderLifeline(Lifeline movedLifeline, Lifeline predecessorBefore, Lifeline predecessorAfter) {
+ final Interaction ownedInteraction = movedLifeline.getInteraction();
+ final EList<Lifeline> lifelines = ownedInteraction.getLifelines();
+ final int movedLifelineIndex = lifelines.indexOf(movedLifeline);
+ if (predecessorAfter != null) {
+ final int predecessorAfterIndex = lifelines.indexOf(predecessorAfter);
+ if (movedLifelineIndex > predecessorAfterIndex) {
+ // Moved from the right to the left
+ lifelines.move(predecessorAfterIndex + 1, movedLifeline);
+ return;
+ }
+ if (movedLifelineIndex < predecessorAfterIndex) {
+ // Moved from the left to the right
+ lifelines.move(predecessorAfterIndex, movedLifeline);
+ return;
+ }
+ } else {
+ // moved at the beginning
+ lifelines.move(0, movedLifeline);
+ }
+ }
+
+ /**
+ * Reorder fragment.
+ *
+ * @param fragment Fragment
+ * @param startingEndPredecessorAfter Starting end predecessor after reorder
+ * @param finishingEndPredecessorAfter Finishing end predecessor after reorder
+ */
+ public void reorderFragment(Element fragment, EventEnd startingEndPredecessorAfter,
+ EventEnd finishingEndPredecessorAfter) {
+
+ final EObject startingEndPredecessorAfterSemanticEnd = startingEndPredecessorAfter == null ? null
+ : (EObject) startingEndPredecessorAfter.getSemanticEnd();
+ final EObject finishingEndPredecessorAfterSemanticEnd = finishingEndPredecessorAfter == null ? null
+ : (EObject) finishingEndPredecessorAfter.getSemanticEnd();
+ if (fragment instanceof CombinedFragment) {
+ reorder((CombinedFragment) fragment, startingEndPredecessorAfterSemanticEnd,
+ finishingEndPredecessorAfterSemanticEnd);
+ } else if (fragment instanceof ExecutionSpecification) {
+ reorder((ExecutionSpecification) fragment, startingEndPredecessorAfterSemanticEnd,
+ finishingEndPredecessorAfterSemanticEnd);
+ } else if (fragment instanceof Message) {
+ reorder((Message) fragment, startingEndPredecessorAfterSemanticEnd,
+ finishingEndPredecessorAfterSemanticEnd);
+ } else if (fragment instanceof StateInvariant) {
+ reorder((StateInvariant) fragment, startingEndPredecessorAfterSemanticEnd,
+ finishingEndPredecessorAfterSemanticEnd);
+ }
+ }
+
+ ///////// Reorder private method
+
+ /**
+ * Reconnect.
+ *
+ * @param context the context
+ * @param edgeView the edge view
+ * @param source the source
+ * @param view the view
+ */
+ public void connectToEvent(EObject context, EObject edgeView, EObject source, EObject view) {
+
+ if (view instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) view).getTarget();
+ if (target instanceof ExecutionOccurrenceSpecification) {
+ if (context instanceof Message) {
+ MessageEnd receiveEvent = ((Message) context).getReceiveEvent();
+ ExecutionSpecification execution = ((ExecutionOccurrenceSpecification) target).getExecution();
+ if (execution.getStart().equals(target)) {
+ execution.setStart((OccurrenceSpecification) receiveEvent);
+ }
+ if (execution.getFinish().equals(target)) {
+ execution.setFinish((OccurrenceSpecification) receiveEvent);
+ }
+ InteractionFragment enclosingFragment = fragmentService.getEnclosingFragment(execution);
+ if (enclosingFragment instanceof Interaction) {
+ ((Interaction) enclosingFragment).getFragments().remove(target);
+ }
+ if (enclosingFragment instanceof InteractionOperand) {
+ ((InteractionOperand) enclosingFragment).getFragments().remove(target);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Reorder combined fragment.
+ *
+ * @param combinedFragment Moved combined fragment
+ * @param startingEndPredecessorAfter Fragment preceding moved combined
+ * fragment start before the beginning of
+ * reorder operation
+ * @param finishingEndPredecessorAfter Fragment preceding moved combined
+ * fragment finish before the beginning of
+ * reorder operation
+ */
+ private void reorder(CombinedFragment combinedFragment, EObject startingEndPredecessorAfter,
+ EObject finishingEndPredecessorAfter) {
+
+ final Interaction interaction = combinedFragment.getEnclosingInteraction();
+ final List<EObject> fragments = fragmentService.getFragmentsAndAnnotation(interaction);
+
+ final boolean combinedFragmentStartPredecessorChanged = combinedFragmentStartPredecessorChanged(
+ combinedFragment, startingEndPredecessorAfter);
+
+ if (combinedFragmentStartPredecessorChanged) {
+ EAnnotation startOc = null;
+ EAnnotation endOc = null;
+ for (EObject interactionFragment : fragments) {
+ if (interactionFragment instanceof EAnnotation) {
+ if (((EAnnotation) interactionFragment).getSource().equals(combinedFragment.getName() + "_start")) {
+ startOc = (EAnnotation) interactionFragment;
+ }
+ if (((EAnnotation) interactionFragment).getSource().equals(combinedFragment.getName() + "_end")) {
+ endOc = (EAnnotation) interactionFragment;
+ }
+ }
+ }
+
+ fragments.remove(combinedFragment);
+ fragments.remove(startOc);
+ fragments.remove(endOc);
+ if (isStartOfExecution(startingEndPredecessorAfter, fragments)) {
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 2, startOc);
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 3,
+ combinedFragment);
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 4, endOc);
+ } else {
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 1, startOc);
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 2,
+ combinedFragment);
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 3, endOc);
+ }
+ }
+ fragmentService.updateFragmentList(interaction, fragments);
+ }
+
+ /**
+ * Reorder.
+ *
+ * @param combinedFragment the combined fragment
+ * @param startingEndPredecessorAfter the starting end predecessor after
+ * @param finishingEndPredecessorAfter the finishing end predecessor after
+ */
+ private void reorder(StateInvariant combinedFragment, EObject startingEndPredecessorAfter,
+ EObject finishingEndPredecessorAfter) {
+
+ final Interaction interaction = combinedFragment.getEnclosingInteraction();
+ final List<EObject> fragments = fragmentService.getFragmentsAndAnnotation(interaction);
+
+ final boolean combinedFragmentStartPredecessorChanged = stateInvariantStartPredecessorChanged(combinedFragment,
+ startingEndPredecessorAfter);
+
+ if (combinedFragmentStartPredecessorChanged) {
+ fragments.remove(combinedFragment);
+ if (isStartOfExecution(startingEndPredecessorAfter, fragments)) {
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 2,
+ combinedFragment);
+ } else {
+ fragments.add(fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments) + 1,
+ combinedFragment);
+ }
+ }
+ fragmentService.updateFragmentList(interaction, fragments);
+ }
+
+ /**
+ * Reorder execution.
+ *
+ * @param execution Moved execution
+ * @param startingEndPredecessorAfter Fragment preceding moved execution start
+ * before the beginning of reorder operation
+ * @param finishingEndPredecessorAfter Fragment preceding moved execution finish
+ * before the beginning of reorder operation
+ */
+ private void reorder(ExecutionSpecification execution, EObject startingEndPredecessorAfter,
+ EObject finishingEndPredecessorAfter) {
+ Interaction parentInteraction = fragmentService.getParentInteraction(execution);
+ List<EObject> fragments = fragmentService.computeFragments(execution, startingEndPredecessorAfter,
+ parentInteraction);
+
+ final boolean executionFinishPredecessorChanged = executionFinishPredecessorChanged(execution,
+ finishingEndPredecessorAfter);
+ final boolean executionStartPredecessorChanged = executionStartPredecessorChanged(execution,
+ startingEndPredecessorAfter);
+
+ OccurrenceSpecification start = execution.getStart();
+ OccurrenceSpecification finish = execution.getFinish();
+
+ if (executionStartPredecessorChanged) {
+ if (start instanceof MessageOccurrenceSpecification) {
+ List<EObject> fragmentsource = FragmentsService.getInstance().getEnclosingFragments(execution);
+ replaceMessageOccByExecOcc(parentInteraction, fragmentsource, start, true);
+ start = execution.getStart();
+ }
+ fragments.remove(start);
+ fragments.remove(execution);
+ // manage start execution moving
+ if (ReorderSequenceRegistry.getInstance().containsKey(startingEndPredecessorAfter)) {
+ startingEndPredecessorAfter = ReorderSequenceRegistry.getInstance().get(startingEndPredecessorAfter);
+ }
+ addFragments(startingEndPredecessorAfter, fragments, start);
+
+ // manage execution moving
+ fragments.add(fragmentService.getFragmentIndex(start, fragments) + 1, execution);
+
+ }
+ if (executionFinishPredecessorChanged) {
+ if (finish instanceof MessageOccurrenceSpecification) {
+ List<EObject> fragmentsource = FragmentsService.getInstance().getEnclosingFragments(execution);
+ replaceMessageOccByExecOcc(parentInteraction, fragmentsource, finish, false);
+ finish = execution.getFinish();
+ }
+ fragments.remove(finish);
+ // manage finish execution moving
+ if (ReorderSequenceRegistry.getInstance().containsKey(finishingEndPredecessorAfter)) {
+ finishingEndPredecessorAfter = ReorderSequenceRegistry.getInstance().get(finishingEndPredecessorAfter);
+ }
+ addFragments(finishingEndPredecessorAfter, fragments, finish);
+
+ }
+ fragmentService.updateFragmentList(
+ startingEndPredecessorAfter != null ? startingEndPredecessorAfter : parentInteraction, fragments);
+ }
+
+ /**
+ * Replace message occ by exec occ.
+ *
+ * @param parentInteraction the parent interaction
+ * @param fragments the fragments
+ * @param occ the occ
+ * @param isStart the is start
+ */
+ private void replaceMessageOccByExecOcc(Interaction parentInteraction, List<EObject> fragments,
+ OccurrenceSpecification occ, boolean isStart) {
+ // 1. get the opposite messageOcc
+ // MessageOccurrenceSpecification oppStart =
+ // getMessageOccOpposite((MessageOccurrenceSpecification) occ);
+ // 1.1 check if opposite mesageOcc is linked at Execution
+ ExecutionSpecification assExec = getExecutionFromMessageOccurence((MessageOccurrenceSpecification) occ);
+
+ if (assExec != null) {
+ // 1.2 create the ExectionOcc
+ boolean isStartOcc = assExec.getStart().equals(occ);
+ ExecutionOccurrenceSpecification newExecOcc = ExecutionService.getInstance()
+ .createExecutionOccurrenceSpecification(assExec, isStartOcc);
+ ReorderSequenceRegistry.getInstance().put(occ, newExecOcc);
+ parentInteraction.getFragments().add(newExecOcc);
+ newExecOcc.setName(computeDefaultName(newExecOcc));
+ parentInteraction.getFragments().remove(newExecOcc);
+ // 1.3 replace the opposite message occ by the ExecutionOcc
+ if (isStartOcc) {
+ assExec.setStart(newExecOcc);
+
+ } else {
+ assExec.setFinish(newExecOcc);
+ }
+ newExecOcc.setExecution(assExec);
+ int indexOfExec = fragments.indexOf(assExec);
+ if (isStartOcc) {
+ fragments.add(indexOfExec, newExecOcc);
+ } else {
+ if (indexOfExec >= fragments.size() - 1) {
+ fragments.add(newExecOcc);
+ } else {
+ fragments.add(indexOfExec + 1, newExecOcc);
+ }
+ }
+ }
+ }
+
+ /**
+ * Adds the fragments.
+ *
+ * @param endPredecessorAfter the end predecessor after
+ * @param fragments the fragments
+ * @param occ the occ
+ */
+ private void addFragments(EObject endPredecessorAfter, List<EObject> fragments, OccurrenceSpecification occ) {
+ if (isStartOfExecution(endPredecessorAfter, fragments)) {
+ fragments.add(fragmentService.getFragmentIndex(endPredecessorAfter, fragments) + 2, occ);
+ } else {
+ fragments.add(endPredecessorAfter == null ? 0
+ : fragmentService.getFragmentIndex(endPredecessorAfter, fragments) + 1, occ);
+ }
+ }
+
+ /**
+ * Reorder message.
+ *
+ * @param message Moved message
+ * @param startingEndPredecessorAfter Fragment preceding moved execution start
+ * before the beginning of reorder operation
+ * @param finishingEndPredecessorAfter Fragment preceding moved execution finish
+ * before the beginning of reorder operation
+ */
+ private void reorder(Message message, EObject startingEndPredecessorAfter, EObject finishingEndPredecessorAfter) {
+ if (isMoveAuthorized(message)) {
+ final Interaction interaction = message.getInteraction();
+
+ MessageEnd sendEvent = message.getSendEvent();
+ MessageEnd receiveEvent = message.getReceiveEvent();
+
+ final List<EObject> fragments = fragmentService.computeFragments(sendEvent, startingEndPredecessorAfter,
+ interaction);
+
+ final boolean messageStartPredecessorChanged = messageStartPredecessorChanged(message,
+ startingEndPredecessorAfter);
+
+ if (ReorderSequenceRegistry.getInstance().containsKey(sendEvent)) {
+ ExecutionOccurrenceSpecification execOcc1 = (ExecutionOccurrenceSpecification) ReorderSequenceRegistry
+ .getInstance().get(sendEvent);
+ fragments.remove(sendEvent);
+ replaceExecByMessage(sendEvent, fragments, execOcc1);
+
+ if (ReorderSequenceRegistry.getInstance().containsKey(receiveEvent)) {
+ ExecutionOccurrenceSpecification execOcc2 = (ExecutionOccurrenceSpecification) ReorderSequenceRegistry
+ .getInstance().get(receiveEvent);
+ replaceExecByMessage(receiveEvent, fragments, execOcc2);
+ } else {
+
+ ExecutionSpecification executionFromMessageOccurence = getExecutionFromMessageOccurence(
+ (MessageOccurrenceSpecification) receiveEvent);
+ if (executionFromMessageOccurence != null) {
+ boolean isStart = executionFromMessageOccurence.getStart().equals(receiveEvent);
+ replaceMessageOccByExecOcc(interaction, fragments,
+ (MessageOccurrenceSpecification) receiveEvent, isStart);
+ int indexOfSendEvent = fragments.indexOf(sendEvent);
+ fragments.remove(receiveEvent);
+ if (indexOfSendEvent >= fragments.size() - 1) {
+ fragments.add(receiveEvent);
+ } else {
+ fragments.add(indexOfSendEvent + 1, receiveEvent);
+ }
+ }
+
+ }
+
+ } else if (ReorderSequenceRegistry.getInstance().containsKey(receiveEvent)) {
+ ExecutionOccurrenceSpecification execOcc1 = (ExecutionOccurrenceSpecification) ReorderSequenceRegistry
+ .getInstance().get(receiveEvent);
+ fragments.remove(receiveEvent);
+ replaceExecByMessage(receiveEvent, fragments, execOcc1);
+
+ ExecutionSpecification executionFromMessageOccurence = getExecutionFromMessageOccurence(
+ (MessageOccurrenceSpecification) sendEvent);
+ if (executionFromMessageOccurence != null) {
+ boolean isStart = executionFromMessageOccurence.getStart().equals(sendEvent);
+ replaceMessageOccByExecOcc(interaction, fragments, (MessageOccurrenceSpecification) sendEvent,
+ isStart);
+ int indexOfSendEvent = fragments.indexOf(receiveEvent);
+ fragments.remove(sendEvent);
+ if (indexOfSendEvent >= fragments.size() - 1) {
+ fragments.add(sendEvent);
+ } else {
+ fragments.add(indexOfSendEvent, sendEvent);
+ }
+ }
+
+ }
+
+ else {
+ if (messageStartPredecessorChanged) {
+ boolean startOfExecution = isStartOfExecution(startingEndPredecessorAfter, fragments);
+ int fragmentIndex = fragmentService.getFragmentIndex(startingEndPredecessorAfter, fragments);
+ int indexOfSend = fragments.indexOf(sendEvent);
+ if (indexOfSend <= fragmentIndex) {
+ fragmentIndex--;
+ }
+ fragments.remove(sendEvent);
+ int indexOfReceive = fragments.indexOf(receiveEvent);
+ if (indexOfReceive <= fragmentIndex) {
+ fragmentIndex--;
+ }
+ fragments.remove(receiveEvent);
+
+ if (startOfExecution) {
+ fragments.add(fragmentIndex + 2, sendEvent);
+ } else {
+ fragments.add(fragmentIndex + 1, sendEvent);
+ }
+
+ fragments.add(fragmentService.getFragmentIndex(sendEvent, fragments) + 1, receiveEvent);
+ }
+ }
+
+ // Move reply for synchronous message
+ if (message.getMessageSort().equals(MessageSort.SYNCH_CALL_LITERAL)) {
+ final Message replyMessage = MessageService.getInstance().getReplyMessage(message);
+ if (replyMessage != null) {
+ fragments.remove(replyMessage.getSendEvent());
+ fragments.remove(replyMessage.getReceiveEvent());
+
+ if (isStartOfExecution(receiveEvent, fragments)) {
+ fragments.add(fragmentService.getFragmentIndex(receiveEvent, fragments) + 2,
+ replyMessage.getSendEvent());
+ } else {
+ fragments.add(fragmentService.getFragmentIndex(receiveEvent, fragments) + 1,
+ replyMessage.getSendEvent());
+ }
+
+ fragments.add(fragmentService.getFragmentIndex(replyMessage.getSendEvent(), fragments) + 1,
+ replyMessage.getReceiveEvent());
+ }
+ }
+ fragmentService.updateFragmentList(
+ startingEndPredecessorAfter != null ? startingEndPredecessorAfter : interaction, fragments);
+ }
+
+ }
+
+ /**
+ * Replace exec by message.
+ *
+ * @param sendEvent the send event
+ * @param fragments the fragments
+ * @param execOcc1 the exec occ 1
+ */
+ public void replaceExecByMessage(MessageEnd sendEvent, final List<EObject> fragments,
+ ExecutionOccurrenceSpecification execOcc1) {
+ int indexOfExec1 = fragments.indexOf(execOcc1);
+ ExecutionSpecification execution1 = execOcc1.getExecution();
+ if (execution1.getStart().equals(execOcc1)) {
+ execution1.setStart((OccurrenceSpecification) sendEvent);
+ } else {
+ execution1.setFinish((OccurrenceSpecification) sendEvent);
+ }
+ fragments.remove(execOcc1);
+ fragments.add(indexOfExec1, sendEvent);
+ }
+
+ /**
+ * Replace exec by message.
+ *
+ * @param sendEvent the send event
+ * @param fragments the fragments
+ * @param execOcc1 the exec occ 1
+ */
+
+ public void replaceExecByMessage(MessageEnd sendEvent, final EList<InteractionFragment> fragments,
+ ExecutionOccurrenceSpecification execOcc1) {
+ int indexOfExec1 = fragments.indexOf(execOcc1);
+ ExecutionSpecification execution1 = execOcc1.getExecution();
+ if (execution1.getStart().equals(execOcc1)) {
+ execution1.setStart((OccurrenceSpecification) sendEvent);
+ } else {
+ execution1.setFinish((OccurrenceSpecification) sendEvent);
+ }
+ fragments.remove(execOcc1);
+ fragments.add(indexOfExec1, (MessageOccurrenceSpecification) sendEvent);
+ }
+
+ /**
+ * Gets the parent interaction.
+ *
+ * @param fragment the fragment
+ * @return the parent interaction
+ */
+ private Interaction getParentInteraction(EObject fragment) {
+ if (fragment instanceof InteractionFragment) {
+ return fragmentService.getParentInteraction((InteractionFragment) fragment);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the execution from message occurence.
+ *
+ * @param messageOcc the message occ
+ * @return the execution from message occurence
+ */
+ public ExecutionSpecification getExecutionFromMessageOccurence(MessageOccurrenceSpecification messageOcc) {
+
+ List<EObject> enclosingFragments = fragmentService.getEnclosingFragments(messageOcc);
+ for (EObject eEObject : enclosingFragments) {
+ if (eEObject instanceof ExecutionSpecification) {
+ if (((ExecutionSpecification) eEObject).getStart().equals(messageOcc)
+ || ((ExecutionSpecification) eEObject).getFinish().equals(messageOcc)) {
+ return (ExecutionSpecification) eEObject;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Checks if is start of execution.
+ *
+ * @param startingEndPredecessorAfter the starting end predecessor after
+ * @param fragments the fragments
+ * @return true, if is start of execution
+ */
+ public boolean isStartOfExecution(EObject startingEndPredecessorAfter, List<EObject> fragments) {
+
+ if (startingEndPredecessorAfter instanceof ExecutionOccurrenceSpecification) {
+ final ExecutionOccurrenceSpecification executionStart = (ExecutionOccurrenceSpecification) startingEndPredecessorAfter;
+ if (executionStart.getExecution().getStart().equals(executionStart)) {
+ return true;
+ }
+ }
+
+ if (startingEndPredecessorAfter instanceof MessageOccurrenceSpecification) {
+ if (fragments.indexOf(startingEndPredecessorAfter) + 1 < fragments.size()) {
+ final EObject candidate = fragments.get(fragments.indexOf(startingEndPredecessorAfter) + 1);
+ if (candidate instanceof ExecutionSpecification) {
+ final ExecutionSpecification behaviorExecution = (ExecutionSpecification) candidate;
+ if (behaviorExecution.getStart().equals(startingEndPredecessorAfter)) {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if is move authorized.
+ *
+ * @param message the message
+ * @return true, if is move authorized
+ */
+ private boolean isMoveAuthorized(Message message) {
+ if (message.getMessageSort().equals(MessageSort.REPLY_LITERAL)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Combined fragment start predecessor changed.
+ *
+ * @param combinedFragment the combined fragment
+ * @param startingEndPredecessorAfter the starting end predecessor after
+ * @return true, if successful
+ */
+ private boolean combinedFragmentStartPredecessorChanged(CombinedFragment combinedFragment,
+ EObject startingEndPredecessorAfter) {
+ final Interaction interaction = combinedFragment.getEnclosingInteraction();
+ final List<EObject> fragments = fragmentService.getFragmentsAndAnnotation(interaction);
+ final EObject initialPredecessor = fragments.get(fragments.indexOf(combinedFragment) - 1);
+
+ return !initialPredecessor.equals(startingEndPredecessorAfter);
+ }
+
+ /**
+ * State invariant start predecessor changed.
+ *
+ * @param stateInvariant the state invariant
+ * @param startingEndPredecessorAfter the starting end predecessor after
+ * @return true, if successful
+ */
+ private boolean stateInvariantStartPredecessorChanged(StateInvariant stateInvariant,
+ EObject startingEndPredecessorAfter) {
+ final Interaction interaction = stateInvariant.getEnclosingInteraction();
+ final List<EObject> fragments = fragmentService.getFragmentsAndAnnotation(interaction);
+ int indexOf = fragments.indexOf(stateInvariant);
+ if (indexOf == 0) {
+ return true;
+ }
+ final EObject initialPredecessor = fragments.get(indexOf - 1);
+
+ return !initialPredecessor.equals(startingEndPredecessorAfter);
+ }
+
+ /**
+ * Execution start predecessor changed.
+ *
+ * @param execution the execution
+ * @param startingEndPredecessorAfter the starting end predecessor after
+ * @return true, if successful
+ */
+ private boolean executionStartPredecessorChanged(ExecutionSpecification execution,
+ EObject startingEndPredecessorAfter) {
+ return true;
+ }
+
+ /**
+ * Execution finish predecessor changed.
+ *
+ * @param execution the execution
+ * @param finishingEndPredecessorAfter the finishing end predecessor after
+ * @return true, if successful
+ */
+ private boolean executionFinishPredecessorChanged(ExecutionSpecification execution,
+ EObject finishingEndPredecessorAfter) {
+ final List<EObject> fragments = fragmentService.getEnclosingFragments(execution);
+ int index = fragments.indexOf(execution.getFinish());
+ if (index == 0) {
+ return false;
+ }
+ final EObject initialPredecessor = fragments.get(index - 1);
+
+ return !initialPredecessor.equals(finishingEndPredecessorAfter);
+ }
+
+ /**
+ * Message start predecessor changed.
+ *
+ * @param message the message
+ * @param startingEndPredecessorAfter the starting end predecessor after
+ * @return true, if successful
+ */
+ private boolean messageStartPredecessorChanged(Message message, EObject startingEndPredecessorAfter) {
+ final InteractionFragment interaction = fragmentService.getEnclosingFragment(message.getSendEvent());
+ final List<EObject> fragments = fragmentService.getFragmentsAndAnnotation(interaction);
+ int index = fragments.indexOf(message.getSendEvent()) - 1;
+ if (index == -1) {
+ return true;
+ }
+ final EObject initialPredecessor = fragments.get(index);
+
+ return !initialPredecessor.equals(startingEndPredecessorAfter);
+
+ }
+
+ /**
+ * Compute default name.
+ *
+ * @param element New element
+ * @return Name for the new element, he name will looks like 'ElementType'+total
+ * of existing elements of the same type.
+ */
+ private String computeDefaultName(final EObject element) {
+ return LabelServices.INSTANCE.computeDefaultName(element);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/SequenceDiagramServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/SequenceDiagramServices.java
new file mode 100755
index 0000000..a7bfd41
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/SequenceDiagramServices.java
@@ -0,0 +1,1088 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.AbstractDiagramServices;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.LabelServices;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.description.style.Side;
+import org.eclipse.sirius.diagram.sequence.ordering.EventEnd;
+import org.eclipse.sirius.diagram.sequence.ordering.SingleEventEnd;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusGMFHelper;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.DurationObservation;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.GeneralOrdering;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageSort;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.TimeConstraint;
+import org.eclipse.uml2.uml.TimeObservation;
+
+/**
+ * A set of services to handle the Sequence diagram.
+ *
+ * @author Melanie Bats <a href="mailto:melanie.bats@obeo.fr">melanie.bats@obeo.fr</a>
+ */
+public class SequenceDiagramServices extends AbstractDiagramServices {
+
+
+ /** The comment service. */
+ private CommentService commentService = CommentService.getInstance();
+
+ /** The constraint service. */
+ private ConstraintService constraintService = ConstraintService.getInstance();
+
+ /** The execution service. */
+ private ExecutionService executionService = ExecutionService.getInstance();
+
+ /** The combined fragment operand service. */
+ private CombinedAndOperandService combinedFragmentOperandService = CombinedAndOperandService.getInstance();
+
+ /** The reorder service. */
+ private ReorderService reorderService = ReorderService.getInstance();
+
+ /** The message service. */
+ private MessageService messageService = MessageService.getInstance();
+
+ /** The lifeline service. */
+ private LifelineService lifelineService = LifelineService.getInstance();
+ /** The time observation constraint service. */
+ private TimeObservationConstraintService timeObservationConstraintService = TimeObservationConstraintService.getInstance();
+ /** The fragments service. */
+ private FragmentsService fragmentsService = FragmentsService.getInstance();
+
+
+ /** The is break. */
+ private static boolean isBreak = false;
+
+
+ /////////////////////// METHODE CALL FROM ODESIGN///////////////////////////
+
+
+ // -------- FRAGMENTS MANAGEMENT
+
+
+
+ /**
+ * Gets the finish.
+ *
+ * @param o
+ * the o
+ * @return the finish
+ */
+ public EObject getFinish(EObject o) {
+ return fragmentsService.getFinish(o);
+ }
+
+
+ /**
+ * Gets the start.
+ *
+ * @param o
+ * the o
+ * @return the start
+ */
+ public EObject getStart(EObject o) {
+ return fragmentsService.getStart(o);
+ }
+
+ /**
+ * Make union.
+ *
+ * @param context
+ * the context
+ * @return the list
+ */
+ public List<InteractionFragment> makeUnion(EObject context) {
+ return fragmentsService.makeUnion(context);
+ }
+
+
+
+ /**
+ * Eol precondition.
+ *
+ * @param p
+ * the p
+ * @return true, if successful
+ */
+ public boolean eolPrecondition(Lifeline p) {
+ return fragmentsService.eolPrecondition(p);
+ }
+
+ /**
+ * Gets the fragments ordering ends.
+ *
+ * @param object
+ * the object
+ * @return the fragments ordering ends
+ */
+ public List<EObject> getFragmentsOrderingEnds(EObject object) {
+ return fragmentsService.getFragmentsOrderingEnds(object);
+ }
+
+
+
+ // ------------ MANAGEMENT DIAGRAM FEATURE
+ /**
+ * Get sequence diagram label.
+ *
+ * @param interaction
+ * Interaction associated to sequence diagram
+ * @return SEquence diagram label
+ */
+ public String getSequenceDiagramName(Interaction interaction) {
+ return LabelServices.INSTANCE.getSequenceDiagramName(interaction);
+ }
+
+ /**
+ * Compute semantic elements.
+ *
+ * @param exec
+ * the exec
+ * @return the collection
+ */
+ public Collection<EObject> computeSemanticElements(ExecutionSpecification exec) {
+ return new LinkedHashSet<EObject>(Arrays.asList(exec, exec.getStart(), exec.getFinish(), exec.getCovereds().get(0)));
+ }
+
+
+ // -------- MANAGEMENT TIME, OBSERVATION AND CONSTRAINTE
+
+
+ /**
+ * Gets the time constraint.
+ *
+ * @param context
+ * the context
+ * @return the time constraint
+ */
+ public List<InteractionFragment> getTimeConstraint(EObject context) {
+ return timeObservationConstraintService.getTimeConstraint(context);
+ }
+
+
+
+ /**
+ * Gets the side.
+ *
+ * @param context
+ * the context
+ * @return the side
+ */
+ public List<Side> getSide(EObject context) {
+ return timeObservationConstraintService.getSide(context);
+ }
+
+
+
+ /**
+ * Creates the general ordering.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @return the general ordering
+ */
+ public GeneralOrdering createGeneralOrdering(EObject context, EObject sourceVariable, EObject targetVariable) {
+ return GeneralOrderingService.getInstance().createGeneralOrdering(context, sourceVariable, targetVariable);
+ }
+
+
+
+ /**
+ * Creates the duration observation.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @return the duration observation
+ */
+ public DurationObservation createDurationObservation(EObject context, EObject sourceVariable, EObject targetVariable) {
+ return timeObservationConstraintService.createDurationObservation(context, sourceVariable, targetVariable);
+ }
+
+
+
+ /**
+ * Creates the duration constraint.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @return the duration constraint
+ */
+ public DurationConstraint createDurationConstraint(EObject context, EObject sourceVariable, EObject targetVariable) {
+
+ return timeObservationConstraintService.createDurationConstraint(context, sourceVariable, targetVariable);
+ }
+
+
+
+
+
+ /**
+ * Gets the all duration observation.
+ *
+ * @param context
+ * the context
+ * @return the all duration observation
+ */
+ public List<DurationObservation> getAllDurationObservation(EObject context) {
+ return timeObservationConstraintService.getAllDurationObservation(context);
+ }
+
+
+ /**
+ * Gets the time constraints.
+ *
+ * @param context
+ * the context
+ * @return the time constraints
+ */
+ public List<TimeConstraint> getTimeConstraints(EObject context) {
+ return timeObservationConstraintService.getTimeConstraints(context);
+ }
+
+
+ /**
+ * Checks if is constrained time.
+ *
+ * @param context the context
+ * @return true, if is constrained time
+ */
+ public boolean isConstrainedTime(EObject context) {
+ return constraintService.isConstrainedTime(context);
+ }
+
+
+
+ /**
+ * Gets the time observations.
+ *
+ * @param context
+ * the context
+ * @return the time observations
+ */
+ public List<TimeObservation> getTimeObservations(EObject context) {
+ return timeObservationConstraintService.getTimeObservations(context);
+ }
+
+
+ /**
+ * Gets the source constrained element.
+ *
+ * @param context
+ * the context
+ * @return the source constrained element
+ */
+ public EObject getSourceConstrainedElement(EObject context) {
+ return constraintService.getSourceConstrainedElement(context);
+ }
+
+ /**
+ * Gets the target constrained element.
+ *
+ * @param context
+ * the context
+ * @return the target constrained element
+ */
+ public EObject getTargetConstrainedElement(EObject context) {
+ return constraintService.getTargetConstrainedElement(context);
+ }
+
+
+ /**
+ * Gets the source constrained element.
+ *
+ * @param context
+ * the context
+ * @return the source constrained element
+ */
+ public EObject getSourceObservation(EObject context) {
+ return constraintService.getSourceObservation(context);
+ }
+
+ /**
+ * Gets the target constrained element.
+ *
+ * @param context
+ * the context
+ * @return the target constrained element
+ */
+ public EObject getTargetObservation(EObject context) {
+ return constraintService.getTargetObservation(context);
+ }
+
+
+ // ------------------- MANGEMENT LIFELINE
+
+
+ /**
+ * Compute lifeline comment label.
+ *
+ * @param lifeline
+ * Lifeline
+ * @return LAbel
+ */
+ public String computeLifelineCommentLabel(Lifeline lifeline) {
+ return lifelineService.computeLifelineCommentLabel(lifeline);
+ }
+
+ /**
+ * Check if lifeline is representing a property.
+ *
+ * @param element
+ * Lifeline
+ * @return True iflifeline is representing a property
+ */
+ public boolean isRepresentingProperty(Lifeline element) {
+ return lifelineService.isRepresentingProperty(element);
+ }
+
+ /**
+ * Delete lifeline.
+ *
+ * @param lifeline
+ * Lifeline to delete
+ */
+ public void delete(Lifeline lifeline) {
+ lifelineService.delete(lifeline);
+ }
+
+
+
+ // --------------- MANAGE MESSAGE
+
+
+
+ /**
+ * Checks if is break.
+ *
+ * @param context
+ * the context
+ * @return true, if is break
+ */
+ public boolean isNotBreak(EObject context) {
+ return !isBreak;
+ }
+
+ /**
+ * Inits the break.
+ *
+ * @param context
+ * the context
+ */
+ public void initBreak(EObject context) {
+ isBreak = false;
+ }
+
+ /**
+ * Check is selection.
+ *
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean checkIsOccurenceSpecSelection(EObject sourceView, EObject targetView) {
+ boolean checkIsOccurenceSpecSelection = messageService.checkIsOccurenceSpecSelection(sourceView, targetView);
+ if (checkIsOccurenceSpecSelection) {
+ isBreak = true;
+ }
+ return checkIsOccurenceSpecSelection;
+ }
+
+
+ /**
+ * Check is gate selection.
+ *
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean checkIsGateSelection(EObject sourceView, EObject targetView) {
+ boolean checkIsGateSelection = messageService.checkIsGateSelection(sourceView, targetView);
+ if (checkIsGateSelection) {
+ isBreak = true;
+ }
+ return checkIsGateSelection;
+ }
+
+
+
+
+
+ /**
+ * Check is exection selection.
+ *
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean checkIsExecutionSelection(EObject sourceView, EObject targetView) {
+ boolean checkIsExecutionSelection = messageService.checkIsExecutionSelection(sourceView, targetView);
+ if (checkIsExecutionSelection) {
+ isBreak = true;
+ }
+ return checkIsExecutionSelection;
+ }
+
+
+ /**
+ * Delete message.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @return the message
+ */
+ public Message foundMessage(EObject context, EObject sourceVariable) {
+ return messageService.foundMessage(context, sourceVariable);
+ }
+
+
+ /**
+ * Delete message.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @return the message
+ */
+ public Message lostMessage(EObject context, EObject sourceVariable) {
+ return messageService.lostMessage(context, sourceVariable);
+ }
+
+ /**
+ * Gets the lost receive annotation.
+ *
+ * @param context
+ * the context
+ * @return the lost receive annotation
+ */
+ public EObject getLostReceiveAnnotation(EObject context) {
+
+ return messageService.getLostReceiveAnnotation(context);
+ }
+
+
+ /**
+ * Checks if is lost found target valid.
+ *
+ * @param context
+ * the context
+ * @return true, if is lost found target valid
+ */
+ public boolean isLostFoundTargetValid(EObject context) {
+ return messageService.isLostFoundTargetValid(context);
+ }
+
+
+ /**
+ * Creates the reply message.
+ *
+ * @param context
+ * the context
+ * @param sourceFragment
+ * the source fragment
+ * @param targetFragment
+ * the target fragment
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ */
+ public void createReplyMessage(EObject context, NamedElement sourceFragment,
+ NamedElement targetFragment, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ messageService.createReplyMessage(context, sourceFragment, targetFragment, startingEndPredecessor, finishingEndPredecessor);
+ }
+
+
+
+ /**
+ * Create Delete message.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @return the message
+ */
+ public Message deleteMessage(EObject context, EObject sourceVariable, Lifeline targetVariable, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ return messageService.deleteMessage(context, sourceVariable, targetVariable, startingEndPredecessor, finishingEndPredecessor);
+ }
+
+ /**
+ * Creates the message.
+ *
+ * @param context
+ * the context
+ * @param sourceV
+ * the source V
+ * @param targetV
+ * the target V
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @return the message
+ */
+ public Message createMessage(EObject context, EObject sourceV, Lifeline targetV, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ return messageService.createMessage(context, sourceV, targetV, startingEndPredecessor, finishingEndPredecessor);
+ }
+
+ /**
+ * Creates the message.
+ *
+ * @param target
+ * the target
+ * @param source
+ * the source
+ * @return the message
+ */
+ public Message createMessage(Lifeline target, EObject source) {
+ return messageService.createMessage(source, target);
+ }
+
+
+ /**
+ * Creates the synchronous message.
+ *
+ * @param target
+ * the target
+ * @param source
+ * the source
+ */
+ public void createSynchronousMessage(NamedElement target, NamedElement source) {
+ messageService.createSynchronousMessage(target, source);
+ }
+
+ /**
+ * Creates the A synchronous message.
+ *
+ * @param target
+ * the target
+ * @param source
+ * the source
+ */
+ public void createASynchronousMessage(NamedElement target, NamedElement source) {
+ messageService.createASynchronousMessage(target, source);
+ }
+
+
+
+ /**
+ * Create an operation and an asynchronous message from a lifeline or an execution. Create the operation
+ * in the class and the asynchronous message in the interaction.
+ *
+ * @param target
+ * Target message element, it could be a lifeline or an execution
+ * @param source
+ * Source message element, it could be a lifeline or an execution
+ * @param startingEndPredecessor
+ * Start predecessor
+ * @param finishingEndPredecessor
+ * Finish predecessor
+ */
+ public void createOperationAndAsynchMessage(NamedElement target, NamedElement source,
+ EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ messageService.createOperationAndAsynchMessage(target, source, startingEndPredecessor, finishingEndPredecessor);
+ }
+
+
+
+ /**
+ * Create an operation and an synchronous message from a lifeline or an execution. Create the operation in
+ * the class and the synchronous message in the interaction.
+ *
+ * @param target
+ * Target message element, it could be a lifeline or an execution
+ * @param source
+ * Source message element, it could be a lifeline or an execution
+ * @param startingEndPredecessor
+ * Start predecessor
+ * @param finishingEndPredecessor
+ * Finish predecessor
+ */
+ public void createOperationAndSynchMessage(NamedElement target, NamedElement source,
+ EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ messageService.createOperationAndSynchMessage(target, source, startingEndPredecessor, finishingEndPredecessor);
+ }
+
+
+
+
+ /**
+ * Check if element is a valid message end.
+ *
+ * @param element
+ * Element
+ * @return True if element is a valid message end
+ */
+ public boolean isValidMessageEnd(Element element) {
+ return messageService.isValidMessageEnd(element);
+ }
+
+ /**
+ * Check if element is a valid message end.
+ *
+ * @param preTarget
+ * Element
+ * @return True if element is a valid message end
+ */
+ public boolean isValidMessageEnd(EObject preTarget) {
+ return messageService.isValidMessageEnd(preTarget);
+ }
+
+
+
+
+
+ /**
+ * Check if message is not a reply message.
+ *
+ * @param message
+ * Message
+ * @return True if message is not a reply message
+ */
+ public boolean isNotReply(Message message) {
+ return messageService.isNotReply(message);
+ }
+
+ /**
+ * Check if message is a reply message.
+ *
+ * @param message
+ * Message
+ * @return True if message is a reply message
+ */
+ public boolean isReply(Message message) {
+ return messageService.isReply(message);
+ }
+
+ /**
+ * Find occurrence specification context for a receive event.
+ *
+ * @param message
+ * Message
+ * @return Occurrence specification context
+ */
+ public NamedElement findOccurrenceSpecificationContextForReceiveEvent(Message message) {
+ return messageService.findOccurrenceSpecificationContextForReceiveEvent(message);
+ }
+
+
+ /**
+ * Find occurrence specification context for a send event.
+ *
+ * @param message
+ * Message
+ * @return Occurrence specification context
+ */
+ public NamedElement findOccurrenceSpecificationContextForSendEvent(Message message) {
+ return messageService.findOccurrenceSpecificationContextForSendEvent(message);
+ }
+
+ /**
+ * Check if message is a synchronous call.
+ *
+ * @param message
+ * Message
+ * @return True if message is a synchronous call
+ */
+ public boolean isSynchCall(Message message) {
+ return messageService.isSynchCall(message);
+ }
+
+ /**
+ * Gets the invocation message.
+ *
+ * @param object
+ * the object
+ * @return the invocation message
+ */
+ public Message getInvocationMessage(EObject object) {
+ return messageService.getInvocationMessage(object);
+ }
+
+ /**
+ * Gets the message associated elements.
+ *
+ * @param msg
+ * the msg
+ * @return the message associated elements
+ */
+ public Collection<EObject> getMessageAssociatedElements(Message msg) {
+ return messageService.getMessageAssociatedElements(msg);
+ }
+
+ /**
+ * Delete message.
+ *
+ * @param message
+ * Message to delete
+ */
+ public void delete(Message message) {
+ messageService.delete(message);
+ }
+
+ /**
+ * Pre condition message basic.
+ *
+ * @param object
+ * the object
+ * @return true, if successful
+ */
+ public boolean preConditionMessageBasic(EObject object) {
+ return messageService.preConditionMessageBasic(object);
+ }
+
+ /**
+ * Pre condition message basic.
+ *
+ * @param object
+ * the object
+ * @return true, if successful
+ */
+ public boolean preConditionNotMessageBasic(EObject object) {
+ if (object instanceof Message) {
+ if (((Message) object).getMessageSort() == MessageSort.CREATE_MESSAGE_LITERAL || ((Message) object).getMessageSort() == MessageSort.DELETE_MESSAGE_LITERAL || ((Message) object).getMessageSort() == MessageSort.REPLY_LITERAL) {
+ return false;
+ }
+ }
+ return !messageService.preConditionMessageBasic(object);
+ }
+
+
+ // ---------------------- REORDER MANAGEMENT
+
+
+ /**
+ * Reorder new fragments.
+ *
+ * @param object
+ * the object
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ */
+ public void reorderNewFragments(EObject object, EObject startingEndPredecessor, EObject finishingEndPredecessor) {
+ reorderService.reorderNewFragments(object, startingEndPredecessor, finishingEndPredecessor);
+
+
+ }
+
+ /**
+ * Reorder new lifeline.
+ *
+ * @param object
+ * the object
+ * @param newInstance
+ * the newInstance to create
+ * @param predecessor
+ * the lifeline predecessor
+ */
+ public void reorderNewLifeline(EObject container, EObject newInstance, EObject predecessor) {
+ reorderService.reorderNewLifeline(container, newInstance, predecessor);
+ }
+
+ /**
+ * Reorder new fragments.
+ *
+ * @param object
+ * the object
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @param instance
+ * the instance
+ */
+ public void reorderNewFragments(EObject object, EObject startingEndPredecessor, EObject finishingEndPredecessor, EObject instance) {
+ reorderService.reorderNewFragments(object, startingEndPredecessor, finishingEndPredecessor, instance);
+ }
+
+ /**
+ * Reorder new fragments.
+ *
+ * @param object
+ * the object
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @param start
+ * the start
+ * @param finish
+ * the finish
+ * @param instance
+ * the instance
+ */
+ public void reorderNewFragments(EObject object, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor, EObject start, EObject finish, EObject instance) {
+ reorderService.reorderNewFragments(object, startingEndPredecessor, finishingEndPredecessor, start, finish, instance);
+ }
+
+
+ /**
+ * Reorder new combined fragment.
+ *
+ * @param object
+ * the object
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ * @param instance
+ * the instance
+ */
+ public void reorderNewCombinedFragment(EObject object, SingleEventEnd startingEndPredecessor, SingleEventEnd finishingEndPredecessor, EObject instance/* , EObject ocStart, EObject oc */) {
+ reorderService.reorderNewCombinedFragment(object, startingEndPredecessor, finishingEndPredecessor, instance);
+ }
+
+
+ /**
+ * Reorder lifeline horizontally.
+ *
+ * @param movedLifeline
+ * moved lifeline
+ * @param predecessorBefore
+ * lifeline predecessor before
+ * @param predecessorAfter
+ * lifeline predecessor after
+ */
+ public void reorderLifeline(Lifeline movedLifeline, Lifeline predecessorBefore,
+ Lifeline predecessorAfter) {
+ reorderService.reorderLifeline(movedLifeline, predecessorBefore, predecessorAfter);
+ }
+
+
+ /**
+ * Reorder fragment.
+ *
+ * @param fragment
+ * Fragment
+ * @param startingEndPredecessorAfter
+ * Starting end predecessor after reorder
+ * @param finishingEndPredecessorAfter
+ * Finishing end predecessor after reorder
+ */
+ public void reorderFragment(Element fragment, EventEnd startingEndPredecessorAfter,
+ EventEnd finishingEndPredecessorAfter) {
+ reorderService.reorderFragment(fragment, startingEndPredecessorAfter, finishingEndPredecessorAfter);
+ }
+
+
+ /**
+ * Gets the predecessor.
+ *
+ * @param context
+ * the context
+ * @return the predecessor
+ */
+ public EObject getPredecessor(EObject context) {
+ return null;
+ }
+
+
+ /**
+ * Reconnect.
+ *
+ * @param context the context
+ * @param edgeView the edge view
+ * @param source the source
+ * @param view the view
+ */
+ public void connectToEvent(EObject context, EObject edgeView, EObject source, EObject view) {
+ View gmfView = SiriusGMFHelper.getGmfView((DNode) view);
+ reorderService.connectToEvent(context, edgeView, source, view);
+ }
+
+
+ // ----------- COMBINEDFRAGMENT MANAGEMENT
+
+ /**
+ * Gets the enclosing fragment.
+ *
+ * @param fragment the fragment
+ * @return the enclosing fragment
+ */
+ public InteractionFragment getEnclosingFragment(EObject fragment) {
+ return fragmentsService.getEnclosingFragment(fragment);
+ }
+
+ /**
+ * Delete combined fragment.
+ *
+ * @param combinedFragment
+ * the combined fragment
+ */
+ public void deleteCombinedFragment(CombinedFragment combinedFragment) {
+ combinedFragmentOperandService.deleteCombinedFragment(combinedFragment);
+ }
+
+
+ /**
+ * Creates the E annotations.
+ *
+ * @param context
+ * the context
+ */
+ public void createEAnnotations(EObject context) {
+ combinedFragmentOperandService.createEAnnotations(context);
+ }
+
+ /**
+ * Manage operand fragment.
+ *
+ * @param context
+ * the context
+ * @param startingEndPredecessor
+ * the starting end predecessor
+ * @param finishingEndPredecessor
+ * the finishing end predecessor
+ */
+ public void manageOperandFragment(EObject context, EventEnd startingEndPredecessor, EventEnd finishingEndPredecessor) {
+ combinedFragmentOperandService.manageOperandFragment(context, startingEndPredecessor, finishingEndPredecessor);
+ }
+
+
+ // ---------- EXECUTION MANAGEMENT
+
+
+ /**
+ * Gets the execution specifications.
+ *
+ * @param object
+ * the object
+ * @return the execution specifications
+ */
+ public List<ExecutionSpecification> getExecutionSpecifications(EObject object) {
+ return executionService.getExecutionSpecifications(object);
+ }
+
+
+
+
+ /**
+ * Delete execution.
+ *
+ * @param execution
+ * Execution to delete
+ */
+ public void deleteExecution(ExecutionSpecification execution) {
+ executionService.deleteExecution(execution);
+ }
+
+ /**
+ * Apply execution.
+ *
+ * @param context
+ * the context
+ * @param exe
+ * the exe
+ * @param start
+ * the start
+ * @param finish
+ * the finish
+ */
+ public void applyExecution(EObject context, ExecutionSpecification exe, ExecutionOccurrenceSpecification start, ExecutionOccurrenceSpecification finish) {
+ executionService.applyExecution(context, exe, start, finish);
+ }
+
+
+
+ /**
+ * Target finder expression.
+ *
+ * @param object
+ * the object
+ * @return the list
+ */
+ // -------------CONSTRAINT AND COMMENT SERVICE
+ public List<?> targetFinderExpression(EObject object) {
+ if (object instanceof Comment) {
+ return commentService.targeFinderExpressionForComment((Comment) object);
+ }
+ if (object instanceof Constraint) {
+ return constraintService.targeFinderExpressionForConstraint((Constraint) object);
+ }
+ return null;
+
+ }
+
+
+ /**
+ * Gets the constraint label.
+ *
+ * @param object
+ * the object
+ * @return the constraint label
+ */
+ public String getConstraintLabel(EObject object) {
+ return constraintService.getConstraintLabel(object);
+ }
+
+
+ /**
+ * Log.
+ *
+ * @param container
+ * the container
+ * @return true, if successful
+ */
+ public boolean log(EObject container) {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/TimeObservationConstraintService.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/TimeObservationConstraintService.java
new file mode 100755
index 0000000..32abab3
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/services/TimeObservationConstraintService.java
@@ -0,0 +1,364 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.services;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.sirius.common.diagram.core.services.LabelServices;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.description.style.Side;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Duration;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.DurationInterval;
+import org.eclipse.uml2.uml.DurationObservation;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.TimeConstraint;
+import org.eclipse.uml2.uml.TimeObservation;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * The Class TimeObservationConstraintService.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class TimeObservationConstraintService {
+
+ /** The service. */
+ static private TimeObservationConstraintService service = null;
+
+
+ /**
+ * Instantiates a new fragments service.
+ */
+ private TimeObservationConstraintService() {
+
+ }
+
+ /**
+ * Gets the single instance of FragmentsService.
+ *
+ * @return single instance of FragmentsService
+ */
+ static public TimeObservationConstraintService getInstance() {
+ if (service == null) {
+ service = new TimeObservationConstraintService();
+ }
+ return service;
+ }
+
+
+
+
+ /**
+ * Gets the time constraint.
+ *
+ * @param context
+ * the context
+ * @return the time constraint
+ */
+ public List<InteractionFragment> getTimeConstraint(EObject context) {
+ List<InteractionFragment> results = new ArrayList<>();
+ if (context instanceof Interaction) {
+ Interaction interaction = (Interaction) context;
+ EList<Constraint> ownedRules = interaction.getOwnedRules();
+ for (Constraint constraint : ownedRules) {
+ if (constraint instanceof TimeConstraint) {
+ EList<Element> constrainedElements = constraint.getConstrainedElements();
+ for (Element element : constrainedElements) {
+ if (element instanceof ExecutionOccurrenceSpecification) {
+ results.add((ExecutionOccurrenceSpecification) element);
+ }
+ }
+ }
+ }
+ }
+ if (context instanceof TimeConstraint) {
+ EList<Element> constrainedElements = ((TimeConstraint) context).getConstrainedElements();
+ for (Element element : constrainedElements) {
+ if (element instanceof ExecutionOccurrenceSpecification) {
+ results.add((ExecutionOccurrenceSpecification) element);
+ }
+ }
+ }
+
+ return results;
+
+ }
+
+
+
+ /**
+ * Gets the side.
+ *
+ * @param context
+ * the context
+ * @return the side
+ */
+ public List<Side> getSide(EObject context) {
+ List<Side> results = new ArrayList<>();
+ results.add(Side.EAST);
+ results.add(Side.WEST);
+ if (context instanceof TimeConstraint) {
+ EList<Element> constrainedElements = ((TimeConstraint) context).getConstrainedElements();
+ for (Element element : constrainedElements) {
+ if (element instanceof OccurrenceSpecification) {
+ if (!ReorderService.getInstance().isStartOfExecution(element, FragmentsService.getInstance().getEnclosingFragments(element))) {
+ results.add(Side.NORTH);
+ return results;
+ }
+ else {
+ results.add(Side.SOUTH);
+ return results;
+ }
+ }
+ }
+ }
+ if (context instanceof TimeObservation) {
+ NamedElement event = ((TimeObservation) context).getEvent();
+ if (!ReorderService.getInstance().isStartOfExecution(event, FragmentsService.getInstance().getEnclosingFragments(event))) {
+ results.add(Side.NORTH);
+ return results;
+ }
+ else {
+ results.add(Side.SOUTH);
+ return results;
+ }
+ }
+ return null;
+ }
+
+
+
+
+
+ /**
+ * Creates the duration observation.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @return the duration observation
+ */
+ public DurationObservation createDurationObservation(EObject context, EObject sourceVariable, EObject targetVariable) {
+ if (context instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) context).getTarget();
+ if (target instanceof ExecutionSpecification) {
+ InteractionFragment interaction = /* ((ExecutionSpecification) target).getEnclosingInteraction() */FragmentsService.getInstance().getEnclosingFragment(target);
+
+ DurationObservation durationObservation = UMLFactory.eINSTANCE.createDurationObservation();
+ interaction.getModel().getPackagedElements().add(durationObservation);
+ durationObservation.setName(computeDefaultName(durationObservation));
+
+
+ durationObservation.getEvents().add(((ExecutionSpecification) sourceVariable).getFinish());
+ durationObservation.getEvents().add(((ExecutionSpecification) targetVariable).getStart());
+
+ return durationObservation;
+ }
+ }
+ return null;
+ }
+
+
+
+ /**
+ * Creates the duration constraint.
+ *
+ * @param context
+ * the context
+ * @param sourceVariable
+ * the source variable
+ * @param targetVariable
+ * the target variable
+ * @return the duration constraint
+ */
+ public DurationConstraint createDurationConstraint(EObject context, EObject sourceVariable, EObject targetVariable) {
+ if (context instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) context).getTarget();
+ if (target instanceof ExecutionSpecification) {
+ InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(target);
+
+ DurationConstraint durationConstraint = UMLFactory.eINSTANCE.createDurationConstraint();
+ getRules(interaction).add(durationConstraint);
+ durationConstraint.setName(computeDefaultName(durationConstraint));
+
+ DurationInterval durationInterval = UMLFactory.eINSTANCE.createDurationInterval();
+ durationConstraint.setSpecification(durationInterval);
+ durationInterval.setName(computeDefaultName(durationInterval));
+
+ Duration min = UMLFactory.eINSTANCE.createDuration();
+ interaction.getModel().getPackagedElements().add(min);
+ durationInterval.setMin(min);
+ min.setName(computeDefaultName(min));
+
+ LiteralInteger minInteger = UMLFactory.eINSTANCE.createLiteralInteger();
+ min.setExpr(minInteger);
+
+ Duration max = UMLFactory.eINSTANCE.createDuration();
+ interaction.getModel().getPackagedElements().add(max);
+ durationInterval.setMax(max);
+ max.setName(computeDefaultName(max));
+
+ LiteralInteger maxInteger = UMLFactory.eINSTANCE.createLiteralInteger();
+ max.setExpr(maxInteger);
+
+ durationConstraint.getConstrainedElements().add(((ExecutionSpecification) sourceVariable).getFinish());
+ durationConstraint.getConstrainedElements().add(((ExecutionSpecification) targetVariable).getStart());
+
+ return durationConstraint;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the all duration observation.
+ *
+ * @param context
+ * the context
+ * @return the all duration observation
+ */
+ public List<DurationObservation> getAllDurationObservation(EObject context) {
+ List<DurationObservation> results = new ArrayList<>();
+ if (context instanceof Interaction) {
+ List<DurationObservation> collect = ((Interaction) context).getModel().getPackagedElements().stream().filter(e -> e instanceof DurationObservation).map(e -> (DurationObservation) e).collect(Collectors.toList());
+ results.addAll(collect);
+ EList<InteractionFragment> fragments = ((Interaction) context).getFragments();
+ for (InteractionFragment interactionFragment : fragments) {
+ if (interactionFragment instanceof CombinedFragment) {
+ results.addAll(getAllDurationObservation(interactionFragment));
+ }
+ }
+ }
+
+
+ return results;
+
+ }
+
+
+ /**
+ * Gets the time constraints.
+ *
+ * @param context
+ * the context
+ * @return the time constraints
+ */
+ public List<TimeConstraint> getTimeConstraints(EObject context) {
+ List<TimeConstraint> results = new ArrayList<>();
+ if (context instanceof ExecutionSpecification) {
+ OccurrenceSpecification start = ((ExecutionSpecification) context).getStart();
+ OccurrenceSpecification finish = ((ExecutionSpecification) context).getFinish();
+ InteractionFragment interaction = FragmentsService.getInstance().getEnclosingFragment(context);
+ EList<Constraint> ownedRules = null;
+ if (interaction instanceof Interaction) {
+ ownedRules = ((Interaction) interaction).getOwnedRules();
+ }
+ if (interaction instanceof InteractionOperand) {
+ ownedRules = ((InteractionOperand) interaction).getOwnedRules();
+ }
+ for (Constraint constraint : ownedRules) {
+ if (constraint instanceof TimeConstraint) {
+ EList<Element> constrainedElements = constraint.getConstrainedElements();
+ for (Element element : constrainedElements) {
+ if (element.equals(start) || element.equals(finish)) {
+ results.add((TimeConstraint) constraint);
+ }
+ }
+ }
+ }
+
+ }
+ return results;
+ }
+
+
+ /**
+ * Gets the time observations.
+ *
+ * @param context
+ * the context
+ * @return the time observations
+ */
+ public List<TimeObservation> getTimeObservations(EObject context) {
+ List<TimeObservation> results = new ArrayList<>();
+ if (context instanceof ExecutionSpecification) {
+ OccurrenceSpecification start = ((ExecutionSpecification) context).getStart();
+ OccurrenceSpecification finish = ((ExecutionSpecification) context).getFinish();
+
+ Model model = ((ExecutionSpecification) context).getModel();
+ EList<PackageableElement> packagedElements = model.getPackagedElements();
+ for (PackageableElement packageableElement : packagedElements) {
+ if (packageableElement instanceof TimeObservation) {
+ if (((TimeObservation) packageableElement).getEvent().equals(start) || ((TimeObservation) packageableElement).getEvent().equals(finish)) {
+ results.add((TimeObservation) packageableElement);
+ }
+ }
+ }
+ }
+
+ return results;
+ }
+
+ ///// private methode
+
+ /**
+ * Gets the rules.
+ *
+ * @param interaction
+ * the interaction
+ * @return the rules
+ */
+ private List<Constraint> getRules(InteractionFragment interaction) {
+ if (interaction instanceof InteractionOperand) {
+ return FragmentsService.getInstance().getParentInteraction(interaction).getOwnedRules();
+ }
+ if (interaction instanceof Interaction) {
+ return ((Interaction) interaction).getOwnedRules();
+ }
+ return null;
+ }
+
+ /**
+ * Compute default name.
+ *
+ * @param element
+ * New element
+ * @return Name for the new element, he name will looks like
+ * 'ElementType'+total of existing elements of the same type.
+ */
+ private String computeDefaultName(final EObject element) {
+ return LabelServices.INSTANCE.computeDefaultName(element);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/utils/ReorderSequenceRegistry.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/utils/ReorderSequenceRegistry.java
new file mode 100755
index 0000000..34ead92
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.sequence.diagram/src/org/eclipse/papyrus/uml/sirius/sequence/diagram/utils/ReorderSequenceRegistry.java
@@ -0,0 +1,124 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.sequence.diagram.utils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * The Class ReorderSequenceRegistry.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+/**
+ * The Class ReorderSequenceRegistry.
+ */
+public class ReorderSequenceRegistry {
+
+ /** The instance. */
+ static private ReorderSequenceRegistry instance;
+
+ /**
+ * Instantiates a new reorder sequence registry.
+ */
+ private ReorderSequenceRegistry() {
+
+ }
+
+ /**
+ * Gets the single instance of ReorderSequenceRegistry.
+ *
+ * @return single instance of ReorderSequenceRegistry
+ */
+ static public ReorderSequenceRegistry getInstance() {
+ if (instance == null) {
+ instance = new ReorderSequenceRegistry();
+ }
+ return instance;
+ }
+
+
+ /** The registry. */
+ static Map<EObject, EObject> registry = new HashMap<>();
+
+
+
+
+ /**
+ * Clear.
+ */
+ public void clear() {
+ registry.clear();
+ }
+
+ /**
+ * Put.
+ *
+ * @param key
+ * the key
+ * @param value
+ * the value
+ */
+ public void put(EObject key, EObject value) {
+ registry.put(key, value);
+ }
+
+ /**
+ * Removes the.
+ *
+ * @param key
+ * the key
+ */
+ public void remove(EObject key) {
+ registry.remove(key);
+ }
+
+
+ /**
+ * Contains.
+ *
+ * @param value
+ * the value
+ * @return true, if successful
+ */
+ public boolean containsKey(EObject value) {
+ return registry.containsKey(value);
+ }
+
+ /**
+ * Contains.
+ *
+ * @param value
+ * the value
+ * @return true, if successful
+ */
+ public boolean containsValue(EObject value) {
+ return registry.containsValue(value);
+ }
+
+ /**
+ * Gets the.
+ *
+ * @param key
+ * the key
+ * @return the e object
+ */
+ public EObject get(EObject key) {
+ return registry.get(key);
+ }
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.classpath b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.classpath
new file mode 100755
index 0000000..4a00bec
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.classpath
@@ -0,0 +1,11 @@
+<?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-11">
+ <attributes>
+ <attribute name="module" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.project b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.project
new file mode 100755
index 0000000..08b5e68
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.sirius.statemachine.diagram</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c9545f0
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/META-INF/MANIFEST.MF b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..342ab30
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.sirius.statemachine.diagram;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.sirius.statemachine.diagram.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.sirius,
+ org.eclipse.sirius.common.acceleo.aql,
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.papyrus.uml.sirius.common.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.uml.diagram.statemachine;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.common.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.common;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.formatdata;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.editor;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[3.1.100,4.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-Vendor: %providerName
+Automatic-Module-Name: org.eclipse.papyrus.uml.sirius.statemachine.diagram
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/about.html b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/build.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/build.properties
new file mode 100755
index 0000000..1ab7df2
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ description/,\
+ plugin.properties,\
+ plugin.xml
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign
new file mode 100755
index 0000000..062d58b
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign
@@ -0,0 +1,1016 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" name="papyrus_statemachine" version="12.0.0.2017041100">
+ <ownedViewpoints name="StateMachineDiagram" modelFileExtension="uml">
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='StateMachineDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='AddHyperlinkView'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" name="StateMachineDiagram" titleExpression="aql:self.name +' StateMachine Diagram'" domainClass="uml::Element" preconditionExpression="service:getPreCondition()" enablePopupBars="true">
+ <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+ <layout xsi:type="description_1:CustomLayoutConfiguration" id="org.eclipse.elk.box" label="ELK Box" description="Algorithm for packing of unconnected boxes, i.e. graphs without edges.">
+ <layoutOptions xsi:type="description_1:DoubleLayoutOption" id="org.eclipse.elk.aspectRatio">
+ <targets>PARENT</targets>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:EnumLayoutOption" id="org.eclipse.elk.box.packingMode">
+ <targets>PARENT</targets>
+ <value name="SIMPLE"/>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:EnumSetLayoutOption" id="org.eclipse.elk.contentAlignment">
+ <targets>PARENT</targets>
+ <values name="V_TOP"/>
+ <values name="V_CENTER"/>
+ <values name="V_BOTTOM"/>
+ <values name="H_LEFT"/>
+ <values name="H_CENTER"/>
+ <values name="H_RIGHT"/>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:BooleanLayoutOption" id="org.eclipse.elk.expandNodes">
+ <targets>PARENT</targets>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:BooleanLayoutOption" id="org.eclipse.elk.interactive">
+ <targets>PARENT</targets>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:EnumSetLayoutOption" id="org.eclipse.elk.nodeSize.constraints">
+ <targets>NODE</targets>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:EnumSetLayoutOption" id="org.eclipse.elk.nodeSize.options">
+ <targets>NODE</targets>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:DoubleLayoutOption" id="org.eclipse.elk.spacing.nodeNode">
+ <targets>PARENT</targets>
+ </layoutOptions>
+ <layoutOptions xsi:type="description_1:IntegerLayoutOption" id="org.eclipse.elk.priority">
+ <targets>NODE</targets>
+ <targets>EDGE</targets>
+ </layoutOptions>
+ </layout>
+ <diagramInitialisation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Model)">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="StateMachine" referenceName="packagedElement">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </diagramInitialisation>
+ <defaultLayer name="State Machine">
+ <nodeMappings name="Comment" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='CommentEdit']" createElements="false" domainClass="Comment">
+ <style xsi:type="style:NoteDescription" labelSize="12" labelExpression="feature:body" sizeComputationExpression="9" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='yellow']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_yellow']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="Constraint" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='ConstraintEdit']" createElements="false" domainClass="Constraint">
+ <style xsi:type="style:NoteDescription" labelSize="12" labelExpression="service:getConstraintLabel()" sizeComputationExpression="9" labelPosition="node" resizeKind="NSEW" color="//@userColorsPalettes[name=null]/@entries[name='ConstrainedColor']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <edgeMappings name="Transition" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="feature:eAllContents" semanticElements="aql:self" sourceMapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='FinalState'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']" targetMapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='FinalState'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="uml.Transition" useDomainElement="true" reconnections="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Target%20Transition'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Source%20Transition']">
+ <style>
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <beginLabelStyleDescription labelSize="10" showIcon="false" labelExpression="aql:self.getValueString(view)">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </beginLabelStyleDescription>
+ <centerLabelStyleDescription labelSize="10" showIcon="false" labelExpression="feature:name">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="Link" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" sourceMapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" targetMapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='FinalState'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@edgeMappings[name='Transition'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" targetFinderExpression="aql:self.targeFinderExpressionForConstraint()" reconnections="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Reconnect%20Source%20Link'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Reconnect%20Target%20Link']">
+ <style lineStyle="dot" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelSize="12">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="ContextLink" preconditionExpression="service:checkContainerViewContext(sourceView)" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" sourceMapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" targetMapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']" targetFinderExpression="aql:self.getContextParent()" reconnections="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Target%20ContextLink'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Source%20ContextLink']">
+ <style lineStyle="dot" targetArrow="NoDecoration">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription labelExpression="<<context>>">
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <containerMappings name="StateMachine" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="StateMachine" reusedBorderedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" reusedContainerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions']" childrenPresentation="HorizontalStack">
+ <subContainerMappings name="Region" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="service:getFeatures()" createElements="false" domainClass="uml.Region" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='RegionDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='StateDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='PseudostateDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='ConstraintDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='CommentDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='StateRepresentationDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='PseudoStateRepresentationDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='ConstraintRepresentationDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='CommentRepresentationDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" reusedContainerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']">
+ <subNodeMappings name="Pseudostate" preconditionExpression="aql:not ((self.kind == uml::PseudostateKind::entryPoint) or ( self.kind == uml::PseudostateKind::exitPoint))" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="feature:subvertex" createElements="false" domainClass="uml.Pseudostate">
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::initial)">
+ <style xsi:type="style:DotDescription" labelSize="12" showIcon="false" sizeComputationExpression="2" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::junction)">
+ <style xsi:type="style:DotDescription" labelSize="12" showIcon="false" sizeComputationExpression="2" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::deepHistory)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::shallowHistory)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::choice)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::terminate)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::join)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::fork)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ </subNodeMappings>
+ <subNodeMappings name="FinalState" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="feature:subvertex" createElements="false" domainClass="FinalState">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" resizeKind="NSEW" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/FinalState.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subContainerMappings name="State" preconditionExpression="aql:not self.oclIsTypeOf(uml::FinalState)" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="feature:subvertex" createElements="false" domainClass="uml.State" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='RegionDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='PseudostateDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='BorderPseudoStateDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" reusedContainerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions']" childrenPresentation="VerticalStack">
+ <borderedNodeMappings name="BorderPseudoState" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:eContents" synchronizationLock="true" domainClass="uml.Pseudostate">
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::entryPoint)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ <conditionnalStyles predicateExpression="aql: self.kind==(uml::PseudostateKind::exitPoint)">
+ <style xsi:type="style:WorkspaceImageDescription" labelSize="12" showIcon="false" sizeComputationExpression="-1" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </conditionnalStyles>
+ </borderedNodeMappings>
+ <subContainerMappings name="VerticalRegions" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getFeatures()" createElements="false" domainClass="uml.Region" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" reusedContainerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions']" childrenPresentation="VerticalStack">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" borderLineStyle="dot" labelSize="12" showIcon="false" hideLabelByDefault="true" widthComputationExpression="100" heightComputationExpression="100" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="HorizontalRegions" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="service:getFeatures()" createElements="false" domainClass="uml.Region" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" reusedContainerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions']" childrenPresentation="HorizontalStack">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" borderLineStyle="dot" labelSize="12" showIcon="false" hideLabelByDefault="true" widthComputationExpression="100" heightComputationExpression="100" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="Activities" preconditionExpression="aql:not self.doActivity->isEmpty() or not self.entry->isEmpty() or not self.exit->isEmpty()" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="var:self" synchronizationLock="true" domainClass="State" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" childrenPresentation="List">
+ <subNodeMappings name="Entry" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:entry" synchronizationLock="true" domainClass="Element">
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="aql:'/entry '+ self.getTypeName() +' '+ self.getName()" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="DoActivity" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:doActivity" synchronizationLock="true" domainClass="Element">
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="aql:'/do '+ self.getTypeName() +' '+ self.getName()" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="Exit" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:exit" synchronizationLock="true" domainClass="Element">
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="aql:'/exit '+ self.getTypeName() +' '+ self.getName()" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <subNodeMappings name="Defer" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="feature:deferrableTrigger" synchronizationLock="true" domainClass="Element">
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="aql:self.getTextTrigger(view)" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" arcWidth="12" arcHeight="12" borderSizeComputationExpression="1" showIcon="false" labelExpression="" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" showIcon="false" roundedCorner="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" borderLineStyle="dot" labelSize="12" showIcon="false" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <labelBorderStyle href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" showIcon="false" roundedCorner="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="StateRoot" preconditionExpression="aql:not self.oclIsTypeOf(uml::FinalState)" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" labelDirectEdit="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Rename']" semanticCandidatesExpression="aql:self" synchronizationLock="true" domainClass="uml.State" reusedBorderedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']" dropDescriptions="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='RegionDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='PseudostateDrop'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Constraint%20from%20Model'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Comment%20from%20Model']" reusedNodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" reusedContainerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='Activities'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" childrenPresentation="VerticalStack">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" showIcon="false" roundedCorner="true" backgroundStyle="GradientTopToBottom" foregroundColor="//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </containerMappings>
+ <toolSections name="Nodes" icon="/org.eclipse.papyrus.uml.sirius.common.diagram/icons/group.gif">
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" name="Region" containerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif" extraMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions'] //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:container.oclIsTypeOf(uml::StateMachine) or container.oclIsTypeOf(uml::State)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:container.getStateParent()">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Region" referenceName="region">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="service:containerView.getStateViewParent()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:container.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:container.getStateParent()">
+ <subModelOperations xsi:type="tool:Let" variableName="dropLocation" valueExpression="aql:self.getDropLocation(containerView)"/>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:dropLocation == 'T'">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.setChildRepresentation('V')"/>
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Region" referenceName="region">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="var:containerView"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="var:containerView" variableName="createdView2"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.moveChildrenView(createdView2)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:applyLayoutData(containerView)"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:dropLocation == 'R'">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.setChildRepresentation('H')"/>
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Region" referenceName="region">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView" variableName="createdView2"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.moveChildrenView(createdView2)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:applyLayoutData(containerView)"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:dropLocation == 'B'">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.setChildRepresentation('V')"/>
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Region" referenceName="region">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView" variableName="createdView2"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.moveChildrenView(createdView2)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:applyLayoutData(containerView)"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:dropLocation == 'L'">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.setChildRepresentation('H')"/>
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Region" referenceName="region">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView" variableName="createdView2"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.moveChildrenView(createdView2)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:applyLayoutData(containerView)"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerCreationDescription" name="State" containerMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="State" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Initial" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::initial"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="FinalState" forceRefresh="true" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='FinalState']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="FinalState" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="ShallowHistory" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::shallowHistory"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="DeepHistory" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::deepHistory"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Fork" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::fork"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Join" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::join"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Choice" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::choice"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Junction" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::junction"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="EntryPoint" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif" extraMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:container.oclIsTypeOf(uml::State)">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="connectionPoint">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::entryPoint"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:container.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:getStateParent()">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="connectionPoint">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::entryPoint"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="ExitPoint" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif" extraMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:container.oclIsTypeOf(uml::State)">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="connectionPoint">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::exitPoint"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:container.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:getStateParent()">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="connectionPoint">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::exitPoint"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="service:getStateViewParent()"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Terminate" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Pseudostate" referenceName="subvertex">
+ <subModelOperations xsi:type="tool:SetValue" featureName="kind" valueExpression="aql:uml::PseudostateKind::terminate"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:containerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Comment" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" iconPath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Comment.gif">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Comment" referenceName="ownedComment"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:NodeCreationDescription" name="Constraint" nodeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" iconPath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Constraint.gif" extraMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']">
+ <variable name="container"/>
+ <viewVariable name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:container.getStateParent()">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Constraint" referenceName="ownedRule">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:instance">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="uml::OpaqueExpression" referenceName="specification">
+ <subModelOperations xsi:type="tool:SetValue" featureName="language" valueExpression="OCL"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="body" valueExpression="true"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="constraintSpec"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="BorderPseudoStateDrop" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element.dndBorderPseudoState(newSemanticContainer)"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::State)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element.dndBorderPseudoState(newSemanticContainer)"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="RegionDrop" precondition="aql:element.checkDropableElement(newViewContainer)" forceRefresh="true" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:newSemanticContainer.getStateParent()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:newContainerView.setChildRepresentation('H')"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:newSemanticContainer">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:newContainerView" variableName="createdView2"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:newContainerView.moveChildrenView(createdView2)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.applyLayoutData(newContainerView)"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::State) or newSemanticContainer.oclIsTypeOf(uml::StateMachine)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="StateDrop" precondition="aql:element.checkDropableElement(newViewContainer)" forceRefresh="true" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="StateRepresentationDrop" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:newSemanticContainer" featureName="subvertex"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="PseudostateDrop" precondition="aql:element.checkDropableElement(newViewContainer)" forceRefresh="true" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::State) or newSemanticContainer.oclIsTypeOf(uml::StateMachine)">
+ <subModelOperations xsi:type="tool_1:CreateView" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="PseudoStateRepresentationDrop" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:newSemanticContainer" featureName="subvertex"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="Rename" forceRefresh="true">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="Delete Region">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:elementView">
+ <subModelOperations xsi:type="tool:Let" variableName="isRegion" valueExpression="aql:containerView.target.oclIsTypeOf(uml::Region)"/>
+ <subModelOperations xsi:type="tool:Switch">
+ <cases conditionExpression="aql:isRegion">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:containerView.target != element">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.getOtherRegion(element).moveChildrenView(containerView)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:applyLayoutData(containerView)"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:For" expression="aql:containerView.getChildrenView()">
+ <subModelOperations xsi:type="tool:DeleteView"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.setChildRepresentation('F')"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element">
+ <subModelOperations xsi:type="tool:RemoveElement"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:containerView.target == element">
+ <subModelOperations xsi:type="tool:Let" variableName="otherElement" valueExpression="aql:containerView.getOtherRegion(element)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView.eContainer()">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:otherElement.target">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']" containerViewExpression="aql:containerView.eContainer()"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:otherElement.moveChildrenView(createdView)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="service:applyLayoutData(createdView)"/>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView">
+ <subModelOperations xsi:type="tool:DeleteView"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element">
+ <subModelOperations xsi:type="tool:RemoveElement"/>
+ </subModelOperations>
+ </subModelOperations>
+ </cases>
+ <cases conditionExpression="aql:not (isRegion)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:containerView.setChildRepresentation('V')">
+ <subModelOperations xsi:type="tool:DeleteView"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element">
+ <subModelOperations xsi:type="tool:RemoveElement"/>
+ </subModelOperations>
+ </subModelOperations>
+ </cases>
+ <default/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="CommentEdit" forceRefresh="true">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:SetValue" featureName="body" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="ConstraintEdit" inputLabelExpression="service:getBodyFromConstraint()">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:setBody(arg0)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="ConstraintDrop" precondition="aql:element.checkDropableElement(newViewContainer)" forceRefresh="true" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="ConstraintRepresentationDrop" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:newSemanticContainer" featureName="ownedRule"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="CommentDrop" precondition="aql:element.checkDropableElement(newViewContainer)" forceRefresh="true" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="CommentRepresentationDrop" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:newSemanticContainer" featureName="ownedComment"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="Delete Comment">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:elementView">
+ <subModelOperations xsi:type="tool:DeleteView"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element">
+ <subModelOperations xsi:type="tool:RemoveElement"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="StateMachineDrop" precondition="aql:element.checkDropableElement(newViewContainer)" forceRefresh="true" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:newSemanticContainer.oclIsTypeOf(uml::Model)">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']" containerViewExpression="aql:newContainerView"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ <toolSections name="Edges" icon="/org.eclipse.papyrus.uml.sirius.common.diagram/icons/group.gif">
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Transition" edgeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@edgeMappings[name='Transition']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:self.getRegionParent()">
+ <subModelOperations xsi:type="tool:CreateInstance" typeName="Transition" referenceName="transition">
+ <subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="service:computeDefaultName"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="source" valueExpression="aql:source"/>
+ <subModelOperations xsi:type="tool:SetValue" featureName="target" valueExpression="aql:target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="Link" precondition="aql:true" forceRefresh="true" edgeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@edgeMappings[name='Link']" iconPath="/org.eclipse.papyrus.uml.sirius.common.diagram/icons/Link.gif" extraTargetMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:source">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:source.oclIsTypeOf(uml::Comment)">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:target.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:SetValue" featureName="annotatedElement" valueExpression="aql:target.getStateParent()"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:not target.oclIsTypeOf(uml::Region)">
+ <subModelOperations xsi:type="tool:SetValue" featureName="annotatedElement" valueExpression="aql:target"/>
+ </subModelOperations>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:source.oclIsTypeOf(uml::Constraint)">
+ <subModelOperations xsi:type="tool:SetValue" featureName="constrainedElement" valueExpression="aql:target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:EdgeCreationDescription" name="ContextLink" edgeMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@edgeMappings[name='ContextLink']" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" extraTargetMappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:source">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:target.getStateParent()" featureName="ownedRule"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Source Link" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:source">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:source.oclIsTypeOf(uml::Constraint)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:target">
+ <subModelOperations xsi:type="tool:SetValue" featureName="constrainedElement" valueExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:Unset" featureName="constrainedElement" elementExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:source.oclIsTypeOf(uml::Comment)">
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:target">
+ <subModelOperations xsi:type="tool:SetValue" featureName="annotatedElement" valueExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:Unset" featureName="annotatedElement" elementExpression="aql:edgeView.targetNode.target"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Reconnect Target Link" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:edgeView.sourceNode.target">
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Constraint)">
+ <subModelOperations xsi:type="tool:SetValue" featureName="constrainedElement" valueExpression="aql:target"/>
+ <subModelOperations xsi:type="tool:Unset" featureName="constrainedElement" elementExpression="aql:source"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool:If" conditionExpression="aql:self.oclIsTypeOf(uml::Comment)">
+ <subModelOperations xsi:type="tool:SetValue" featureName="annotatedElement" valueExpression="aql:target"/>
+ <subModelOperations xsi:type="tool:Unset" featureName="annotatedElement" elementExpression="aql:source"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Target ContextLink" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:target" featureName="ownedRule"/>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Source ContextLink" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:source">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:sourceView.getContextParentView().target" featureName="ownedRule"/>
+ <subModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:target">
+ <subModelOperations xsi:type="tool:MoveElement" newContainerExpression="aql:edgeView.targetNode.target" featureName="ownedRule"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Target Transition" forceRefresh="true">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:edgeView.target">
+ <subModelOperations xsi:type="tool:SetValue" featureName="target" valueExpression="aql:target"/>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ReconnectEdgeDescription" name="Source Transition" forceRefresh="true" reconnectionKind="RECONNECT_SOURCE">
+ <source name="source"/>
+ <target name="target"/>
+ <sourceView name="sourceView"/>
+ <targetView name="targetView"/>
+ <element name="element"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:edgeView.target">
+ <subModelOperations xsi:type="tool:SetValue" featureName="source" valueExpression="aql:target"/>
+ </firstModelOperations>
+ </initialOperation>
+ <edgeView name="edgeView"/>
+ </ownedTools>
+ </toolSections>
+ <customization>
+ <vsmElementCustomizations xsi:type="description:VSMElementCustomization">
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions']/@style //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions']/@style" attributeName="widthComputationExpression" value="service:getWidth(view, containerView)"/>
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='VerticalRegions']/@style //@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@subContainerMappings[name='HorizontalRegions']/@style" attributeName="heightComputationExpression" value="service:getHeight(view, containerView)"/>
+ <featureCustomizations xsi:type="description:EAttributeCustomization" appliedOn="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@style" attributeName="borderSizeComputationExpression" value="service:computeBorderLineSize(view)"/>
+ </vsmElementCustomizations>
+ </customization>
+ </defaultLayer>
+ <additionalLayers name="Common" optional="false">
+ <nodeMappings name="Bendpoint" semanticCandidatesExpression="aql:diagram.getCommonBendpointsToDraw()" synchronizationLock="true" domainClass="uml.Element">
+ <style xsi:type="style:DotDescription" labelSize="12" showIcon="false" labelExpression="" hideLabelByDefault="true" sizeComputationExpression="aql:self.getBenpointDiameter()">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </style>
+ </nodeMappings>
+ <nodeMappings name="Hyperlink" preconditionExpression="aql:self.isNotSemanticElement()" deletionDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='PapyrusDelete']" semanticCandidatesExpression="aql:self.allAvailableViews()" createElements="false" doubleClickDescription="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@toolSections.0/@ownedTools[name='Hyperlink%20View']" domainClass="EObject">
+ <style xsi:type="style:SquareDescription" labelSize="12" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ </style>
+ </nodeMappings>
+ <toolSections name="Common">
+ <ownedTools xsi:type="tool_1:DoubleClickDescription" name="Open Hyperlink">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:elementView.createOrOpenHyperlink()"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DeleteElementDescription" name="PapyrusDelete">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:element.deleteElement(elementView)"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:PopupMenu" name="Sirius View Deletion">
+ <menuItemDescription xsi:type="tool:OperationAction" name="Delete View">
+ <view name="views"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:DeleteView"/>
+ </initialOperation>
+ </menuItemDescription>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="AddHyperlinkView" precondition="aql:element.isNotSemanticElement()" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DoubleClickDescription" name="Hyperlink View" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@additionalLayers[name='Common']/@nodeMappings[name='Hyperlink']">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <initialOperation/>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Constraint from Model" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Constraint']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:ContainerDropDescription" name="Comment from Model" mappings="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" dragSource="PROJECT_EXPLORER">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool_1:CreateView" mapping="//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@nodeMappings[name='Comment']" containerViewExpression="aql:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="CommentEdit">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:SetValue" featureName="body" valueExpression="aql:arg0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool_1:DirectEditLabel" name="ConstraintEdit" inputLabelExpression="service:getBody()">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="service:setConstraintBody(arg0)"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </additionalLayers>
+ </ownedRepresentations>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.statemachine.diagram.StateMachineServices"/>
+ <ownedJavaExtensions qualifiedClassName="org.eclipse.papyrus.uml.sirius.common.diagram.core.services.AbstractDiagramServices"/>
+ </ownedViewpoints>
+ <userColorsPalettes>
+ <entries xsi:type="description:UserFixedColor" red="239" green="239" blue="239" name="StateMachine_Gray_Min"/>
+ <entries xsi:type="description:UserFixedColor" red="195" green="209" blue="213" name="StateMachine_Gray"/>
+ <entries xsi:type="description:UserFixedColor" red="200" green="255" blue="230" name="ConstrainedColor"/>
+ </userColorsPalettes>
+</description:Group>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg
new file mode 100755
index 0000000..6cea077
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16mm"
+ height="16mm"
+ viewBox="0 0 16 16"
+ version="1.1"
+ id="svg1427"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Choice.svg">
+ <defs
+ id="defs1421">
+ <linearGradient
+ id="linearGradient838"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop836" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="13.88507"
+ inkscape:cx="26.671924"
+ inkscape:cy="26.038253"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1001"
+ inkscape:window-x="-9"
+ inkscape:window-y="-9"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid1429" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata1424">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.232894;stroke-miterlimit:4;stroke-dasharray:none"
+ id="rect1431"
+ width="11.038232"
+ height="11.038232"
+ x="-5.5191159"
+ y="5.8932929"
+ transform="rotate(-45)"
+ ry="0" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Comment.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Comment.gif
new file mode 100755
index 0000000..c495731
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Comment.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Constraint.gif b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Constraint.gif
new file mode 100755
index 0000000..eed6ace
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Constraint.gif
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg
new file mode 100755
index 0000000..47c109e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 4.2333331 4.2333335"
+ version="1.1"
+ id="svg2016"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Entry.svg">
+ <defs
+ id="defs2010" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.678384"
+ inkscape:cx="4.2950087"
+ inkscape:cy="8.5773877"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ units="px"
+ inkscape:window-width="1647"
+ inkscape:window-height="1030"
+ inkscape:window-x="2756"
+ inkscape:window-y="116"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2018" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata2013">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <ellipse
+ style="fill:#c3d1d5;fill-opacity:0;stroke:#000000;stroke-width:0.128564;stroke-miterlimit:4;stroke-dasharray:none"
+ id="path2020"
+ cx="2.1194403"
+ cy="2.1160731"
+ rx="2.0475905"
+ ry="2.0488694" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.0153909"
+ d="M 7.3781388,15.458062 C 5.81997,15.307185 4.4040853,14.720308 3.2134201,13.731808 2.0477666,12.764073 1.1511956,11.351759 0.77774178,9.8950319 0.3844164,8.3607917 0.46794277,6.7795599 1.0181563,5.3437628 2.0064233,2.764853 4.3300272,0.93530968 7.0739203,0.57561669 7.509398,0.51853059 8.4539102,0.51024967 8.8564788,0.5599883 11.382892,0.87213468 13.529631,2.3693926 14.67147,4.6156957 c 0.525019,1.0328513 0.769159,1.9959585 0.804206,3.1725103 0.06875,2.307952 -0.912533,4.474778 -2.704856,5.972752 -1.027603,0.858842 -2.367434,1.451401 -3.7294234,1.649388 -0.4192467,0.06094 -1.2735393,0.08545 -1.6632578,0.04772 z"
+ id="path832"
+ transform="scale(0.26458333)" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg
new file mode 100755
index 0000000..6c6029d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 4.2333331 4.2333335"
+ version="1.1"
+ id="svg2016"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Exit.svg">
+ <defs
+ id="defs2010" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254834"
+ inkscape:cx="10.615292"
+ inkscape:cy="8.532081"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ units="px"
+ inkscape:window-width="1647"
+ inkscape:window-height="1030"
+ inkscape:window-x="2756"
+ inkscape:window-y="116"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2018"
+ spacingx="2.6458333e-06"
+ spacingy="2.6458333e-06" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata2013">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <ellipse
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.128564;stroke-miterlimit:4;stroke-dasharray:none"
+ id="path2020"
+ cx="2.1194403"
+ cy="2.1160731"
+ rx="2.0475905"
+ ry="2.0488694" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.129;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 0.70442666,0.65023999 C 3.57632,3.6305066 3.57632,3.6305066 3.57632,3.6305066 v 0"
+ id="path2583" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.129;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 0.65023999,3.5221333 3.5898666,0.63669333"
+ id="path2585" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/FinalState.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/FinalState.svg
new file mode 100755
index 0000000..7148d4e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/FinalState.svg
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 4.2333332 4.2333335"
+ version="1.1"
+ id="svg8"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="FinalState.svg">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.678384"
+ inkscape:cx="5.915888"
+ inkscape:cy="6.9670928"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ units="px"
+ inkscape:pagecheckerboard="false"
+ inkscape:window-width="1647"
+ inkscape:window-height="1030"
+ inkscape:window-x="2542"
+ inkscape:window-y="52"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid10"
+ units="px"
+ dotted="false" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <ellipse
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.248861;stroke-opacity:1"
+ id="path17"
+ cx="2.1333709"
+ cy="2.1333709"
+ rx="1.9908926"
+ ry="1.9908928" />
+ <ellipse
+ style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.300968;stroke-opacity:1"
+ id="path842"
+ cx="2.1124904"
+ cy="2.1166666"
+ rx="0.89666378"
+ ry="0.90919209" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg
new file mode 100755
index 0000000..e1c32b9
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="3.7795277pc"
+ height="0.94488192pc"
+ viewBox="0 0 16 4"
+ version="1.1"
+ id="svg1427"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Fork.svg">
+ <defs
+ id="defs1421">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2006">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0"
+ id="stop2002" />
+ <stop
+ style="stop-color:#c3d1d5;stop-opacity:1"
+ offset="1"
+ id="stop2004" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2006"
+ id="linearGradient2008"
+ x1="2.6458333"
+ y1="0"
+ x2="2.6458333"
+ y2="15.875"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(3.9217654,0,0,0.22430941,0.21739076,0.21486625)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="256"
+ inkscape:cx="0.57981812"
+ inkscape:cy="6.5908371"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ inkscape:window-width="2400"
+ inkscape:window-height="1271"
+ inkscape:window-x="2391"
+ inkscape:window-y="-9"
+ inkscape:window-maximized="1"
+ units="pc">
+ <inkscape:grid
+ type="xygrid"
+ id="grid1429" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata1424">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="fill:url(#linearGradient2008);fill-opacity:1;stroke:#000000;stroke-width:0.436133"
+ id="rect1431"
+ width="15.564506"
+ height="3.5609119"
+ x="0.21739075"
+ y="0.21486625" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg
new file mode 100755
index 0000000..2e3df5c
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="4mm"
+ height="16mm"
+ viewBox="0 0 4 16"
+ version="1.1"
+ id="svg1427"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Join.svg">
+ <defs
+ id="defs1421">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2006">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0"
+ id="stop2002" />
+ <stop
+ style="stop-color:#c3d1d5;stop-opacity:1"
+ offset="1"
+ id="stop2004" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2006"
+ id="linearGradient2008"
+ x1="2.6458333"
+ y1="0"
+ x2="2.6458333"
+ y2="15.875"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.0825172"
+ inkscape:cx="9.5420681"
+ inkscape:cy="80.874097"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ inkscape:window-width="2400"
+ inkscape:window-height="1271"
+ inkscape:window-x="2391"
+ inkscape:window-y="-9"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid1429" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata1424">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="fill:url(#linearGradient2008);stroke:#000000;stroke-width:0.465;fill-opacity:1"
+ id="rect1431"
+ width="3.96875"
+ height="15.875"
+ x="0"
+ y="0" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg
new file mode 100755
index 0000000..3eb8bab
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 4.2333332 4.2333335"
+ version="1.1"
+ id="svg850"
+ inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="Terminate.svg">
+ <defs
+ id="defs844" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="44.8"
+ inkscape:cx="6.7055794"
+ inkscape:cy="7.9600372"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ inkscape:document-rotation="0"
+ showgrid="true"
+ units="px"
+ inkscape:window-width="2400"
+ inkscape:window-height="1271"
+ inkscape:window-x="2391"
+ inkscape:window-y="-9"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid852" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata847">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.465;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 0,0 1.3288225,1.3288225 2.9045108,2.9045108 v 0 0"
+ id="path856"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.465;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M -1.4353901e-5,4.2331143 4.2333477,1.0101255e-5"
+ id="path858" />
+ </g>
+</svg>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/terminateState.png b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/terminateState.png
new file mode 100755
index 0000000..0b5a87f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/terminateState.png
Binary files differ
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/plugin.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/plugin.properties
new file mode 100755
index 0000000..fa555a0
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/plugin.properties
@@ -0,0 +1,3 @@
+pluginName = Papyrus-SiriusDiagram - Sirius state machine diagram implementation
+providerName = Eclipse Modeling Project
+viewpointName = StateMachine
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/plugin.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/plugin.xml
new file mode 100755
index 0000000..2320450
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/plugin.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension point="org.eclipse.sirius.componentization">
+ <component class="org.eclipse.papyrus.uml.sirius.statemachine.diagram.Activator"
+ id="org.eclipse.papyrus.uml.sirius.statemachine.diagram"
+ name="papyrus_statemachine">
+ </component>
+ </extension>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.papyrus.uml.sirius.statemachine.diagram.Startup">
+ </startup>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.uml.sirius.statemachine.diagram.custom.StateMachineSiriusCreateEditPolicyProvider">
+ <Priority
+ name="High">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+ <extension
+ point="org.eclipse.sirius.refreshExtensionProvider">
+ <refreshExtensionProvider
+ priority="lowest"
+ providerClass="org.eclipse.papyrus.uml.sirius.statemachine.diagram.StateMachineRefreshExtensionProvider">
+ </refreshExtensionProvider>
+ </extension>
+ <extension
+ point="org.eclipse.sirius.diagram.ui.formatDataManager">
+ <formatDataManagerProvider
+ class="org.eclipse.papyrus.uml.sirius.statemachine.diagram.layout.StateMachineDataManagerProvider"
+ id="org.eclipse.papyrus.uml.sirius.statemachine.diagram.stateFormatDataManager">
+ </formatDataManagerProvider>
+ </extension>
+</plugin>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/pom.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/pom.xml
new file mode 100755
index 0000000..530e26d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/pom.xml
@@ -0,0 +1,11 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.sirius.statemachine.diagram</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/Activator.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/Activator.java
new file mode 100755
index 0000000..b91a9c8
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/Activator.java
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.sirius.business.api.componentization.ViewpointRegistry;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.sirius.statemachine.diagram";
+
+ /** The plugin. */
+ private static Activator plugin;
+
+ /** The viewpoints. */
+ private static Set<Viewpoint> viewpoints;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /**
+ * Start.
+ *
+ * @param context the context
+ * @throws Exception the exception
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ viewpoints = new HashSet<Viewpoint>();
+ viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/papyrus_statemachine.odesign"));
+ }
+
+ /**
+ * Stop.
+ *
+ * @param context the context
+ * @throws Exception the exception
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ if (viewpoints != null) {
+ for (final Viewpoint viewpoint: viewpoints) {
+ ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
+ }
+ viewpoints.clear();
+ viewpoints = null;
+ }
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/ElementToRefresh.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/ElementToRefresh.java
new file mode 100755
index 0000000..be0311b
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/ElementToRefresh.java
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.ContainerLayout;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.StateMachine;
+
+/**
+ * The Class ElementToRefresh.
+ * This class allows to keep in memory Sirius graphical elements to refresh. Refresh the position or the ContainerLayout.
+ *
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class ElementToRefresh {
+
+
+ /** The Constant toReposition. */
+ public static final Map<AbstractDNode, Rectangle> toReposition = new HashMap<>();
+
+ /** The map. */
+ public static Map<DNodeContainer, ContainerLayout> map = new HashMap<DNodeContainer, ContainerLayout>();
+
+ /** The initial state machine. */
+ private static StateMachine initialStateMachine = null;
+
+
+
+
+ /**
+ * Adds the position element.
+ *
+ * @param element
+ * the element
+ * @param rec
+ * the rec
+ */
+ static public void addPositionElement(AbstractDNode element, Rectangle rec) {
+ toReposition.put(element, rec);
+ }
+
+
+
+
+ /**
+ * Save state machine.
+ *
+ * @param stateMachine
+ * the state machine
+ */
+ public static void saveStateMachine(StateMachine stateMachine) {
+ initialStateMachine = stateMachine;
+ }
+
+ /**
+ * Gets the initial state machine.
+ *
+ * @return the initial state machine
+ */
+ public static StateMachine getInitialStateMachine() {
+ return initialStateMachine;
+ }
+
+
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/Startup.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/Startup.java
new file mode 100755
index 0000000..c96d0a4
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/Startup.java
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * Early start-up hook for the externalized profile applications subsystem.
+ */
+public class Startup implements IStartup {
+
+ /**
+ * Instantiates a new startup.
+ */
+ public Startup() {
+ super();
+ }
+
+ /**
+ * Early startup.
+ *
+ * @see org.eclipse.ui.IStartup#earlyStartup()
+ */
+
+ @Override
+ public void earlyStartup() {
+ // Kick the index
+ Activator.getDefault();
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/StateMachineRefreshExtensionProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/StateMachineRefreshExtensionProvider.java
new file mode 100755
index 0000000..a68e35d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/StateMachineRefreshExtensionProvider.java
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram;
+
+import java.util.Map.Entry;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.sirius.diagram.ContainerLayout;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtension;
+import org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider;
+import org.eclipse.sirius.diagram.description.DiagramDescription;
+
+/**
+ * The Class StateMachineRefreshExtensionProvider allows to implement specific refresh in the StateMachine diagram case.
+ */
+public class StateMachineRefreshExtensionProvider implements IRefreshExtensionProvider {
+
+ /**
+ * Instantiates a new refresh extension provider 1.
+ */
+ public StateMachineRefreshExtensionProvider() {
+ }
+
+ /**
+ * Provides.
+ *
+ * @param viewPoint
+ * the view point
+ * @return true, if successful
+ * @see org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider#provides(org.eclipse.sirius.diagram.DDiagram)
+ */
+
+ @Override
+ public boolean provides(DDiagram viewPoint) {
+ DiagramDescription description = viewPoint.getDescription();
+ String name = description.getName();
+
+ return name.equals("StateMachineDiagram");
+ }
+
+ /**
+ * Gets the refresh extension.
+ *
+ * @param viewPoint
+ * the view point
+ * @return the refresh extension
+ * @see org.eclipse.sirius.diagram.business.api.refresh.IRefreshExtensionProvider#getRefreshExtension(org.eclipse.sirius.diagram.DDiagram)
+ */
+
+ @Override
+ public IRefreshExtension getRefreshExtension(DDiagram viewPoint) {
+
+ return new IRefreshExtension() {
+
+ @Override
+ public void postRefresh(DDiagram dDiagram) {
+
+ manageRegionPresentation();
+
+ manageStatePresentation(dDiagram);
+
+
+ }
+
+ @Override
+ public void beforeRefresh(DDiagram dDiagram) {
+ registeredRegionPresentation(dDiagram);
+ }
+
+
+ };
+ }
+
+ /**
+ *
+ * This method allows to get the ContainerLayout values save in memory
+ * and apply them at the Region diagram elements.
+ * In the goal to keep the ContainerLayout values from bedore refresh.
+ */
+ private void manageRegionPresentation() {
+ for (Entry<DNodeContainer, ContainerLayout> entry : ElementToRefresh.map.entrySet()) {
+ DNodeContainer key = entry.getKey();
+ ContainerLayout value = entry.getValue();
+ key.setChildrenPresentation(value);
+
+ }
+ ElementToRefresh.map.clear();
+ }
+
+ /**
+ * This method allows to get the ContainerLayout values save in memory
+ * and apply them at the State diagram elements.
+ * In the goal to keep the ContainerLayout values from bedore refresh.
+ *
+ * @param dDiagram
+ * the d diagram
+ */
+ private void manageStatePresentation(DDiagram dDiagram) {
+ DSemanticDiagram di = (DSemanticDiagram) dDiagram;
+ EList<DDiagramElement> diagramElements = di.getDiagramElements();
+ for (DDiagramElement dDiagramElement : diagramElements) {
+ if (dDiagramElement instanceof DNodeContainer) {
+ if (((DNodeContainer) dDiagramElement).getActualMapping().getName().equals("State") || ((DNodeContainer) dDiagramElement).getActualMapping().getName().equals("StateRoot")) {
+ if (((DNodeContainer) dDiagramElement).getElements().size() == 0) {
+ ((DNodeContainer) dDiagramElement).setChildrenPresentation(ContainerLayout.FREE_FORM);
+ } else {
+ ((DNodeContainer) dDiagramElement).setChildrenPresentation(ContainerLayout.VERTICAL_STACK);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Registered region presentation. This method allows to save in memory the ContainerLayout value of the Diagram element before refresh. (the Sirius generic refresh can modify this value)
+ *
+ * @param dDiagram
+ * the d diagram
+ */
+ private void registeredRegionPresentation(DDiagram dDiagram) {
+ EList<DDiagramElement> diagramElements = dDiagram.getDiagramElements();
+ for (DDiagramElement dDiagramElement : diagramElements) {
+ if (dDiagramElement instanceof DNodeContainer) {
+ ContainerLayout childrenPresentation = ((DNodeContainer) dDiagramElement)
+ .getChildrenPresentation();
+ ElementToRefresh.map.put((DNodeContainer) dDiagramElement, childrenPresentation);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/StateMachineServices.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/StateMachineServices.java
new file mode 100755
index 0000000..9e4cbc1
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/StateMachineServices.java
@@ -0,0 +1,1426 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.Messages;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.OpaqueBehaviorViewUtil;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.preferences.CSSOptionsConstants;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.preferences.PreferenceConstants;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.util.TriggerUtil;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.sirius.statemachine.diagram.custom.StateMachineRegionPolicy;
+import org.eclipse.papyrus.uml.sirius.statemachine.diagram.custom.StateMachineRegionPolicy.Zone;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.sirius.common.ui.tools.api.util.EclipseUIUtil;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.ContainerLayout;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.diagram.description.ContainerMapping;
+import org.eclipse.sirius.diagram.impl.DNodeContainerImpl;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusGMFHelper;
+import org.eclipse.sirius.diagram.ui.business.api.view.SiriusLayoutDataManager;
+import org.eclipse.sirius.diagram.ui.business.internal.view.RootLayoutData;
+import org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper;
+import org.eclipse.sirius.ext.base.Option;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.CallEvent;
+import org.eclipse.uml2.uml.ChangeEvent;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Event;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.eclipse.uml2.uml.PseudostateKind;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.SignalEvent;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.TimeEvent;
+import org.eclipse.uml2.uml.TimeExpression;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * The services class used by VSM.
+ */
+@SuppressWarnings("restriction")
+public class StateMachineServices {
+
+
+ /**
+ * Checks if is initial pseudo state.
+ *
+ * @param object
+ * the object
+ * @return true, if is initial pseudo state
+ */
+ public boolean isInitialPseudoState(EObject object) {
+ if (object instanceof Pseudostate) {
+ if (((Pseudostate) object).getKind() == PseudostateKind.INITIAL_LITERAL) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check dropable element.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ public boolean checkDropableElement(EObject dropable, EObject containerView) {
+ if (dropable instanceof Region) {
+ return checkDropableRegion(dropable, containerView);
+ }
+ if (dropable instanceof State) {
+ return checkDropableState(dropable, containerView);
+ }
+ if (dropable instanceof StateMachine) {
+ return checkDropableStateMachine(dropable, containerView);
+ }
+ if (dropable instanceof Pseudostate) {
+ return checkDropablePseudostate(dropable, containerView);
+ }
+ if (dropable instanceof Constraint) {
+ return checkDropableConstraint(dropable, containerView);
+ }
+ if (dropable instanceof Comment) {
+ return checkDropableComment(dropable, containerView);
+ }
+ return false;
+ }
+
+ /**
+ * Check dropable comment.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ private boolean checkDropableComment(EObject dropable, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer nodeContainerView = (DNodeContainer) containerView;
+ EObject target = nodeContainerView.getTarget();
+ if (target instanceof Region) {
+ if (((Region) target).getOwnedComments().contains(dropable)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check dropable constraint.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ private boolean checkDropableConstraint(EObject dropable, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer nodeContainerView = (DNodeContainer) containerView;
+ EObject target = nodeContainerView.getTarget();
+ if (target instanceof Region) {
+ EObject stateParent = getStateParent(target);
+ if (((State) stateParent).getOwnedRules().contains(dropable)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check dropable pseudostate.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ private boolean checkDropablePseudostate(EObject dropable, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer nodeContainerView = (DNodeContainer) containerView;
+ EObject target = nodeContainerView.getTarget();
+ if (target instanceof Region) {
+ if (((Region) target).getSubvertices().contains(dropable)) {
+ return true;
+ }
+ }
+ if (target instanceof State) {
+ if (((State) target).getConnectionPoints().contains(dropable)) {
+ return true;
+ }
+ }
+ if (target instanceof StateMachine) {
+ if (((StateMachine) target).getConnectionPoints().contains(dropable)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check dropable state.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ private boolean checkDropableState(EObject dropable, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer nodeContainerView = (DNodeContainer) containerView;
+ EObject target = nodeContainerView.getTarget();
+ if (target instanceof Region) {
+ if (((Region) target).getSubvertices().contains(dropable)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check dropable state machine.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ private boolean checkDropableStateMachine(EObject dropable, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer nodeContainerView = (DNodeContainer) containerView;
+ EObject target = nodeContainerView.getTarget();
+ if (target instanceof Model) {
+ if (((Model) target).getPackagedElements().contains(dropable)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check dropable region.
+ *
+ * @param dropable
+ * the dropable
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ private boolean checkDropableRegion(EObject dropable, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer nodeContainerView = (DNodeContainer) containerView;
+ EObject target = nodeContainerView.getTarget();
+ if (target instanceof StateMachine) {
+ if (((StateMachine) target).getRegions().contains(dropable)) {
+ return true;
+ }
+ }
+ if (target instanceof State) {
+ if (((State) target).getRegions().contains(dropable)) {
+ return true;
+ }
+ }
+ if (target instanceof Region) {
+ EObject eContainer = target.eContainer();
+ if (eContainer instanceof StateMachine) {
+ if (((StateMachine) eContainer).getRegions().contains(dropable)) {
+ return true;
+ }
+ }
+ if (eContainer instanceof State) {
+ if (((State) eContainer).getRegions().contains(dropable)) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the region parent.
+ *
+ * @param object
+ * the object
+ * @return the region parent
+ */
+ public EObject getRegionParent(EObject object) {
+ if (object instanceof Region) {
+ return object;
+ }
+ if (object instanceof StateMachine) {
+ return ((StateMachine) object).getRegions().get(0);
+ }
+ if (object instanceof State) {
+ return getRegionParent(object.eContainer());
+ }
+ if (object instanceof Pseudostate) {
+ return getRegionParent(object.eContainer());
+ }
+ return null;
+ }
+
+
+
+ /**
+ * Gets the state parent.
+ *
+ * @param context
+ * the context
+ * @return the state parent
+ */
+ public EObject getStateParent(EObject context) {
+ if (context instanceof State || context instanceof StateMachine) {
+ return context;
+ }
+ if (context instanceof Region) {
+ return getStateParent(context.eContainer());
+ }
+ return null;
+ }
+
+ /**
+ * Gets the features.
+ *
+ * @param object
+ * the object
+ * @return the features
+ */
+ public Collection<?> getFeatures(EObject object) {
+ if (object instanceof Region) {
+ return getFeatures(object.eContainer());
+ }
+ if (object instanceof State) {
+ return ((State) object).getRegions();
+ }
+ if (object instanceof StateMachine) {
+ return ((StateMachine) object).getRegions();
+ }
+ return null;
+
+ }
+
+ /**
+ * Gets the state view parent.
+ *
+ * @param context
+ * the context
+ * @return the state view parent
+ */
+ public EObject getStateViewParent(EObject context) {
+ if (context instanceof DNodeContainer) {
+ if (((DNodeContainer) context).getTarget() instanceof State) {
+ return context;
+ }
+ if (((DNodeContainer) context).getTarget() instanceof StateMachine) {
+ return context;
+ }
+ if (((DNodeContainer) context).getTarget() instanceof Region) {
+ if (((DNodeContainer) context).getActualMapping().getName().contains("Horizontal") || ((DNodeContainer) context).getActualMapping().getName().contains("Vertical")) {
+ return context;
+ }
+ return getStateViewParent(context.eContainer());
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets the state view parent.
+ *
+ * @param context
+ * the context
+ * @return the state view parent
+ */
+ private EObject getStateView(EObject context) {
+ if (context instanceof DNodeContainer) {
+ if (((DNodeContainer) context).getTarget() instanceof State) {
+ return context;
+ }
+ if (((DNodeContainer) context).getTarget() instanceof Region) {
+ return getStateView(context.eContainer());
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the child representation.
+ *
+ * @param context
+ * the context
+ * @param value
+ * the value
+ * @return the e object
+ */
+ public EObject setChildRepresentation(EObject context, String value) {
+ if (context instanceof DNodeContainer) {
+ if (value.equals("H")) {
+ ((DNodeContainer) context).setChildrenPresentation(ContainerLayout.HORIZONTAL_STACK);
+ }
+ if (value.equals("V")) {
+ ((DNodeContainer) context).setChildrenPresentation(ContainerLayout.VERTICAL_STACK);
+ }
+ if (value.equals("F")) {
+ ((DNodeContainer) context).setChildrenPresentation(ContainerLayout.FREE_FORM);
+ }
+ }
+ return context;
+ }
+
+
+
+
+
+ /**
+ * Gets the container mapping.
+ *
+ * @param context
+ * the context
+ * @param position
+ * the position
+ * @return the container mapping
+ */
+ public ContainerMapping getContainerMapping(DNodeContainer context, String position) {
+ DNodeContainer stateViewParent = (DNodeContainer) getStateView(context);
+ EList<ContainerMapping> subContainerMappings = stateViewParent.getActualMapping().getSubContainerMappings();
+ for (ContainerMapping containerMapping : subContainerMappings) {
+ if (containerMapping.getName().equals(position)) {
+ return containerMapping;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sort element.
+ *
+ * @param object
+ * the object
+ * @param containerView
+ * the container view
+ * @return the e object
+ */
+ public EObject sortElement(EObject object, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DNodeContainer container = (DNodeContainer) containerView;
+ container.getActualMapping().setChildrenPresentation(null);
+ }
+ return object;
+ }
+
+ /**
+ * Checks if is vertical.
+ *
+ * @param object
+ * the object
+ * @param containerView
+ * the container view
+ * @return true, if is vertical
+ */
+ public boolean isVertical(EObject object, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ View view = SiriusGMFHelper.getGmfView((DNodeContainer) containerView);
+ Node gmfnode = (Node) view;
+ String dropLocation = getDropLocation(gmfnode);
+ if (Zone.isTop(dropLocation)) {
+ return false;
+ } else if (Zone.isLeft(dropLocation)) {
+ return true;
+ } else if (Zone.isRight(dropLocation)) {
+ return true;
+ } else if (Zone.isBottom(dropLocation)) {
+ return false;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Checks if is horizontal.
+ *
+ * @param object
+ * the object
+ * @param containerView
+ * the container view
+ * @return true, if is vertical
+ */
+ public boolean isHorizontal(EObject object, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ View view = SiriusGMFHelper.getGmfView((DNodeContainer) containerView);
+ Node gmfnode = (Node) view;
+ String dropLocation = getDropLocation(gmfnode);
+ if (Zone.isTop(dropLocation)) {
+ return true;
+ } else if (Zone.isLeft(dropLocation)) {
+ return false;
+ } else if (Zone.isRight(dropLocation)) {
+ return false;
+ } else if (Zone.isBottom(dropLocation)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+
+ /**
+ * Gets the drop location.
+ *
+ * @param object
+ * the object
+ * @param containerView
+ * the container view
+ * @return the drop location
+ */
+ public String getDropLocation(EObject object, EObject containerView) {
+ String result = "";
+ if (containerView instanceof DNodeContainer) {
+ View view = SiriusGMFHelper.getGmfView((DNodeContainer) containerView);
+ Node gmfnode = (Node) view;
+ result = getDropLocation(gmfnode);
+ }
+ return result;
+ }
+
+
+ /**
+ * Gets the freeform viewport.
+ *
+ * @param element
+ * the element
+ * @return the freeform viewport
+ */
+ private Rectangle getFreeformViewport(View element) {
+
+ IEditorPart editor = EclipseUIUtil.getActiveEditor();
+ if (editor instanceof PapyrusMultiDiagramEditor) {
+ IEditorPart activeEditor = ((PapyrusMultiDiagramEditor) editor).getActiveEditor();
+
+ final Map<?, ?> editPartRegistry = ((DiagramEditor) activeEditor).getDiagramGraphicalViewer().getEditPartRegistry();
+ final Object editPart = editPartRegistry.get(element);
+ if (editPart instanceof IGraphicalEditPart) {
+
+ IGraphicalEditPart result = (IGraphicalEditPart) editPart;
+ return result.getContentPane().getParent().getBounds();
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * Gets the drop location.
+ *
+ * @param element
+ * the element
+ * @return the drop location
+ */
+ private String getDropLocation(View element) {
+
+ Option<GraphicalEditPart> editPart = GMFHelper.getGraphicalEditPart(element);
+ if (editPart.some()) {
+ editPart.get();
+ List<?> children = editPart.get().getChildren();
+ for (Object object : children) {
+ if (object instanceof EditPart) {
+ EditPart part = (EditPart) object;
+ EditPolicy editPolicy = part.getEditPolicy(EditPolicyRoles.CREATION_ROLE);
+ if (editPolicy instanceof StateMachineRegionPolicy) {
+ return ((StateMachineRegionPolicy) editPolicy).getDropLocation();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets the size.
+ *
+ * @param object
+ * the object
+ * @param object2
+ * the object 2
+ * @param containerView
+ * the container view
+ * @return the size
+ */
+ public String getHeight(EObject object, EObject object2, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ View view = SiriusGMFHelper.getGmfView((DNodeContainer) containerView);
+ Node gmfnode = (Node) view;
+ Rectangle bounds = getFreeformViewport(gmfnode);
+ return ((bounds.height + 1) / 10) + "";
+ }
+ return "-1";
+ }
+
+ /**
+ * Gets the width.
+ *
+ * @param object
+ * the object
+ * @param object2
+ * the object 2
+ * @param containerView
+ * the container view
+ * @return the width
+ */
+ public String getWidth(EObject object, EObject object2, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ View view = SiriusGMFHelper.getGmfView((DNodeContainer) containerView);
+ Node gmfnode = (Node) view;
+ Rectangle bounds = getFreeformViewport(gmfnode);
+ return ((bounds.width + 1) / 10) + "";
+ }
+
+ return "-1";
+ }
+
+
+ /**
+ * Move children view.
+ *
+ * @param containerView
+ * the container view
+ * @param newView
+ * the new view
+ * @return the e object
+ */
+ public EObject moveChildrenView(EObject containerView, EObject newView) {
+
+ if (newView instanceof DNodeContainerImpl) {
+ Collection<?> children = (Collection<?>) ((DNodeContainerImpl) containerView).eGet(DiagramPackage.DNODE_CONTAINER__OWNED_DIAGRAM_ELEMENTS, false, false);
+ for (Object object : children) {
+ if (object instanceof AbstractDNode) {
+ View view = SiriusGMFHelper.getGmfView((AbstractDNode) object);
+ Rectangle bounds = getFreeformViewport(view);
+ ElementToRefresh.addPositionElement((AbstractDNode) object, bounds);
+ }
+ }
+
+ List<Object> list = new ArrayList<>();
+ Iterator<?> iterator = children.iterator();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ if (next instanceof DNodeContainer && ((DNodeContainer) next).getTarget() instanceof Region) {
+ continue;
+ }
+ if (!next.equals(containerView)) {
+ list.add(next);
+ }
+ }
+
+ ((DNodeContainerImpl) newView).eSet(DiagramPackage.DNODE_CONTAINER__OWNED_DIAGRAM_ELEMENTS, list);
+ }
+ return newView;
+ }
+
+
+ /**
+ * Apply layout data.
+ *
+ * @param object
+ * the object
+ * @param containerView
+ * the container view
+ */
+ public void applyLayoutData(EObject object, EObject containerView) {
+ if (containerView instanceof DNodeContainer) {
+ DDiagram parentDiagram = ((DNodeContainer) containerView).getParentDiagram();
+ EList<DDiagramElement> diagramElements = parentDiagram.getDiagramElements();
+ for (DDiagramElement dDiagramElement : diagramElements) {
+ if ((dDiagramElement instanceof DNodeContainer) && ((DNodeContainer) dDiagramElement).getActualMapping().getName().equals("Region")) {
+ continue;
+ }
+ if (ElementToRefresh.toReposition.containsKey(dDiagramElement)) {
+ Rectangle rectangle = ElementToRefresh.toReposition.get(dDiagramElement);
+ Point point = new Point(rectangle.x, rectangle.y);
+ Dimension dim = new Dimension(rectangle.width, rectangle.height);
+ RootLayoutData layoutData = new RootLayoutData(dDiagramElement, point, dim);
+ manageSubLayoutData(dDiagramElement);
+ SiriusLayoutDataManager.INSTANCE.addData(layoutData);
+
+ }
+ }
+ }
+ ElementToRefresh.toReposition.clear();
+ }
+
+
+ /**
+ * Manage sub layout data.
+ *
+ * @param element
+ * the element
+ */
+ private void manageSubLayoutData(DDiagramElement element) {
+ if (element instanceof DNodeContainer) {
+ List<DDiagramElement> ownedDiagramElements = new ArrayList<>(((DNodeContainer) element).getOwnedDiagramElements());
+ EList<DNode> ownedBorderedNodes = ((DNodeContainer) element).getOwnedBorderedNodes();
+ ownedDiagramElements.addAll(ownedBorderedNodes);
+
+ for (DDiagramElement dDiagramElement : ownedDiagramElements) {
+ // if ((dDiagramElement instanceof DNodeContainer) && ((DNodeContainer) dDiagramElement).getActualMapping().getName().equals("Region")) {
+ // manageSubLayoutData(dDiagramElement);
+ // continue;
+ // }
+ View view = SiriusGMFHelper.getGmfView(dDiagramElement);
+ Rectangle rectangle = getFreeformViewport(view);
+ Point point = new Point(rectangle.x, rectangle.y);
+ Dimension dim = new Dimension(rectangle.width, rectangle.height);
+ RootLayoutData subLayout = new RootLayoutData(dDiagramElement, point, dim);
+ manageSubLayoutData(dDiagramElement);
+ SiriusLayoutDataManager.INSTANCE.addData(subLayout);
+ }
+ }
+ }
+
+
+
+ /**
+ * Gets the children view.
+ *
+ * @param object
+ * the object
+ * @return the children view
+ */
+ public List<DDiagramElement> getChildrenView(EObject object) {
+
+ if (object instanceof DNodeContainer) {
+ DDiagramElement f;
+ List<DDiagramElement> ownedDiagramElements = ((DNodeContainer) object).getOwnedDiagramElements().stream().filter(d -> (d instanceof DNodeContainer)).map(d -> (DNodeContainer) d).filter(d -> d.getActualMapping().getName().equals("Region"))
+ .collect(Collectors.toList());
+ return ownedDiagramElements;
+ }
+ return null;
+ }
+
+ /**
+ * Gets the freeform viewport.
+ *
+ * @param containerView
+ * the new bounds
+ * @return the freeform viewport
+ */
+ public void setBounds(EObject containerView) {
+
+ if (containerView instanceof DNodeContainer) {
+
+ View view = SiriusGMFHelper.getGmfView((DNodeContainer) containerView);
+
+ IEditorPart editor = EclipseUIUtil.getActiveEditor();
+ if (editor instanceof DiagramEditor) {
+
+ final Map<?, ?> editPartRegistry = ((DiagramEditor) editor).getDiagramGraphicalViewer().getEditPartRegistry();
+ final AbstractGraphicalEditPart editPart = (AbstractGraphicalEditPart) editPartRegistry.get(view);
+ EditPart parent = editPart.getParent();
+ if (parent instanceof AbstractGraphicalEditPart) {
+ IFigure figure = ((AbstractGraphicalEditPart) parent).getFigure();
+ if (figure != null) {
+ Rectangle bounds = figure.getBounds();
+ Point point = new Point(bounds.x, bounds.y);
+ Dimension dim = new Dimension(bounds.width, bounds.height);
+ SiriusLayoutDataManager.INSTANCE.addData(new RootLayoutData(containerView, point, dim));
+ }
+ }
+
+
+
+ }
+ }
+ }
+
+ /**
+ * Return all constriantedElement for given Constraint <b> Exception for PartDeploymentLink (return its
+ * DeployedElement) <b>.
+ *
+ * @param object
+ * the object
+ * @return the list
+ */
+ public List<?> targeFinderExpressionForConstraint(EObject object) {
+ List<EObject> result = new ArrayList<>();
+ if (object instanceof Comment) {
+ Comment comment = (Comment) object;
+
+ EList<Element> annotatedElements = comment.getAnnotatedElements();
+ for (Element element : annotatedElements) {
+ if (element instanceof Region) {
+ EObject stateParent = getStateParent(element);
+ result.add(stateParent);
+ } else {
+ result.add(element);
+ }
+ }
+ }
+ if (object instanceof Constraint) {
+ Constraint constraint = (Constraint) object;
+ EList<Element> constrainedElements = constraint.getConstrainedElements();
+ result.addAll(constrainedElements);
+ }
+ return result;
+ }
+
+ /**
+ * Gets the constraint label.
+ *
+ * @param object
+ * the object
+ * @return the constraint label
+ */
+ public String getConstraintLabel(EObject object) {
+
+ if (object instanceof Constraint) {
+
+ String name = ((Constraint) object).getName();
+ EList<String> languages = null;
+ EList<String> bodies = null;
+ ValueSpecification specification = ((Constraint) object).getSpecification();
+ if (specification instanceof OpaqueExpression) {
+ languages = ((OpaqueExpression) specification).getLanguages();
+ bodies = ((OpaqueExpression) specification).getBodies();
+ }
+ String langage = "";
+ if (languages != null && !languages.isEmpty()) {
+ langage = languages.get(0);
+ }
+ String body = "";
+ if (bodies != null && !bodies.isEmpty()) {
+ body = bodies.get(0);
+ }
+ String result = name + "\n" + "{{" + langage + "}" + body + "}";
+ return result;
+ }
+ return "";
+ }
+
+
+ /**
+ * Sets the body.
+ *
+ * @param context
+ * the context
+ * @param value
+ * the value
+ * @return the e object
+ */
+ public EObject setBody(EObject context, String value) {
+ if (context instanceof Constraint) {
+ ValueSpecification specification = ((Constraint) context).getSpecification();
+ if (specification instanceof OpaqueExpression) {
+ EList<String> bodies = ((OpaqueExpression) specification).getBodies();
+ bodies.remove(0);
+ bodies.add(0, value);
+ }
+ }
+ return context;
+ }
+
+
+
+ /**
+ * Gets the body from constraint.
+ *
+ * @param object
+ * the object
+ * @return the body from constraint
+ */
+ public String getBodyFromConstraint(EObject object) {
+
+ if (object instanceof Constraint) {
+
+ EList<String> bodies = null;
+ ValueSpecification specification = ((Constraint) object).getSpecification();
+ if (specification instanceof OpaqueExpression) {
+ bodies = ((OpaqueExpression) specification).getBodies();
+ }
+ String body = "";
+ if (bodies != null && !bodies.isEmpty()) {
+ body = bodies.get(0);
+ }
+
+ String result = body;
+ return result;
+
+ }
+ return "";
+ }
+
+ /**
+ * Gets the context parent.
+ *
+ * @param element
+ * the element
+ * @return the context parent
+ */
+ public EObject getContextParent(EObject element) {
+
+ if (element instanceof Constraint) {
+ EObject eContainer = element.eContainer();
+ return eContainer;
+ }
+ return null;
+ }
+
+ /**
+ * Check container view context.
+ *
+ * @param element
+ * the element
+ * @param containerView
+ * the container view
+ * @return true, if successful
+ */
+ public boolean checkContainerViewContext(EObject element, EObject containerView) {
+
+ if (containerView instanceof DNode) {
+
+ EObject eContainer = containerView.eContainer();
+ if (eContainer instanceof DNodeContainer) {
+ DNodeContainer stateViewParent = (DNodeContainer) getStateViewParent(eContainer);
+ if (stateViewParent.getTarget().equals(element.eContainer())) {
+ return false;
+ }
+ }
+
+ }
+ return true;
+
+ }
+
+ /**
+ * Gets the context parent view.
+ *
+ * @param object
+ * the object
+ * @return the context parent view
+ */
+ public EObject getContextParentView(EObject object) {
+
+ if (object instanceof DNodeContainer) {
+ return getStateViewParent(object);
+ }
+ if (object instanceof DNode) {
+ return getContextParentView(object.eContainer());
+ }
+ return null;
+
+ }
+
+ /**
+ * Gets the pre condition.
+ *
+ * @param object
+ * the object
+ * @return the pre condition
+ */
+ public boolean getPreCondition(EObject object) {
+ if (object instanceof Model) {
+ return true;
+ }
+ if (object instanceof StateMachine) {
+ return true;
+ }
+ if (object instanceof State) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Gets the root.
+ *
+ * @param object
+ * the object
+ * @return the root
+ */
+ public EObject getRoot(EObject object) {
+
+ if (object instanceof Model) {
+ return object;
+ } else if (object instanceof StateMachine) {
+ return ((StateMachine) object).getModel();
+ }
+ return null;
+
+ }
+
+ /**
+ * Compute border line size.
+ *
+ * @param context
+ * the context
+ * @param view
+ * the view
+ * @return the int
+ */
+ public int computeBorderLineSize(EObject context, EObject view) {
+ if (view instanceof DNodeContainer) {
+ if (((DNodeContainer) view).getActualMapping().getName().equals("Region")) {
+ if (((DNodeContainer) view).getElements().size() > 0) {
+ return 0;
+ }
+ }
+
+ }
+ return 1;
+ }
+
+
+ /**
+ * Gets the other region.
+ *
+ * @param containerView
+ * the container view
+ * @param object
+ * the object
+ * @return the other region
+ */
+ public EObject getOtherRegion(DNodeContainer containerView, EObject object) {
+
+ EList<DDiagramElement> ownedDiagramElements = containerView.getOwnedDiagramElements();
+ for (DDiagramElement dDiagramElement : ownedDiagramElements) {
+ if (!dDiagramElement.getTarget().equals(object)) {
+ return dDiagramElement;
+ }
+ }
+
+ return null;
+
+ }
+
+ /**
+ * Save initial state machine.
+ *
+ * @param object
+ * the object
+ */
+ public void saveInitialStateMachine(EObject object) {
+ if (object instanceof StateMachine) {
+ ElementToRefresh.saveStateMachine((StateMachine) object);
+ }
+ }
+
+
+ /**
+ * Gets the state element.
+ *
+ * @param container
+ * the container
+ * @param containerView
+ * the container view
+ * @return the state element
+ */
+ public List<?> getStateElement(EObject container, EObject containerView) {
+
+ if (containerView instanceof DSemanticDiagram) {
+ EObject target = ((DSemanticDiagram) containerView).getTarget();
+ if (target instanceof State) {
+ List<EObject> list = new ArrayList<>();
+ list.add(target);
+ return list;
+ }
+ } else {
+ if (containerView instanceof DNodeContainer) {
+ EObject target = ((DNodeContainer) containerView).getTarget();
+ if (target instanceof Region) {
+ return ((Region) target).getSubvertices();
+ }
+ }
+ }
+
+ return null;
+ }
+ // aql:'/entry '+ self.getTypeName() + self.getName()
+
+ /**
+ * Gets the type name.
+ *
+ * @param object the object
+ * @return the type name
+ */
+ public String getTypeName(EObject object) {
+
+ String name = object.eClass().getName();
+
+ return name;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @param object the object
+ * @return the name
+ */
+ public String getName(EObject object) {
+
+ if (object instanceof NamedElement) {
+ return ((NamedElement) object).getName();
+ }
+
+ return "";
+ }
+
+ /**
+ * get the text concerning guard.
+ *
+ * @param trans the trans
+ * @return the text for guard
+ */
+ public String getTextForGuard(Transition trans) {
+ Constraint constraint = trans.getGuard();
+ if (constraint != null) {
+ String value;
+ if (constraint.getSpecification() != null) {
+ value = ValueSpecificationUtil.getConstraintnValue(constraint);
+ } else {
+ String name = UMLLabelInternationalization.getInstance().getLabel(constraint);
+ if (name == null) {
+ name = "<undef>"; //$NON-NLS-1$
+ }
+ value = String.format("%s (no spec)", name); //$NON-NLS-1$
+ }
+ if (value != null) {
+ return String.format("[%s]", value); //$NON-NLS-1$
+ }
+ }
+ return "";
+ }
+
+
+ /**
+ * Gets the value string.
+ *
+ * @param trans the trans
+ * @param containerView the container view
+ * @return the value string
+ */
+ public String getValueString(Transition trans, EObject containerView) {
+ StringBuilder result = new StringBuilder();
+ View view = SiriusGMFHelper.getGmfView((DDiagramElement) containerView);
+ String textForTrigger = getTextForTrigger(view, trans);
+ if (textForTrigger != null && !"".equals(textForTrigger)) {
+ result.append(textForTrigger);
+ }
+ result.append(getTextForGuard(trans));
+ String textForEffect = getTextForEffect(view, trans);
+ if (textForEffect != null && !"".equals(textForEffect)) {
+ result.append("/"); //$NON-NLS-1$
+ if (lineBreakBeforeEffect(view)) {
+ result.append("\n"); //$NON-NLS-1$
+ }
+ result.append(textForEffect);
+ }
+ return result.toString();
+ }
+
+ /**
+ * Line break before effect.
+ *
+ * @param view the view
+ * @return true, if the presence of parameters should be indicated by (...)
+ */
+ public boolean lineBreakBeforeEffect(View view) {
+ IPreferenceStore preferenceStore = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+ boolean prefValue = preferenceStore.getBoolean(PreferenceConstants.LINEBREAK_BEFORE_EFFECT);
+ return NotationUtils.getBooleanValue(view, CSSOptionsConstants.LINEBREAK_BEFORE_EFFECT, prefValue);
+ }
+
+ /**
+ * get the text concerning Effects.
+ *
+ * @param view the view
+ * @param trans the trans
+ * @return the text for effect
+ */
+ protected String getTextForEffect(View view, Transition trans) {
+ StringBuilder result = new StringBuilder();
+ Behavior effect = trans.getEffect();
+ if (effect != null) {
+ EClass eClass = effect.eClass();
+ if (effect instanceof OpaqueBehavior) {
+ OpaqueBehavior ob = (OpaqueBehavior) effect;
+ if (ob.getBodies().size() > 0) {
+ // return body of behavior (only handle case of a single body)
+ result.append(OpaqueBehaviorViewUtil.retrieveBody(view, ob));
+ return result.toString();
+ }
+ }
+ if (eClass != null) {
+ result.append(eClass.getName()).append(": ").append(UMLLabelInternationalization.getInstance().getLabel(effect)); //$NON-NLS-1$
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * Get the text concerning Trigger.
+ *
+ * @param view the view
+ * @param trans the trans
+ * @return the text for trigger
+ */
+ protected String getTextForTrigger(View view, Transition trans) {
+ StringBuilder result = new StringBuilder();
+ boolean isFirstTrigger = true;
+ for (Trigger t : trans.getTriggers()) {
+ if (t != null) {
+ if (!isFirstTrigger) {
+ result.append(", "); //$NON-NLS-1$
+ } else {
+ isFirstTrigger = false;
+ }
+ Event e = t.getEvent();
+ if (e instanceof CallEvent) {
+ Operation op = ((CallEvent) e).getOperation();
+ if (op != null) {
+ result.append(UMLLabelInternationalization.getInstance().getLabel(op));
+ if ((op.getOwnedParameters().size() > 0) && OpaqueBehaviorViewUtil.displayParamDots(view)) {
+ result.append(OpaqueBehaviorViewUtil.PARAM_DOTS);
+ }
+ } else {
+ result.append(UMLLabelInternationalization.getInstance().getLabel((e)));
+ }
+ } else if (e instanceof SignalEvent) {
+ Signal signal = ((SignalEvent) e).getSignal();
+ if (signal != null) {
+ result.append(UMLLabelInternationalization.getInstance().getLabel(signal));
+ if ((signal.getAttributes().size() > 0) && OpaqueBehaviorViewUtil.displayParamDots(view)) {
+ result.append(OpaqueBehaviorViewUtil.PARAM_DOTS);
+ }
+ } else {
+ result.append(UMLLabelInternationalization.getInstance().getLabel((e)));
+ }
+ } else if (e instanceof ChangeEvent) {
+ ValueSpecification vs = ((ChangeEvent) e).getChangeExpression();
+ String value;
+ if (vs instanceof OpaqueExpression) {
+ value = OpaqueBehaviorViewUtil.retrieveBody(view, (OpaqueExpression) vs);
+ } else {
+ value = vs.stringValue();
+ }
+ result.append(value);
+ } else if (e instanceof TimeEvent) {
+ TimeEvent timeEvent = (TimeEvent) e;
+ // absRelPrefix
+ result.append(timeEvent.isRelative() ? "after " : "at "); //$NON-NLS-1$ //$NON-NLS-2$
+ // body
+ TimeExpression te = timeEvent.getWhen();
+ String value;
+ if (te != null) {
+ ValueSpecification vs = te.getExpr();
+ if (vs instanceof OpaqueExpression) {
+ value = OpaqueBehaviorViewUtil.retrieveBody(view, (OpaqueExpression) vs);
+ } else {
+ value = vs.stringValue();
+ }
+ } else {
+ value = "undefined"; //$NON-NLS-1$
+ }
+ result.append(value);
+ } else { // any receive event
+ result.append("all"); //$NON-NLS-1$
+ }
+ }
+ }
+ return result.toString();
+ }
+
+
+ /**
+ * Gets the text for trigger.
+ *
+ * @param view the view
+ * @param trigger the trigger
+ * @return the text for trigger
+ */
+ public String getTextForTrigger(View view, Trigger trigger) {
+ StringBuilder result = new StringBuilder();
+ if (trigger != null) {
+ Event e = trigger.getEvent();
+ if (e instanceof CallEvent) {
+ Operation op = ((CallEvent) e).getOperation();
+ if (op != null) {
+ result.append(UMLLabelInternationalization.getInstance().getLabel(op));
+ if ((op.getOwnedParameters().size() > 0) && OpaqueBehaviorViewUtil.displayParamDots(view)) {
+ result.append(OpaqueBehaviorViewUtil.PARAM_DOTS);
+ }
+ } else {
+ result.append(UMLLabelInternationalization.getInstance().getLabel((e)));
+ }
+ } else if (e instanceof SignalEvent) {
+ Signal signal = ((SignalEvent) e).getSignal();
+ if (signal != null) {
+ result.append(UMLLabelInternationalization.getInstance().getLabel(signal));
+ if ((signal.getAttributes().size() > 0) && OpaqueBehaviorViewUtil.displayParamDots(view)) {
+ result.append(OpaqueBehaviorViewUtil.PARAM_DOTS);
+ }
+ } else {
+ result.append(UMLLabelInternationalization.getInstance().getLabel((e)));
+ }
+ } else if (e instanceof ChangeEvent) {
+ ValueSpecification vs = ((ChangeEvent) e).getChangeExpression();
+ String value;
+ if (vs instanceof OpaqueExpression) {
+ value = OpaqueBehaviorViewUtil.retrieveBody(view, (OpaqueExpression) vs);
+ } else {
+ value = vs.stringValue();
+ }
+ result.append(value);
+ } else if (e instanceof TimeEvent) {
+ TimeEvent timeEvent = (TimeEvent) e;
+ // absRelPrefix
+ result.append(timeEvent.isRelative() ? "after " : "at "); //$NON-NLS-1$ //$NON-NLS-2$
+ // body
+ TimeExpression te = timeEvent.getWhen();
+ String value;
+ if (te != null) {
+ ValueSpecification vs = te.getExpr();
+ if (vs instanceof OpaqueExpression) {
+ value = OpaqueBehaviorViewUtil.retrieveBody(view, (OpaqueExpression) vs);
+ } else {
+ value = vs.stringValue();
+ }
+ } else {
+ value = "undefined"; //$NON-NLS-1$
+ }
+ result.append(value);
+ } else { // any receive event
+ result.append("all"); //$NON-NLS-1$
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * Gets the text trigger.
+ *
+ * @param trigger the trigger
+ * @param containerView the container view
+ * @return the text trigger
+ */
+ public String getTextTrigger(Trigger trigger, EObject containerView) {
+ StringBuilder result = new StringBuilder();
+ View view = SiriusGMFHelper.getGmfView((DDiagramElement) containerView);
+ if (trigger.getEvent() != null) {
+ result.append(TriggerUtil.getTextForTrigger(view, trigger));
+ }
+ result.append(" ");
+ result.append(Messages.DeferrableTriggerParser_DEFER_KEYWORD);
+ return result.toString();
+ }
+
+ /**
+ * Checks for graphical region.
+ *
+ * @param containerView the container view
+ * @return true, if successful
+ */
+ public boolean hasGraphicalRegion(DNodeContainer containerView) {
+ EList<DDiagramElement> ownedDiagramElements = containerView.getOwnedDiagramElements();
+ for (DDiagramElement dDiagramElement : ownedDiagramElements) {
+ if (dDiagramElement instanceof DNodeContainer) {
+ if (dDiagramElement.getTarget() instanceof Region) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Dnd border pseudo state.
+ *
+ * @param context the context
+ * @param newContainer the new container
+ */
+ public void dndBorderPseudoState(EObject context, EObject newContainer) {
+ if (context instanceof Pseudostate) {
+ if (newContainer instanceof State) {
+ ((State) newContainer).getConnectionPoints().add((Pseudostate) context);
+ }
+ if (newContainer instanceof Region) {
+ EObject stateParent = getStateParent(context);
+ ((State) stateParent).getConnectionPoints().add((Pseudostate) context);
+
+ }
+ }
+
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/custom/StateMachineRegionPolicy.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/custom/StateMachineRegionPolicy.java
new file mode 100755
index 0000000..13d2d86
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/custom/StateMachineRegionPolicy.java
@@ -0,0 +1,468 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram.custom;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.LayerConstants;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editparts.LayerManager;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GroupEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomRegionCreateElementCommand;
+import org.eclipse.sirius.diagram.description.tool.ContainerCreationDescription;
+import org.eclipse.uml2.uml.State;
+
+/**
+ * The Class MyRegionPolicy.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+public class StateMachineRegionPolicy extends CreationEditPolicy {
+
+ /** The size on drop feedback. */
+ IFigure sizeOnDropFeedback = null;
+
+ /** The drop location. */
+ String dropLocation = "";
+
+ /**
+ * Erase target feedback.
+ *
+ * @param request
+ * the request
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#eraseTargetFeedback(org.eclipse.gef.Request)
+ */
+
+ @Override
+ public void eraseTargetFeedback(Request request) {
+ if (sizeOnDropFeedback != null) {
+ LayerManager.Helper.find(getHost()).getLayer(LayerConstants.FEEDBACK_LAYER).remove(sizeOnDropFeedback);
+ sizeOnDropFeedback = null;
+ }
+ }
+
+ /**
+ * Gets the reparent command.
+ *
+ * @param changeBoundsRequest the change bounds request
+ * @return the reparent command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy#getReparentCommand(org.eclipse.gef.requests.ChangeBoundsRequest)
+ */
+
+ @Override
+ protected Command getReparentCommand(ChangeBoundsRequest changeBoundsRequest) {
+ View container = getHost().getAdapter(View.class);
+ EObject context = container == null ? null : ViewUtil.resolveSemanticElement(container);
+ CompositeCommand cc = new CompositeCommand("move (re-parent) state");
+ Iterator<?> it = changeBoundsRequest.getEditParts().iterator();
+ while (it.hasNext()) {
+ Object next = it.next();
+ if (next instanceof EditPart) {
+ EditPart ep = (EditPart) next;
+ if (ep instanceof LabelEditPart) {
+ continue;
+ }
+ if (ep instanceof GroupEditPart) {
+ cc.compose(getReparentGroupCommand((GroupEditPart) ep));
+ }
+ View view = ep.getAdapter(View.class);
+ if (view == null) {
+ continue;
+ }
+ EObject semantic = ViewUtil.resolveSemanticElement(view);
+ if (semantic == null) {
+ cc.compose(getReparentViewCommand((IGraphicalEditPart) ep));
+ } else if (context != null && shouldReparent(semantic, context)) {
+ cc.compose(getReparentCommand((IGraphicalEditPart) ep));
+ if (semantic instanceof State) {
+ // State state = (State) semantic;
+ // correct container of transitions
+// for (Transition transition : state.getOutgoings()) {
+// cc.compose(new EMFtoGMFCommandWrapper(
+// new EMFCustomTransitionRetargetContainerCommand(transition)));
+// }
+// for (Transition transition : state.getIncomings()) {
+// cc.compose(new EMFtoGMFCommandWrapper(
+// new EMFCustomTransitionRetargetContainerCommand(transition)));
+// }
+ }
+ }
+ }
+ }
+ return cc.isEmpty() ? null : new ICommandProxy(cc.reduce());
+ }
+
+ /**
+ * Gets the command.
+ *
+ * @param request
+ * the request
+ * @return the command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy#getCommand(org.eclipse.gef.Request)
+ */
+
+ @Override
+ public Command getCommand(Request request) {
+ // CHECK THIS
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ CompositeTransactionalCommand cc = new CompositeTransactionalCommand(editingDomain, DiagramUIMessages.AddCommand_Label);
+ if (understandsRequest(request)) {
+ if (request instanceof CreateUnspecifiedTypeRequest) {
+ CreateUnspecifiedTypeRequest unspecReq = (CreateUnspecifiedTypeRequest) request;
+ for (Iterator<?> iter = unspecReq.getElementTypes().iterator(); iter.hasNext();) {
+ IElementType elementType = (IElementType) iter.next();
+ if (((IHintedType) elementType).getSemanticHint().equals(((IHintedType) getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Region_Shape")).getSemanticHint())) {
+ // starting point is the existing region compartment on
+ // which mouse was moving
+ View existingRegionCompartmentView = (View) getHost().getModel();
+ // the existing region view
+ View existingRegionView = (View) existingRegionCompartmentView.eContainer();
+ // get and adaptable for it, to pass on to commands
+ IAdaptable adaptableForExistingRegionView = new SemanticAdapter(null, existingRegionView);
+ // do the whole job
+ CustomRegionCreateElementCommand createNewRegion = new CustomRegionCreateElementCommand(adaptableForExistingRegionView, null, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint(), editingDomain,
+ DiagramUIMessages.CreateCommand_Label, dropLocation);
+ cc.compose(createNewRegion);
+ return new ICommandProxy(cc.reduce());
+ }
+ }
+ } else if (request instanceof CreateViewRequest) {
+ CreateViewRequest create = (CreateViewRequest) request;
+ for (CreateViewRequest.ViewDescriptor descriptor : create.getViewDescriptors()) {
+ if (((IHintedType) getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Region_Shape")).getSemanticHint().equals(descriptor.getSemanticHint())) {
+ // Creating a region view as a sibling of the region owning this compartment
+ IAdaptable compartment = new SemanticAdapter(null, ((View) getHost().getModel()).eContainer());
+
+ // Create the view with a reasonable initial layout
+ CustomRegionCreateElementCommand command = new CustomRegionCreateElementCommand(
+ compartment, descriptor.getElementAdapter(),
+ ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint(),
+ editingDomain, DiagramUIMessages.CreateCommand_Label, dropLocation);
+ cc.compose(command);
+ }
+ }
+
+ // It's all-or-nothing: if anything besides regions were being created (which
+ // would be an odd sort of a compound request), then only the regions will be
+ if (!cc.isEmpty()) {
+ return new ICommandProxy(cc.reduce());
+ } else {
+ return super.getCommand(request);
+ }
+ } else if (request instanceof ChangeBoundsRequest) {
+ return getReparentCommand((ChangeBoundsRequest) request);
+ /*
+ * ChangeBoundsRequest changeBoundsRequest = (ChangeBoundsRequest)request;
+ * Point mouseLocation = changeBoundsRequest.getLocation();
+ *
+ * DropObjectsRequest dropRequest = new DropObjectsRequest();
+ * dropRequest.setLocation(mouseLocation);
+ *
+ * List<View> list = new ArrayList<View>();
+ * Iterator<EditPart> it = changeBoundsRequest.getEditParts().iterator();
+ * while(it.hasNext()) {
+ * EditPart ep = it.next();
+ * if(ep instanceof RegionEditPart) {
+ * View regionToDrag = (View)ep.getModel();
+ * list.add(regionToDrag);
+ * }
+ * }
+ * View container = (View)getHost().getAdapter(View.class);
+ * EObject context = container == null ? null : ViewUtil.resolveSemanticElement(container);
+ * dropRequest.setObjects(list);
+ * return getHost().getCommand(dropRequest);
+ */
+ }
+
+ return super.getCommand(request);
+ }
+ return null;
+ }
+
+
+
+
+ /**
+ * Gets the element type by unique id.
+ *
+ * @param id the id
+ * @return the element type by unique id
+ * @generated
+ */
+ private static IElementType getElementTypeByUniqueId(String id) {
+ return ElementTypeRegistry.getInstance().getType(id);
+ }
+ /**
+ * Gets the size on drop feedback.
+ *
+ * @return the size on drop feedback
+ */
+ protected IFigure getSizeOnDropFeedback() {
+ if (sizeOnDropFeedback == null) {
+ sizeOnDropFeedback = new RectangleFigure();
+ FigureUtilities.makeGhostShape((Shape) sizeOnDropFeedback);
+ ((Shape) sizeOnDropFeedback).setLineStyle(Graphics.LINE_DASHDOT);
+ sizeOnDropFeedback.setForegroundColor(ColorConstants.white);
+ LayerManager.Helper.find(getHost()).getLayer(LayerConstants.FEEDBACK_LAYER).add(sizeOnDropFeedback);
+ }
+ return sizeOnDropFeedback;
+ }
+
+ /**
+ * Gets the drop location.
+ *
+ * @return the drop location
+ */
+ public String getDropLocation() {
+ return dropLocation;
+ }
+
+ /**
+ * Gets the target edit part.
+ *
+ * @param request
+ * the request
+ * @return the target edit part
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy#getTargetEditPart(org.eclipse.gef.Request)
+ */
+
+ // @Override
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+ if (request instanceof CreateUnspecifiedTypeRequest) {
+ CreateUnspecifiedTypeRequest createUnspecifiedTypeRequest = (CreateUnspecifiedTypeRequest) request;
+ if (understandsRequest(request)) {
+ List<?> elementTypes = createUnspecifiedTypeRequest.getElementTypes();
+ // Treat the case where only one element type is listed
+ // Only take EntryPoint or ExitPoint element type into account
+ if ((elementTypes.size() == 1) && (((IElementType) (elementTypes.get(0)) == getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Pseudostate_EntryPointShape")) || ((IElementType) (elementTypes.get(0)) ==getElementTypeByUniqueId("org.eclipse.papyrus.umldi.Pseudostate_ExitPointShape")))) {
+ // If the target is a compartment replace by its grand parent edit part
+ if ((getHost() instanceof ShapeCompartmentEditPart)) {
+ return getHost().getParent().getParent().getParent();
+ }
+ }
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * Show target feedback.
+ *
+ * @param request
+ * the request
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#showTargetFeedback(org.eclipse.gef.Request)
+ */
+
+ @Override
+ public void showTargetFeedback(Request request) {
+
+ if (request instanceof CreateRequest) {
+ Object newObject = ((CreateRequest) request).getNewObject();
+ if (newObject instanceof ContainerCreationDescription) {
+ if (((ContainerCreationDescription) newObject).getName().equals("Region")) {
+ // CreateUnspecifiedTypeRequest unspecReq = (CreateUnspecifiedTypeRequest) request;
+ // for (Iterator<?> iter = unspecReq.getElementTypes().iterator(); iter.hasNext();) {
+ // IElementType elementType = (IElementType) iter.next();
+ // if (elementType.equals(UMLElementTypes.Region_Shape)) {
+ IFigure targetFig = ((GraphicalEditPart) getHost()).getFigure();
+ // make a local copy
+ Rectangle targetFigBounds = targetFig.getBounds().getCopy();
+ // transform the coordinates to absolute
+ targetFig.translateToAbsolute(targetFigBounds);
+ // retrieve mouse location
+ Point mouseLocation = ((CreateRequest) request).getLocation();
+ // get the drop location, i.e. RIGHT, LEFT, TOP, BOTTOM
+ dropLocation = Zone.getZoneFromLocationInRectangleWithAbsoluteCoordinates(mouseLocation, targetFigBounds);
+ // perform corresponding change (scaling, translation) on
+ // targetFigBounds
+ // and updates the graph node drop location property
+ if (Zone.isTop(dropLocation)) {
+ targetFigBounds.setSize(targetFigBounds.getSize().scale(1.0, 0.5));
+ } else if (Zone.isLeft(dropLocation)) {
+ targetFigBounds.setSize(targetFigBounds.getSize().scale(0.5, 1.0));
+ } else if (Zone.isRight(dropLocation)) {
+ targetFigBounds.setSize(targetFigBounds.getSize().scale(0.5, 1.0));
+ targetFigBounds.translate(targetFigBounds.width, 0);
+ } else if (Zone.isBottom(dropLocation)) {
+ targetFigBounds.setSize(targetFigBounds.getSize().scale(1.0, 0.5));
+ targetFigBounds.translate(0, targetFigBounds.height);
+ }
+ getSizeOnDropFeedback().setBounds(new PrecisionRectangle(targetFigBounds));
+ // }
+ // }//
+ }
+ }
+
+// } else {
+// super.showTargetFeedback(request);
+ }
+ }
+
+
+
+
+ /**
+ * The Class Zone.
+ */
+ public static class Zone {
+
+ /**
+ * A default empty property string which serves when creating a region
+ * without initial graphical context.
+ */
+ public static final String NONE = "";
+ /**
+ * The code for a region in the TOP part of a given area.
+ */
+ public static final String TOP = "T";
+ /**
+ * The code for a region in the RIGHT part of a given area.
+ */
+ public static final String RIGHT = "R";
+ /**
+ * The code for a region in the BOTTOM part of a given area.
+ */
+ public static final String BOTTOM = "B";
+ /**
+ * The code for a region in the LEFT part of a given area.
+ */
+ public static final String LEFT = "L";
+
+ /**
+ * Computes the zone at location within bounds using absolute coordinates.
+ *
+ * @param location
+ * the location
+ * @param rect
+ * the bounds
+ * @return the zone
+ */
+ public static String getZoneFromLocationInRectangleWithAbsoluteCoordinates(Point location, Rectangle rect) {
+ // d1 is for the first diagonal (going up) rect
+ double d1 = location.y - 1.0 * rect.height / rect.width * (rect.x - location.x) - rect.y - rect.height;
+ // d2 is for the second (going down)
+ double d2 = location.y + 1.0 * rect.height / rect.width * (rect.x - location.x) - rect.y;
+ if ((d1 <= 0) && (d2 <= 0)) {
+ return Zone.TOP;
+ }
+ if ((d1 <= 0) && (d2 > 0)) {
+ return Zone.LEFT;
+ }
+ if ((d1 > 0) && (d2 <= 0)) {
+ return Zone.RIGHT;
+ }
+ if ((d1 > 0) && (d2 > 0)) {
+ return Zone.BOTTOM;
+ }
+ return Zone.NONE;
+ }
+
+ /**
+ * Checks whether the leaf location encoded is TOP.
+ *
+ * @param s
+ * a string
+ * @return boolean true or false
+ */
+ public static boolean isTop(String s) {
+ if (s == null) {
+ return false;
+ }
+ return s.endsWith(Zone.TOP);
+ }
+
+ /**
+ * Checks whether the leaf location encoded is LEFT.
+ *
+ * @param s
+ * a string
+ *
+ * @return boolean true or false
+ */
+ public static boolean isLeft(String s) {
+ if (s == null) {
+ return false;
+ }
+ return s.endsWith(Zone.LEFT);
+ }
+
+ /**
+ * Checks whether the leaf location encoded is BOTTOM.
+ *
+ * @param s
+ * a string
+ *
+ * @return boolean true or false
+ */
+ public static boolean isBottom(String s) {
+ if (s == null) {
+ return false;
+ }
+ return s.endsWith(Zone.BOTTOM);
+ }
+
+ /**
+ * Checks whether the leaf location encoded is RIGHT.
+ *
+ * @param s
+ * a string
+ *
+ * @return boolean true or false
+ */
+ public static boolean isRight(String s) {
+ if (s == null) {
+ return false;
+ }
+ return s.endsWith(Zone.RIGHT);
+ }
+
+ }
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/custom/StateMachineSiriusCreateEditPolicyProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/custom/StateMachineSiriusCreateEditPolicyProvider.java
new file mode 100755
index 0000000..ea9d26c
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.statemachine.diagram/src/org/eclipse/papyrus/uml/sirius/statemachine/diagram/custom/StateMachineSiriusCreateEditPolicyProvider.java
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.statemachine.diagram.custom;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerViewNodeContainerCompartment2EditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerViewNodeContainerCompartmentEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.policies.AbstractCreateEditPolicyProvider;
+import org.eclipse.uml2.uml.Region;
+
+/**
+ * The Class MyCreateEditPolicyProvider.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class StateMachineSiriusCreateEditPolicyProvider extends AbstractCreateEditPolicyProvider {
+
+ /**
+ * Creates the edit policies.
+ *
+ * @param arg0
+ * the arg 0
+ * @see org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider#createEditPolicies(org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ public void createEditPolicies(EditPart editpart) {
+ EditPolicy regionCreationPolicy = new StateMachineRegionPolicy();
+
+ editpart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, regionCreationPolicy);
+ }
+
+ /**
+ * Checks if is valid edit part.
+ *
+ * @param editPart
+ * the edit part
+ * @return true, if is valid edit part
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.policies.AbstractCreateEditPolicyProvider#isValidEditPart(org.eclipse.gef.EditPart)
+ */
+
+ @Override
+ protected boolean isValidEditPart(EditPart editPart) {
+
+ if (editPart instanceof DNodeContainerViewNodeContainerCompartmentEditPart || editPart instanceof DNodeContainerViewNodeContainerCompartment2EditPart) {
+ Object model = editPart.getModel();
+ if (model instanceof NodeImpl) {
+ EObject element = ((NodeImpl) model).getElement();
+ if (element instanceof DNodeContainer) {
+ EObject target = ((DNodeContainer) element).getTarget();
+ if (target instanceof Region) {
+ return true;
+ }
+ }
+ }
+ }
+
+
+ return false;
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.classpath b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.classpath
new file mode 100755
index 0000000..e801ebf
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.project b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.project
new file mode 100755
index 0000000..4cc6839
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.sirius.xtext.integration.ui</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c9545f0
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/META-INF/MANIFEST.MF b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..c9ee980
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.sirius.xtext.integration.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Automatic-Module-Name: org.eclipse.papyrus.uml.sirius.xtext.integration.ui
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.100,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
+ org.eclipse.sirius;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.common.acceleo.aql;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.papyrus.uml.sirius.common.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.common.xtext;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.textedit.state.xtext.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.textedit.state.xtext;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.xtext.integration.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.xtext;bundle-version="[2.25.0,3.0.0)",
+ org.eclipse.xtext.builder;bundle-version="[2.25.0,3.0.0)",
+ org.eclipse.xtext.ui;bundle-version="[2.25.0,3.0.0)",
+ org.eclipse.xtext.xbase;bundle-version="[2.25.0,3.0.0)",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.sirius.diagram.sequence.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.sequence;bundle-version="[6.4.2,7.0.0)"
+Bundle-Activator: org.eclipse.papyrus.uml.sirius.xtext.integration.ui.Activator
+Bundle-Vendor: %providerName
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/about.html b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/build.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/build.properties
new file mode 100755
index 0000000..e9863e2
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/plugin.properties b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/plugin.properties
new file mode 100755
index 0000000..da97b9a
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/plugin.properties
@@ -0,0 +1,2 @@
+pluginName = Papyrus-SiriusDiagram - Sirius xtext integration plugin
+providerName = Eclipse Modeling Project
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/plugin.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/plugin.xml
new file mode 100755
index 0000000..130fb08
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.uml.sirius.xtext.integration.ui.XtextSiriusEditPartProvider">
+ <Priority
+ name="High">
+ </Priority>
+ </editpartProvider>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
+ <ParserProvider
+ class="org.eclipse.papyrus.uml.sirius.xtext.integration.ui.XTextSiriusParserProvider">
+ <Priority
+ name="Low">
+ </Priority>
+ </ParserProvider>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/pom.xml b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/pom.xml
new file mode 100755
index 0000000..3b9f0ae
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/pom.xml
@@ -0,0 +1,11 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.sirius.xtext.integration.ui</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/Activator.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/Activator.java
new file mode 100755
index 0000000..4497dc0
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/Activator.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The Class Activator.
+ */
+
+/**
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /** The Constant PLUGIN_ID. */
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.sirius.xtext.integration.ui"; //$NON-NLS-1$
+
+ /** The plugin. */
+ // The shared instance
+ private static Activator plugin;
+
+ /** The log. */
+ public static LogHelper log;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ *
+ * @param context
+ * @throws Exception
+ */
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ *
+ * @param context
+ * @throws Exception
+ */
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XTextSiriusParserProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XTextSiriusParserProvider.java
new file mode 100755
index 0000000..264c7fc
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XTextSiriusParserProvider.java
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNode3EditPart;
+import org.eclipse.sirius.diagram.ui.internal.parsers.MessageFormatParser;
+import org.eclipse.sirius.diagram.ui.internal.providers.SiriusParserProvider;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
+
+/**
+ * The Class XTextSiriusParserProvider.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XTextSiriusParserProvider extends SiriusParserProvider {
+
+
+ /**
+ * Gets the parser.
+ *
+ * @param visualID the visual ID
+ * @return the parser
+ * @see org.eclipse.sirius.diagram.ui.internal.providers.SiriusParserProvider#getParser(int)
+ */
+
+ @Override
+ protected IParser getParser(int visualID) {
+
+ switch (visualID) {
+ case DNode3EditPart.VISUAL_ID:
+ return getDNodeBody_Parser();
+ }
+
+ return super.getParser(visualID);
+ }
+
+ /** The d edge name 6002 parser. */
+ private IParser dNodeBodyParser;
+
+ /**
+ * Gets the d node body parser.
+ *
+ * @return the d node body parser
+ */
+ private IParser getDNodeBody_Parser() {
+ if (dNodeBodyParser == null) {
+ dNodeBodyParser = createDNodeBody_Parser();
+ }
+ return dNodeBodyParser;
+ }
+
+ /**
+ * Creates the D node body parser.
+ *
+ * @return the i parser
+ */
+ protected IParser createDNodeBody_Parser() {
+ EAttribute[] features = new EAttribute[] { ViewpointPackage.eINSTANCE.getDRepresentationElement_Name(), };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ return parser;
+ }
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XtextSiriusEditPartFactory.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XtextSiriusEditPartFactory.java
new file mode 100755
index 0000000..9a0c12e
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XtextSiriusEditPartFactory.java
@@ -0,0 +1,159 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart.XtextDEdgeNameEditPart;
+import org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart.XtextSiriusDNode3EditPart;
+import org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart.XtextSiriusDNodeContainerName2EditPart;
+import org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart.XtextSiriusDNodeContainerNameEditPart;
+import org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart.XtextSiriusDNodeListElementEditPart;
+import org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart.XtextSiriusDNodeNameEditPart;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.DiagramPackage;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.CombinedFragment;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.EndOfLife;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Execution;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.InstanceRole;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.InteractionUse;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.LostMessageEnd;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Message;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ObservationPoint;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Operand;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.State;
+import org.eclipse.sirius.diagram.sequence.business.internal.metamodel.SequenceDDiagramSpec;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.CombinedFragmentCompartmentEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.CombinedFragmentEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.EndOfLifeEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.ExecutionEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.InstanceRoleEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.InteractionUseEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.LifelineEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.LostMessageEndEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.ObservationPointEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.OperandCompartmentEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.OperandEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.SequenceDiagramEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.SequenceMessageNameEditPart;
+import org.eclipse.sirius.diagram.sequence.ui.tool.internal.edit.part.StateEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DDiagramEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeNameEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNode3EditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerName2EditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerNameEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeListElementEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.NotationViewIDs;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.SiriusEditPartFactory;
+import org.eclipse.sirius.diagram.ui.part.SiriusVisualIDRegistry;
+
+/**
+ * A factory for creating ITextAwareEditPart EditPart objects.
+ */
+@SuppressWarnings("restriction")
+public class XtextSiriusEditPartFactory extends SiriusEditPartFactory {
+
+ /**
+ * Creates a new ITextAwareEditPart EditPart object.
+ * This method allows to extends Sirius graphical model elements to integrate Xtext.
+ *
+ * @param context
+ * the context
+ * @param model
+ * the model
+ * @return the edits the part
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.SiriusEditPartFactory#createEditPart(org.eclipse.gef.EditPart, java.lang.Object)
+ */
+
+ @Override
+ public EditPart createEditPart(EditPart context, Object model) {
+
+ if (model instanceof View) {
+ final View view = (View) model;
+
+ //For sequence diagram edit part
+ if (SiriusVisualIDRegistry.getVisualID(view)==(DDiagramEditPart.VISUAL_ID)
+ && view.getElement() instanceof SequenceDDiagramSpec){
+ return new SequenceDiagramEditPart(view);
+ }
+ if (view instanceof Node) {
+ EObject semanticElement = ViewUtil.resolveSemanticElement(view);
+ if (DiagramPackage.eINSTANCE.getDNode().isInstance(semanticElement)) {
+ if (InstanceRole.notationPredicate().apply(view)) {
+ return new InstanceRoleEditPart(view);
+ } else if (Lifeline.notationPredicate().apply(view)) {
+ return new LifelineEditPart(view);
+ } else if (Execution.notationPredicate().apply(view)) {
+ return new ExecutionEditPart (view);
+ } else if (State.notationPredicate().apply(view)) {
+ return new StateEditPart(view);
+ } else if (EndOfLife.notationPredicate().apply(view)) {
+ return new EndOfLifeEditPart(view);
+ } else if (LostMessageEnd.notationPredicate().apply(view)) {
+ return new LostMessageEndEditPart(view);
+ } else if (ObservationPoint.notationPredicate().apply(view)) {
+ return new ObservationPointEditPart(view);
+ }
+ } else if (DiagramPackage.eINSTANCE.getDNodeContainer().isInstance(semanticElement)) {
+ if (InteractionUse.notationPredicate().apply(view)) {
+ return new InteractionUseEditPart(view);
+ } else if (CombinedFragment.notationPredicate().apply(view)) {
+ return new CombinedFragmentEditPart(view);
+ } else if (CombinedFragment.compartmentNotationPredicate().apply(view)) {
+ return new CombinedFragmentCompartmentEditPart(view);
+ } else if (Operand.notationPredicate().apply(view)) {
+ return new OperandEditPart(view);
+ } else if (Operand.compartmentNotationPredicate().apply(view)) {
+ return new OperandCompartmentEditPart(view);
+ }
+ } else if (DiagramPackage.eINSTANCE.getDEdge().isInstance(semanticElement)) {
+ DEdge edge = (DEdge) semanticElement;
+ if (Message.viewpointElementPredicate().apply(edge) && SiriusVisualIDRegistry.getVisualID(view) == SequenceMessageNameEditPart.VISUAL_ID) {
+ return new SequenceMessageNameEditPart(view);
+ }
+ }
+ }
+
+
+ //For other edit part
+ switch (SiriusVisualIDRegistry.getVisualID(view)) {
+ case NotationViewIDs.DNODE_NAME_EDIT_PART_VISUAL_ID:
+ case NotationViewIDs.DNODE_NAME_2_EDIT_PART_VISUAL_ID:
+ case NotationViewIDs.DNODE_NAME_3_EDIT_PART_VISUAL_ID:
+ case NotationViewIDs.DNODE_NAME_4_EDIT_PART_VISUAL_ID:
+ return new XtextSiriusDNodeNameEditPart(view);
+ case DNodeContainerName2EditPart.VISUAL_ID:
+ return new XtextSiriusDNodeContainerName2EditPart(view);
+ case DNodeContainerNameEditPart.VISUAL_ID:
+ return new XtextSiriusDNodeContainerNameEditPart(view);
+ case DNodeListElementEditPart.VISUAL_ID:
+ return new XtextSiriusDNodeListElementEditPart(view);
+ case DNode3EditPart.VISUAL_ID:
+ return new XtextSiriusDNode3EditPart(view);
+ case DEdgeNameEditPart.VISUAL_ID:
+ return new XtextDEdgeNameEditPart(view);
+
+
+ }
+
+ }
+
+ return super.createEditPart(context, model);
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XtextSiriusEditPartProvider.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XtextSiriusEditPartProvider.java
new file mode 100755
index 0000000..748f8c4
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/XtextSiriusEditPartProvider.java
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui;
+
+import org.eclipse.sirius.diagram.ui.internal.providers.SiriusEditPartProvider;
+
+/**
+ * The Class XtextSiriusEditPartProvider allows to provide the new {@link XtextSiriusEditPartFactory}.
+ */
+public class XtextSiriusEditPartProvider extends SiriusEditPartProvider {
+
+ /**
+ * Instantiates a new Xtext sirius edit part provider.
+ * This Provider allows to define a new specific factory to integrate Xtext in the Sirius diagrams.
+ */
+ public XtextSiriusEditPartProvider() {
+ setFactory(new XtextSiriusEditPartFactory());
+ setAllowCaching(true);
+ }
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextDEdgeNameEditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextDEdgeNameEditPart.java
new file mode 100755
index 0000000..d55afd4
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextDEdgeNameEditPart.java
@@ -0,0 +1,147 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeNameEditPart;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The Class XtextDEdgeNameEditPart.
+ * This EditPart extends the sirius {@link DEdgeNameEditPart} to integrate Xtext behavior.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XtextDEdgeNameEditPart extends DEdgeNameEditPart {
+
+
+ /** The configuration. */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * Instantiates a new xtext D edge name edit part.
+ *
+ * @param view
+ * the view
+ */
+ public XtextDEdgeNameEditPart(View view) {
+ super(view);
+ }
+
+
+ /**
+ * Perform direct edit request.
+ *
+ * @param request
+ * the request
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEditRequest(org.eclipse.gef.Request)
+ */
+
+ @Override
+ protected void performDirectEditRequest(final Request request) {
+ EObject resolveSemanticElement = resolveSemanticElement();
+ if (resolveSemanticElement instanceof DEdgeSpec) {
+ EObject target = ((DEdgeSpec) resolveSemanticElement).getTarget();
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + target.eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, target, this);
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, target, this);
+ }
+ configuration.preEditAction(target);
+ }
+
+
+
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(request);
+ }
+ }
+
+
+
+ /**
+ * Initialize direct edit manager.
+ *
+ * @param request
+ * the request
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (request.getExtendedData().get(
+ RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ }
+
+
+ /**
+ * Perform direct edit.
+ *
+ * @param initialCharacter
+ * the initial character
+ */
+ protected void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEdit()
+ */
+
+ @Override
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNode3EditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNode3EditPart.java
new file mode 100755
index 0000000..bd6430d
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNode3EditPart.java
@@ -0,0 +1,390 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.description.tool.DirectEditLabel;
+import org.eclipse.sirius.diagram.tools.internal.command.builders.DirectEditCommandBuilder;
+import org.eclipse.sirius.diagram.ui.graphical.edit.policies.ToolBasedLabelDirectEditPolicy;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNode3EditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.NotationViewIDs;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.SiriusEditPartFactory;
+import org.eclipse.sirius.diagram.ui.internal.edit.policies.SiriusTextSelectionEditPolicy;
+import org.eclipse.sirius.diagram.ui.internal.providers.SiriusElementTypes;
+import org.eclipse.sirius.diagram.ui.internal.providers.SiriusParserProvider;
+import org.eclipse.sirius.diagram.ui.tools.internal.figure.ViewNodeFigure;
+import org.eclipse.sirius.ext.gmf.runtime.gef.ui.figures.SiriusWrapLabel;
+import org.eclipse.sirius.viewpoint.DMappingBased;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The Class XtextSiriusDNode3EditPart.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XtextSiriusDNode3EditPart extends DNode3EditPart implements ITextAwareEditPart {
+
+
+ /**
+ * The parser.
+ *
+ * @was-generated
+ */
+ protected IParser parser;
+ /**
+ * The manager.
+ *
+ * @was-generated
+ */
+ protected DirectEditManager manager;
+
+ /** The configuration. */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * Instantiates a new xtext sirius DNode list element edit part.
+ *
+ * @param view
+ * the view
+ */
+ public XtextSiriusDNode3EditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Perform direct edit request.
+ *
+ * @param request
+ * the request
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEditRequest(org.eclipse.gef.Request)
+ */
+
+ @Override
+ protected void performDirectEditRequest(final Request request) {
+
+ EObject resolveSemanticElement = resolveSemanticElement();
+ if (resolveSemanticElement instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) resolveSemanticElement).getTarget();
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + target.eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, target, this);
+ } else {
+ super.performDirectEditRequest(request);
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, target, this);
+ }
+ configuration.preEditAction(target);
+ }
+
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(request);
+ }
+ }
+
+ /**
+ * Initialize direct edit manager.
+ *
+ * @param request
+ * the request
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditModeEnabled()) {
+ if (request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @param initialCharacter
+ * the initial character
+ */
+ protected void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEdit()
+ */
+
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+ /**
+ * Gets the completion processor.
+ *
+ * @return the completion processor
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart#getCompletionProcessor()
+ */
+
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (resolveSemanticElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(resolveSemanticElement()));
+ }
+
+ /**
+ * Gets the edits the text.
+ *
+ * @return the edits the text
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart#getEditText()
+ */
+
+ @Override
+ public String getEditText() {
+ if (resolveSemanticElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(resolveSemanticElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * Gets the edits the text validator.
+ *
+ * @return the edits the text validator
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart#getEditTextValidator()
+ */
+
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = resolveSemanticElement();
+ final IParser validationParser = getParser();
+ try {
+ final IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ @Override
+ public void run() {
+ setResult(validationParser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (final InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * Gets the parser.
+ *
+ * @return the parser
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart#getParser()
+ */
+
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ final String parserHint = Integer.toString(NotationViewIDs.DNODE_NAME_EDIT_PART_VISUAL_ID);
+ final IAdaptable hintAdapter = new SiriusParserProvider.HintAdapter(SiriusElementTypes.DNode_2001, resolveSemanticElement(), parserHint);
+ parser = ParserService.getInstance().getParser(hintAdapter);
+ }
+ return parser;
+ }
+
+
+ /**
+ * Gets the parser options.
+ *
+ * @return the parser options
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart#getParserOptions()
+ */
+
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * Sets the label text.
+ *
+ * @param text the new label text
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart#setLabelText(java.lang.String)
+ */
+
+ @Override
+ public void setLabelText(String text) {
+ setLabelTextHelper(getContentPane(), text);
+ final Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof SiriusTextSelectionEditPolicy) {
+ ((SiriusTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * Sets the label text helper.
+ *
+ * @param figure the figure
+ * @param text the text
+ * @not-generated
+ */
+ protected void setLabelTextHelper(final IFigure figure, final String text) {
+ if (figure instanceof SiriusWrapLabel) {
+ ((SiriusWrapLabel) figure).setText(text);
+ }
+ else if (figure instanceof ViewNodeFigure) {
+ SiriusWrapLabel nodeLabel = ((ViewNodeFigure) figure).getNodeLabel();
+ setLabelTextHelper(nodeLabel, text);
+ } else if (figure instanceof Label) {
+ ((Label) figure).setText(text);
+ }
+ }
+ /**
+ * Gets the adapter.
+ *
+ * @param key
+ * the key
+ * @return the adapter
+ * @see org.eclipse.sirius.diagram.ui.edit.api.part.AbstractBorderedDiagramElementEditPart#getAdapter(java.lang.Class)
+ */
+
+ @Override
+ public Object getAdapter(Class key) {
+ if (key == EObject.class) {
+ return resolveTargetSemanticElement();
+ }
+ return super.getAdapter(key);
+ }
+
+ /**
+ * Gets the manager.
+ *
+ * @return the manager
+ * @was-generated
+ */
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new TextDirectEditManager(this, SiriusEditPartFactory.getTextCellEditorClass(this), SiriusEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * Sets the manager.
+ *
+ * @param manager
+ * the new manager
+ * @was-generated
+ */
+ protected void setManager(final DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.DNode3EditPart#createDefaultEditPolicies()
+ */
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ // We want a special behavior with direct editing.
+ removeEditPolicy(EditPolicy.DIRECT_EDIT_ROLE);
+ if (isDirectEditEnabled()) {
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new ToolBasedLabelDirectEditPolicy(getEditingDomain()));
+ }
+ super.createDefaultEditPolicies();
+ }
+
+ /**
+ * Test if this edit part must provides the direct edit.
+ *
+ * @return true if the semantic element have a mapping with a direct edit tool and if the parent diagram is not in
+ * LayoutingMode, false otherwise
+ */
+ protected boolean isDirectEditEnabled() {
+ boolean directEditEnabled = false;
+ final EObject eObj = resolveSemanticElement();
+ if (eObj instanceof DMappingBased) {
+ final DMappingBased mappingBasedObject = (DMappingBased) eObj;
+ if (mappingBasedObject.getMapping() != null && mappingBasedObject instanceof DDiagramElement
+ && ((DDiagramElement) mappingBasedObject).getDiagramElementMapping().getLabelDirectEdit() != null) {
+ // check precondition
+ DirectEditLabel labelDirectEdit = ((DDiagramElement) mappingBasedObject).getDiagramElementMapping().getLabelDirectEdit();
+ final DirectEditCommandBuilder builder = new DirectEditCommandBuilder((DDiagramElement) mappingBasedObject, labelDirectEdit, null);
+ directEditEnabled = builder.canDirectEdit();
+ }
+ }
+ return directEditEnabled;
+ }
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeContainerName2EditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeContainerName2EditPart.java
new file mode 100755
index 0000000..319226b
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeContainerName2EditPart.java
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerName2EditPart;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The Class XtextSiriusDNodeContainerName2EditPart.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XtextSiriusDNodeContainerName2EditPart extends DNodeContainerName2EditPart implements ITextAwareEditPart/*,IControlParserForDirectEdit*/ {
+
+ /** The configuration. */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * Instantiates a new {@link XtextSiriusDNodeContainerName2EditPart}.
+ *
+ * @param view
+ * the view
+ */
+ public XtextSiriusDNodeContainerName2EditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Perform direct edit request.
+ *
+ * @param request the request
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEditRequest(org.eclipse.gef.Request)
+ */
+
+ @Override
+ protected void performDirectEditRequest(final Request request) {
+
+ EObject resolveSemanticElement = /*super.*/resolveSemanticElement();
+ if (resolveSemanticElement instanceof DNodeContainerSpec) {
+ EObject target = ((DNodeContainer) resolveSemanticElement).getTarget();
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + target.eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, target, this);
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, target, this);
+ }
+ configuration.preEditAction(target);
+ }
+
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(request);
+ }
+ }
+
+ /**
+ * Initialize direct edit manager.
+ *
+ * @param request the request
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @param initialCharacter the initial character
+ */
+ protected void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEdit()
+ */
+
+ @Override
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeContainerNameEditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeContainerNameEditPart.java
new file mode 100755
index 0000000..5e432a8
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeContainerNameEditPart.java
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerNameEditPart;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The Class XtextSiriusDNodeContainerNameEditPart.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XtextSiriusDNodeContainerNameEditPart extends DNodeContainerNameEditPart implements ITextAwareEditPart {
+
+ /** The configuration. */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * Instantiates a new xtext sirius D node container name edit part.
+ *
+ * @param view the view
+ */
+ public XtextSiriusDNodeContainerNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Perform direct edit request.
+ *
+ * @param request
+ * the request
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEditRequest(org.eclipse.gef.Request)
+ */
+
+ @Override
+ protected void performDirectEditRequest(final Request request) {
+
+ EObject resolveSemanticElement = resolveSemanticElement();
+ if (resolveSemanticElement instanceof DNodeContainerSpec) {
+ EObject target = ((DNodeContainerSpec) resolveSemanticElement).getTarget();
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + target.eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, target, this);
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, target, this);
+ }
+ configuration.preEditAction(target);
+ }
+
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(request);
+ }
+ }
+
+ /**
+ * Initialize direct edit manager.
+ *
+ * @param request
+ * the request
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @param initialCharacter
+ * the initial character
+ */
+ protected void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEdit()
+ */
+
+ @Override
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeListElementEditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeListElementEditPart.java
new file mode 100755
index 0000000..6667978
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeListElementEditPart.java
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and others
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.DNodeListElement;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeListElementEditPart;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The Class XtextSiriusDNodeListElementEditPart.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XtextSiriusDNodeListElementEditPart extends DNodeListElementEditPart implements ITextAwareEditPart {
+
+ /** The configuration. */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * Instantiates a new xtext sirius D node list element edit part.
+ *
+ * @param view the view
+ */
+ public XtextSiriusDNodeListElementEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Perform direct edit request.
+ *
+ * @param request the request
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEditRequest(org.eclipse.gef.Request)
+ */
+
+ @Override
+ protected void performDirectEditRequest(final Request request) {
+
+ EObject resolveSemanticElement = resolveSemanticElement();
+ if (resolveSemanticElement instanceof DNodeListElement) {
+ EObject target = ((DNodeListElement) resolveSemanticElement).getTarget();
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + target.eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, target, this);
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, target, this);
+ }
+ configuration.preEditAction(target);
+ }
+
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(request);
+ }
+ }
+
+ /**
+ * Initialize direct edit manager.
+ *
+ * @param request
+ * the request
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @param initialCharacter
+ * the initial character
+ */
+ protected void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEdit()
+ */
+
+ @Override
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+}
diff --git a/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeNameEditPart.java b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeNameEditPart.java
new file mode 100755
index 0000000..1c2935f
--- /dev/null
+++ b/plugins/uml/sirius/org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src/org/eclipse/papyrus/uml/sirius/xtext/integration/ui/editpart/XtextSiriusDNodeNameEditPart.java
@@ -0,0 +1,146 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.sirius.xtext.integration.ui.editpart;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeNameEditPart;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The Class XtextSiriusDNodeNameEditPart.
+ *
+ * @author Yann Binot (Artal Technologies) <yann.binot@artal.fr>
+ */
+@SuppressWarnings("restriction")
+public class XtextSiriusDNodeNameEditPart extends DNodeNameEditPart implements ITextAwareEditPart {
+
+
+ /** The configuration. */
+ protected IDirectEditorConfiguration configuration;
+
+
+ /**
+ * Instantiates a new xtext sirius D node name edit part.
+ *
+ * @param view the view
+ */
+ public XtextSiriusDNodeNameEditPart(View view) {
+ super(view);
+ }
+
+
+ /**
+ * Perform direct edit request.
+ *
+ * @param request the request
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEditRequest(org.eclipse.gef.Request)
+ */
+
+ @Override
+ protected void performDirectEditRequest(final Request request) {
+
+
+ EObject resolveSemanticElement = resolveSemanticElement();
+ if(resolveSemanticElement instanceof DNodeSpec) {
+ EObject target = ((DNodeSpec) resolveSemanticElement).getTarget();
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + target.eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, target, this);
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, target, this);
+ }
+ configuration.preEditAction(target);
+ }
+
+
+
+ if (configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration) configuration).createDirectEditManager(this));
+ initializeDirectEditManager(request);
+ }
+ }
+
+
+
+ /**
+ * Initialize direct edit manager.
+ *
+ * @param request the request
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (request.getExtendedData().get(
+ RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ }
+
+
+ /**
+ * Perform direct edit.
+ *
+ * @param initialCharacter the initial character
+ */
+ protected void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * Perform direct edit.
+ *
+ * @see org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart#performDirectEdit()
+ */
+
+ @Override
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+}
diff --git a/plugins/uml/sirius/pom.xml b/plugins/uml/sirius/pom.xml
new file mode 100755
index 0000000..e5f3aa5
--- /dev/null
+++ b/plugins/uml/sirius/pom.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.uml.sirius</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.uml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Sirius diagrams for papyrus</name>
+ <modules>
+ <module>org.eclipse.papyrus.uml.sirius.clazz.diagram</module>
+ <module>org.eclipse.papyrus.uml.sirius.common.diagram</module>
+ <module>org.eclipse.papyrus.uml.sirius.diagram.architecture</module>
+ <module>org.eclipse.papyrus.uml.sirius.sequence.diagram</module>
+ <module>org.eclipse.papyrus.uml.sirius.statemachine.diagram</module>
+ <module>org.eclipse.papyrus.uml.sirius.xtext.integration.ui</module>
+ </modules>
+</project>
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.classpath b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.classpath
new file mode 100644
index 0000000..e801ebf
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.project b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.project
new file mode 100644
index 0000000..c15f22f
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.siriusdiag.junit.utils</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.dev.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/.api_filters b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/.api_filters
new file mode 100644
index 0000000..9bc0528
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.papyrus.junit.utils" version="2">
+ <resource path="META-INF/MANIFEST.MF">
+ <filter id="926941240">
+ <message_arguments>
+ <message_argument value="3.1.0"/>
+ <message_argument value="3.0.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.core.resources.prefs b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..896a9a5
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.core.runtime.prefs b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.jdt.core.prefs b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..037f04a
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..ba7542e
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.pde.api.tools.prefs b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..b2260f8
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/META-INF/MANIFEST.MF b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b5d9cdf
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/META-INF/MANIFEST.MF
@@ -0,0 +1,60 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.e4.core.contexts;bundle-version="[1.8.0,2.0.0)",
+ org.eclipse.e4.ui.model.workbench;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.e4.ui.workbench;bundle-version="[1.11.0,2.0.0)",
+ org.eclipse.emf.databinding;bundle-version="[1.5.0,2.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.jdt.ui;bundle-version="[3.21.0,4.0.0)",
+ org.eclipse.papyrus.editor;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.common;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.nattable;bundle-version="[7.0.0,8.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[6.0.0,7.0.0)",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.infra.services.decoration;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.tools;bundle-version="[5.0.0,6.0.0)",
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.17.0,4.0.0)",
+ org.eclipse.ui.navigator;bundle-version="[3.9.300,4.0.0)",
+ org.eclipse.uml2.uml.edit;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.xtext.ui;bundle-version="[2.22.0,3.0.0)",
+ org.junit;bundle-version="[4.13.0,5.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.ui;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.sirius;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.sirius.tests.junit.support;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.122.0,4.0.0)",
+ org.eclipse.sirius.common.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[4.0.0,5.0.0)"
+Export-Package: org.eclipse.papyrus.sirusdiag.junit.utils.rules
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.siriusdiag.junit.utils.Activator
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.siriusdiag.junit.utils;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Import-Package: com.google.common.base;version="[30.1.0, 31.0.0)",
+ com.google.common.cache;version="[30.1.0, 31.0.0)",
+ com.google.common.collect;version="[30.1.0, 31.0.0)",
+ com.google.common.io;version="[30.1.0, 31.0.0)",
+ com.google.common.primitives;version="[30.1.0, 31.0.0)"
+Automatic-Module-Name: org.eclipse.papyrus.siriusdiag.junit.utils
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/OSGI-INF/l10n/bundle.properties b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..fbed29c
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.junit.utils
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Utils classes for JUnit tests
\ No newline at end of file
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/about.html b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/about.html
new file mode 100644
index 0000000..3e183aa
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/build.properties b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/build.properties
new file mode 100644
index 0000000..bafbbb5
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ about.html,\
+ build.properties
+src.includes = about.html
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/plugin.properties b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/plugin.properties
new file mode 100644
index 0000000..0380005
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# 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 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=This plugin provides useful methods for the JUnit tests
\ No newline at end of file
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/pom.xml b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/pom.xml
new file mode 100644
index 0000000..cf0df06
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.tests</groupId>
+ <artifactId>org.eclipse.papyrus.tests.junit-framework</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.siriusdiag.junit.utils</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/src/org/eclipse/papyrus/siriusdiag/junit/utils/Activator.java b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/src/org/eclipse/papyrus/siriusdiag/junit/utils/Activator.java
new file mode 100644
index 0000000..479ca46
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/src/org/eclipse/papyrus/siriusdiag/junit/utils/Activator.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2021 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.siriusdiag.junit.utils;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author allogo
+ *
+ */
+public class Activator implements BundleActivator {
+
+ /**
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ *
+ * @param context
+ * @throws Exception
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ *
+ * @param context
+ * @throws Exception
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/src/org/eclipse/papyrus/sirusdiag/junit/utils/rules/SiriusDiagramEditorFixture.java b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/src/org/eclipse/papyrus/sirusdiag/junit/utils/rules/SiriusDiagramEditorFixture.java
new file mode 100644
index 0000000..dec5725
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.siriusdiag.junit.utils/src/org/eclipse/papyrus/sirusdiag/junit/utils/rules/SiriusDiagramEditorFixture.java
@@ -0,0 +1,2579 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2018, 2019 CEA, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bugs 433206, 465416, 434983, 483721, 469188, 485220, 491542, 497865, 533673, 533682, 533676, 533679, 536486
+ * Thanh Liem PHAN (ALL4TEC) thanhliem.phan@all4tec.net - Bug 521550
+ * EclipseSource - Bug 536631
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Bug 549108
+ *****************************************************************************/
+package org.eclipse.papyrus.sirusdiag.junit.utils.rules;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.e4.ui.model.application.ui.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
+import org.eclipse.e4.ui.model.application.ui.basic.MStackElement;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.palette.CreationToolEntry;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.gef.tools.CreationTool;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IDiagramPreferenceSupport;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.ArrangeRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IComponentPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PaletteUtil;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.infra.nattable.common.editor.AbstractEMFNattableEditor;
+import org.eclipse.papyrus.infra.nattable.common.modelresource.PapyrusNattableModel;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.siriusdiag.sirius.ISiriusSessionService;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.SessionService;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.SiriusConstants;
+import org.eclipse.papyrus.infra.siriusdiag.ui.modelresource.SiriusDiagramModel;
+import org.eclipse.papyrus.infra.tools.util.PlatformHelper;
+import org.eclipse.papyrus.infra.tools.util.TypeUtils;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.junit.matchers.CommandMatchers;
+import org.eclipse.papyrus.junit.utils.CommandUtils;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.JUnitUtils;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.ActiveTable;
+import org.eclipse.papyrus.junit.utils.rules.ProjectFixture;
+import org.eclipse.papyrus.junit.utils.rules.ShowView;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPage;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DDiagramElementContainer;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.DSemanticDiagram;
+import org.eclipse.sirius.diagram.DragAndDropTarget;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.description.Layer;
+import org.eclipse.sirius.diagram.description.tool.ContainerCreationDescription;
+import org.eclipse.sirius.diagram.description.tool.ContainerDropDescription;
+import org.eclipse.sirius.diagram.description.tool.DirectEditLabel;
+import org.eclipse.sirius.diagram.description.tool.EdgeCreationDescription;
+import org.eclipse.sirius.diagram.description.tool.NodeCreationDescription;
+import org.eclipse.sirius.diagram.description.tool.ReconnectEdgeDescription;
+import org.eclipse.sirius.diagram.tools.api.command.DiagramCommandFactoryService;
+import org.eclipse.sirius.diagram.tools.api.command.IDiagramCommandFactory;
+import org.eclipse.sirius.tests.support.api.DiagramComponentizationTestSupport;
+import org.eclipse.sirius.tools.api.command.ui.NoUICallback;
+import org.eclipse.sirius.viewpoint.DSemanticDecorator;
+import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription;
+import org.eclipse.sirius.viewpoint.description.tool.OperationAction;
+import org.eclipse.sirius.viewpoint.description.tool.SelectionWizardDescription;
+import org.eclipse.sirius.viewpoint.description.tool.ToolDescription;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.IPage;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.runner.Description;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.ListMultimap;
+import com.google.common.collect.Lists;
+
+
+/**
+ * A fixture that presents editors on a model specified via an annotation as for {@link ProjectFixture}. The editor is closed automatically upon
+ * completion of the test.
+ */
+public class SiriusDiagramEditorFixture extends AbstractModelFixture<TransactionalEditingDomain> {
+
+ private static final class ShowViewDescriptor {
+
+ private static final ShowView.Location DEFAULT_LOCATION_EDITORS = ShowView.Location.RIGHT;
+
+ private static final ShowView.Location DEFAULT_LOCATION_VIEW = ShowView.Location.STACKED;
+
+ private static final String DEFAULT_RELATIVE_TO = "org.eclipse.ui.editorss"; //$NON-NLS-1$
+
+ static Iterable<ShowViewDescriptor> getDescriptors(final ShowView annotation) {
+ ImmutableList.Builder<ShowViewDescriptor> result = ImmutableList.builder();
+
+ String[] ids = annotation.value();
+ for (int i = 0; i < ids.length; i++) {
+ result.add(new ShowViewDescriptor(annotation, i));
+ }
+
+ return result.build();
+ }
+
+ private final ShowView.Location location;
+
+ private final String relativeTo;
+
+ private final String viewID;
+
+ private ShowViewDescriptor(ShowView annotation, int index) {
+ this.viewID = annotation.value()[index];
+
+ String[] relativeTo = annotation.relativeTo();
+ this.relativeTo = (relativeTo.length == 0) ? null : (relativeTo.length == 1) ? relativeTo[0] : relativeTo[index];
+
+ ShowView.Location[] location = annotation.location();
+ this.location = (location.length == 0) ? null : (location.length == 1) ? location[0] : location[index];
+ }
+
+ int location() {
+ return ((location != null) ? location : (relativeTo == null) ? DEFAULT_LOCATION_EDITORS : DEFAULT_LOCATION_VIEW).toModelServiceLocation();
+ }
+
+ String relativeTo() {
+ return (relativeTo != null) ? relativeTo : DEFAULT_RELATIVE_TO;
+ }
+
+ String viewID() {
+ return viewID;
+ }
+ }
+
+ private static boolean DUMP_COMMANDS = Boolean.getBoolean("dump.commands"); //$NON-NLS-1$
+
+ /**
+ * Create a point location (useful as a static import for test readability).
+ *
+ * @param x
+ * the x coördinate
+ * @param y
+ * the y coördinate
+ * @return the point
+ *
+ * @since 2.2
+ */
+ public static Point at(int x, int y) {
+ return new Point(x, y);
+ }
+
+ /**
+ * Convert a point that is relative to the given part to a point relative to the
+ * current viewport (taking zoom and scroll into account). This can be used to get
+ * a "Mouse Location" to configure requests. Useful as a static import for test
+ * readability
+ *
+ * @param x
+ * the relative x coördinate
+ * @param y
+ * the relative y coördinate
+ * @param relativeTo
+ * the edit-part in which coördinate space the {@code x} and {@code y}
+ * are specified
+ * @return the point in absolute mouse-pointer coördinates
+ *
+ * @since 2.2
+ */
+ public static Point at(int x, int y, IGraphicalEditPart relativeTo) {
+ Point at = new Point(x, y);
+
+ IFigure figure = relativeTo.getContentPane();
+ Point layoutOrigin = figure.getClientArea().getLocation();
+
+ at.performTranslate(layoutOrigin.x, layoutOrigin.y);
+ figure.translateToParent(at);
+ figure.translateToAbsolute(at);
+
+ return at;
+ }
+
+ /**
+ * Create a size dimension (useful as a static import for test readability).
+ *
+ * @param width
+ * the size width
+ * @param height
+ * the the size height
+ * @return the size
+ *
+ * @since 2.2
+ */
+ public static Dimension sized(int width, int height) {
+ return new Dimension(width, height);
+ }
+
+ /**
+ * Obtain a fake supplier that just fails the test with the given {@code message}
+ * instead of supplying a result.
+ *
+ * @param message
+ * the failure message
+ * @return the fake supplier
+ */
+ private static <T> Supplier<T> failOnAbsence(String message) {
+ return () -> {
+ fail(message);
+ return null;
+ };
+ }
+
+ /**
+ * Obtain a typed stream over a raw-typed collection from a legacy pre-generics API
+ * such as GEF.
+ *
+ * @param rawCollection
+ * a raw-typed collection
+ * @param type
+ * the expected element type of the collection
+ * @return the typed stream
+ */
+ private static <T> Stream<T> stream(@SuppressWarnings("rawtypes") Collection rawCollection, Class<T> type) {
+ return ((Collection<?>) rawCollection).stream()
+ .filter(type::isInstance).map(type::cast);
+ }
+
+ private DiagramEditorWithFlyOutPalette activeDiagramEditor;
+
+ private AbstractEMFNattableEditor activeTableEditor;
+
+ private IDiagramCommandFactory commandFactory;
+
+ private IMultiDiagramEditor editor;
+
+ private final Collection<IEditorPart> editorsToClose = Lists.newArrayList();
+
+ private final boolean ensureOperationHistoryIntegrity;
+
+ private final List<String> excludedTypeView = Arrays.asList(new String[] { "Note" });
+ @SuppressWarnings("restriction")
+ private org.eclipse.papyrus.infra.ui.internal.preferences.YesNo initialEditorLayoutStorageMigrationPreference;
+
+ private ModelExplorerView modelExplorer;
+
+ private ListMultimap<Description, IFile> modelFiles;
+
+ private IOperationHistory operationHistory;
+
+ private IOperationHistoryListener operationHistoryIntegrityListener;
+
+
+ /// XXXX BEGIN SIRIUS DECLARATIONS +> form org.eclipse.sirius.tests.support.api.SiriusDiagramTestCase
+ /// => Remove unused papyrus stuff later
+
+ private static final String TOOL_NAME_INCORRECT = "The tool name is not correct";
+ private static final String LAYER_NAME_INCORRECT = "The layer name is not correct (not found in the diagram description of this diagram)";
+
+ // /** the service registry */
+ // protected ServicesRegistry servicesRegistry;
+
+ private Session session;
+
+ private Class<?> testClass;
+
+ private Description testDescription;
+
+ private Collection<IViewPart> viewsToClose;
+
+ /**
+ * Initializes me with the assurance of undo/redo correspondence in the
+ * diagram and EMF views of the command history.
+ */
+ public SiriusDiagramEditorFixture() {
+ this(true);
+ }
+
+ /**
+ * Initializes me with the option to ensure integrity of the operation history
+ * by listening for command execution in the diagram context and, if an operation
+ * executed in the diagram does not have the editing-domain context, adds that
+ * context. This ensures that the diagram editor and the model explorer, for
+ * example, see the same undo/redo history (which they would not if some
+ * diagram-only commands were only in the diagram's history). Some tests do
+ * need to suppress this convenience in order to accurately represent the
+ * normal Papyrus run-time environment.
+ *
+ * @param ensureOperationHistoryIntegrity
+ *
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture(boolean ensureOperationHistoryIntegrity) {
+ this(ensureOperationHistoryIntegrity, Collections.emptyList());
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param ensureOperationHistoryIntegrity
+ *
+ * @param additionalFileExtension
+ * a list of additional file extension to manage
+ * @since 2.3
+ */
+ public SiriusDiagramEditorFixture(boolean ensureOperationHistoryIntegrity, final List<String> additionalFileExtension) {
+ super(Lists.asList(SiriusConstants.SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION, additionalFileExtension.toArray(new String[additionalFileExtension.size()])));
+ this.ensureOperationHistoryIntegrity = ensureOperationHistoryIntegrity;
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param ensureOperationHistoryIntegrity
+ *
+ * @param additionalFileExtension
+ * a list of additional file extension to manage
+ * @since 2.3
+ */
+ public SiriusDiagramEditorFixture(final List<String> additionalFileExtension) {
+ super(additionalFileExtension);
+ this.ensureOperationHistoryIntegrity = true;
+ }
+
+ public void activate() {
+ if (editor != null) {
+ activate(editor);
+ }
+ }
+
+ public void activate(IWorkbenchPart part) {
+ IWorkbenchPage page = part.getSite().getPage();
+
+ if (page.getActivePart() != part) {
+ page.activate(part);
+ flushDisplayEvents();
+ }
+ }
+
+ public SiriusDiagramEditorFixture activateDiagram(DiagramEditPart diagram) {
+ return activateDiagram(editor, diagram);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture activateDiagram(IMultiDiagramEditor editor, final DiagramEditPart diagram) {
+ activate(editor);
+
+ final ISashWindowsContainer sashContainer = PlatformHelper.getAdapter(editor, ISashWindowsContainer.class);
+ final org.eclipse.papyrus.infra.core.sasheditor.editor.IPage[] select = { null };
+
+ sashContainer.visit(new IPageVisitor() {
+
+ @Override
+ public void accept(IComponentPage page) {
+ // Pass
+ }
+
+ @Override
+ public void accept(IEditorPage page) {
+ DiagramEditorWithFlyOutPalette nested = TypeUtils.as(page.getIEditorPart(), DiagramEditorWithFlyOutPalette.class);
+ if ((nested != null) && (nested.getDiagramEditPart() == diagram)) {
+ select[0] = page;
+ setActiveDiagramEditor(nested);
+ }
+ }
+ });
+
+ if (select[0] != null) {
+ sashContainer.selectPage(select[0]);
+ flushDisplayEvents();
+ }
+
+ return this;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture activateDiagram(IMultiDiagramEditor editor, final String name) {
+ activate(editor);
+
+ final ISashWindowsContainer sashContainer = PlatformHelper.getAdapter(editor, ISashWindowsContainer.class);
+ final org.eclipse.papyrus.infra.core.sasheditor.editor.IPage[] select = { null };
+
+ sashContainer.visit(new IPageVisitor() {
+
+ @Override
+ public void accept(IComponentPage page) {
+ // Pass
+ }
+
+ @Override
+ public void accept(IEditorPage page) {
+ if (name.equals(page.getPageTitle()) && (page.getIEditorPart() instanceof DiagramEditorWithFlyOutPalette)) {
+ select[0] = page;
+ setActiveDiagramEditor((DiagramEditorWithFlyOutPalette) page.getIEditorPart());
+ }
+ }
+ });
+
+ if (select[0] != null) {
+ sashContainer.selectPage(select[0]);
+ flushDisplayEvents();
+ }
+
+ return this;
+ }
+
+ public SiriusDiagramEditorFixture activateDiagram(String name) {
+ return activateDiagram(editor, name);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture activateTable(IMultiDiagramEditor editor, final String name) {
+ activate(editor);
+
+ final ISashWindowsContainer sashContainer = PlatformHelper.getAdapter(editor, ISashWindowsContainer.class);
+ final org.eclipse.papyrus.infra.core.sasheditor.editor.IPage[] select = { null };
+
+ sashContainer.visit(new IPageVisitor() {
+
+ @Override
+ public void accept(IComponentPage page) {
+ // Pass
+ }
+
+ @Override
+ public void accept(IEditorPage page) {
+ if (name.equals(page.getPageTitle()) && (page.getIEditorPart() instanceof AbstractEMFNattableEditor)) {
+ select[0] = page;
+ setActiveTableEditor((AbstractEMFNattableEditor) page.getIEditorPart());
+ }
+ }
+ });
+
+ if (select[0] != null) {
+ sashContainer.selectPage(select[0]);
+ flushDisplayEvents();
+ }
+
+ return this;
+ }
+
+ public SiriusDiagramEditorFixture activateTable(String name) {
+ return activateTable(editor, name);
+ }
+
+
+
+ public void close() {
+ if (editor != null) {
+ close(editor);
+ editor = null;
+ }
+ }
+
+ public void close(IEditorPart editor) {
+ if (null != editor.getSite() && null != editor.getSite().getPage()) {
+ editor.getSite().getPage().closeEditor(editor, false);
+ flushDisplayEvents();
+ }
+ }
+
+ public String closeDiagram() {
+ String result = getActiveDiagramEditor().getDiagram().getName();
+ closeDiagram(editor, result);
+ return result;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture closeDiagram(IMultiDiagramEditor editor, final String name) {
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(editor.getServicesRegistry());
+ NotationModel representation = (NotationModel) modelSet.getModel(NotationModel.MODEL_ID);
+ Diagram diagram = representation.getDiagram(name);
+
+ // If the diagram was deleted, then so too was its page
+ if (diagram != null) {
+ ServiceUtils.getInstance().getService(IPageManager.class, editor.getServicesRegistry()).closePage(diagram);
+ flushDisplayEvents();
+ }
+ } catch (Exception e) {
+ throw new IllegalStateException("Cannot close diagram", e);
+ }
+
+ return this;
+ }
+
+ public SiriusDiagramEditorFixture closeDiagram(String name) {
+ return closeDiagram(editor, name);
+ }
+
+ /**
+ * Create a new shape in the {@code parent}. Fails if the shape cannot be created or
+ * cannot be found in the diagram after creation.
+ *
+ * @param parent
+ * the parent edit-part in which to create a shape
+ * @param type
+ * the type of shape to create
+ * @param location
+ * the location (mouse pointer) at which to create the shape
+ * @param size
+ * the size of the shape to create, or {@code null} for the default size as
+ * would be created when just clicking in the diagram
+ * @return the newly created shape edit-part
+ *
+ * @since 2.2
+ */
+ public IGraphicalEditPart createShape(EditPart parent, IElementType type, Point location, Dimension size) {
+ CreateViewRequest request = CreateViewRequestFactory.getCreateShapeRequest(type, ((IGraphicalEditPart) parent).getDiagramPreferencesHint());
+
+ request.setLocation(location);
+ request.setSize(size);
+
+ // Some edit-parts in some diagrams depend on the creation tool setting this
+ CreateElementRequest semanticRequest = null;
+ if (!request.getViewDescriptors().isEmpty()) {
+ semanticRequest = (CreateElementRequest) ((CreateElementRequestAdapter) request.getViewDescriptors().get(0).getElementAdapter()).getAdapter(CreateElementRequest.class);
+ if (semanticRequest != null) {
+ semanticRequest.setParameter(AspectUnspecifiedTypeCreationTool.INITIAL_MOUSE_LOCATION_FOR_CREATION, location.getCopy());
+ }
+ }
+
+ EditPart target = parent.getTargetEditPart(request);
+ assertThat("No target edit part", target, notNullValue());
+ org.eclipse.gef.commands.Command command = target.getCommand(request);
+ execute(command);
+
+ return getNewEditPart(parent, request.getViewDescriptors());
+ }
+
+ /**
+ * Create a new shape in the current diagram by automating the creation tool.
+ * Fails if the shape cannot be created or cannot be found in the diagram after creation.
+ *
+ * @param type
+ * the type of shape to create
+ * @param location
+ * the location (mouse pointer) at which to create the shape
+ * @param size
+ * the size of the shape to create, or {@code null} for the default size as
+ * would be created when just clicking in the diagram
+ * @return the newly created shape edit-part
+ *
+ * @since 2.2
+ */
+ public IGraphicalEditPart createShape(IElementType type, Point location, Dimension size) {
+ class MyTool extends AspectUnspecifiedTypeCreationTool {
+ private Collection<? extends ViewDescriptor> results = Collections.emptyList();
+
+ MyTool() {
+ super(Collections.singletonList(type));
+ }
+
+ @Override
+ protected Request getTargetRequest() {
+ return super.getTargetRequest();
+ }
+
+ @Override
+ protected void selectAddedObject(EditPartViewer viewer, @SuppressWarnings("rawtypes") Collection objects) {
+ super.selectAddedObject(viewer, objects);
+
+ results = ((Collection<?>) objects).stream()
+ .filter(ViewDescriptor.class::isInstance).map(ViewDescriptor.class::cast)
+ .collect(Collectors.toList());
+ }
+
+ Collection<? extends ViewDescriptor> getResults() {
+ return results;
+ }
+ }
+
+ EditPartViewer viewer = getActiveDiagram().getViewer();
+ MyTool tool = new MyTool();
+
+ Event mouse = new Event();
+ mouse.display = editor.getSite().getShell().getDisplay();
+ mouse.widget = viewer.getControl();
+ mouse.x = location.x();
+ mouse.y = location.y();
+
+ viewer.getEditDomain().setActiveTool(tool);
+ tool.setViewer(viewer);
+
+ // Move to the place where we'll click
+ mouse.type = SWT.MouseMove;
+ tool.mouseMove(new MouseEvent(mouse), viewer);
+
+ // Press down
+ mouse.type = SWT.MouseDown;
+ mouse.button = 1;
+ tool.mouseDown(new MouseEvent(mouse), viewer);
+
+ flushDisplayEvents();
+
+ if (size == null) {
+ // Just a click
+ mouse.type = SWT.MouseUp;
+ tool.mouseUp(new MouseEvent(mouse), viewer);
+ } else {
+ // Drag and release
+ mouse.type = SWT.MouseMove;
+ mouse.x = location.x() + size.width();
+ mouse.y = location.y() + size.height();
+ tool.mouseDrag(new MouseEvent(mouse), viewer);
+
+ flushDisplayEvents();
+
+ mouse.type = SWT.MouseUp;
+ tool.mouseUp(new MouseEvent(mouse), viewer);
+ }
+
+ flushDisplayEvents();
+
+ // Find the new edit-part
+ return getNewEditPart(getActiveDiagram(), tool.getResults());
+ }
+
+ /**
+ * Delete one or more edit-parts from the diagram.
+ *
+ * @param editPart
+ * the edit-parts to delete
+ *
+ * @since 2.2
+ *
+ * @throws IllegalArgumentException
+ * if no edit-parts are specified
+ */
+ public void delete(EditPart... editPart) {
+ // In the diagram, deletion of a multiple selection is accomplished with separate
+ // requests to each edit-part, so do the same here
+ org.eclipse.gef.commands.Command delete = Stream.of(editPart).map(ep -> ep.getCommand(new EditCommandRequestWrapper(new DestroyElementRequest(false))))
+ .reduce(org.eclipse.gef.commands.Command::chain)
+ .orElseThrow(IllegalArgumentException::new);
+
+ execute(delete);
+ }
+
+ public void deselect(EditPart editPart) {
+ editPart.getViewer().getSelectionManager().deselect(editPart);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public void ensurePapyrusPerspective() {
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ final String papyrus = "org.eclipse.papyrus.infra.core.perspective"; //$NON-NLS-1$
+ final IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IPerspectiveDescriptor perspective = activePage.getPerspective();
+ if (!papyrus.equals(perspective.getId())) {
+ perspective = PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(papyrus);
+ if (perspective != null) {
+ activePage.setPerspective(perspective);
+ flushDisplayEvents();
+ }
+ }
+ }
+ });
+ }
+
+ @Override
+ public void execute(Command command) {
+ super.execute(command);
+ flushDisplayEvents();
+ }
+
+ @Override
+ public IStatus execute(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) {
+ IStatus result = super.execute(operation, monitor, info);
+ flushDisplayEvents();
+ return result;
+ }
+
+ public void execute(org.eclipse.gef.commands.Command command) {
+ assertThat("No command", command, notNullValue());
+ assertThat(command, CommandMatchers.GEF.canExecute());
+ getActiveDiagramEditor().getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ flushDisplayEvents();
+ }
+
+ /**
+ * Find an edit-part for a model element in a particular {@code scope}.
+ *
+ * @param scope
+ * an edit part in which to search (its children) for an edit-part
+ * @param modelElement
+ * the model element visualized by the edit-part to search for
+ *
+ * @return the matching edit-part, or {@code null} if none is found in the {@code scope}
+ */
+ public EditPart findEditPart(EditPart scope, EObject modelElement) {
+ EditPart result = null;
+
+ View view = PlatformHelper.getAdapter(scope, View.class);
+ if ((view != null) && (view.getElement() == modelElement)) {
+ result = scope;
+ }
+
+ if (result == null) {
+ // Search children
+ for (Iterator<?> iter = scope.getChildren().iterator(); (result == null) && iter.hasNext();) {
+ result = findEditPart((EditPart) iter.next(), modelElement);
+ }
+ }
+
+ if ((result == null) && (scope instanceof GraphicalEditPart)) {
+ // Search edges
+ for (Iterator<?> iter = ((GraphicalEditPart) scope).getSourceConnections().iterator(); (result == null) && iter.hasNext();) {
+ result = findEditPart((EditPart) iter.next(), modelElement);
+ }
+ if (result == null) {
+ for (Iterator<?> iter = ((GraphicalEditPart) scope).getTargetConnections().iterator(); (result == null) && iter.hasNext();) {
+ result = findEditPart((EditPart) iter.next(), modelElement);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public EditPart findEditPart(EObject modelElement) {
+ return findEditPart(getActiveDiagramEditor(), modelElement);
+ }
+
+ public EditPart findEditPart(IDiagramWorkbenchPart editor, EObject modelElement) {
+ DiagramEditPart diagram = editor.getDiagramEditPart();
+ return findEditPart(diagram, modelElement);
+ }
+
+ public EditPart findEditPart(IDiagramWorkbenchPart editor, String name, Class<? extends NamedElement> type) {
+ EditPart result = null;
+
+ for (Iterator<View> views = Iterators.filter(editor.getDiagram().eAllContents(), View.class); views.hasNext();) {
+ View next = views.next();
+ EObject element = next.getElement();
+ if (type.isInstance(element) && name.equals(type.cast(element).getName())) {
+ result = (EditPart) editor.getDiagramGraphicalViewer().getEditPartRegistry().get(next);
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public EditPart findEditPart(IMultiDiagramEditor editor, EObject modelElement) {
+ IEditorPart activeEditor = editor.getActiveEditor();
+ assertThat("No diagram active", activeEditor, instanceOf(DiagramEditor.class));
+ return findEditPart((DiagramEditor) activeEditor, modelElement);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public EditPart findEditPart(IMultiDiagramEditor editor, String name, Class<? extends NamedElement> type) {
+ IEditorPart activeEditor = editor.getActiveEditor();
+ assertThat("No diagram active", activeEditor, instanceOf(DiagramEditor.class));
+ return findEditPart((DiagramEditor) activeEditor, name, type);
+ }
+
+ public EditPart findEditPart(String name, Class<? extends NamedElement> type) {
+ return findEditPart(getActiveDiagramEditor(), name, type);
+ }
+
+ /**
+ * Find orphan edit part.
+ *
+ * @return the edits the part
+ */
+ public EditPart findOrphanEditPart() {
+ IDiagramWorkbenchPart activeEditor = (IDiagramWorkbenchPart) editor.getActiveEditor();
+ EditPart result = null;
+ for (Iterator<View> views = Iterators.filter(activeEditor.getDiagram().eAllContents(), View.class); views.hasNext();) {
+ View next = views.next();
+
+ String type = next.getType();
+ EObject element = next.getElement();
+
+ if (element == null && !excludedTypeView.contains(type)) {
+ result = (EditPart) activeEditor.getDiagramGraphicalViewer().getEditPartRegistry().get(next);
+ break;
+ }
+ }
+
+ return result;
+
+ }
+
+ /**
+ * Find orphan edit part with a type.
+ *
+ * @param type
+ * the type
+ * @return the edits the part
+ */
+ public EditPart findOrphanEditPart(String type) {
+ IDiagramWorkbenchPart activeEditor = (IDiagramWorkbenchPart) editor.getActiveEditor();
+ EditPart result = null;
+ for (Iterator<View> views = Iterators.filter(activeEditor.getDiagram().eAllContents(), View.class); views.hasNext();) {
+ View next = views.next();
+ EObject element = next.getElement();
+ if (element == null && type.equals(next.getType())) {
+ result = (EditPart) activeEditor.getDiagramGraphicalViewer().getEditPartRegistry().get(next);
+ break;
+ }
+ }
+
+ return result;
+
+ }
+
+ public void flushDisplayEvents() {
+ for (;;) {
+ try {
+ if (Display.getCurrent() != null && !Display.getCurrent().readAndDispatch()) {
+ break;
+ }
+ } catch (Exception e) {
+ Bundle testBundle = FrameworkUtil.getBundle((testClass == null) ? SiriusDiagramEditorFixture.class : testClass);
+ Platform.getLog(testBundle).log(new Status(IStatus.ERROR, testBundle.getSymbolicName(), "Uncaught exception in display runnable.", e));
+ }
+ }
+ }
+
+ public DiagramEditPart getActiveDiagram() {
+ return getActiveDiagramEditor().getDiagramEditPart();
+ }
+
+
+
+ public DiagramEditorWithFlyOutPalette getActiveDiagramEditor() {
+ DiagramEditorWithFlyOutPalette result = activeDiagramEditor;
+
+ if (result == null) {
+ IEditorPart activeEditor = getWorkbenchPage().getActiveEditor();
+ if (activeEditor instanceof IMultiDiagramEditor) {
+ activeEditor = ((IMultiDiagramEditor) activeEditor).getActiveEditor();
+ if (activeEditor instanceof DiagramEditorWithFlyOutPalette) {
+ result = (DiagramEditorWithFlyOutPalette) activeEditor;
+ setActiveDiagramEditor(result);
+ }
+ }
+ }
+
+ assertThat("No diagram active", result, notNullValue());
+
+ return result;
+ }
+
+
+ public AbstractEMFNattableEditor getActiveTableEditor() {
+ AbstractEMFNattableEditor result = activeTableEditor;
+
+ if (result == null) {
+ IEditorPart activeEditor = getWorkbenchPage().getActiveEditor();
+ if (activeEditor instanceof IMultiDiagramEditor) {
+ activeEditor = ((IMultiDiagramEditor) activeEditor).getActiveEditor();
+ if (activeEditor instanceof AbstractEMFNattableEditor) {
+ result = (AbstractEMFNattableEditor) activeEditor;
+ setActiveTableEditor(result);
+ }
+ }
+ }
+
+ assertThat("No table active", result, notNullValue());
+
+ return result;
+ }
+
+ public INattableModelManager getActiveTableManager() {
+ return (INattableModelManager) getActiveTableEditor().getAdapter(INattableModelManager.class);
+ }
+
+ /**
+ * <p>
+ * Return the Papyrus {@link CreateRequest} associated with the given palette tool.
+ * </p>
+ * <p>
+ * Note that this method is designed to work exclusively with Papyrus' AspectUnspecified tools and requests
+ * </p>
+ *
+ * @param tool
+ * @return
+ * @throws Exception
+ *
+ * @see AspectUnspecifiedTypeCreationTool
+ * @see AspectUnspecifiedTypeConnectionTool
+ * @see AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest
+ * @see AspectUnspecifiedTypeCreationTool.CreateAspectUnspecifiedTypeRequest
+ */
+ public Request getAspectUnspecifiedCreateRequest(final Tool tool) throws Exception {
+ final IDiagramGraphicalViewer viewer = getActiveDiagramEditor().getDiagramGraphicalViewer();
+
+ AtomicReference<Exception> exception = new AtomicReference<>();
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ tool.setViewer(viewer);
+ } catch (Exception ex) {
+ exception.set(ex);
+ }
+ }
+ });
+ if (exception.get() != null) {
+ throw exception.get();
+ }
+
+ if (tool instanceof AspectUnspecifiedTypeCreationTool) {
+ AspectUnspecifiedTypeCreationTool creationTool = (AspectUnspecifiedTypeCreationTool) tool;
+ return creationTool.createCreateRequest();
+ } else if (tool instanceof AspectUnspecifiedTypeConnectionTool) {
+ AspectUnspecifiedTypeConnectionTool connectionTool = (AspectUnspecifiedTypeConnectionTool) tool;
+ return connectionTool.new CreateAspectUnspecifiedTypeConnectionRequest(connectionTool.getElementTypes(), false, getPreferencesHint());
+ }
+
+ throw new Exception("Unexpected kind of creation tool.");
+ }
+
+ /**
+ * @since 2.0
+ */
+ public DiagramEditPart getDiagram(IMultiDiagramEditor editor, final String name) {
+ final ISashWindowsContainer sashContainer = PlatformHelper.getAdapter(editor, ISashWindowsContainer.class);
+ final org.eclipse.papyrus.infra.core.sasheditor.editor.IPage[] matchedPage = { null };
+
+ sashContainer.visit(new IPageVisitor() {
+
+ @Override
+ public void accept(IComponentPage page) {
+ // Pass
+ }
+
+ @Override
+ public void accept(IEditorPage page) {
+ if (name.equals(page.getPageTitle()) && (page.getIEditorPart() instanceof DiagramEditorWithFlyOutPalette)) {
+ matchedPage[0] = page;
+ }
+ }
+ });
+
+ IEditorPage editorPage = TypeUtils.as(matchedPage[0], IEditorPage.class);
+ IDiagramWorkbenchPart diagramPart = (editorPage == null) ? null : TypeUtils.as(editorPage.getIEditorPart(), IDiagramWorkbenchPart.class);
+
+ // The lazy initialization, used in the patch for bug 519107, does not initialize the diagram edit part of UmlGmfDiagramEditor
+ // So we call the setFocus method here to initialize it manually (see patch for bug 521353)
+ if (null != diagramPart) {
+ if (null == diagramPart.getDiagramEditPart()) {
+ diagramPart.setFocus();
+ }
+ return diagramPart.getDiagramEditPart();
+ }
+ return null;
+ }
+
+ public DiagramEditPart getDiagram(String name) {
+ return getDiagram(editor, name);
+ }
+
+ @Override
+ public TransactionalEditingDomain getEditingDomain() {
+ TransactionalEditingDomain result = null;
+
+ if (editor != null) {
+ result = getEditingDomain(editor);
+ }
+
+ return result;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public TransactionalEditingDomain getEditingDomain(IMultiDiagramEditor editor) {
+ TransactionalEditingDomain result = null;
+
+ try {
+ result = getServiceRegistry(editor).getService(TransactionalEditingDomain.class);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to get editing domain from Papyrus editor: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IMultiDiagramEditor getEditor() {
+ return editor;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IMultiDiagramEditor getEditor(String path) {
+ IMultiDiagramEditor result = null;
+
+ final String fileName = new Path(path).lastSegment();
+ for (IEditorReference next : getWorkbenchPage().getEditorReferences()) {
+ if (PapyrusMultiDiagramEditor.EDITOR_ID.equals(next.getId()) && fileName.equals(next.getName())) {
+ result = (IMultiDiagramEditor) next.getEditor(true);
+ }
+ }
+
+ return result;
+ }
+
+ // public DiagramEditPart getActiveSiriusDiagram() {
+ // return getActiveDiagramEditor().getDiagramEditPart();
+ // }
+
+ public String getLabel(EObject object) {
+ String result = null;
+
+ try {
+ EditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(editor.getServicesRegistry());
+ if (domain instanceof AdapterFactoryEditingDomain) {
+ IItemLabelProvider labels = (IItemLabelProvider) ((AdapterFactoryEditingDomain) domain).getAdapterFactory().adapt(object, IItemLabelProvider.class);
+ if (labels != null) {
+ result = labels.getText(object);
+ }
+ }
+ } catch (ServiceException e) {
+ // Doesn't matter
+ }
+
+ if (result == null) {
+ result = String.valueOf(object);
+ }
+
+ return result;
+ }
+
+ @Override
+ public Package getModel() {
+ return getModel(editor);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public Package getModel(IMultiDiagramEditor editor) {
+ Package result = null;
+
+ ModelSet modelSet = getModelSet(editor);
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ assertThat("No UML model present in resource set", uml.getResource(), notNullValue());
+
+ result = (Package) EcoreUtil.getObjectByType(uml.getResource().getContents(), UMLPackage.Literals.PACKAGE);
+ assertThat("Model resource contains no UML Package", result, notNullValue());
+
+ return result;
+ }
+
+ public ModelExplorerView getModelExplorerView() {
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ ModelExplorerPageBookView view;
+ try {
+ view = (ModelExplorerPageBookView) getWorkbenchPage().showView(AbstractEditorTest.MODELEXPLORER_VIEW_ID);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ return;
+ }
+
+ IPage currentPage = view.getCurrentPage();
+ ModelExplorerPage page = (ModelExplorerPage) currentPage;
+ IViewPart viewer = page.getViewer();
+ modelExplorer = (ModelExplorerView) viewer;
+ }
+ });
+
+ return modelExplorer;
+ }
+
+ public ModelSet getModelSet() {
+ return getModelSet(editor);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public ModelSet getModelSet(IMultiDiagramEditor editor) {
+ try {
+ return getServiceRegistry(editor).getService(ModelSet.class);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to get model set from Papyrus editor: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IPageManager getPageManager() {
+ return getPageManager(editor);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IPageManager getPageManager(IMultiDiagramEditor editor) {
+ try {
+ return getServiceRegistry(editor).getService(IPageManager.class);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to get page manager from Papyrus editor: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ public PaletteViewer getPalette() {
+ return getPalette(getActiveDiagramEditor());
+ }
+
+ public PaletteViewer getPalette(IDiagramWorkbenchPart editor) {
+ return editor.getDiagramEditPart().getViewer().getEditDomain().getPaletteViewer();
+ }
+
+ /**
+ * @since 2.0
+ */
+ public PaletteViewer getPalette(IMultiDiagramEditor editor) {
+ IEditorPart activeEditor = editor.getActiveEditor();
+ assertThat("No diagram active", activeEditor, instanceOf(DiagramEditor.class));
+ return getPalette((DiagramEditor) activeEditor);
+ }
+
+ /**
+ * <p>
+ * Return the Palette Tool with the given toolId from the current active diagram editor
+ * </p>
+ *
+ * @param paletteToolId
+ * @return
+ */
+ public Tool getPaletteTool(String paletteToolId) {
+ PaletteRoot paletteRoot = getActiveDiagramEditor().getDiagramGraphicalViewer().getEditDomain().getPaletteViewer().getPaletteRoot();
+ List<ToolEntry> allToolEntries = PaletteUtil.getAllToolEntries(paletteRoot);
+ return allToolEntries.stream().filter(entry -> entry.getId().equals(paletteToolId)).findAny().map(ToolEntry::createTool).orElse(null);
+ }
+
+ public List<IWorkbenchPart> getPartStack(IWorkbenchPart part) {
+ List<IWorkbenchPart> result;
+
+ MPart mpart = part.getSite().getService(MPart.class);
+ EModelService modelService = mpart.getContext().get(EModelService.class);
+ MPartStack stack = (MPartStack) modelService.getContainer(mpart);
+
+ result = Lists.newArrayListWithCapacity(stack.getChildren().size());
+ for (MPart next : Iterables.filter(stack.getChildren(), MPart.class)) {
+ IWorkbenchPart wbPart = next.getContext().get(IWorkbenchPart.class);
+ if (wbPart != null) {
+ result.add(wbPart);
+ }
+ }
+
+ return result;
+ }
+
+ public PreferencesHint getPreferencesHint() {
+ PreferencesHint result = PreferencesHint.USE_DEFAULTS;
+
+ if (activeDiagramEditor != null) {
+ RootEditPart rootEditPart = activeDiagramEditor.getDiagramGraphicalViewer().getRootEditPart();
+ if (rootEditPart instanceof IDiagramPreferenceSupport) {
+ result = ((IDiagramPreferenceSupport) rootEditPart).getPreferencesHint();
+ }
+ }
+
+ return result;
+ }
+
+ public ServicesRegistry getServiceRegistry() {
+ return getServiceRegistry(editor);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public ServicesRegistry getServiceRegistry(IMultiDiagramEditor editor) {
+ return editor.getServicesRegistry();
+ }
+
+ /**
+ * @return the session
+ */
+ public Session getSession() {
+ return session;
+ }
+
+ /**
+ * Get the shape compartment of an edit-part. Fails if the edit-part has no
+ * shape compartment.
+ *
+ * @param shapeEditPart
+ * a shape edit part
+ * @return its shape compartment
+ *
+ * @since 2.2
+ */
+ public EditPart getShapeCompartment(EditPart shapeEditPart) {
+ return stream(shapeEditPart.getChildren(), EditPart.class)
+ .filter(ShapeCompartmentEditPart.class::isInstance)
+ .findFirst().orElseGet(failOnAbsence("No shape compartment"));
+ }
+
+ public IViewPart getView(String id, boolean open) {
+ IViewPart result = null;
+
+ IWorkbenchPage wbPage = getWorkbenchPage();
+
+ try {
+ result = wbPage.findView(id);
+ if ((result == null) && open) {
+ result = wbPage.showView(id);
+ }
+
+ if (result != null) {
+ result.getSite().getPage().activate(result);
+ flushDisplayEvents();
+ }
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ fail("Failed to show a view: " + id);
+ } finally {
+ flushDisplayEvents();
+ }
+
+ return result;
+ }
+
+ public void move(GraphicalEditPart editPart, Point newLocation) {
+ ChangeBoundsRequest move = new ChangeBoundsRequest(RequestConstants.REQ_MOVE);
+ IFigure figure = editPart.getFigure();
+ Rectangle bounds = figure.getBounds();
+ move.setEditParts(editPart);
+ move.setConstrainedMove(false);
+ move.setMoveDelta(at(newLocation.x() - bounds.x(), newLocation.y() - bounds.y()));
+ execute(editPart.getCommand(move));
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IMultiDiagramEditor open() {
+ return openOne(testDescription);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IMultiDiagramEditor open(String resourcePath) {
+ return open(new Path(resourcePath).removeFileExtension().lastSegment(), ResourceKind.BUNDLE, resourcePath);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IMultiDiagramEditor open(String targetPath, ResourceKind resourceKind, String resourcePath) {
+ final IFile papyrusModel = getProject().getFile(initModelResource(targetPath, resourceKind, resourcePath).getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION));
+ return open(papyrusModel);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public IMultiDiagramEditor open(String targetPath, String resourcePath) {
+ return open(targetPath, ResourceKind.BUNDLE, resourcePath);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture openDiagram(IMultiDiagramEditor editor, final String name) {
+ activate(editor);
+
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(editor.getServicesRegistry());
+ SiriusDiagramModel representation = (SiriusDiagramModel) modelSet.getModel(SiriusDiagramModel.SIRIUS_DIAGRAM_MODEL_ID);
+ DSemanticDiagram diagram = representation.getDiagram(name);
+ openEditor(diagram);
+ flushDisplayEvents();
+
+ activateDiagram(editor, name);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Cannot initialize test", e);
+ }
+
+ return this;
+ }
+
+ public SiriusDiagramEditorFixture openDiagram(String name) {
+ return openDiagram(editor, name);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public SiriusDiagramEditorFixture openTable(IMultiDiagramEditor editor, final String name) {
+ activate(editor);
+
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(editor.getServicesRegistry());
+ PapyrusNattableModel representation = (PapyrusNattableModel) modelSet.getModel(PapyrusNattableModel.MODEL_ID);
+ Table table = representation.getTable(name);
+ ServiceUtils.getInstance().getService(IPageManager.class, editor.getServicesRegistry()).openPage(table);
+ flushDisplayEvents();
+
+ activateTable(editor, name);
+ } catch (Exception e) {
+ throw new IllegalStateException("Cannot initialize test", e); // NON-NLS-1
+ }
+
+ return this;
+ }
+
+ public SiriusDiagramEditorFixture openTable(String name) {
+ return openTable(editor, name);
+ }
+
+ @Override
+ public void redo() {
+ super.redo();
+ flushDisplayEvents();
+ }
+
+ /**
+ * Reopens the same test model that was previously {@link #open() opened} and the
+ * subsequently {@link #close() closed}. This is an important disction, as simply
+ * {@link #open() opening} the test model again would actually re-initialize it from
+ * the deployed test resources, potentially replacing any changes in the model files
+ * that may be significant to the test.
+ *
+ * @return the re-opened editor
+ * @since 2.0
+ */
+ public IMultiDiagramEditor reopen() {
+ return reopenOne(testDescription);
+ }
+
+ /**
+ * Require an edit-part for a model element in a particular {@code scope}.
+ *
+ * @param scope
+ * an edit part in which to search (its children) for an edit-part
+ * @param modelElement
+ * the model element visualized by the edit-part to search for
+ *
+ * @return the matching edit-part
+ *
+ * @throws AssertionError
+ * if the required edit-part is found in the {@code scope}
+ */
+ public EditPart requireEditPart(EditPart scope, EObject modelElement) {
+ EditPart result = findEditPart(scope, modelElement);
+ if (result == null) {
+ String label = getLabel(modelElement);
+ fail(String.format("No edit-part found for \"%s\" in %s", label, scope));
+ }
+ return result;
+ }
+
+ public void resize(GraphicalEditPart editPart, Dimension newSize) {
+ ChangeBoundsRequest resize = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE);
+ IFigure figure = editPart.getFigure();
+ Rectangle bounds = figure.getBounds();
+ resize.setEditParts(editPart);
+ resize.setResizeDirection(PositionConstants.SOUTH_WEST);
+ resize.setCenteredResize(false);
+ resize.setConstrainedResize(false);
+ resize.setSizeDelta(sized(newSize.width() - bounds.width(), newSize.height() - bounds.height()));
+ execute(editPart.getCommand(resize));
+ }
+
+ public void save() {
+ save(getEditor());
+ }
+
+ public void save(ISaveablePart part) {
+ if (part.isDirty()) {
+ try {
+ part.doSave(new NullProgressMonitor());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to save editor/view: " + e.getLocalizedMessage());
+ } finally {
+ // Must flush display events because some steps (e.g. dependent editor reload)
+ // are done asynchronously in a UI job
+ flushDisplayEvents();
+ }
+ }
+ }
+
+ public void saveAll() {
+ try {
+ IWorkbenchPage page = editor.getSite().getPage();
+ page.saveAllEditors(false);
+ } finally {
+ // Must flush display events because some steps (e.g. dependent editor reload)
+ // are done asynchronously in a UI job
+ flushDisplayEvents();
+ }
+ }
+
+ public void select(EditPart editPart) {
+ editPart.getViewer().getSelectionManager().appendSelection(editPart);
+ }
+
+ public void splitEditorArea(IEditorPart editorToMove, boolean splitHorizontally) {
+ MPart editorPart = editorToMove.getSite().getService(MPart.class);
+ EModelService modelService = editorPart.getContext().get(EModelService.class);
+ MPartStack oldStack = (MPartStack) modelService.getContainer(editorPart);
+ MPartStack newStack = modelService.createModelElement(MPartStack.class);
+ modelService.insert(newStack, oldStack, splitHorizontally ? EModelService.RIGHT_OF : EModelService.BELOW, 0.5f);
+ newStack.getChildren().add(editorPart);
+
+ activate(editorToMove);
+ }
+
+ @Override
+ public void undo() {
+ super.undo();
+ flushDisplayEvents();
+ }
+
+ private IGraphicalEditPart getNewEditPart(EditPart context, Collection<? extends ViewDescriptor> viewDescriptors) {
+ return viewDescriptors.stream()
+ .map(desc -> desc.getAdapter(View.class)).map(View.class::cast)
+ .filter(Objects::nonNull)
+ .map(view -> DiagramEditPartsUtil.getEditPartFromView(view, context))
+ .filter(IGraphicalEditPart.class::isInstance).map(IGraphicalEditPart.class::cast)
+ .findAny().orElseGet(failOnAbsence("Could not find newly created edit-part"));
+ }
+
+ /**
+ *
+ * @param servicesRegistry
+ * the servicesRegistry
+ * @return
+ * the page manager or <code>null</code> if not found
+ */
+ private IPageManager getPageManager(final ServicesRegistry servicesRegistry) {
+ try {
+ return ServiceUtils.getInstance().getService(IPageManager.class, servicesRegistry);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ return null;
+
+ }
+
+ private AbstractToolDescription getTool(final List<AbstractToolDescription> tools, final String toolName) {
+ AbstractToolDescription theAbstractToolDescription = null;
+ for (int i = 0; i < tools.size(); i++) {
+
+ final AbstractToolDescription tool = tools.get(i);
+ final String name = tool.getName();
+ if (name != null && name.equals(toolName)) {
+ theAbstractToolDescription = tool;
+ break;
+ }
+ }
+ return theAbstractToolDescription;
+ }
+
+ private void movePartRelativeTo(IWorkbenchPart part, String relativeTo, int where) {
+ MPart mPart = part.getSite().getService(MPart.class);
+ EModelService modelService = mPart.getContext().get(EModelService.class);
+ MUIElement relativePart = modelService.find(relativeTo, modelService.getTopLevelWindowFor(mPart));
+ if (relativePart instanceof MPartSashContainerElement) {
+ MStackElement toMove = mPart;
+ MPlaceholder placeHolder = mPart.getCurSharedRef();
+ if (placeHolder != null) {
+ toMove = placeHolder;
+ }
+
+ if (where < 0) {
+ // Add it to the relative part's containing stack
+ if (relativePart instanceof MPart) {
+ MPart relativeMPart = (MPart) relativePart;
+ if (relativeMPart.getCurSharedRef() != null) {
+ // This is where the part is stacked
+ relativePart = relativeMPart.getCurSharedRef();
+ }
+ }
+ relativePart.getParent().getChildren().add(toMove);
+ } else {
+ // Insert it next to the relative part
+ MPartStack newStack = modelService.createModelElement(MPartStack.class);
+ newStack.getChildren().add(toMove);
+ modelService.insert(newStack, (MPartSashContainerElement) relativePart, where, 0.3f);
+ }
+ }
+ }
+
+ private void setActiveDiagramEditor(DiagramEditorWithFlyOutPalette editor) {
+ activeDiagramEditor = editor;
+ activeTableEditor = null;
+ }
+
+ private void setActiveTableEditor(AbstractEMFNattableEditor editor) {
+ activeTableEditor = editor;
+ activeDiagramEditor = null;
+ }
+
+ /**
+ * Apply a container creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyContainerCreationTool(final String toolName, final DDiagram diagram, final EObject container) {
+ final AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool instanceof ContainerCreationDescription || tool instanceof NodeCreationDescription || tool instanceof ToolDescription) {
+ final Command command = getCommand(container, tool);
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(container);
+ boolean canExecute = command.canExecute();
+ domain.getCommandStack().execute(command);
+ return canExecute;
+ }
+ throw new IllegalArgumentException(TOOL_NAME_INCORRECT);
+ }
+
+
+ /**
+ * Applies the {@link ContainerDropDescription} with the given name, on the given target container and the dropped
+ * dDiagram element. It simulates a DDiagramElement drop from the same diagram.
+ *
+ * @param diagram
+ * the diagram in which the tool should be applied
+ * @param dndToolName
+ * the name of the {@link ContainerDropDescription} tool
+ * @param dropContainer
+ * the container in which element should be dropped
+ * @param droppedDDiagramElement
+ * the dropped {@link DDiagramElement} from a diagram.
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyContainerDropDescriptionTool(final DDiagram diagram, final String dndToolName, DragAndDropTarget dropContainer, DDiagramElement droppedDDiagramElement) {
+ boolean result = false;
+ AbstractToolDescription dndTool = getTool(diagram, dndToolName);
+ if (dndTool instanceof ContainerDropDescription) {
+ Command command = getCommandFactory().buildDropInContainerCommandFromTool(dropContainer, droppedDDiagramElement, (ContainerDropDescription) dndTool);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ return result;
+ }
+
+ /**
+ * Applies the {@link ContainerDropDescription} with the given name, on the given target container and the dropped
+ * semantic element. It simulates a semantic element drop from example the Model Explorer view.
+ *
+ * @param diagram
+ * the diagram in which the tool should be applied
+ * @param dndToolName
+ * the name of the {@link ContainerDropDescription} tool
+ * @param dropContainer
+ * the container in which element should be dropped
+ * @param droppedElement
+ * the dropped EObject (if the Drop is made from the Model content view) or the {@link DDiagramElement}
+ * if the drop is made from an existing {@link DDiagramElement}.
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyContainerDropDescriptionTool(final DDiagram diagram, final String dndToolName, DragAndDropTarget dropContainer, EObject droppedElement) {
+ boolean result = false;
+ AbstractToolDescription dndTool = getTool(diagram, dndToolName);
+ if (dndTool instanceof ContainerDropDescription) {
+ Command command = getCommandFactory().buildDropInContainerCommandFromTool(dropContainer, droppedElement, (ContainerDropDescription) dndTool);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ return result;
+ }
+
+ /**
+ * Apply a semantic deletion tool on a diagram element.
+ *
+ * @param element
+ * the diagram element
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applySemanticDeletionTool(final DDiagramElement element) {
+ boolean result = false;
+ Command command = getCommandFactory().buildDeleteDiagramElement(element);
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ return result;
+ }
+
+ /**
+ * Apply a graphical deletion tool on a diagram element.
+ *
+ * @param element
+ * the diagram element
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyGraphicalDeletionTool(final DDiagramElement element) {
+ boolean result = false;
+ Command command = getCommandFactory().buildDeleteFromDiagramCommand(element);
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ return result;
+ }
+
+ /**
+ * Apply a direct edit tool on a diagram element.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param element
+ * the diagram element
+ * @param value
+ * the new value to set
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyDirectEditTool(final String toolName, final DDiagram diagram, final DDiagramElement element, final String value) {
+ boolean result = false;
+ AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool instanceof DirectEditLabel) {
+ Command command = getCommandFactory().buildDirectEditLabelFromTool(element, (DirectEditLabel) tool, value);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ return result;
+ }
+
+ /**
+ * Apply an edge creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param source
+ * the graphical source element
+ * @param target
+ * the graphical target element
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyEdgeCreationTool(final String toolName, final DDiagram diagram, final EdgeTarget source, final EdgeTarget target) {
+ boolean result = false;
+ AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool instanceof EdgeCreationDescription) {
+ Command command = getCommandFactory().buildCreateEdgeCommandFromTool(source, target, (EdgeCreationDescription) tool);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ return result;
+ }
+
+ /**
+ * Apply an edge reconnection tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param edge
+ * the edge
+ * @param source
+ * the graphical source element
+ * @param target
+ * the graphical target element
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyEdgeReconnectionTool(final String toolName, final DDiagram diagram, final DEdge edge, final EdgeTarget source, final EdgeTarget target) {
+ boolean result = false;
+ AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool instanceof ReconnectEdgeDescription) {
+ Command command = getCommandFactory().buildReconnectEdgeCommandFromTool((ReconnectEdgeDescription) tool, edge, source, target);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ return result;
+ }
+
+
+ /**
+ * Apply a generic tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyGenericTool(final String toolName, final DDiagram diagram, final EObject container) {
+ final AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool instanceof ToolDescription) {
+ final Command command = getCommand(container, tool);
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(container);
+ boolean canExecute = command.canExecute();
+ domain.getCommandStack().execute(command);
+ return canExecute;
+ }
+ throw new IllegalArgumentException(TOOL_NAME_INCORRECT);
+ }
+
+ /**
+ * Apply a node creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyNodeCreationTool(final String toolName, final DDiagram diagram, final EObject container) {
+ final AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool != null) {
+ final Command command = getCommand(container, tool);
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(container);
+ boolean canExecute = command.canExecute();
+ domain.getCommandStack().execute(command);
+ return canExecute;
+ }
+ throw new IllegalArgumentException(TOOL_NAME_INCORRECT);
+ }
+
+
+ /**
+ * Apply a node creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param layerName
+ * the layer name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyNodeCreationTool(final String layerName, final String toolName, final DDiagram diagram, final EObject container) {
+ boolean result = false;
+ Layer layer = getLayer(diagram, layerName);
+ if (layer != null) {
+ final AbstractToolDescription tool = getTool(layer, toolName);
+ if (tool != null) {
+ Command command = getCommand(container, tool);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ }
+ return result;
+ }
+
+
+
+ /**
+ * Apply a node creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applySelectionTool(final String toolName, final DDiagram diagram, final EObject container) {
+ boolean result = false;
+ AbstractToolDescription tool = getTool(diagram, toolName);
+ if (tool != null) {
+ Collection<EObject> selectedElements = getSelectedEObject(tool, diagram, container);
+ Command command = getCommand(container, tool, selectedElements);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ return result;
+ }
+
+ /**
+ * Apply a node creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param layerName
+ * the layer name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applySelectionTool(final String layerName, final String toolName, final DDiagram diagram, final EObject container) {
+ boolean result = false;
+ Layer layer = getLayer(diagram, layerName);
+ if (layer != null) {
+ AbstractToolDescription tool = getTool(layer, toolName);
+ if (tool != null) {
+ Collection<EObject> selectedElements = getSelectedEObject(tool, diagram, container);
+ Command command = getCommand(container, tool, selectedElements);
+ result = command.canExecute();
+ session.getTransactionalEditingDomain().getCommandStack().execute(command);
+ }
+ }
+ return result;
+ }
+
+
+ /**
+ * Performs a arrange all request on diagramEditPart.
+ *
+ * @param diagramEditPart
+ * the {@link DiagramEditPart} on to do the request
+ */
+ protected void arrangeAll(DiagramEditPart diagramEditPart) {
+ ArrangeRequest arrangeRequest = new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL);
+ List<Object> partsToArrange = new ArrayList<>();
+ partsToArrange.add(diagramEditPart);
+ arrangeRequest.setPartsToArrange(partsToArrange);
+ diagramEditPart.performRequest(arrangeRequest);
+ }
+
+ protected void closeRequiredViews() {
+ // Only close the Palette view if we opened it
+ if (viewsToClose != null) {
+ for (IViewPart closeMe : viewsToClose) {
+ closeMe.getSite().getPage().hideView(closeMe);
+ }
+ viewsToClose = null;
+ flushDisplayEvents();
+ }
+ }
+
+ @Override
+ protected TransactionalEditingDomain createEditingDomain() {
+ // We don't create the domain; the editor does
+ return null;
+ }
+
+
+
+
+ @SuppressWarnings("restriction")
+ @Override
+ protected void finished(Description description) {
+ try {
+ modelFiles = null;
+
+ Exception exception = null;
+
+ for (IEditorPart editor : ImmutableList.copyOf(editorsToClose)) {
+ try {
+ close(editor);
+ } catch (Exception e) {
+ if (exception == null) {
+ exception = e;
+ }
+ }
+ }
+
+ if (exception != null) {
+ exception.printStackTrace();
+ fail("Failed to close an editor: " + exception.getLocalizedMessage());
+ }
+ } finally {
+ try {
+ if (operationHistoryIntegrityListener != null) {
+ operationHistory.removeOperationHistoryListener(operationHistoryIntegrityListener);
+ operationHistoryIntegrityListener = null;
+ operationHistory = null;
+ }
+
+ } finally {
+ editorsToClose.clear();
+ editor = null;
+ activeDiagramEditor = null;
+
+ org.eclipse.papyrus.infra.ui.internal.preferences.EditorPreferences.getInstance().setConvertSharedPageLayoutToPrivate(initialEditorLayoutStorageMigrationPreference);
+
+ try {
+ if (hasRequiredViews()) {
+ closeRequiredViews();
+ }
+ } finally {
+ super.finished(description);
+ }
+ }
+ }
+ }
+
+ /**
+ * Get a command for the tool.
+ *
+ * @param container
+ * the container
+ * @param tool
+ * the tool
+ * @return the command build to execute the tool's operation on the given container
+ */
+ protected final Command getCommand(final EObject container, final AbstractToolDescription tool) {
+
+ Command cmd = null;
+
+ if (tool instanceof NodeCreationDescription) {
+ if (container instanceof DDiagram) {
+ cmd = getCommandFactory().buildCreateNodeCommandFromTool((DDiagram) container, (NodeCreationDescription) tool);
+ } else if (container instanceof DDiagramElementContainer) {
+ cmd = getCommandFactory().buildCreateNodeCommandFromTool((DDiagramElementContainer) container, (NodeCreationDescription) tool);
+ } else if (container instanceof DNode) {
+ cmd = getCommandFactory().buildCreateNodeCommandFromTool((DNode) container, (NodeCreationDescription) tool);
+ }
+ } else if (tool instanceof ContainerCreationDescription) {
+ if (container instanceof DDiagram) {
+ cmd = getCommandFactory().buildCreateContainerCommandFromTool((DDiagram) container, (ContainerCreationDescription) tool);
+ } else if (container instanceof DDiagramElementContainer) {
+ cmd = getCommandFactory().buildCreateContainerCommandFromTool((DDiagramElementContainer) container, (ContainerCreationDescription) tool);
+ }
+ } else if (tool instanceof ToolDescription) {
+ cmd = getCommandFactory().buildGenericToolCommandFromTool(container, (ToolDescription) tool);
+ }
+ return cmd;
+ }
+
+
+ protected IDiagramCommandFactory getCommandFactory() {
+ if (commandFactory == null) {
+ commandFactory = DiagramCommandFactoryService.getInstance().getNewProvider().getCommandFactory(getEditingDomain());
+ commandFactory.setUserInterfaceCallBack(new NoUICallback());
+ }
+ return commandFactory;
+ }
+
+ protected final ShowView getRequiredViews() {
+ ShowView result = testDescription.getAnnotation(ShowView.class);
+
+ if (result == null) {
+ for (Class<?> clazz = testClass; (result == null) && (clazz != null) && (clazz != Object.class); clazz = clazz.getSuperclass()) {
+ result = clazz.getAnnotation(ShowView.class);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ *
+ * @param modelElement
+ * an element of the edited model
+ * @return
+ * the service registry or <code>null</code> if not found
+ */
+ protected final ServicesRegistry getServiceRegistry(final EObject modelElement) {
+ try {
+ return ServiceUtilsForEObject.getInstance().getServiceRegistry(modelElement);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * Searches the given {@link DDiagram} for a tool of the given name and returns it.
+ *
+ * @param diagram
+ * The diagram to search for a tool.
+ * @param toolName
+ * The name of the searched tool ("chapter" for the "Create new chapter" tool).
+ * @return The searched tool, <code>null</code> if it cannot be found.
+ */
+ protected final AbstractToolDescription getTool(final DDiagram diagram, final String toolName) {
+ final List<AbstractToolDescription> tools = DiagramComponentizationTestSupport.getAllTools(session, diagram.getDescription());
+ return getTool(tools, toolName);
+ }
+
+ protected final IWorkbenchPage getWorkbenchPage() {
+ IWorkbench bench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = bench.getActiveWorkbenchWindow();
+ if (window == null) {
+ window = bench.getWorkbenchWindows()[0];
+ }
+ return window.getActivePage();
+ }
+
+ protected final boolean hasRequiredViews() {
+ return getRequiredViews() != null;
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected IMultiDiagramEditor open(final IFile modelFile) {
+ final boolean firstEditor = editorsToClose.isEmpty();
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ editor = EditorUtils.openPapyrusEditor(modelFile);
+ editorsToClose.add(editor);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to open Papyrus editor: " + e.getLocalizedMessage());
+ }
+ }
+ });
+
+ if (firstEditor && !editorsToClose.isEmpty()) {
+ final IWorkbenchPage page = editor.getSite().getPage();
+ page.addPartListener(new IPartListener() {
+
+ @Override
+ public void partActivated(IWorkbenchPart part) {
+ // Pass
+ }
+
+ @Override
+ public void partBroughtToTop(IWorkbenchPart part) {
+ // Pass
+ }
+
+ @Override
+ public void partClosed(IWorkbenchPart part) {
+ editorsToClose.remove(part);
+
+ if (part == editor) {
+ editor = null;
+ }
+
+ if (editorsToClose.isEmpty()) {
+ page.removePartListener(this);
+ }
+ }
+
+ @Override
+ public void partDeactivated(IWorkbenchPart part) {
+ // Pass
+ }
+
+ @Override
+ public void partOpened(IWorkbenchPart part) {
+ // Pass
+ }
+ });
+ }
+
+ flushDisplayEvents();
+
+ return editor;
+ }
+
+ protected Iterable<IMultiDiagramEditor> openAll(Description description) {
+ List<IMultiDiagramEditor> result = Lists.newArrayList();
+
+ for (Resource resource : initModelResources(description)) {
+ if (resource.getURI().fileExtension().equals(UmlModel.UML_FILE_EXTENSION)) {
+ IFile papyrusModel = getProject().getFile(resource.getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION));
+ modelFiles.put(description, papyrusModel);
+ result.add(open(papyrusModel));
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Open the editor for the diagram
+ *
+ * @param proto
+ * the diagram
+ */
+ protected final void openEditor(final DSemanticDiagram proto) {
+ final ServicesRegistry sReg = getServiceRegistry(proto.getTarget());
+ if (null == sReg) {
+ return;
+ }
+ final IPageManager pageManager = getPageManager(sReg);
+ if (null == pageManager) {
+ return;
+ }
+ pageManager.openPage(proto);
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected IMultiDiagramEditor openOne(Description description) {
+ IFile papyrusModel = getProject().getFile(Iterables.getOnlyElement(initModelResources(description)).getURI().trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION));
+ modelFiles.put(description, papyrusModel);
+ return open(papyrusModel);
+ }
+
+ protected void openRequiredViews() {
+ IWorkbenchPage page = getWorkbenchPage();
+
+ for (ShowViewDescriptor next : ShowViewDescriptor.getDescriptors(getRequiredViews())) {
+ IViewPart part = page.findView(next.viewID());
+ if (part == null) {
+ // Must open it
+ try {
+ part = page.showView(next.viewID());
+ movePartRelativeTo(part, next.relativeTo(), next.location());
+
+ if (viewsToClose == null) {
+ viewsToClose = Lists.newArrayListWithExpectedSize(1);
+ }
+ viewsToClose.add(part);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ fail("Failed to open required view: " + e.getLocalizedMessage());
+ }
+ }
+ }
+
+ flushDisplayEvents();
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected IMultiDiagramEditor reopenOne(Description description) {
+ IFile papyrusModel = modelFiles.get(description).get(0);
+ return open(papyrusModel);
+ }
+
+ @SuppressWarnings("restriction")
+ @Override
+ protected void starting(Description description) {
+ testClass = description.getTestClass();
+ testDescription = description;
+
+ // Ensure that we won't see a dialog prompting the user to migrate page layout
+ // storage from the DI file to the workspace-private sash file
+ initialEditorLayoutStorageMigrationPreference = org.eclipse.papyrus.infra.ui.internal.preferences.EditorPreferences.getInstance().getConvertSharedPageLayoutToPrivate();
+ org.eclipse.papyrus.infra.ui.internal.preferences.EditorPreferences.getInstance().setConvertSharedPageLayoutToPrivate(org.eclipse.papyrus.infra.ui.internal.preferences.YesNo.NO);
+
+ if (hasRequiredViews()) {
+ openRequiredViews();
+ }
+
+ modelFiles = ArrayListMultimap.create();
+ openAll(description);
+
+ ActiveDiagram activeDiagram = JUnitUtils.getAnnotation(description, ActiveDiagram.class);
+ if (activeDiagram != null) {
+ String name = activeDiagram.value();
+ activateDiagram(name);
+ if ((activeDiagramEditor == null) || !name.equals(getActiveDiagramEditor().getDiagram().getName())) {
+ // OK, we need to open it, then
+ openDiagram(name);
+ }
+ } else {
+ ActiveTable activeTable = JUnitUtils.getAnnotation(description, ActiveTable.class);
+ if (activeTable != null) {
+ String name = activeTable.value();
+ activateTable(name);
+ if ((activeTableEditor == null) || !name.equals(getActiveTableEditor().getTable().getName())) {
+ openTable(name);
+ }
+ }
+ }
+
+ super.starting(description);
+
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(editor.getServicesRegistry());
+ SiriusDiagramModel siriusModel = (SiriusDiagramModel) modelSet.getModel(SiriusDiagramModel.SIRIUS_DIAGRAM_MODEL_ID);
+
+ SessionService sessionService = (SessionService) editor.getServicesRegistry().getService(ISiriusSessionService.SERVICE_ID);
+ session = sessionService.getSiriusSession();
+ } catch (ServiceException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ if (ensureOperationHistoryIntegrity) {
+ // Ensure consistency of undo/redo with EMF operations
+ final IWorkspaceCommandStack stack = (IWorkspaceCommandStack) getEditingDomain().getCommandStack();
+ final IUndoContext emfContext = stack.getDefaultUndoContext();
+ operationHistory = stack.getOperationHistory();
+ operationHistoryIntegrityListener = new IOperationHistoryListener() {
+ @Override
+ public void historyNotification(OperationHistoryEvent event) {
+ if (DUMP_COMMANDS && (event.getEventType() == OperationHistoryEvent.ABOUT_TO_EXECUTE)) {
+ System.err.println(">> Executing command"); //$NON-NLS-1$
+ CommandUtils.dump(event.getOperation());
+ System.err.println();
+ }
+ if ((event.getEventType() == OperationHistoryEvent.DONE) && (activeDiagramEditor != null)) {
+ IUndoContext diagramContext = activeDiagramEditor.getDiagramEditDomain().getDiagramCommandStack().getUndoContext();
+ if (diagramContext != null) {
+ IUndoableOperation undo = event.getOperation();
+ if ((undo != null) && !undo.hasContext(emfContext)) {
+ undo.addContext(emfContext);
+ }
+ }
+ }
+ // nothing to do for table
+ }
+ };
+ operationHistory.addOperationHistoryListener(operationHistoryIntegrityListener);
+ }
+ }
+
+ /**
+ * Searches the given {@link DDiagram} for a layer of the given name and returns it.
+ *
+ * @param diagram
+ * The diagram to search for a tool.
+ * @param layerName
+ * The name of the searched layer.
+ * @return The retrieved layer, or <code>null</code> if it cannot be found.
+ */
+ protected final Layer getLayer(final DDiagram diagram, final String layerName) {
+ final Collection<Layer> layers = DiagramComponentizationTestSupport.getAllLayers(session, diagram.getDescription());
+
+ for (final Layer layer : layers) {
+ if (layer.getName().equals(layerName)) {
+ return layer;
+ }
+ }
+ throw new IllegalArgumentException(LAYER_NAME_INCORRECT);
+ }
+
+
+ /**
+ * Searches the given {@link Layer} for a tool of the given name and returns it.
+ *
+ * @param layer
+ * The layer to search for a tool.
+ * @param toolName
+ * The name of the searched tool ("chapter" for the "Create new chapter" tool).
+ * @return The searched tool, <code>null</code> if it cannot be found.
+ */
+ protected final AbstractToolDescription getTool(final Layer layer, final String toolName) {
+ return getTool(layer.getAllTools(), toolName);
+ }
+
+ /**
+ * Get the selected objects.
+ *
+ * @param tool
+ * the tool
+ * @param diagram
+ * the diagram
+ * @param container
+ * the container
+ * @return the selected objects
+ */
+ protected Collection<EObject> getSelectedEObject(final AbstractToolDescription tool, final DDiagram diagram, final EObject container) {
+ return Collections.<EObject> emptyList();
+ }
+
+
+ /**
+ * Get a selection command for the tool.
+ *
+ * @param container
+ * the container
+ * @param tool
+ * the tool
+ * @param selectedElements
+ * the selected elements
+ * @return the command build to execute the tool's operation on the given container
+ */
+ protected Command getCommand(final EObject container, final AbstractToolDescription tool, final Collection<EObject> selectedElements) {
+ Command cmd = null;
+ if (tool instanceof SelectionWizardDescription && container instanceof DSemanticDecorator) {
+ cmd = getCommandFactory().buildSelectionWizardCommandFromTool((SelectionWizardDescription) tool, (DSemanticDecorator) container, selectedElements);
+ } else if (tool instanceof OperationAction) {
+ cmd = getCommandFactory().buildOperationActionFromTool((OperationAction) tool,
+ selectedElements.stream().filter(DSemanticDecorator.class::isInstance).map(DSemanticDecorator.class::cast).collect(Collectors.toList()));
+ }
+ return cmd;
+ }
+
+
+ private class ToolBasedCreationFactory implements CreationFactory {
+
+ AbstractToolDescription toolDesc;
+
+ public ToolBasedCreationFactory(AbstractToolDescription toolDescription) {
+ this.toolDesc = toolDescription;
+ }
+
+ @Override
+ public Object getNewObject() {
+ return toolDesc;
+ }
+
+ @Override
+ public Object getObjectType() {
+ return toolDesc.getClass();
+ }
+
+ }
+
+
+
+
+ /**
+ *
+ * @author ymortier
+ */
+ public static class DummyCreationTool extends CreationTool {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.gef.tools.TargetingTool#setTargetEditPart(org.eclipse.gef.EditPart)
+ */
+ @Override
+ public void setTargetEditPart(EditPart editpart) {
+ super.setTargetEditPart(editpart);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.gef.tools.TargetingTool#getTargetRequest()
+ */
+ @Override
+ public Request getTargetRequest() {
+ return super.getTargetRequest();
+ }
+
+ }
+
+ /**
+ * Apply a node creation tool on a diagram.
+ *
+ * @param toolName
+ * the tool name
+ * @param diagram
+ * the diagram
+ * @param container
+ * the graphical container, for instance the diagram
+ * @return <code>true</code> if the tool could be applied, <code>false</code> otherwise
+ */
+ public final boolean applyNodeCreationToolFromPalette(final String toolName, final DDiagram diagram, final EObject container, Point location, Dimension size) {
+ final AbstractToolDescription tool = getTool(diagram, toolName);
+
+ if (tool != null) {
+ DummyCreationTool creationTool = createPaletteTool(tool);
+ final var targetEditPart = findEditPart(container);
+ creationTool.setTargetEditPart(targetEditPart);
+
+
+ final Request request = creationTool.getTargetRequest();
+ if (request instanceof CreateRequest) {
+ CreateRequest requestcreation = (CreateRequest) request;
+ requestcreation.setLocation(location);
+ requestcreation.setSize(size);
+ }
+ final org.eclipse.gef.commands.Command command = targetEditPart.getCommand(request);
+ getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command));
+ return command.canExecute();
+ }
+ throw new IllegalArgumentException(TOOL_NAME_INCORRECT);
+ }
+
+ /**
+ * @param tool
+ * @return
+ */
+ private DummyCreationTool createPaletteTool(final AbstractToolDescription tool) {
+ final AbstractToolDescription containerCreation = tool;
+ final CreationFactory creationFactory = new ToolBasedCreationFactory(containerCreation);
+
+ final CreationToolEntry paletteEntry = new CreationToolEntry(containerCreation.getName(), containerCreation.getDocumentation(), creationFactory, null, null);
+ paletteEntry.setToolClass(DummyCreationTool.class);
+
+ DummyCreationTool creationTool = (DummyCreationTool) paletteEntry.createTool();
+ creationTool.setViewer(getActiveDiagramEditor().getDiagramGraphicalViewer());
+ return creationTool;
+ }
+
+ /**
+ * @param string
+ * @param diagramRespresentation
+ * @param element
+ * @param element2
+ * @param absoluteEndPoint
+ * @param absoluteStartPoint
+ * @return
+ */
+ public boolean applyEdgeCreationToolFromPalette(String toolName, DDiagram diagram, EdgeTarget element1, EdgeTarget element2, Point absoluteStartPoint, Point absoluteEndPoint) {
+
+ AbstractToolDescription tool = getTool(diagram, toolName);
+
+ IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) findEditPart(element1);
+ IGraphicalEditPart targetEditPart = (IGraphicalEditPart) findEditPart(element2);
+
+
+ CreateConnectionRequest createConnectionRequest = new CreateConnectionRequest();
+ createConnectionRequest.setSourceEditPart(sourceEditPart);
+ createConnectionRequest.setTargetEditPart(targetEditPart);
+ createConnectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ createConnectionRequest.setLocation(absoluteStartPoint);
+ createConnectionRequest.setFactory(new ToolBasedCreationFactory(tool));
+
+ sourceEditPart.showSourceFeedback(createConnectionRequest);
+ targetEditPart.showTargetFeedback(createConnectionRequest);
+ try {
+ org.eclipse.gef.commands.Command startCommand = sourceEditPart.getCommand(createConnectionRequest);
+ if (startCommand.canExecute()) {
+ createConnectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ createConnectionRequest.setLocation(absoluteEndPoint);
+ // => activate feedback for debug ?
+ // lifelineAEditPart.showSourceFeedback(createConnectionRequest);
+ // lifelineBEditPart.showTargetFeedback(createConnectionRequest);
+ final org.eclipse.gef.commands.Command endCommand = targetEditPart.getCommand(createConnectionRequest);
+ getEditingDomain().getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(endCommand));
+ return endCommand.canExecute();
+ }
+ } finally {
+ sourceEditPart.eraseSourceFeedback(createConnectionRequest);
+ targetEditPart.eraseTargetFeedback(createConnectionRequest);
+ }
+ return false;
+ }
+
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.classpath b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.classpath
new file mode 100755
index 0000000..a42a828
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.classpath
@@ -0,0 +1,11 @@
+<?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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.project b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.project
new file mode 100755
index 0000000..f323dc2
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.siriusdiag.clazz.tests</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.core.runtime.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..e63dbb3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,379 @@
+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=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+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.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
+org.eclipse.jdt.core.formatter.align_with_spaces=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
+org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.indent_tag_description=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..d38b689
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=17
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST.\n * \n * All rights reserved. This program and the accompanying materials\n * are the property of CEA LIST, their use is subject to specific\n * agreement with the CEA LIST.\n *\n * Contributors\:\n * ${user}\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.m2e.core.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.m2e.core.prefs
new file mode 100755
index 0000000..f897a7f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..a856f9b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,43 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Papyrus - UML Class Diagram Tests
+Bundle-SymbolicName: org.eclipse.papyrus.uml.siriusdiag.clazz.tests
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.siriusdiag.clazz.tests.Activator
+Bundle-Vendor: Eclipse Modeling Project
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[2.1.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.junit;bundle-version="[4.13.0,5.0.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.10.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.sirius.clazz.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.properties;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation.edit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.sirius;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.ui;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.sirius.common.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.sirius.diagram.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.siriusdiag.junit.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram.ui
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: uml.diagram.clazz.tests.examples
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.papyrus.junit.utils.rules
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/SiriusDiagClassTest.launch b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/SiriusDiagClassTest.launch
new file mode 100755
index 0000000..70899f8
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/SiriusDiagClassTest.launch
@@ -0,0 +1,1384 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+ <setAttribute key="additional_plugins">
+ <setEntry value="org.antlr.runtime:3.2.0.v201101311130:default:true:default:default"/>
+ <setEntry value="org.apache.batik.css:1.13.0.v20200622-2037:default:true:default:default"/>
+ <setEntry value="org.apache.batik.css:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.dom.svg:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.dom:1.6.1.v201505192100:default:true:default:default"/>
+ <setEntry value="org.apache.batik.ext.awt:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.i18n:1.13.0.v20200622-2037:default:true:default:default"/>
+ <setEntry value="org.apache.batik.parser:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.transcoder:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.util.gui:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.util:1.13.0.v20200622-2037:default:true:default:default"/>
+ <setEntry value="org.apache.batik.util:1.6.0.v201011041432:default:true:default:default"/>
+ <setEntry value="org.apache.batik.xml:1.6.0.v201011041432:default:true:default:default"/>
+ </setAttribute>
+ <booleanAttribute key="append.args" value="true"/>
+ <booleanAttribute key="askclear" value="false"/>
+ <booleanAttribute key="automaticAdd" value="false"/>
+ <booleanAttribute key="automaticValidate" value="true"/>
+ <stringAttribute key="bootstrap" value=""/>
+ <stringAttribute key="checked" value="[NONE]"/>
+ <booleanAttribute key="clearConfig" value="true"/>
+ <booleanAttribute key="clearws" value="true"/>
+ <booleanAttribute key="clearwslog" value="false"/>
+ <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+ <booleanAttribute key="default" value="false"/>
+ <setAttribute key="deselected_workspace_bundles"/>
+ <stringAttribute key="featureDefaultLocation" value="workspace"/>
+ <stringAttribute key="featurePluginResolution" value="workspace"/>
+ <booleanAttribute key="includeOptional" value="false"/>
+ <stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+ <listEntry value="/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllClassDiagramTests.java"/>
+ </listAttribute>
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+ <listEntry value="1"/>
+ </listAttribute>
+ <listAttribute key="org.eclipse.eclemma.core.SCOPE_IDS">
+ <listEntry value="=org.eclipse.papyrus.infra.hyperlink/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.architecture.representation/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.representation.architecture/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.modelexplorer/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.representation/src"/>
+ <listEntry value="=org.eclipse.papyrus.uml.sirius.common.diagram/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.ui/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.common/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css3.xtext/xtend-gen"/>
+ <listEntry value="=org.eclipse.papyrus.uml.sirius.statemachine.diagram/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css/src"/>
+ <listEntry value="=org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src=/test=/true=/"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css.model.edit/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.properties/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.representation/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.sirius/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.representation.architecture/api"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.hyperlink/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.representation/api"/>
+ <listEntry value="=org.eclipse.papyrus.uml.sirius.sequence.diagram/src"/>
+ <listEntry value="=org.eclipse.papyrus.uml.sirius.xtext.integration.ui/src"/>
+ <listEntry value="=org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src=/test=/true=/"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.representation.edit/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.uml.sirius.clazz.diagram/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css.model/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.uml.diagram.menu/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css3.xtext/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.architecture.representation/src"/>
+ <listEntry value="=org.eclipse.papyrus.siriusdiag.junit.utils/src"/>
+ <listEntry value="=org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src=/test=/true=/"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css.model/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.style/src-gen"/>
+ <listEntry value="=org.eclipse.papyrus.junit.utils/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.emf/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css.properties/src"/>
+ <listEntry value="=org.eclipse.papyrus.junit.framework/src"/>
+ <listEntry value="=org.eclipse.papyrus.uml.sirius.diagram.architecture/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.gmfdiag.css.configuration/src"/>
+ <listEntry value="=org.eclipse.papyrus.infra.siriusdiag.sirius/api"/>
+ <listEntry value="=org.eclipse.papyrus.uml.diagram.css/src"/>
+ <listEntry value="=org.eclipse.papyrus.bundles.tests/src"/>
+ </listAttribute>
+ <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+ <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+ <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+ <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
+ <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+ <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all.AllClassDiagramTests"/>
+ <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+ <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.siriusdiag.clazz.tests"/>
+ <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+ <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
+ <stringAttribute key="pde.version" value="3.3"/>
+ <stringAttribute key="product" value="org.eclipse.papyrus.rcp.product"/>
+ <booleanAttribute key="run_in_ui_thread" value="true"/>
+ <setAttribute key="selected_features">
+ <setEntry value="org.eclipse.papyrus.doc.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.editor.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.architecture.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.expressions.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.ui.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.viewpoints.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.widget.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.sdk.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.architecture.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.decoratormodel.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.css.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.expressions.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.internationalization.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.m2m.qvto.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.modelexplorer.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.properties.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.search.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.tools.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.ui.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.xtext.integration.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.documentation.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.modelexplorer.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.properties.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.references.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.search.feature:default"/>
+ <setEntry value="org.eclipse.papyrus.views.validation.feature:default"/>
+ </setAttribute>
+ <setAttribute key="selected_target_bundles">
+ <setEntry value="biz.aQute.bndlib@default:default"/>
+ <setEntry value="ca.odell.glazedlists@default:default"/>
+ <setEntry value="com.google.gerrit.common@default:default"/>
+ <setEntry value="com.google.gerrit.prettify@default:default"/>
+ <setEntry value="com.google.gerrit.reviewdb@default:default"/>
+ <setEntry value="com.google.gson*2.7.0.v20170129-0911@default:default"/>
+ <setEntry value="com.google.gson*2.8.6.v20201231-1626@default:default"/>
+ <setEntry value="com.google.guava*21.0.0.v20170206-1425@default:default"/>
+ <setEntry value="com.google.guava*27.1.0.v20190517-1946@default:default"/>
+ <setEntry value="com.google.guava*30.1.0.v20210127-2300@default:default"/>
+ <setEntry value="com.google.gwt.servlet@default:default"/>
+ <setEntry value="com.google.gwtjsonrpc@default:default"/>
+ <setEntry value="com.google.gwtorm@default:default"/>
+ <setEntry value="com.google.inject@default:default"/>
+ <setEntry value="com.ibm.icu@default:default"/>
+ <setEntry value="com.jcraft.jsch@default:default"/>
+ <setEntry value="com.sun.el@default:default"/>
+ <setEntry value="com.sun.jna.platform@default:default"/>
+ <setEntry value="com.sun.jna@default:default"/>
+ <setEntry value="com.sun.xml.bind*2.2.0.v20201118-1845@default:default"/>
+ <setEntry value="com.sun.xml.bind*2.3.3.v20201118-1818@default:default"/>
+ <setEntry value="io.github.classgraph@default:default"/>
+ <setEntry value="jakarta.xml.bind@default:default"/>
+ <setEntry value="javaewah@default:default"/>
+ <setEntry value="javax.activation*1.1.0.v201211130549@default:default"/>
+ <setEntry value="javax.activation*1.2.2.v20201119-1642@default:default"/>
+ <setEntry value="javax.annotation@default:default"/>
+ <setEntry value="javax.el@default:default"/>
+ <setEntry value="javax.inject@default:default"/>
+ <setEntry value="javax.servlet*3.0.0.v201112011016@default:default"/>
+ <setEntry value="javax.servlet*3.1.0.v201410161800@default:default"/>
+ <setEntry value="javax.servlet.jsp@default:default"/>
+ <setEntry value="javax.xml.bind@default:default"/>
+ <setEntry value="javax.xml.stream@default:default"/>
+ <setEntry value="javax.xml@default:default"/>
+ <setEntry value="lpg.runtime.java@default:default"/>
+ <setEntry value="net.i2p.crypto.eddsa@default:default"/>
+ <setEntry value="org.antlr.runtime*3.2.0.v201101311130@default:default"/>
+ <setEntry value="org.antlr.runtime*4.7.2.v20200218-0804@default:default"/>
+ <setEntry value="org.apache.ant@default:default"/>
+ <setEntry value="org.apache.batik.bridge@default:default"/>
+ <setEntry value="org.apache.batik.constants@default:default"/>
+ <setEntry value="org.apache.batik.css*1.13.0.v20200622-2037@default:default"/>
+ <setEntry value="org.apache.batik.css*1.6.0.v201011041432@default:default"/>
+ <setEntry value="org.apache.batik.dom.svg@default:default"/>
+ <setEntry value="org.apache.batik.dom@default:default"/>
+ <setEntry value="org.apache.batik.ext.awt@default:default"/>
+ <setEntry value="org.apache.batik.i18n@default:default"/>
+ <setEntry value="org.apache.batik.parser@default:default"/>
+ <setEntry value="org.apache.batik.pdf@default:default"/>
+ <setEntry value="org.apache.batik.svggen@default:default"/>
+ <setEntry value="org.apache.batik.transcoder@default:default"/>
+ <setEntry value="org.apache.batik.util*1.13.0.v20200622-2037@default:default"/>
+ <setEntry value="org.apache.batik.util*1.6.0.v201011041432@default:default"/>
+ <setEntry value="org.apache.batik.util.gui@default:default"/>
+ <setEntry value="org.apache.batik.xml@default:default"/>
+ <setEntry value="org.apache.commons.cli@default:default"/>
+ <setEntry value="org.apache.commons.codec@default:default"/>
+ <setEntry value="org.apache.commons.compress@default:default"/>
+ <setEntry value="org.apache.commons.httpclient@default:default"/>
+ <setEntry value="org.apache.commons.io@default:default"/>
+ <setEntry value="org.apache.commons.jxpath@default:default"/>
+ <setEntry value="org.apache.commons.lang@default:default"/>
+ <setEntry value="org.apache.commons.logging@default:default"/>
+ <setEntry value="org.apache.felix.gogo.command@default:default"/>
+ <setEntry value="org.apache.felix.gogo.runtime@default:default"/>
+ <setEntry value="org.apache.felix.gogo.shell@default:default"/>
+ <setEntry value="org.apache.felix.scr@1:true"/>
+ <setEntry value="org.apache.httpcomponents.httpclient.win@default:default"/>
+ <setEntry value="org.apache.httpcomponents.httpclient@default:default"/>
+ <setEntry value="org.apache.httpcomponents.httpcore@default:default"/>
+ <setEntry value="org.apache.jasper.glassfish@default:default"/>
+ <setEntry value="org.apache.log4j@default:default"/>
+ <setEntry value="org.apache.lucene.analyzers-common*6.1.0.v20161115-1612@default:default"/>
+ <setEntry value="org.apache.lucene.analyzers-common*8.4.1.v20200122-1459@default:default"/>
+ <setEntry value="org.apache.lucene.analyzers-smartcn@default:default"/>
+ <setEntry value="org.apache.lucene.core*6.1.0.v20170814-1820@default:default"/>
+ <setEntry value="org.apache.lucene.core*8.4.1.v20200122-1459@default:default"/>
+ <setEntry value="org.apache.lucene.queryparser@default:default"/>
+ <setEntry value="org.apache.sshd.osgi@default:default"/>
+ <setEntry value="org.apache.sshd.sftp@default:default"/>
+ <setEntry value="org.apache.ws.commons.util@default:default"/>
+ <setEntry value="org.apache.xerces*2.12.1.v20210115-0812@default:default"/>
+ <setEntry value="org.apache.xerces*2.9.0.v201101211617@default:default"/>
+ <setEntry value="org.apache.xml.resolver@default:default"/>
+ <setEntry value="org.apache.xml.serializer@default:default"/>
+ <setEntry value="org.apache.xmlgraphics@default:default"/>
+ <setEntry value="org.apache.xmlrpc@default:default"/>
+ <setEntry value="org.apiguardian@default:default"/>
+ <setEntry value="org.bouncycastle.bcpg@default:default"/>
+ <setEntry value="org.bouncycastle.bcprov@default:default"/>
+ <setEntry value="org.easymock@default:default"/>
+ <setEntry value="org.eclipse.acceleo.annotations@default:default"/>
+ <setEntry value="org.eclipse.acceleo.common.ide@default:default"/>
+ <setEntry value="org.eclipse.acceleo.common.ui@default:default"/>
+ <setEntry value="org.eclipse.acceleo.common@default:default"/>
+ <setEntry value="org.eclipse.acceleo.engine@default:default"/>
+ <setEntry value="org.eclipse.acceleo.ide.ui@default:default"/>
+ <setEntry value="org.eclipse.acceleo.model@default:default"/>
+ <setEntry value="org.eclipse.acceleo.parser@default:default"/>
+ <setEntry value="org.eclipse.acceleo.profiler@default:default"/>
+ <setEntry value="org.eclipse.acceleo.query.doc@default:default"/>
+ <setEntry value="org.eclipse.acceleo.query.ide@default:default"/>
+ <setEntry value="org.eclipse.acceleo.query@default:default"/>
+ <setEntry value="org.eclipse.acceleo.traceability.model@default:default"/>
+ <setEntry value="org.eclipse.acceleo.traceability@default:default"/>
+ <setEntry value="org.eclipse.acceleo.ui.interpreter@default:default"/>
+ <setEntry value="org.eclipse.ant.core@default:default"/>
+ <setEntry value="org.eclipse.ant.launching@default:default"/>
+ <setEntry value="org.eclipse.ant.ui@default:default"/>
+ <setEntry value="org.eclipse.buildship.branding@default:default"/>
+ <setEntry value="org.eclipse.buildship.core@default:default"/>
+ <setEntry value="org.eclipse.buildship.stsmigration@default:default"/>
+ <setEntry value="org.eclipse.buildship.ui@default:default"/>
+ <setEntry value="org.eclipse.compare.core@default:default"/>
+ <setEntry value="org.eclipse.compare.win32@default:default"/>
+ <setEntry value="org.eclipse.compare@default:default"/>
+ <setEntry value="org.eclipse.core.commands@default:default"/>
+ <setEntry value="org.eclipse.core.contenttype@default:default"/>
+ <setEntry value="org.eclipse.core.databinding.beans@default:default"/>
+ <setEntry value="org.eclipse.core.databinding.observable@default:default"/>
+ <setEntry value="org.eclipse.core.databinding.property@default:default"/>
+ <setEntry value="org.eclipse.core.databinding@default:default"/>
+ <setEntry value="org.eclipse.core.expressions@default:default"/>
+ <setEntry value="org.eclipse.core.externaltools@default:default"/>
+ <setEntry value="org.eclipse.core.filebuffers@default:default"/>
+ <setEntry value="org.eclipse.core.filesystem.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.core.filesystem@default:default"/>
+ <setEntry value="org.eclipse.core.jobs@default:default"/>
+ <setEntry value="org.eclipse.core.net.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.core.net@default:default"/>
+ <setEntry value="org.eclipse.core.resources.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.core.resources@default:default"/>
+ <setEntry value="org.eclipse.core.runtime@default:true"/>
+ <setEntry value="org.eclipse.core.variables@default:default"/>
+ <setEntry value="org.eclipse.debug.core@default:default"/>
+ <setEntry value="org.eclipse.debug.ui@default:default"/>
+ <setEntry value="org.eclipse.draw2d@default:default"/>
+ <setEntry value="org.eclipse.e4.core.commands@default:default"/>
+ <setEntry value="org.eclipse.e4.core.contexts@default:default"/>
+ <setEntry value="org.eclipse.e4.core.di.annotations@default:default"/>
+ <setEntry value="org.eclipse.e4.core.di.extensions.supplier@default:default"/>
+ <setEntry value="org.eclipse.e4.core.di.extensions@default:default"/>
+ <setEntry value="org.eclipse.e4.core.di@default:default"/>
+ <setEntry value="org.eclipse.e4.core.services@default:default"/>
+ <setEntry value="org.eclipse.e4.emf.xpath@default:default"/>
+ <setEntry value="org.eclipse.e4.tools.compat@default:default"/>
+ <setEntry value="org.eclipse.e4.tools.emf.editor3x@default:default"/>
+ <setEntry value="org.eclipse.e4.tools.emf.ui@default:default"/>
+ <setEntry value="org.eclipse.e4.tools.jdt.templates@default:default"/>
+ <setEntry value="org.eclipse.e4.tools.services@default:default"/>
+ <setEntry value="org.eclipse.e4.tools@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.bindings@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.css.core@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.css.swt.theme@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.css.swt@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.di@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.dialogs@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.ide@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.model.workbench@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.services@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.swt.win32@default:false"/>
+ <setEntry value="org.eclipse.e4.ui.widgets@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.workbench.addons.swt@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.workbench.renderers.swt@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.workbench.swt@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.workbench3@default:default"/>
+ <setEntry value="org.eclipse.e4.ui.workbench@default:default"/>
+ <setEntry value="org.eclipse.ecf.filetransfer@default:default"/>
+ <setEntry value="org.eclipse.ecf.identity@default:default"/>
+ <setEntry value="org.eclipse.ecf.provider.filetransfer.httpclient45.win32@default:default"/>
+ <setEntry value="org.eclipse.ecf.provider.filetransfer.httpclient45@default:default"/>
+ <setEntry value="org.eclipse.ecf.provider.filetransfer.ssl@default:false"/>
+ <setEntry value="org.eclipse.ecf.provider.filetransfer@default:default"/>
+ <setEntry value="org.eclipse.ecf.ssl@default:false"/>
+ <setEntry value="org.eclipse.ecf@default:default"/>
+ <setEntry value="org.eclipse.eclemma.core@default:default"/>
+ <setEntry value="org.eclipse.eclemma.doc@default:default"/>
+ <setEntry value="org.eclipse.eclemma.ui@default:default"/>
+ <setEntry value="org.eclipse.eef.common.ui@default:default"/>
+ <setEntry value="org.eclipse.eef.common@default:default"/>
+ <setEntry value="org.eclipse.eef.core.ext.widgets.reference@default:default"/>
+ <setEntry value="org.eclipse.eef.core@default:default"/>
+ <setEntry value="org.eclipse.eef.ext.widgets.reference@default:default"/>
+ <setEntry value="org.eclipse.eef.ide.ui.ext.widgets.reference@default:default"/>
+ <setEntry value="org.eclipse.eef.ide.ui.properties@default:default"/>
+ <setEntry value="org.eclipse.eef.ide.ui@default:default"/>
+ <setEntry value="org.eclipse.eef.properties.ui.legacy@default:default"/>
+ <setEntry value="org.eclipse.eef.properties.ui@default:default"/>
+ <setEntry value="org.eclipse.eef@default:default"/>
+ <setEntry value="org.eclipse.egit.core@default:default"/>
+ <setEntry value="org.eclipse.egit.doc@default:default"/>
+ <setEntry value="org.eclipse.egit.gitflow.ui@default:default"/>
+ <setEntry value="org.eclipse.egit.gitflow@default:default"/>
+ <setEntry value="org.eclipse.egit.mylyn.ui@default:default"/>
+ <setEntry value="org.eclipse.egit.ui@default:default"/>
+ <setEntry value="org.eclipse.egit@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.common@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.disco.debug@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.disco@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.force@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.graphviz.dot@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.graphviz.layouter@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.layered@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.mrtree@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.radial@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.rectpacking@default:default"/>
+ <setEntry value="org.eclipse.elk.alg.spore@default:default"/>
+ <setEntry value="org.eclipse.elk.core.debug.grandom.ide@default:default"/>
+ <setEntry value="org.eclipse.elk.core.debug.grandom.ui@default:default"/>
+ <setEntry value="org.eclipse.elk.core.debug.grandom@default:default"/>
+ <setEntry value="org.eclipse.elk.core.debug@default:default"/>
+ <setEntry value="org.eclipse.elk.core.meta.ui@default:default"/>
+ <setEntry value="org.eclipse.elk.core.meta@default:default"/>
+ <setEntry value="org.eclipse.elk.core.service@default:default"/>
+ <setEntry value="org.eclipse.elk.core.ui@default:default"/>
+ <setEntry value="org.eclipse.elk.core@default:default"/>
+ <setEntry value="org.eclipse.elk.graph.json.text.ide@default:default"/>
+ <setEntry value="org.eclipse.elk.graph.json.text.ui@default:default"/>
+ <setEntry value="org.eclipse.elk.graph.json.text@default:default"/>
+ <setEntry value="org.eclipse.elk.graph.text.ide@default:default"/>
+ <setEntry value="org.eclipse.elk.graph.text.ui@default:default"/>
+ <setEntry value="org.eclipse.elk.graph.text@default:default"/>
+ <setEntry value="org.eclipse.elk.graph@default:default"/>
+ <setEntry value="org.eclipse.emf.ant@default:default"/>
+ <setEntry value="org.eclipse.emf.cheatsheets@default:default"/>
+ <setEntry value="org.eclipse.emf.codegen.ecore.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.codegen.ecore@default:default"/>
+ <setEntry value="org.eclipse.emf.codegen.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.codegen@default:default"/>
+ <setEntry value="org.eclipse.emf.common.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.common@default:default"/>
+ <setEntry value="org.eclipse.emf.compare@default:default"/>
+ <setEntry value="org.eclipse.emf.converter@default:default"/>
+ <setEntry value="org.eclipse.emf.databinding.edit@default:default"/>
+ <setEntry value="org.eclipse.emf.databinding@default:default"/>
+ <setEntry value="org.eclipse.emf.doc@default:default"/>
+ <setEntry value="org.eclipse.emf.ecore.change.edit@default:default"/>
+ <setEntry value="org.eclipse.emf.ecore.change@default:default"/>
+ <setEntry value="org.eclipse.emf.ecore.edit@default:default"/>
+ <setEntry value="org.eclipse.emf.ecore.editor@default:default"/>
+ <setEntry value="org.eclipse.emf.ecore.xmi@default:default"/>
+ <setEntry value="org.eclipse.emf.ecore@default:default"/>
+ <setEntry value="org.eclipse.emf.edit.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.edit@default:default"/>
+ <setEntry value="org.eclipse.emf.example.installer@default:default"/>
+ <setEntry value="org.eclipse.emf.exporter@default:default"/>
+ <setEntry value="org.eclipse.emf.importer.ecore@default:default"/>
+ <setEntry value="org.eclipse.emf.importer.java@default:default"/>
+ <setEntry value="org.eclipse.emf.importer.rose@default:default"/>
+ <setEntry value="org.eclipse.emf.importer@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ecore.editor@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ecore2ecore.editor@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ecore2ecore@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ecore2xml.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ecore2xml@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ecore@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.mapping@default:default"/>
+ <setEntry value="org.eclipse.emf.mwe.core@default:default"/>
+ <setEntry value="org.eclipse.emf.mwe.utils@default:default"/>
+ <setEntry value="org.eclipse.emf.mwe2.language@default:default"/>
+ <setEntry value="org.eclipse.emf.mwe2.launch@default:default"/>
+ <setEntry value="org.eclipse.emf.mwe2.runtime@default:default"/>
+ <setEntry value="org.eclipse.emf.transaction.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.transaction@default:default"/>
+ <setEntry value="org.eclipse.emf.validation.ocl@default:default"/>
+ <setEntry value="org.eclipse.emf.validation.ui.ide@default:default"/>
+ <setEntry value="org.eclipse.emf.validation.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.validation@default:default"/>
+ <setEntry value="org.eclipse.emf.workspace.ui@default:default"/>
+ <setEntry value="org.eclipse.emf.workspace@default:default"/>
+ <setEntry value="org.eclipse.emf@default:default"/>
+ <setEntry value="org.eclipse.epp.mpc.core.win32@default:default"/>
+ <setEntry value="org.eclipse.epp.mpc.core@default:default"/>
+ <setEntry value="org.eclipse.epp.mpc.help.ui@default:default"/>
+ <setEntry value="org.eclipse.epp.mpc.ui.css@default:default"/>
+ <setEntry value="org.eclipse.epp.mpc.ui@default:default"/>
+ <setEntry value="org.eclipse.epp.package.committers@default:default"/>
+ <setEntry value="org.eclipse.epp.package.common@default:default"/>
+ <setEntry value="org.eclipse.equinox.app@default:default"/>
+ <setEntry value="org.eclipse.equinox.bidi@default:default"/>
+ <setEntry value="org.eclipse.equinox.common@2:true"/>
+ <setEntry value="org.eclipse.equinox.concurrent@default:default"/>
+ <setEntry value="org.eclipse.equinox.console@default:default"/>
+ <setEntry value="org.eclipse.equinox.event@default:default"/>
+ <setEntry value="org.eclipse.equinox.frameworkadmin.equinox@default:default"/>
+ <setEntry value="org.eclipse.equinox.frameworkadmin@default:default"/>
+ <setEntry value="org.eclipse.equinox.http.jetty@default:default"/>
+ <setEntry value="org.eclipse.equinox.http.registry@default:default"/>
+ <setEntry value="org.eclipse.equinox.http.servlet@default:default"/>
+ <setEntry value="org.eclipse.equinox.jsp.jasper.registry@default:default"/>
+ <setEntry value="org.eclipse.equinox.jsp.jasper@default:default"/>
+ <setEntry value="org.eclipse.equinox.launcher.win32.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.equinox.launcher@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.artifact.repository@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.console@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.core@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.director.app@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.director@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.directorywatcher@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.discovery.compatibility@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.discovery@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.engine@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.extensionlocation@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.garbagecollector@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.jarprocessor@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.metadata.repository@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.metadata@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.operations@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.publisher.eclipse@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.publisher@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.reconciler.dropins@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.repository.tools@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.repository@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.touchpoint.eclipse@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.touchpoint.natives@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.transport.ecf@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.ui.discovery@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.ui.importexport@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.ui.sdk.scheduler@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.ui.sdk@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.ui@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.updatechecker@default:default"/>
+ <setEntry value="org.eclipse.equinox.p2.updatesite@default:default"/>
+ <setEntry value="org.eclipse.equinox.preferences@default:default"/>
+ <setEntry value="org.eclipse.equinox.registry@default:default"/>
+ <setEntry value="org.eclipse.equinox.security.ui@default:default"/>
+ <setEntry value="org.eclipse.equinox.security.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.equinox.security@default:default"/>
+ <setEntry value="org.eclipse.equinox.simpleconfigurator.manipulator@default:default"/>
+ <setEntry value="org.eclipse.equinox.simpleconfigurator@1:true"/>
+ <setEntry value="org.eclipse.gef@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.core@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.action.ide@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.action@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.printing.win32@default:false"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.printing@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.services.action@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.services.dnd@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.services.properties@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui.services@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.common.ui@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.core@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.actions@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.dnd@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.printing@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.properties@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.providers@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.render@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.diagram.ui@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.draw2d.ui.render@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.draw2d.ui@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.clipboard.core@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.commands.core@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.core@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.type.core@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.type.ui@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.ui.properties@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.emf.ui@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.gef.ui@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.notation.edit@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.notation.providers@default:default"/>
+ <setEntry value="org.eclipse.gmf.runtime.notation@default:default"/>
+ <setEntry value="org.eclipse.gmf@default:default"/>
+ <setEntry value="org.eclipse.help.base@default:default"/>
+ <setEntry value="org.eclipse.help.ui@default:default"/>
+ <setEntry value="org.eclipse.help.webapp@default:default"/>
+ <setEntry value="org.eclipse.help@default:default"/>
+ <setEntry value="org.eclipse.jdt.annotation*1.1.500.v20200407-1355@default:default"/>
+ <setEntry value="org.eclipse.jdt.annotation*2.2.600.v20200408-1511@default:default"/>
+ <setEntry value="org.eclipse.jdt.apt.core@default:default"/>
+ <setEntry value="org.eclipse.jdt.apt.pluggable.core@default:default"/>
+ <setEntry value="org.eclipse.jdt.apt.ui@default:default"/>
+ <setEntry value="org.eclipse.jdt.compiler.apt@default:false"/>
+ <setEntry value="org.eclipse.jdt.compiler.tool@default:false"/>
+ <setEntry value="org.eclipse.jdt.core.formatterapp@default:default"/>
+ <setEntry value="org.eclipse.jdt.core.manipulation@default:default"/>
+ <setEntry value="org.eclipse.jdt.core@default:default"/>
+ <setEntry value="org.eclipse.jdt.debug.ui@default:default"/>
+ <setEntry value="org.eclipse.jdt.debug@default:default"/>
+ <setEntry value="org.eclipse.jdt.doc.isv@default:default"/>
+ <setEntry value="org.eclipse.jdt.doc.user@default:default"/>
+ <setEntry value="org.eclipse.jdt.junit.core@default:default"/>
+ <setEntry value="org.eclipse.jdt.junit.runtime@default:default"/>
+ <setEntry value="org.eclipse.jdt.junit4.runtime@default:default"/>
+ <setEntry value="org.eclipse.jdt.junit5.runtime@default:default"/>
+ <setEntry value="org.eclipse.jdt.junit@default:default"/>
+ <setEntry value="org.eclipse.jdt.launching@default:default"/>
+ <setEntry value="org.eclipse.jdt.ui@default:default"/>
+ <setEntry value="org.eclipse.jdt@default:default"/>
+ <setEntry value="org.eclipse.jetty.continuation@default:default"/>
+ <setEntry value="org.eclipse.jetty.http@default:default"/>
+ <setEntry value="org.eclipse.jetty.io@default:default"/>
+ <setEntry value="org.eclipse.jetty.security@default:default"/>
+ <setEntry value="org.eclipse.jetty.server@default:default"/>
+ <setEntry value="org.eclipse.jetty.servlet@default:default"/>
+ <setEntry value="org.eclipse.jetty.util.ajax@default:default"/>
+ <setEntry value="org.eclipse.jetty.util@default:default"/>
+ <setEntry value="org.eclipse.jface.databinding@default:default"/>
+ <setEntry value="org.eclipse.jface.notifications@default:default"/>
+ <setEntry value="org.eclipse.jface.text@default:default"/>
+ <setEntry value="org.eclipse.jface@default:default"/>
+ <setEntry value="org.eclipse.jgit.archive@default:default"/>
+ <setEntry value="org.eclipse.jgit.gpg.bc@default:false"/>
+ <setEntry value="org.eclipse.jgit.http.apache@default:default"/>
+ <setEntry value="org.eclipse.jgit.ssh.apache@default:default"/>
+ <setEntry value="org.eclipse.jgit@default:default"/>
+ <setEntry value="org.eclipse.jsch.core@default:default"/>
+ <setEntry value="org.eclipse.jsch.ui@default:default"/>
+ <setEntry value="org.eclipse.lsp4e.debug@default:default"/>
+ <setEntry value="org.eclipse.lsp4e@default:default"/>
+ <setEntry value="org.eclipse.lsp4j.debug@default:default"/>
+ <setEntry value="org.eclipse.lsp4j.jsonrpc.debug@default:default"/>
+ <setEntry value="org.eclipse.lsp4j.jsonrpc@default:default"/>
+ <setEntry value="org.eclipse.lsp4j@default:default"/>
+ <setEntry value="org.eclipse.ltk.core.refactoring@default:default"/>
+ <setEntry value="org.eclipse.ltk.ui.refactoring@default:default"/>
+ <setEntry value="org.eclipse.m2e.archetype.common@default:default"/>
+ <setEntry value="org.eclipse.m2e.binaryproject.ui@default:default"/>
+ <setEntry value="org.eclipse.m2e.binaryproject@default:default"/>
+ <setEntry value="org.eclipse.m2e.core.ui@default:default"/>
+ <setEntry value="org.eclipse.m2e.core@default:default"/>
+ <setEntry value="org.eclipse.m2e.discovery@default:default"/>
+ <setEntry value="org.eclipse.m2e.editor.lemminx@default:default"/>
+ <setEntry value="org.eclipse.m2e.editor.xml@default:default"/>
+ <setEntry value="org.eclipse.m2e.editor@default:default"/>
+ <setEntry value="org.eclipse.m2e.importer@default:default"/>
+ <setEntry value="org.eclipse.m2e.jdt.ui@default:false"/>
+ <setEntry value="org.eclipse.m2e.jdt@default:default"/>
+ <setEntry value="org.eclipse.m2e.launching@default:default"/>
+ <setEntry value="org.eclipse.m2e.lifecyclemapping.defaults@default:default"/>
+ <setEntry value="org.eclipse.m2e.maven.indexer@default:default"/>
+ <setEntry value="org.eclipse.m2e.maven.runtime.slf4j.simple@default:default"/>
+ <setEntry value="org.eclipse.m2e.maven.runtime@default:default"/>
+ <setEntry value="org.eclipse.m2e.model.edit@default:default"/>
+ <setEntry value="org.eclipse.m2e.pde.ui@default:default"/>
+ <setEntry value="org.eclipse.m2e.pde@default:default"/>
+ <setEntry value="org.eclipse.m2e.profiles.core@default:default"/>
+ <setEntry value="org.eclipse.m2e.profiles.ui@default:default"/>
+ <setEntry value="org.eclipse.m2e.refactoring@default:default"/>
+ <setEntry value="org.eclipse.m2e.scm@default:default"/>
+ <setEntry value="org.eclipse.m2e.sourcelookup.ui@default:default"/>
+ <setEntry value="org.eclipse.m2e.sourcelookup@default:default"/>
+ <setEntry value="org.eclipse.m2e.workspace.cli@default:default"/>
+ <setEntry value="org.eclipse.m2m.qvt.oml.common@default:default"/>
+ <setEntry value="org.eclipse.m2m.qvt.oml.cst.parser@default:default"/>
+ <setEntry value="org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default"/>
+ <setEntry value="org.eclipse.m2m.qvt.oml.emf.util@default:default"/>
+ <setEntry value="org.eclipse.m2m.qvt.oml@default:default"/>
+ <setEntry value="org.eclipse.mylyn.bugzilla.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.bugzilla.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.builds.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.builds.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.identity.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.net@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.notifications.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.notifications.feed@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.notifications.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.repositories.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.repositories.http.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.repositories.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.screenshots@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.workbench@default:default"/>
+ <setEntry value="org.eclipse.mylyn.commons.xmlrpc@default:default"/>
+ <setEntry value="org.eclipse.mylyn.context.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.context.tasks.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.context.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.discovery.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.discovery.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.gerrit.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.gerrit.dashboard.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.gerrit.dashboard.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.gerrit.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.git.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.git.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.hudson.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.hudson.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.monitor.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.monitor.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.resources.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.reviews.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.reviews.edit@default:default"/>
+ <setEntry value="org.eclipse.mylyn.reviews.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.tasks.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.tasks.index.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.tasks.index.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.tasks.search@default:default"/>
+ <setEntry value="org.eclipse.mylyn.tasks.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.team.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.versions.core@default:default"/>
+ <setEntry value="org.eclipse.mylyn.versions.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.ant@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.asciidoc.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.asciidoc@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.confluence.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.confluence@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.context.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.help.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.html@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.markdown.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.markdown@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.mediawiki.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.mediawiki@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.osgi@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.tasks.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.textile.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.textile@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.tracwiki.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.tracwiki@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.twiki.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.twiki@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext.ui@default:default"/>
+ <setEntry value="org.eclipse.mylyn.wikitext@default:default"/>
+ <setEntry value="org.eclipse.nebula.cwt@default:default"/>
+ <setEntry value="org.eclipse.nebula.widgets.nattable.core@default:default"/>
+ <setEntry value="org.eclipse.nebula.widgets.nattable.extension.glazedlists@default:default"/>
+ <setEntry value="org.eclipse.nebula.widgets.nattable.extension.nebula@default:default"/>
+ <setEntry value="org.eclipse.nebula.widgets.richtext@default:default"/>
+ <setEntry value="org.eclipse.nebula.widgets.tablecombo@default:default"/>
+ <setEntry value="org.eclipse.ocl.common.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.common@default:default"/>
+ <setEntry value="org.eclipse.ocl.ecore@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.debug.vm.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.debug.vm@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.debug@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.emf.validation.validity.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.emf.validation.validity@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.xtext.console@default:default"/>
+ <setEntry value="org.eclipse.ocl.examples.xtext.serializer@default:default"/>
+ <setEntry value="org.eclipse.ocl.pivot.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.pivot.uml@default:default"/>
+ <setEntry value="org.eclipse.ocl.pivot@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.base.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.base@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.completeocl.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.completeocl@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.essentialocl.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.essentialocl@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.markup.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.markup@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.oclinecore.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.oclinecore@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.oclstdlib.ui@default:default"/>
+ <setEntry value="org.eclipse.ocl.xtext.oclstdlib@default:default"/>
+ <setEntry value="org.eclipse.ocl@default:default"/>
+ <setEntry value="org.eclipse.oomph.base.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.base@default:default"/>
+ <setEntry value="org.eclipse.oomph.extractor.lib@default:default"/>
+ <setEntry value="org.eclipse.oomph.jreinfo.ui@default:default"/>
+ <setEntry value="org.eclipse.oomph.jreinfo.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.oomph.jreinfo@default:default"/>
+ <setEntry value="org.eclipse.oomph.p2.core@default:default"/>
+ <setEntry value="org.eclipse.oomph.p2.doc@default:default"/>
+ <setEntry value="org.eclipse.oomph.p2.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.p2.ui@default:default"/>
+ <setEntry value="org.eclipse.oomph.p2@default:default"/>
+ <setEntry value="org.eclipse.oomph.predicates.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.predicates@default:default"/>
+ <setEntry value="org.eclipse.oomph.preferences@default:default"/>
+ <setEntry value="org.eclipse.oomph.resources.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.resources@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.core@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.doc@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.editor@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.p2.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.p2@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.sync@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.ui.questionnaire@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup.ui@default:default"/>
+ <setEntry value="org.eclipse.oomph.setup@default:default"/>
+ <setEntry value="org.eclipse.oomph.ui@default:default"/>
+ <setEntry value="org.eclipse.oomph.util@default:default"/>
+ <setEntry value="org.eclipse.oomph.workingsets.edit@default:default"/>
+ <setEntry value="org.eclipse.oomph.workingsets.editor@default:default"/>
+ <setEntry value="org.eclipse.oomph.workingsets@default:default"/>
+ <setEntry value="org.eclipse.osgi.compatibility.state@default:false"/>
+ <setEntry value="org.eclipse.osgi.services@default:default"/>
+ <setEntry value="org.eclipse.osgi.util@default:default"/>
+ <setEntry value="org.eclipse.osgi@-1:true"/>
+ <setEntry value="org.eclipse.papyrus.api.migration.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.copypaste.ui.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.developer.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.dsml.validation.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.eclipse.project.editors@default:default"/>
+ <setEntry value="org.eclipse.papyrus.editor.perspectiveconfiguration@default:default"/>
+ <setEntry value="org.eclipse.papyrus.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.aggregate.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.architecture.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.common.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.common.sdk.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.common.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.metamodel.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.metamodel.editor.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.metamodel.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.metamodel@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.sdk.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.sdk.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.custom.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.catalog@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.metamodel.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.metamodel@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.sdk.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.efacet@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.java.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.java.metamodel@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.java.sdk.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.java@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.ocl.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.ocl.metamodel@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.query.ocl.sdk.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.emf.catalog@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.emf.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.emf.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.emf.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.jface.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.pde.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.swt@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.util.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.widgets.celleditors@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.facet.widgets@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.emf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.core.lifecycleevents@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.core.sashwindows.fulleditor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.core.sashwindows.simpleeditor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.text.instance@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.uml.comment.editor.newresource@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.uml.comment.editor.sharedresource@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.uml.nattable.actions@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.uml.nattable.empty.line@default:default"/>
+ <setEntry value="org.eclipse.papyrus.example.uml.services.decorator@default:default"/>
+ <setEntry value="org.eclipse.papyrus.examples.uml.diagrams@default:default"/>
+ <setEntry value="org.eclipse.papyrus.examples.user.qvto@default:default"/>
+ <setEntry value="org.eclipse.papyrus.extensionpoints.editors@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.architecture.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.architecture.representation.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.architecture.representation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.constraints.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.constraints.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.constraints.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.constraints@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.architecture.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.log@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.sasheditor.di@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.sasheditor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core.sashwindows.di@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.editor.welcome.internationalization@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.editor.welcome.nattable@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.editor.welcome@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.appearance@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.diagram.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.expressions.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.expressions.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.expressions.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.expressions.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.expressions@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.gmf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.nattable@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.readonly@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.types.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf.types@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.emf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.filters.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.filters@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.assistant.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.assistant.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.assistant.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.assistant@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.canonical@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.commands@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.common.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.connectionpoint.preferences@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.controlmode@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.configuration@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.model.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.model@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.theme@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css3.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css3.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.dnd@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.expansion@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.export@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.gef@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.hyperlink@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.menu@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.modelexplorer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.navigation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.outline@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.preferences@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.representation.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.representation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.style.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.style@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.tooling.runtime@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.viewersearcher@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.welcome@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.widgets@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.guava@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.hyperlink@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.controlmode@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.readonly@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization.utils@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.internationalization@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.controlmode@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.gmfdiag@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.model.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.model.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.model@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.modelexplorer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.representation.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.representation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.views.config@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable.views.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.nattable@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.newchild.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.newchild.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.newchild.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.newchild.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.newchild@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.onefile.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.onefile@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.properties.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.properties.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.properties.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.psf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.controlmode.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.controlmode.history@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.controlmode@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.decoration.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.decoration@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.edit.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.labelprovider@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.localizer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.markerlistener@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.navigation.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.navigation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.openelement@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.resourceloading.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.resourceloading@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.semantic@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.validation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.viewersearch@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.services.viewlabelprovider@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.sync@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.tools@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types.editor@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types.rulebased@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.types@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.ui.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.ui.emf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.ui.fonts@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.ui.resources@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.viewpoints.policy@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.widgets.toolbox@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.widgets@default:default"/>
+ <setEntry value="org.eclipse.papyrus.outline.emftree@default:default"/>
+ <setEntry value="org.eclipse.papyrus.req.reqif.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.sdk@default:default"/>
+ <setEntry value="org.eclipse.papyrus.toolsmiths.architecture.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.toolsmiths.plugin.builder.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.toolsmiths.profilemigration.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.toolsmiths.validation.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf.common.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf.libraries@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf.to.fuml@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.alf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.appearance@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.commands@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.controlmode.profile@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.decoratormodel.controlmode@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.decoratormodel.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.decoratormodel.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.decoratormodel.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.decoratormodel@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.activity@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.clazz@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.common.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.common.groups@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.communication@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.component@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.composite@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.css@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.deployment@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.dnd@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.emftree@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.icons@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.interactionoverview@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.linklf@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.menu@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.modelexplorer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.navigation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.profile.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.profile@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.sequence.restrictions@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.sequence@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.statemachine@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.stereotype.edition@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.symbols.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.symbols@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.timing@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.usecase@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.wizards@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.documentation.profile@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.export@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.expressions.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.expressions.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.expressions@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.extensionpoints@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.filters.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.filters@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.icons@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.import@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.internationalization.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.internationalization.utils@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.internationalization@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.m2m.qvto.common.blackboxes@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.m2m.qvto.common@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.migration.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.modelexplorer.widgets@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.modelexplorer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.modelrepair.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.modelrepair@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.clazz.config@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.generic.config@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.generic@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.matrix@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.menu@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.richtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.stereotype.display@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.xtext.integration@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable.xtext.valuespecification@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.nattable@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.navigation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.oclconstraintevaluation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.perspective@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.profile.assistants.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.profile.customization.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.profile.drafter@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.profile.types.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.profile@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.properties.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.resourceloading.profile@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.search.ui.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.search.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.service.types.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.service.types@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.service.validation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.services.decoration@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.templaterepository@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.collaborationuse.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.common.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.common.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.javaconstraint@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.message.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.message.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.parameter.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.parameter.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.port.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.port.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.property.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.property.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.state.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.state.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.transition.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.transition.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.tools.utils@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.tools@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.types.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.xtext.integration.core@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.xtext.integration.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.xtext.integration.validation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.documentation.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.documentation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.modelexplorer.newchild@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.modelexplorer.resourceloading@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.modelexplorer.widgets@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.modelexplorer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.properties.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.properties.model.xwt@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.references.doc@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.references@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.search@default:default"/>
+ <setEntry value="org.eclipse.papyrus.views.validation@default:default"/>
+ <setEntry value="org.eclipse.pde.api.tools.annotations@default:default"/>
+ <setEntry value="org.eclipse.pde.api.tools.ui@default:default"/>
+ <setEntry value="org.eclipse.pde.api.tools@default:default"/>
+ <setEntry value="org.eclipse.pde.build@default:default"/>
+ <setEntry value="org.eclipse.pde.core@default:default"/>
+ <setEntry value="org.eclipse.pde.doc.user@default:default"/>
+ <setEntry value="org.eclipse.pde.ds.annotations@default:default"/>
+ <setEntry value="org.eclipse.pde.ds.core@default:default"/>
+ <setEntry value="org.eclipse.pde.ds.lib@default:default"/>
+ <setEntry value="org.eclipse.pde.ds.ui@default:default"/>
+ <setEntry value="org.eclipse.pde.ds1_2.lib@default:default"/>
+ <setEntry value="org.eclipse.pde.genericeditor.extension@default:default"/>
+ <setEntry value="org.eclipse.pde.junit.runtime@default:default"/>
+ <setEntry value="org.eclipse.pde.launching@default:default"/>
+ <setEntry value="org.eclipse.pde.runtime@default:default"/>
+ <setEntry value="org.eclipse.pde.ua.core@default:default"/>
+ <setEntry value="org.eclipse.pde.ua.ui@default:default"/>
+ <setEntry value="org.eclipse.pde.ui.templates@default:default"/>
+ <setEntry value="org.eclipse.pde.ui@default:default"/>
+ <setEntry value="org.eclipse.pde@default:default"/>
+ <setEntry value="org.eclipse.platform.doc.isv@default:default"/>
+ <setEntry value="org.eclipse.platform.doc.user@default:default"/>
+ <setEntry value="org.eclipse.platform@default:default"/>
+ <setEntry value="org.eclipse.rcp@default:default"/>
+ <setEntry value="org.eclipse.sdk@default:default"/>
+ <setEntry value="org.eclipse.search@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.acceleo.aql.ide@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.acceleo.aql@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.acceleo.mtl.ide@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.acceleo.mtl@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.interpreter.aql@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.interpreter@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.ocl@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.ui.ext@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.common.xtext@default:default"/>
+ <setEntry value="org.eclipse.sirius.common@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.elk@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.formatdata@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.sequence.edit@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.sequence.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.sequence@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.ui.ext@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.diagram@default:default"/>
+ <setEntry value="org.eclipse.sirius.doc@default:default"/>
+ <setEntry value="org.eclipse.sirius.ecore.extender@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor.diagram@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor.properties.ext.widgets.reference@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor.properties@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor.sequence@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor.table@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor.tree@default:default"/>
+ <setEntry value="org.eclipse.sirius.editor@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.base@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.draw2d@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.e3.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.e3@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.emf.edit@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.emf.tx@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.emf.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.emf@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.gef@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.gmf.notation@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.gmf.runtime@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.ide@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.jface@default:default"/>
+ <setEntry value="org.eclipse.sirius.ext.swt@default:default"/>
+ <setEntry value="org.eclipse.sirius.interpreter@default:default"/>
+ <setEntry value="org.eclipse.sirius.properties.core@default:default"/>
+ <setEntry value="org.eclipse.sirius.properties.defaultrules@default:default"/>
+ <setEntry value="org.eclipse.sirius.properties.edit@default:default"/>
+ <setEntry value="org.eclipse.sirius.properties.ext.widgets.reference.edit@default:default"/>
+ <setEntry value="org.eclipse.sirius.properties.ext.widgets.reference@default:default"/>
+ <setEntry value="org.eclipse.sirius.properties@default:default"/>
+ <setEntry value="org.eclipse.sirius.sample.ecore.design@default:default"/>
+ <setEntry value="org.eclipse.sirius.sample.interactions.design@default:default"/>
+ <setEntry value="org.eclipse.sirius.sample.interactions.edit@default:default"/>
+ <setEntry value="org.eclipse.sirius.sample.interactions.editor@default:default"/>
+ <setEntry value="org.eclipse.sirius.sample.interactions@default:default"/>
+ <setEntry value="org.eclipse.sirius.samples.family@default:default"/>
+ <setEntry value="org.eclipse.sirius.synchronizer@default:default"/>
+ <setEntry value="org.eclipse.sirius.table.ui.ext@default:default"/>
+ <setEntry value="org.eclipse.sirius.table.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.table@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.junit.support@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.junit@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.rcptt.properties.edit@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.rcptt.properties.editor@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.rcptt.properties.samples@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.rcptt.properties@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.benchmark@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.component.design@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.component@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.docbook.design@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.docbook@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.migration.design@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.migration@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.scxml.design@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.sample.scxml@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.swtbot.support@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.swtbot@default:default"/>
+ <setEntry value="org.eclipse.sirius.tests.tree@default:default"/>
+ <setEntry value="org.eclipse.sirius.tree.ui.ext@default:default"/>
+ <setEntry value="org.eclipse.sirius.tree.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius.tree@default:default"/>
+ <setEntry value="org.eclipse.sirius.ui.editor@default:default"/>
+ <setEntry value="org.eclipse.sirius.ui.ext@default:default"/>
+ <setEntry value="org.eclipse.sirius.ui.properties.ext.widgets.reference@default:default"/>
+ <setEntry value="org.eclipse.sirius.ui.properties@default:default"/>
+ <setEntry value="org.eclipse.sirius.ui@default:default"/>
+ <setEntry value="org.eclipse.sirius@default:default"/>
+ <setEntry value="org.eclipse.swt.browser.chromium.win32.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.swt.tools.base@default:default"/>
+ <setEntry value="org.eclipse.swt.tools.spies@default:default"/>
+ <setEntry value="org.eclipse.swt.tools@default:default"/>
+ <setEntry value="org.eclipse.swt.win32.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.swt@default:default"/>
+ <setEntry value="org.eclipse.swtbot.eclipse.core@default:default"/>
+ <setEntry value="org.eclipse.swtbot.eclipse.finder@default:default"/>
+ <setEntry value="org.eclipse.swtbot.eclipse.gef.finder@default:default"/>
+ <setEntry value="org.eclipse.swtbot.junit4_x@default:default"/>
+ <setEntry value="org.eclipse.swtbot.swt.finder@default:default"/>
+ <setEntry value="org.eclipse.team.core@default:default"/>
+ <setEntry value="org.eclipse.team.genericeditor.diff.extension@default:default"/>
+ <setEntry value="org.eclipse.team.ui@default:default"/>
+ <setEntry value="org.eclipse.text.quicksearch@default:default"/>
+ <setEntry value="org.eclipse.text@default:default"/>
+ <setEntry value="org.eclipse.tm4e.core@default:default"/>
+ <setEntry value="org.eclipse.tm4e.languageconfiguration@default:default"/>
+ <setEntry value="org.eclipse.tm4e.registry@default:default"/>
+ <setEntry value="org.eclipse.tm4e.ui@default:default"/>
+ <setEntry value="org.eclipse.tools.layout.spy@default:default"/>
+ <setEntry value="org.eclipse.ui.browser@default:default"/>
+ <setEntry value="org.eclipse.ui.cheatsheets@default:default"/>
+ <setEntry value="org.eclipse.ui.console@default:default"/>
+ <setEntry value="org.eclipse.ui.editors@default:default"/>
+ <setEntry value="org.eclipse.ui.externaltools@default:default"/>
+ <setEntry value="org.eclipse.ui.forms@default:default"/>
+ <setEntry value="org.eclipse.ui.genericeditor@default:default"/>
+ <setEntry value="org.eclipse.ui.ide.application@default:default"/>
+ <setEntry value="org.eclipse.ui.ide@default:default"/>
+ <setEntry value="org.eclipse.ui.intro.quicklinks@default:default"/>
+ <setEntry value="org.eclipse.ui.intro.universal@default:default"/>
+ <setEntry value="org.eclipse.ui.intro@default:default"/>
+ <setEntry value="org.eclipse.ui.monitoring@default:default"/>
+ <setEntry value="org.eclipse.ui.navigator.resources@default:default"/>
+ <setEntry value="org.eclipse.ui.navigator@default:default"/>
+ <setEntry value="org.eclipse.ui.net@default:default"/>
+ <setEntry value="org.eclipse.ui.themes@default:default"/>
+ <setEntry value="org.eclipse.ui.trace@default:default"/>
+ <setEntry value="org.eclipse.ui.views.log@default:default"/>
+ <setEntry value="org.eclipse.ui.views.properties.tabbed@default:default"/>
+ <setEntry value="org.eclipse.ui.views@default:default"/>
+ <setEntry value="org.eclipse.ui.win32@default:false"/>
+ <setEntry value="org.eclipse.ui.workbench.texteditor@default:default"/>
+ <setEntry value="org.eclipse.ui.workbench@default:default"/>
+ <setEntry value="org.eclipse.ui@default:default"/>
+ <setEntry value="org.eclipse.uml2.codegen.ecore@default:default"/>
+ <setEntry value="org.eclipse.uml2.common.edit@default:default"/>
+ <setEntry value="org.eclipse.uml2.common@default:default"/>
+ <setEntry value="org.eclipse.uml2.types@default:default"/>
+ <setEntry value="org.eclipse.uml2.uml.edit@default:default"/>
+ <setEntry value="org.eclipse.uml2.uml.editor@default:default"/>
+ <setEntry value="org.eclipse.uml2.uml.profile.standard@default:default"/>
+ <setEntry value="org.eclipse.uml2.uml.resources@default:default"/>
+ <setEntry value="org.eclipse.uml2.uml.validation@default:default"/>
+ <setEntry value="org.eclipse.uml2.uml@default:default"/>
+ <setEntry value="org.eclipse.update.configurator@default:default"/>
+ <setEntry value="org.eclipse.urischeme@default:default"/>
+ <setEntry value="org.eclipse.userstorage.oauth@default:default"/>
+ <setEntry value="org.eclipse.userstorage.ui@default:default"/>
+ <setEntry value="org.eclipse.userstorage@default:default"/>
+ <setEntry value="org.eclipse.wb.core.lib@default:default"/>
+ <setEntry value="org.eclipse.wildwebdeveloper.embedder.node.win32.x86_64@default:false"/>
+ <setEntry value="org.eclipse.wildwebdeveloper.embedder.node@default:default"/>
+ <setEntry value="org.eclipse.wildwebdeveloper.xml@default:default"/>
+ <setEntry value="org.eclipse.wildwebdeveloper@default:default"/>
+ <setEntry value="org.eclipse.wst.common.core@default:default"/>
+ <setEntry value="org.eclipse.wst.common.emf@default:default"/>
+ <setEntry value="org.eclipse.wst.common.environment@default:default"/>
+ <setEntry value="org.eclipse.wst.common.frameworks.ui@default:default"/>
+ <setEntry value="org.eclipse.wst.common.frameworks@default:default"/>
+ <setEntry value="org.eclipse.wst.common.project.facet.core@default:default"/>
+ <setEntry value="org.eclipse.wst.common.ui@default:default"/>
+ <setEntry value="org.eclipse.wst.common.uriresolver@default:default"/>
+ <setEntry value="org.eclipse.wst.sse.core@default:default"/>
+ <setEntry value="org.eclipse.wst.sse.ui@default:default"/>
+ <setEntry value="org.eclipse.wst.validation.ui@default:default"/>
+ <setEntry value="org.eclipse.wst.validation@default:default"/>
+ <setEntry value="org.eclipse.wst.xml.core@default:default"/>
+ <setEntry value="org.eclipse.wst.xml.ui@default:default"/>
+ <setEntry value="org.eclipse.wst.xsd.core@default:default"/>
+ <setEntry value="org.eclipse.xpand@default:default"/>
+ <setEntry value="org.eclipse.xsd@default:default"/>
+ <setEntry value="org.eclipse.xtend.lib.macro@default:default"/>
+ <setEntry value="org.eclipse.xtend.lib@default:default"/>
+ <setEntry value="org.eclipse.xtend.typesystem.emf@default:default"/>
+ <setEntry value="org.eclipse.xtend@default:default"/>
+ <setEntry value="org.eclipse.xtext.builder@default:default"/>
+ <setEntry value="org.eclipse.xtext.common.types.edit@default:default"/>
+ <setEntry value="org.eclipse.xtext.common.types.shared@default:default"/>
+ <setEntry value="org.eclipse.xtext.common.types.ui@default:default"/>
+ <setEntry value="org.eclipse.xtext.common.types@default:default"/>
+ <setEntry value="org.eclipse.xtext.ecore@default:default"/>
+ <setEntry value="org.eclipse.xtext.generator@default:default"/>
+ <setEntry value="org.eclipse.xtext.ide@default:default"/>
+ <setEntry value="org.eclipse.xtext.smap@default:default"/>
+ <setEntry value="org.eclipse.xtext.ui.codetemplates.ide@default:default"/>
+ <setEntry value="org.eclipse.xtext.ui.codetemplates.ui@default:default"/>
+ <setEntry value="org.eclipse.xtext.ui.codetemplates@default:default"/>
+ <setEntry value="org.eclipse.xtext.ui.shared@default:default"/>
+ <setEntry value="org.eclipse.xtext.ui@default:default"/>
+ <setEntry value="org.eclipse.xtext.util@default:default"/>
+ <setEntry value="org.eclipse.xtext.xbase.ide@default:default"/>
+ <setEntry value="org.eclipse.xtext.xbase.lib@default:default"/>
+ <setEntry value="org.eclipse.xtext.xbase.ui@default:default"/>
+ <setEntry value="org.eclipse.xtext.xbase@default:default"/>
+ <setEntry value="org.eclipse.xtext.xtext.generator@default:default"/>
+ <setEntry value="org.eclipse.xtext@default:default"/>
+ <setEntry value="org.eclipse.xwt@default:default"/>
+ <setEntry value="org.gradle.toolingapi@default:default"/>
+ <setEntry value="org.hamcrest.core@default:default"/>
+ <setEntry value="org.hamcrest.library@default:default"/>
+ <setEntry value="org.jacoco.agent@default:default"/>
+ <setEntry value="org.jacoco.core@default:default"/>
+ <setEntry value="org.jacoco.report@default:default"/>
+ <setEntry value="org.jcodings@default:default"/>
+ <setEntry value="org.joni@default:default"/>
+ <setEntry value="org.jsoup@default:default"/>
+ <setEntry value="org.junit.jupiter.api@default:default"/>
+ <setEntry value="org.junit.jupiter.engine@default:default"/>
+ <setEntry value="org.junit.jupiter.migrationsupport@default:default"/>
+ <setEntry value="org.junit.jupiter.params@default:default"/>
+ <setEntry value="org.junit.platform.commons@default:default"/>
+ <setEntry value="org.junit.platform.engine@default:default"/>
+ <setEntry value="org.junit.platform.launcher@default:default"/>
+ <setEntry value="org.junit.platform.runner@default:default"/>
+ <setEntry value="org.junit.platform.suite.api@default:default"/>
+ <setEntry value="org.junit.tools@default:default"/>
+ <setEntry value="org.junit.vintage.engine@default:default"/>
+ <setEntry value="org.junit@default:default"/>
+ <setEntry value="org.objectweb.asm.commons@default:default"/>
+ <setEntry value="org.objectweb.asm.tree@default:default"/>
+ <setEntry value="org.objectweb.asm@default:default"/>
+ <setEntry value="org.opentest4j@default:default"/>
+ <setEntry value="org.sat4j.core@default:default"/>
+ <setEntry value="org.sat4j.pb@default:default"/>
+ <setEntry value="org.slf4j.api@default:default"/>
+ <setEntry value="org.tukaani.xz@default:default"/>
+ <setEntry value="org.w3c.css.sac@default:default"/>
+ <setEntry value="org.w3c.dom.events@default:default"/>
+ <setEntry value="org.w3c.dom.smil@default:default"/>
+ <setEntry value="org.w3c.dom.svg@default:default"/>
+ </setAttribute>
+ <setAttribute key="selected_workspace_bundles">
+ <setEntry value="org.eclipse.papyrus.infra.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.gmfdiag.css.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.modelexplorer@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.properties@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.representation.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.representation.edit@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.representation@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.sirius@default:default"/>
+ <setEntry value="org.eclipse.papyrus.infra.siriusdiag.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.junit.framework@default:default"/>
+ <setEntry value="org.eclipse.papyrus.junit.utils@default:default"/>
+ <setEntry value="org.eclipse.papyrus.siriusdiag.junit.utils@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.css@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.diagram.menu@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.sirius.clazz.diagram@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.sirius.common.diagram@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.sirius.diagram.architecture@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.sirius.sequence.diagram@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.sirius.statemachine.diagram@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.sirius.xtext.integration.ui@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.siriusdiag.clazz.tests@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.siriusdiag.sequence.tests@default:default"/>
+ <setEntry value="org.eclipse.papyrus.uml.siriusdiag.statemachine.tests@default:default"/>
+ </setAttribute>
+ <booleanAttribute key="show_selected_only" value="false"/>
+ <stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+ <booleanAttribute key="tracing" value="false"/>
+ <booleanAttribute key="useCustomFeatures" value="false"/>
+ <booleanAttribute key="useDefaultConfig" value="true"/>
+ <booleanAttribute key="useDefaultConfigArea" value="false"/>
+ <booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/about.html b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/build.properties b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/build.properties
new file mode 100755
index 0000000..9384875
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ about.html
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/pom.xml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/pom.xml
new file mode 100755
index 0000000..f1b343d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.clazz.tests</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.uml
new file mode 100755
index 0000000..d10cca4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/createDiagram/createDiagram.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_f9LMMNTBEeubBbo79kQPZw" name="createDiagram">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_gC-5QNTBEeubBbo79kQPZw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/TopNode_Class_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/TopNode_Class_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/TopNode_Class_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/TopNode_Class_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/TopNode_Class_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/TopNode_Class_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.aird
new file mode 100755
index 0000000..08b6596
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.aird
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_7UXikDc0Eey6QLfFGXOJpw" selectedViews="_7VMB8Dc0Eey6QLfFGXOJpw _7VrxMDc0Eey6QLfFGXOJpw _7XERQDc0Eey6QLfFGXOJpw" version="14.3.1.202003261200">
+ <semanticResources>Edge_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_7VMB8Dc0Eey6QLfFGXOJpw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_7VrxMDc0Eey6QLfFGXOJpw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_7XTh0Dc0Eey6QLfFGXOJpw" name="Edge_ClassDiagram" repPath="#_7XQegDc0Eey6QLfFGXOJpw" changeId="83df5389-3f1b-42c1-9a93-4c7d80acbc93">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_CreationTest.uml#_vWvSEBX6EeysipnJgzA6vQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_7XERQDc0Eey6QLfFGXOJpw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_7XQegDc0Eey6QLfFGXOJpw">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_7YtQAjc0Eey6QLfFGXOJpw" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_7Yt3EDc0Eey6QLfFGXOJpw" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_7XXMMDc0Eey6QLfFGXOJpw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_7XXMMTc0Eey6QLfFGXOJpw" type="Sirius" element="_7XQegDc0Eey6QLfFGXOJpw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_8fn0wDc0Eey6QLfFGXOJpw" type="2002" element="_8dyBsDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8fob0Dc0Eey6QLfFGXOJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_8fpC4Dc0Eey6QLfFGXOJpw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_8fpC4zc0Eey6QLfFGXOJpw" type="3009" element="_8d26Mjc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8fpC5jc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_8fpp8Dc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8fpp8Tc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8fpp8jc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_8fpp8zc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8fpC5Dc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8fpC5Tc0Eey6QLfFGXOJpw" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_8fpp9Dc0Eey6QLfFGXOJpw" type="3009" element="_8d3hQjc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8fpp9zc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_8fpp-Dc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8fpp-Tc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8fpp-jc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_8fpp-zc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8fpp9Tc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8fpp9jc0Eey6QLfFGXOJpw" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_8fpp_Dc0Eey6QLfFGXOJpw" type="3009" element="_8d5WcDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8fq4EDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_8fq4ETc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8fq4Ejc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8fq4Ezc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_8fq4FDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8fpp_Tc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8fpp_jc0Eey6QLfFGXOJpw" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8fpC4Tc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8fpC4jc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8fn0wTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8fn0wjc0Eey6QLfFGXOJpw" x="114" y="246"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_8wBoQDc0Eey6QLfFGXOJpw" type="2002" element="_8uL1MDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8wBoQzc0Eey6QLfFGXOJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_8wCPUDc0Eey6QLfFGXOJpw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_8wCPUzc0Eey6QLfFGXOJpw" type="3009" element="_8uQttDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8wCPVjc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_8wC2YDc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8wC2YTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8wC2Yjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_8wC2Yzc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8wCPVDc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8wCPVTc0Eey6QLfFGXOJpw" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_8wC2ZDc0Eey6QLfFGXOJpw" type="3009" element="_8uRUwjc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8wC2Zzc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_8wC2aDc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8wC2aTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8wC2ajc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_8wC2azc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8wC2ZTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8wC2Zjc0Eey6QLfFGXOJpw" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_8wC2bDc0Eey6QLfFGXOJpw" type="3009" element="_8uR70Dc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_8wDdcDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_8wDdcTc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8wDdcjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8wDdczc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_8wDddDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8wC2bTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8wC2bjc0Eey6QLfFGXOJpw" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8wCPUTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8wCPUjc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_8wBoQTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8wBoQjc0Eey6QLfFGXOJpw" x="330" y="258"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_7XXMMjc0Eey6QLfFGXOJpw"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_7YtQADc0Eey6QLfFGXOJpw" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_7YtQATc0Eey6QLfFGXOJpw"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_8dyBsDc0Eey6QLfFGXOJpw" name="Class1" tooltipText="Edge_CreationTest::Class1" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8dyowDc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_8d26Mjc0Eey6QLfFGXOJpw" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_8d3hQTc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8d26Mzc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_8d3hQjc0Eey6QLfFGXOJpw" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_8d4vYDc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8d3hQzc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_8d5WcDc0Eey6QLfFGXOJpw" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_0ao-4BX8EeytXPImM8tXMA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_8d5Wczc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8d5WcTc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_8uL1MDc0Eey6QLfFGXOJpw" name="Class2" tooltipText="Edge_CreationTest::Class2" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8uMcQDc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_8uQttDc0Eey6QLfFGXOJpw" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_8uRUwTc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8uQttTc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_8uRUwjc0Eey6QLfFGXOJpw" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_8uRUxTc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8uRUwzc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_8uR70Dc0Eey6QLfFGXOJpw" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_CreationTest.uml#_1FItYBX8EeytXPImM8tXMA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_8uR70zc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_8uR70Tc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_7XQegTc0Eey6QLfFGXOJpw"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_CreationTest.uml#_vWvSEBX6EeysipnJgzA6vQ"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.uml
new file mode 100755
index 0000000..9fb3408
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/common/Edge_CreationTest.uml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_vWvSEBX6EeysipnJgzA6vQ" name="Edge_CreationTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_0ao-4BX8EeytXPImM8tXMA" name="Class1" visibility="public"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_1FItYBX8EeytXPImM8tXMA" name="Class2" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.aird
new file mode 100755
index 0000000..977eef0
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.aird
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_bPbmcDc0Eey6QLfFGXOJpw" selectedViews="_bdvIMDc0Eey6QLfFGXOJpw _befWIDc0Eey6QLfFGXOJpw _bgMmUDc0Eey6QLfFGXOJpw" version="14.3.1.202003261200">
+ <semanticResources>Edge_GeneralizationSet_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_bdvIMDc0Eey6QLfFGXOJpw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_befWIDc0Eey6QLfFGXOJpw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_biY-sDc0Eey6QLfFGXOJpw" name="Edge_GeneralizationSet_ClassDiagram" repPath="#_bh6dkDc0Eey6QLfFGXOJpw" changeId="920751b4-d35f-4f65-838e-da752153b044">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_GeneralizationSet_CreationTest.uml#_rH7bQBoLEey-Ee3SHtwVxw"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_bgMmUDc0Eey6QLfFGXOJpw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_bh6dkDc0Eey6QLfFGXOJpw">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_bq2-MDc0Eey6QLfFGXOJpw" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bq2-MTc0Eey6QLfFGXOJpw" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_bjr_MDc0Eey6QLfFGXOJpw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_bjr_MTc0Eey6QLfFGXOJpw" type="Sirius" element="_bh6dkDc0Eey6QLfFGXOJpw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_q_m6oDc0Eey6QLfFGXOJpw" type="2002" element="_q8UWEDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_q_-uEDc0Eey6QLfFGXOJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_rAFbwDc0Eey6QLfFGXOJpw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_rAGp4Dc0Eey6QLfFGXOJpw" type="3009" element="_q80sYDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rAHQ8Dc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rAHQ8Tc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rAHQ8jc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rAHQ8zc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rAK7UDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rAGp4Tc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rAGp4jc0Eey6QLfFGXOJpw" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rAK7UTc0Eey6QLfFGXOJpw" type="3009" element="_q82hkTc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rALiYDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rAMJcDc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rAMJcTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rAMJcjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rAMJczc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rAK7Ujc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rAK7Uzc0Eey6QLfFGXOJpw" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rAMJdDc0Eey6QLfFGXOJpw" type="3009" element="_q83Iojc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rAMwgDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rAMwgTc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rAMwgjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rAMwgzc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rAMwhDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rAMJdTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rAMJdjc0Eey6QLfFGXOJpw" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rAFbwTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rAFbwjc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_q_m6oTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q_m6ojc0Eey6QLfFGXOJpw" x="120" y="198"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rUDgoDc0Eey6QLfFGXOJpw" type="2002" element="_rSCucDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rUEHsDc0Eey6QLfFGXOJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_rUEHsTc0Eey6QLfFGXOJpw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_rUEuwDc0Eey6QLfFGXOJpw" type="3009" element="_rSL4YTc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rUEuwzc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rUEuxDc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rUEuxTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rUEuxjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rUFV0Dc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rUEuwTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUEuwjc0Eey6QLfFGXOJpw" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rUFV0Tc0Eey6QLfFGXOJpw" type="3009" element="_rSNGgDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rUFV1Dc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rUFV1Tc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rUFV1jc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rUFV1zc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rUF84Dc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rUFV0jc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUFV0zc0Eey6QLfFGXOJpw" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rUF84Tc0Eey6QLfFGXOJpw" type="3009" element="_rSNtkDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rUF85Dc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rUGj8Dc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rUGj8Tc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rUGj8jc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rUGj8zc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rUF84jc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUF84zc0Eey6QLfFGXOJpw" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rUEHsjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rUEHszc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rUDgoTc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUDgojc0Eey6QLfFGXOJpw" x="300" y="186"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rkwPEDc0Eey6QLfFGXOJpw" type="2002" element="_riT_EDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rkw2IDc0Eey6QLfFGXOJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_rkxdMDc0Eey6QLfFGXOJpw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_rkxdMzc0Eey6QLfFGXOJpw" type="3009" element="_ridJADc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rkyEQDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rkyEQTc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rkyEQjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rkyEQzc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rkyERDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rkxdNDc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkxdNTc0Eey6QLfFGXOJpw" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rkyERTc0Eey6QLfFGXOJpw" type="3009" element="_ridwETc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rkyrUDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rkyrUTc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rkyrUjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rkyrUzc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rkyrVDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rkyERjc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkyERzc0Eey6QLfFGXOJpw" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rkyrVTc0Eey6QLfFGXOJpw" type="3009" element="_rieXIDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rkzSYDc0Eey6QLfFGXOJpw" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_rkzSYTc0Eey6QLfFGXOJpw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rkzSYjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rkzSYzc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_rkzSZDc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rkyrVjc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkyrVzc0Eey6QLfFGXOJpw" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rkxdMTc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rkxdMjc0Eey6QLfFGXOJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rkwPETc0Eey6QLfFGXOJpw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkwPEjc0Eey6QLfFGXOJpw" x="282" y="66"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_bjr_Mjc0Eey6QLfFGXOJpw"/>
+ <edges xmi:type="notation:Edge" xmi:id="_rUPt4Dc0Eey6QLfFGXOJpw" type="4001" element="_rSzjcDc0Eey6QLfFGXOJpw" source="_q_m6oDc0Eey6QLfFGXOJpw" target="_rUDgoDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rUSKIDc0Eey6QLfFGXOJpw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUSKITc0Eey6QLfFGXOJpw" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rUSxMDc0Eey6QLfFGXOJpw" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUSxMTc0Eey6QLfFGXOJpw" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rUTYQDc0Eey6QLfFGXOJpw" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rUTYQTc0Eey6QLfFGXOJpw" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_rUPt4Tc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_rUPt4jc0Eey6QLfFGXOJpw" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_rUPt4zc0Eey6QLfFGXOJpw" points="[7, 1, -214, -28]$[181, 23, -40, -6]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_rUZe4Dc0Eey6QLfFGXOJpw" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_rUZe4Tc0Eey6QLfFGXOJpw" id="(0.5,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_rkzSZTc0Eey6QLfFGXOJpw" type="4001" element="_ri_UhDc0Eey6QLfFGXOJpw" source="_q_m6oDc0Eey6QLfFGXOJpw" target="_rkwPEDc0Eey6QLfFGXOJpw">
+ <children xmi:type="notation:Node" xmi:id="_rkz5cDc0Eey6QLfFGXOJpw" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkz5cTc0Eey6QLfFGXOJpw" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rkz5cjc0Eey6QLfFGXOJpw" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkz5czc0Eey6QLfFGXOJpw" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_rkz5dDc0Eey6QLfFGXOJpw" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rkz5dTc0Eey6QLfFGXOJpw" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_rkzSZjc0Eey6QLfFGXOJpw"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_rkzSZzc0Eey6QLfFGXOJpw" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_rkzSaDc0Eey6QLfFGXOJpw" points="[0, 0, -203, 91]$[203, -91, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_rk0ggDc0Eey6QLfFGXOJpw" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_rk0ggTc0Eey6QLfFGXOJpw" id="(0.5,0.5)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_bqH-YDc0Eey6QLfFGXOJpw" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_bqIlcDc0Eey6QLfFGXOJpw"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_q8UWEDc0Eey6QLfFGXOJpw" name="Class1" tooltipText="Edge_GeneralizationSet_CreationTest::Class1" outgoingEdges="_rSzjcDc0Eey6QLfFGXOJpw _ri_UhDc0Eey6QLfFGXOJpw" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_q8k0wDc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_q80sYDc0Eey6QLfFGXOJpw" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_q82hkDc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_q80sYTc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_q82hkTc0Eey6QLfFGXOJpw" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_q83IoTc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_q82hkjc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_q83Iojc0Eey6QLfFGXOJpw" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EC98gBoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_q83vsjc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_q83vsDc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_rSCucDc0Eey6QLfFGXOJpw" name="Class2" tooltipText="Edge_GeneralizationSet_CreationTest::Class2" incomingEdges="_rSzjcDc0Eey6QLfFGXOJpw" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_rSDVgDc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_rSL4YTc0Eey6QLfFGXOJpw" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_rSMfcjc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_rSMfcDc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_rSNGgDc0Eey6QLfFGXOJpw" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_rSNGgzc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_rSNGgTc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_rSNtkDc0Eey6QLfFGXOJpw" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_EiejABoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_rSNtkzc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_rSNtkTc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" uid="_rSzjcDc0Eey6QLfFGXOJpw" sourceNode="_q8UWEDc0Eey6QLfFGXOJpw" targetNode="_rSCucDc0Eey6QLfFGXOJpw">
+ <target xmi:type="uml:Generalization" href="Edge_GeneralizationSet_CreationTest.uml#_F6QOQBoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Generalization" href="Edge_GeneralizationSet_CreationTest.uml#_F6QOQBoMEeyDjbv4GqpAeQ"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" uid="_rS1_sDc0Eey6QLfFGXOJpw" targetArrow="InputClosedArrow" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_rS2mwDc0Eey6QLfFGXOJpw" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_riT_EDc0Eey6QLfFGXOJpw" name="Class3" tooltipText="Edge_GeneralizationSet_CreationTest::Class3" incomingEdges="_ri_UhDc0Eey6QLfFGXOJpw" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_riT_ETc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_ridJADc0Eey6QLfFGXOJpw" name="Class3">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_ridwEDc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_ridJATc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_ridwETc0Eey6QLfFGXOJpw" name="Class3">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_ridwFDc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_ridwEjc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_rieXIDc0Eey6QLfFGXOJpw" name="Class3">
+ <target xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_GeneralizationSet_CreationTest.uml#_E8HLABoMEeyDjbv4GqpAeQ"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_rieXIzc0Eey6QLfFGXOJpw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_rieXITc0Eey6QLfFGXOJpw" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" uid="_ri_UhDc0Eey6QLfFGXOJpw" sourceNode="_q8UWEDc0Eey6QLfFGXOJpw" targetNode="_riT_EDc0Eey6QLfFGXOJpw">
+ <target xmi:type="uml:Generalization" href="Edge_GeneralizationSet_CreationTest.uml#_GgquABoMEeyDjbv4GqpAeQ"/>
+ <semanticElements xmi:type="uml:Generalization" href="Edge_GeneralizationSet_CreationTest.uml#_GgquABoMEeyDjbv4GqpAeQ"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" uid="_ri_7kDc0Eey6QLfFGXOJpw" targetArrow="InputClosedArrow" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_ri_7kTc0Eey6QLfFGXOJpw" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_biEOkDc0Eey6QLfFGXOJpw"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_GeneralizationSet_CreationTest.uml#_rH7bQBoLEey-Ee3SHtwVxw"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.uml
new file mode 100755
index 0000000..c4f4b6c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.uml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_rH7bQBoLEey-Ee3SHtwVxw" name="Edge_GeneralizationSet_CreationTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_EC98gBoMEeyDjbv4GqpAeQ" name="Class1" visibility="public">
+ <generalization xmi:type="uml:Generalization" xmi:id="_F6QOQBoMEeyDjbv4GqpAeQ" general="_EiejABoMEeyDjbv4GqpAeQ"/>
+ <generalization xmi:type="uml:Generalization" xmi:id="_GgquABoMEeyDjbv4GqpAeQ" general="_E8HLABoMEeyDjbv4GqpAeQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_EiejABoMEeyDjbv4GqpAeQ" name="Class2" visibility="public"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_E8HLABoMEeyDjbv4GqpAeQ" name="Class3" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.aird
new file mode 100755
index 0000000..eeae0c3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.aird
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="__pt5kDcxEeySVJ5jrKIH0A" selectedViews="__qeHgDcxEeySVJ5jrKIH0A __rcX4DcxEeySVJ5jrKIH0A __rpMMDcxEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>Edge_InstanceSpecification_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="__qeHgDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="__rzkQDcxEeySVJ5jrKIH0A" name="Edge_InstanceSpecification_ClassDiagram" repPath="#__rxvEDcxEeySVJ5jrKIH0A" changeId="df8c58ab-af3c-4b24-bee1-6fa61cee6b97">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_InstanceSpecification_CreationTest.uml#_3fjQgBoREeyBTeMIAcQMtA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="__rcX4DcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="__rpMMDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="__rxvEDcxEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="__s6XgDcxEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__s6XgTcxEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="__r0yYDcxEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="__r0yYTcxEeySVJ5jrKIH0A" type="Sirius" element="__rxvEDcxEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_B1XRwDcyEeySVJ5jrKIH0A" type="2003" element="_BzwvQDcyEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_B1Yf4DcyEeySVJ5jrKIH0A" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_B1Yf4TcyEeySVJ5jrKIH0A" type="7004">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_B1Yf4jcyEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_B1Yf4zcyEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_B1XRwTcyEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_B1XRwjcyEeySVJ5jrKIH0A" x="156" y="282" width="80" height="80"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CQXywDcyEeySVJ5jrKIH0A" type="2003" element="_COsXwDcyEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_CQYZ0DcyEeySVJ5jrKIH0A" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_CQYZ0TcyEeySVJ5jrKIH0A" type="7004">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CQYZ0jcyEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CQYZ0zcyEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CQXywTcyEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CQXywjcyEeySVJ5jrKIH0A" x="342" y="282" width="80" height="80"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="__r0yYjcxEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="__s5wcDcxEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="__s5wcTcxEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_BzwvQDcyEeySVJ5jrKIH0A" name="InstanceSpecification1" tooltipText="Edge_InstanceSpecification_CreationTest::InstanceSpecification1" width="8" height="8">
+ <target xmi:type="uml:InstanceSpecification" href="Edge_InstanceSpecification_CreationTest.uml#_UqeSkBoSEeyR2svuylIKVw"/>
+ <semanticElements xmi:type="uml:InstanceSpecification" href="Edge_InstanceSpecification_CreationTest.uml#_UqeSkBoSEeyR2svuylIKVw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_BzwvQTcyEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_COsXwDcyEeySVJ5jrKIH0A" name="InstanceSpecification2" tooltipText="Edge_InstanceSpecification_CreationTest::InstanceSpecification2" width="8" height="8">
+ <target xmi:type="uml:InstanceSpecification" href="Edge_InstanceSpecification_CreationTest.uml#_VKmkIBoSEeyR2svuylIKVw"/>
+ <semanticElements xmi:type="uml:InstanceSpecification" href="Edge_InstanceSpecification_CreationTest.uml#_VKmkIBoSEeyR2svuylIKVw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_COsXwTcyEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_InstanceSpecification']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="__ryWIDcxEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_InstanceSpecification_CreationTest.uml#_3fjQgBoREeyBTeMIAcQMtA"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.uml
new file mode 100755
index 0000000..d6b4488
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.uml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_3fjQgBoREeyBTeMIAcQMtA" name="Edge_InstanceSpecification_CreationTest">
+ <packagedElement xmi:type="uml:InstanceSpecification" xmi:id="_UqeSkBoSEeyR2svuylIKVw" name="InstanceSpecification1" visibility="public"/>
+ <packagedElement xmi:type="uml:InstanceSpecification" xmi:id="_VKmkIBoSEeyR2svuylIKVw" name="InstanceSpecification2" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.aird
new file mode 100755
index 0000000..98eccf7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.aird
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_v7GroDcxEeySVJ5jrKIH0A" selectedViews="_v7z2QDcxEeySVJ5jrKIH0A _v8wRcDcxEeySVJ5jrKIH0A _v873oDcxEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>Edge_InterfaceRealization_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_v7z2QDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_v9FooDcxEeySVJ5jrKIH0A" name="Edge_InterfaceRealization_ClassDiagram" repPath="#_v9DzcDcxEeySVJ5jrKIH0A" changeId="97ebb4c9-fe01-4d46-8d7b-e1fc47745d12">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_InterfaceRealization_CreationTest.uml#_jE_pIBoXEey5afkUahgE3g"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_v8wRcDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_v873oDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_v9DzcDcxEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_v-L00jcxEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_v-L00zcxEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_v9G2wDcxEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_v9G2wTcxEeySVJ5jrKIH0A" type="Sirius" element="_v9DzcDcxEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_ww5EIDcxEeySVJ5jrKIH0A" type="2002" element="_wvIwoDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_ww5rMDcxEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_ww5rMTcxEeySVJ5jrKIH0A" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_ww5rNDcxEeySVJ5jrKIH0A" type="3009" element="_wvNpIDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_ww6SQDcxEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_ww6SQTcxEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ww6SQjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ww6SQzcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ww6SRDcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ww5rNTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ww5rNjcxEeySVJ5jrKIH0A" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ww6SRTcxEeySVJ5jrKIH0A" type="3009" element="_wvNpJDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_ww65UDcxEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_ww65UTcxEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ww65UjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ww65UzcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ww65VDcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ww6SRjcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ww6SRzcxEeySVJ5jrKIH0A" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ww65VTcxEeySVJ5jrKIH0A" type="3009" element="_wvOQMjcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_ww7gYDcxEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_ww7gYTcxEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ww7gYjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ww7gYzcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ww7gZDcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ww65VjcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ww65VzcxEeySVJ5jrKIH0A" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ww5rMjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ww5rMzcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ww5EITcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ww5EIjcxEeySVJ5jrKIH0A" x="102" y="294"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_xFQxoDcxEeySVJ5jrKIH0A" type="2002" element="_xDFAUDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_xFQxozcxEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_xFQxpDcxEeySVJ5jrKIH0A" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_xFRYsDcxEeySVJ5jrKIH0A" type="3009" element="_xDIDpjcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_xFRYszcxEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_xFRYtDcxEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xFRYtTcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xFRYtjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_xFRYtzcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_xFRYsTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xFRYsjcxEeySVJ5jrKIH0A" width="167" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_xFRYuDcxEeySVJ5jrKIH0A" type="3009" element="_xDIqsjcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_xFRYuzcxEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_xFR_wDcxEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xFR_wTcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xFR_wjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_xFR_wzcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_xFRYuTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xFRYujcxEeySVJ5jrKIH0A" y="15" width="167" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_xFR_xDcxEeySVJ5jrKIH0A" type="3009" element="_xDIqtjcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_xFR_xzcxEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_xFR_yDcxEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xFR_yTcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xFR_yjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_xFR_yzcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_xFR_xTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xFR_xjcxEeySVJ5jrKIH0A" y="30" width="167" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xFQxpTcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xFQxpjcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_xFQxoTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xFQxojcxEeySVJ5jrKIH0A" x="264" y="294"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_v9G2wjcxEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_v-L00DcxEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_v-L00TcxEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_wvIwoDcxEeySVJ5jrKIH0A" name="Class1" tooltipText="Edge_InterfaceRealization_CreationTest::Class1" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wvJXsDcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_wvNpIDcxEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_wvNpIzcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wvNpITcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_wvNpJDcxEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_wvOQMTcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wvNpJTcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_wvOQMjcxEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_InterfaceRealization_CreationTest.uml#_829yYBoXEeynAtyfwNaJlg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_wvOQNTcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wvOQMzcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_xDFAUDcxEeySVJ5jrKIH0A" name="<<Interface>>
Interface1" tooltipText="Edge_InterfaceRealization_CreationTest::Interface1" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_xDFAUTcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_xDIDpjcxEeySVJ5jrKIH0A" name="Interface1">
+ <target xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_xDIqsTcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_xDIDpzcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_xDIqsjcxEeySVJ5jrKIH0A" name="Interface1">
+ <target xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_xDIqtTcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_xDIqszcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_xDIqtjcxEeySVJ5jrKIH0A" name="Interface1">
+ <target xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InterfaceRealization_CreationTest.uml#_9QcpYBoXEeynAtyfwNaJlg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_xDIquTcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_xDIqtzcxEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_v9DzcTcxEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_InterfaceRealization_CreationTest.uml#_jE_pIBoXEey5afkUahgE3g"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.uml
new file mode 100755
index 0000000..8729056
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.uml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_jE_pIBoXEey5afkUahgE3g" name="Edge_InterfaceRealization_CreationTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_829yYBoXEeynAtyfwNaJlg" name="Class1" visibility="public"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_9QcpYBoXEeynAtyfwNaJlg" name="Interface1" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.aird
new file mode 100755
index 0000000..8901152
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.aird
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_aM-yUDcxEeySVJ5jrKIH0A" selectedViews="_aNvAQDcxEeySVJ5jrKIH0A _aOrbcDcxEeySVJ5jrKIH0A _aO3osDcxEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>Edge_Link_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_aNvAQDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_aPCn0DcxEeySVJ5jrKIH0A" name="Edge_Link_ClassDiagram" repPath="#_aPBZsDcxEeySVJ5jrKIH0A" changeId="f213da04-e844-4430-bbac-75d50263497c">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_Link_CreationTest.uml#_jxEMEBqzEeyiteqTlxjDlg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_aOrbcDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_aO3osDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_aPBZsDcxEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_aQJbEjcxEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aQJbEzcxEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_aPEdADcxEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_aPEdATcxEeySVJ5jrKIH0A" type="Sirius" element="_aPBZsDcxEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_jZUmEDcxEeySVJ5jrKIH0A" type="2001" element="_jXqZMDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_jZWbQDcxEeySVJ5jrKIH0A" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jZWbQTcxEeySVJ5jrKIH0A" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jZXpYDcxEeySVJ5jrKIH0A" type="3013" element="_jXrnUDcxEeySVJ5jrKIH0A">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jZXpYTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jZXpYjcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jZUmETcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jZUmEjcxEeySVJ5jrKIH0A" x="108" y="222" width="127" height="91"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jr9OMDcxEeySVJ5jrKIH0A" type="2001" element="_jqWEoDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_jr9OMzcxEeySVJ5jrKIH0A" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jr9ONDcxEeySVJ5jrKIH0A" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jr9ONTcxEeySVJ5jrKIH0A" type="3013" element="_jqWrsDcxEeySVJ5jrKIH0A">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jr9ONjcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jr9ONzcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jr9OMTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jr9OMjcxEeySVJ5jrKIH0A" x="306" y="225" width="115" height="85"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_aPEdAjcxEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_aQJbEDcxEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_aQJbETcxEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_jXqZMDcxEeySVJ5jrKIH0A" name="Constraint1
{{OCL} true}" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Constraint" href="Edge_Link_CreationTest.uml#_yPbTEBqzEeyiteqTlxjDlg"/>
+ <semanticElements xmi:type="uml:Constraint" href="Edge_Link_CreationTest.uml#_yPbTEBqzEeyiteqTlxjDlg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_jXrnUDcxEeySVJ5jrKIH0A" labelSize="9" labelPosition="node" color="200,255,230">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_jqWEoDcxEeySVJ5jrKIH0A" name="Constraint2
{{OCL} true}" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Constraint" href="Edge_Link_CreationTest.uml#_zM62EBqzEeyiteqTlxjDlg"/>
+ <semanticElements xmi:type="uml:Constraint" href="Edge_Link_CreationTest.uml#_zM62EBqzEeyiteqTlxjDlg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_jqWrsDcxEeySVJ5jrKIH0A" labelSize="9" labelPosition="node" color="200,255,230">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@nodeMappings[name='CD_Constraint']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_aPBZsTcxEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_Link_CreationTest.uml#_jxEMEBqzEeyiteqTlxjDlg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.uml
new file mode 100755
index 0000000..1f99783
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/link/Edge_Link_CreationTest.uml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_jxEMEBqzEeyiteqTlxjDlg" name="Edge_Link_CreationTest">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_yPbTEBqzEeyiteqTlxjDlg" name="Constraint1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_yPb6IBqzEeyiteqTlxjDlg" name="constraintSpec">
+ <language>OCL</language>
+ <body>true</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_zM62EBqzEeyiteqTlxjDlg" name="Constraint2">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_zM62ERqzEeyiteqTlxjDlg" name="constraintSpec">
+ <language>OCL</language>
+ <body>true</body>
+ </specification>
+ </ownedRule>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.aird
new file mode 100755
index 0000000..7211368
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.aird
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_HqGF8DcxEeySVJ5jrKIH0A" selectedViews="_Hq7MYDcxEeySVJ5jrKIH0A _Hsf5sDcxEeySVJ5jrKIH0A _HsvxUDcxEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>Edge_PackageImportMerge_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_Hq7MYDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_Hs7XgDcxEeySVJ5jrKIH0A" name="Edge_PackageImportMerge_ClassDiagram" repPath="#_Hs5iUDcxEeySVJ5jrKIH0A" changeId="de82709a-f7cf-4031-87e9-7706ea469c88">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_PackageImportMerge_CreationTest.uml#_VIVVcBohEeywE9VzG78DQQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_Hsf5sDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_HsvxUDcxEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_Hs5iUDcxEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_HuCx0jcxEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_HuCx0zcxEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Hs9MsDcxEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_Hs9MsTcxEeySVJ5jrKIH0A" type="Sirius" element="_Hs5iUDcxEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_KUnygDcxEeySVJ5jrKIH0A" type="2002" element="_KS57QDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_KUoZkDcxEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_KUoZkTcxEeySVJ5jrKIH0A" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_KUoZkjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_KUoZkzcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_KUnygTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KUnygjcxEeySVJ5jrKIH0A" x="120" y="222" width="80" height="80"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_KdL4oDcxEeySVJ5jrKIH0A" type="2002" element="_KbczQDcxEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_KdMfsDcxEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_KdMfsTcxEeySVJ5jrKIH0A" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_KdMfsjcxEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_KdMfszcxEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_KdL4oTcxEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KdL4ojcxEeySVJ5jrKIH0A" x="300" y="222" width="80" height="80"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Hs9MsjcxEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_HuCx0DcxEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_HuCx0TcxEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_KS57QDcxEeySVJ5jrKIH0A" name="Package1" tooltipText="Edge_PackageImportMerge_CreationTest::Package1" width="8" height="8">
+ <target xmi:type="uml:Package" href="Edge_PackageImportMerge_CreationTest.uml#_KS4tIDcxEeySVJ5jrKIH0A"/>
+ <semanticElements xmi:type="uml:Package" href="Edge_PackageImportMerge_CreationTest.uml#_KS4tIDcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_KS57QTcxEeySVJ5jrKIH0A" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_KbczQDcxEeySVJ5jrKIH0A" name="Package2" tooltipText="Edge_PackageImportMerge_CreationTest::Package2" width="8" height="8">
+ <target xmi:type="uml:Package" href="Edge_PackageImportMerge_CreationTest.uml#_KbblIDcxEeySVJ5jrKIH0A"/>
+ <semanticElements xmi:type="uml:Package" href="Edge_PackageImportMerge_CreationTest.uml#_KbblIDcxEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_KbdaUDcxEeySVJ5jrKIH0A" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_Hs5iUTcxEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_PackageImportMerge_CreationTest.uml#_VIVVcBohEeywE9VzG78DQQ"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.uml
new file mode 100755
index 0000000..5c74b21
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.uml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_VIVVcBohEeywE9VzG78DQQ" name="Edge_PackageImportMerge_CreationTest">
+ <packagedElement xmi:type="uml:Package" xmi:id="_KS4tIDcxEeySVJ5jrKIH0A" name="Package1"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_KbblIDcxEeySVJ5jrKIH0A" name="Package2"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.aird
new file mode 100755
index 0000000..ccab5ff
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.aird
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_IXAWoDcuEeySVJ5jrKIH0A" selectedViews="_IYtm0DcuEeySVJ5jrKIH0A _IZzL8DcuEeySVJ5jrKIH0A _IaE4wDcuEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>SubNode_PropertyOperation_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_IYtm0DcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_IaPQ0DcuEeySVJ5jrKIH0A" name="SubNode_PropertyOperation_ClassDiagram" repPath="#_IaOCsDcuEeySVJ5jrKIH0A" changeId="c2fe9c78-bfec-489d-aaf1-80a4fc62551a">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="SubNode_PropertyOperation_CreationTest.uml#_Z0ZvEBVXEeyenq05a-1hNg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_IZzL8DcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_IaE4wDcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_IaOCsDcuEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_IbcKsjcuEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IbcKszcuEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_IaRtEDcuEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_IaRtETcuEeySVJ5jrKIH0A" type="Sirius" element="_IaOCsDcuEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_Ovx2kDcuEeySVJ5jrKIH0A" type="2002" element="_OuFNcDcuEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_OvydoDcuEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_OvzEsDcuEeySVJ5jrKIH0A" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_OvzEszcuEeySVJ5jrKIH0A" type="3009" element="_OuKtATcuEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_OvzEtjcuEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_OvzEtzcuEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OvzEuDcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OvzEuTcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_OvzEujcuEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_OvzEtDcuEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OvzEtTcuEeySVJ5jrKIH0A" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_OvzrwDcuEeySVJ5jrKIH0A" type="3009" element="_OuLUEzcuEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_OvzrwzcuEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_Ov0S0DcuEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ov0S0TcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ov0S0jcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ov0S0zcuEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_OvzrwTcuEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OvzrwjcuEeySVJ5jrKIH0A" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Ov0S1DcuEeySVJ5jrKIH0A" type="3009" element="_OuL7IDcuEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_Ov0S1zcuEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_Ov054DcuEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ov054TcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ov054jcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ov054zcuEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Ov0S1TcuEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ov0S1jcuEeySVJ5jrKIH0A" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OvzEsTcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OvzEsjcuEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Ovx2kTcuEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ovx2kjcuEeySVJ5jrKIH0A" x="204" y="216"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_IaRtEjcuEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_IbcKsDcuEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_IbcKsTcuEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_OuFNcDcuEeySVJ5jrKIH0A" name="Class1" tooltipText="SubNode_PropertyOperation_CreationTest::Class1" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_OuF0gDcuEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_OuKtATcuEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_OuLUEjcuEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_OuLUEDcuEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_OuLUEzcuEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_OuLUFjcuEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_OuLUFDcuEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_OuL7IDcuEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperation_CreationTest.uml#_26k0ABVXEeyzl_dEYZy-1A"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_OuL7IzcuEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_OuL7ITcuEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_IaOCsTcuEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="SubNode_PropertyOperation_CreationTest.uml#_Z0ZvEBVXEeyenq05a-1hNg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.uml
new file mode 100755
index 0000000..c3cc71c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Z0ZvEBVXEeyenq05a-1hNg" name="SubNode_PropertyOperation_CreationTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_26k0ABVXEeyzl_dEYZy-1A" name="Class1" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.aird
new file mode 100755
index 0000000..4acd8a9
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.aird
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_XPf04DcuEeySVJ5jrKIH0A" selectedViews="_XQPbwDcuEeySVJ5jrKIH0A _XRQvcDcuEeySVJ5jrKIH0A _XReK0DcuEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>SubNode_Model_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_XQPbwDcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_XRoi4DcuEeySVJ5jrKIH0A" name="SubNode_Model_ClassDiagram" repPath="#_XRmtsDcuEeySVJ5jrKIH0A" changeId="eaa086fa-15dd-4348-9413-fff46cb6b2aa">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="SubNode_Model_CreationTest.uml#_MUx0ABu0EeyGKo4hkiVRuw"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_XRQvcDcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_XReK0DcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_XRmtsDcuEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_XSxLUjcuEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XSxLUzcuEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_XRpxADcuEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_XRpxATcuEeySVJ5jrKIH0A" type="Sirius" element="_XRmtsDcuEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_aJKJoDcuEeySVJ5jrKIH0A" type="2002" element="_aHmDYDcuEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_aJKwsDcuEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_aJKwsTcuEeySVJ5jrKIH0A" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aJKwsjcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aJKwszcuEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_aJKJoTcuEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aJKJojcuEeySVJ5jrKIH0A" x="204" y="186" width="213" height="147"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XRpxAjcuEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_XSxLUDcuEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_XSxLUTcuEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_aHmDYDcuEeySVJ5jrKIH0A" name="Model1" tooltipText="Model1" width="8" height="8">
+ <target xmi:type="uml:Model" href="SubNode_Model_CreationTest.uml#_aHk1QDcuEeySVJ5jrKIH0A"/>
+ <semanticElements xmi:type="uml:Model" href="SubNode_Model_CreationTest.uml#_aHk1QDcuEeySVJ5jrKIH0A"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_aHmDYTcuEeySVJ5jrKIH0A" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_XRmtsTcuEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="SubNode_Model_CreationTest.uml#_MUx0ABu0EeyGKo4hkiVRuw"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.uml
new file mode 100755
index 0000000..d368cdd
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_MUx0ABu0EeyGKo4hkiVRuw" name="SubNode_Model_CreationTest">
+ <packagedElement xmi:type="uml:Model" xmi:id="_aHk1QDcuEeySVJ5jrKIH0A" name="Model1"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.aird
new file mode 100755
index 0000000..02c9e4d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.aird
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_4RRzwDcuEeySVJ5jrKIH0A" selectedViews="_4SBaoDcuEeySVJ5jrKIH0A _4S-c4DcuEeySVJ5jrKIH0A _4TKqIDcuEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>SubNode_Package_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_4SBaoDcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_4TUbIDcuEeySVJ5jrKIH0A" name="SubNode_Package_ClassDiagram" repPath="#_4TSl8DcuEeySVJ5jrKIH0A" changeId="b091a461-b402-4444-868b-38efc970ac74">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="SubNode_Package_CreationTest.uml#_eCrFUBViEeyEBNWwmCiibg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_4S-c4DcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_4TKqIDcuEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_4TSl8DcuEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_4UdqojcuEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4UdqozcuEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_4TWQUDcuEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_4TWQUTcuEeySVJ5jrKIH0A" type="Sirius" element="_4TSl8DcuEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_7JZQYDcuEeySVJ5jrKIH0A" type="2002" element="_7Ht1YDcuEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_7JZ3cDcuEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_7JZ3cTcuEeySVJ5jrKIH0A" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_7JZ3cjcuEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_7JZ3czcuEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_7JZQYTcuEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7JZQYjcuEeySVJ5jrKIH0A" x="156" y="186" width="397" height="217"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_4TWQUjcuEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_4UdqoDcuEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_4UdqoTcuEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_7Ht1YDcuEeySVJ5jrKIH0A" name="Package1" tooltipText="SubNode_Package_CreationTest::Package1" width="8" height="8">
+ <target xmi:type="uml:Package" href="SubNode_Package_CreationTest.uml#_7HtOUDcuEeySVJ5jrKIH0A"/>
+ <semanticElements xmi:type="uml:Package" href="SubNode_Package_CreationTest.uml#_7HtOUDcuEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_7HuccDcuEeySVJ5jrKIH0A" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_4TSl8TcuEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="SubNode_Package_CreationTest.uml#_eCrFUBViEeyEBNWwmCiibg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.uml
new file mode 100755
index 0000000..1514667
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_eCrFUBViEeyEBNWwmCiibg" name="SubNode_Package_CreationTest">
+ <packagedElement xmi:type="uml:Package" xmi:id="_7HtOUDcuEeySVJ5jrKIH0A" name="Package1"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.aird
new file mode 100755
index 0000000..ab17d58
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.aird
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description">
+ <viewpoint:DAnalysis uid="_xc8OoDctEeySVJ5jrKIH0A" selectedViews="_xhZ34DctEeySVJ5jrKIH0A _xirqQDctEeySVJ5jrKIH0A _xi5FoDctEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_xhZ34DctEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_xjEEwDctEeySVJ5jrKIH0A" name="TopNode_ClassDiagram" repPath="#_xjCPkDctEeySVJ5jrKIH0A" changeId="5591753b-97bc-4235-8a0f-85d4aca364ce">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_CreationTest.uml#_HQB8kBJEEeycmriCTWsf2w"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_xirqQDctEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_xi5FoDctEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_xjCPkDctEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_xl4vQjctEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xl4vQzctEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_xjFS4DctEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_xjFS4TctEeySVJ5jrKIH0A" type="Sirius" element="_xjCPkDctEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_xjFS4jctEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_xl4vQDctEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_xl4vQTctEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_xjCPkTctEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="TopNode_CreationTest.uml#_HQB8kBJEEeycmriCTWsf2w"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.uml
new file mode 100755
index 0000000..4d43990
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/creation/topNodes/TopNode_CreationTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_HQB8kBJEEeycmriCTWsf2w" name="TopNode_CreationTest">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_HY1TQBJEEeycmriCTWsf2w">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.aird
new file mode 100755
index 0000000..9593db6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.aird
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_lASi0EkXEeyHOvMI38kLoA" selectedViews="_lAqWQEkXEeyHOvMI38kLoA _lA4_wEkXEeyHOvMI38kLoA _lBKskEkXEeyHOvMI38kLoA" version="14.3.1.202003261200">
+ <semanticResources>Edge_Abstraction_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_lAqWQEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_lA4_wEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_lBKskEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_lCGgsEkXEeyHOvMI38kLoA" name="Edge_GeneralizationSet_ClassDiagram" repPath="#_lCErgEkXEeyHOvMI38kLoA" changeId="a7978781-22b4-4a92-9748-87c032c27c2c">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_Abstraction_DeleteSemanticTest.uml#_-Dm8cCUfEeycgswzYyutmA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_lCErgEkXEeyHOvMI38kLoA">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_lDQ-UkkXEeyHOvMI38kLoA" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_lDQ-U0kXEeyHOvMI38kLoA" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_lCHu0EkXEeyHOvMI38kLoA" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_lCHu0UkXEeyHOvMI38kLoA" type="Sirius" element="_lCErgEkXEeyHOvMI38kLoA" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_l6Ht0EkXEeyHOvMI38kLoA" type="2002" element="_l4ZPgEkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_l6I78EkXEeyHOvMI38kLoA" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_l6JjAEkXEeyHOvMI38kLoA" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_l6KxIEkXEeyHOvMI38kLoA" type="3009" element="_l4evEEkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_l6KxI0kXEeyHOvMI38kLoA" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_l6LYMEkXEeyHOvMI38kLoA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_l6LYMUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_l6LYMkkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_l6LYM0kXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_l6KxIUkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l6KxIkkXEeyHOvMI38kLoA" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_l6LYNEkXEeyHOvMI38kLoA" type="3009" element="_l4f9MUkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_l6L_QEkXEeyHOvMI38kLoA" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_l6L_QUkXEeyHOvMI38kLoA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_l6L_QkkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_l6L_Q0kXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_l6L_REkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_l6LYNUkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l6LYNkkXEeyHOvMI38kLoA" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_l6L_RUkXEeyHOvMI38kLoA" type="3009" element="_l4hLUEkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_l6L_SEkXEeyHOvMI38kLoA" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_l6MmUEkXEeyHOvMI38kLoA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_l6MmUUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_l6MmUkkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_l6MmU0kXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_l6L_RkkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l6L_R0kXEeyHOvMI38kLoA" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_l6JjAUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_l6JjAkkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_l6Ht0UkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_l6Ht0kkXEeyHOvMI38kLoA" x="198" y="222"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_mIFRUEkXEeyHOvMI38kLoA" type="2002" element="_mGU90EkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_mIF4YEkXEeyHOvMI38kLoA" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_mIGfcEkXEeyHOvMI38kLoA" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_mIGfc0kXEeyHOvMI38kLoA" type="3009" element="_mGZPRUkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_mIHGgEkXEeyHOvMI38kLoA" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_mIHGgUkXEeyHOvMI38kLoA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mIHGgkkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mIHGg0kXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_mIHGhEkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_mIGfdEkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIGfdUkXEeyHOvMI38kLoA" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_mIHGhUkXEeyHOvMI38kLoA" type="3009" element="_mGZ2UkkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_mIHGiEkXEeyHOvMI38kLoA" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_mIHGiUkXEeyHOvMI38kLoA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mIHGikkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mIHGi0kXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_mIHtkEkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_mIHGhkkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIHGh0kXEeyHOvMI38kLoA" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_mIHtkUkXEeyHOvMI38kLoA" type="3009" element="_mGZ2VkkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_mIHtlEkXEeyHOvMI38kLoA" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_mIHtlUkXEeyHOvMI38kLoA" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mIHtlkkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mIHtl0kXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_mIHtmEkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_mIHtkkkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIHtk0kXEeyHOvMI38kLoA" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mIGfcUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mIGfckkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_mIFRUUkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIFRUkkXEeyHOvMI38kLoA" x="492" y="186"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_lCHu0kkXEeyHOvMI38kLoA"/>
+ <edges xmi:type="notation:Edge" xmi:id="_mIYzUEkXEeyHOvMI38kLoA" type="4001" element="_mGkOYEkXEeyHOvMI38kLoA" source="_l6Ht0EkXEeyHOvMI38kLoA" target="_mIFRUEkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_mIZaYEkXEeyHOvMI38kLoA" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIZaYUkXEeyHOvMI38kLoA" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_mIaBcEkXEeyHOvMI38kLoA" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIaBcUkXEeyHOvMI38kLoA" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_mIaogEkXEeyHOvMI38kLoA" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mIaogUkXEeyHOvMI38kLoA" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_mIYzUUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_mIYzUkkXEeyHOvMI38kLoA" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mIYzU0kXEeyHOvMI38kLoA" points="[67, 1, -268, -4]$[295, 4, -40, -1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mIikUEkXEeyHOvMI38kLoA" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mIikUUkXEeyHOvMI38kLoA" id="(0.5,0.5)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_lDQ-UEkXEeyHOvMI38kLoA" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_lDQ-UUkXEeyHOvMI38kLoA"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_l4ZPgEkXEeyHOvMI38kLoA" name="Class1" tooltipText="Edge_Abstraction_DeleteSemanticTest::Class1" outgoingEdges="_mGkOYEkXEeyHOvMI38kLoA" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_l4Z2kEkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l4evEEkXEeyHOvMI38kLoA" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_l4f9MEkXEeyHOvMI38kLoA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_l4evEUkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l4f9MUkXEeyHOvMI38kLoA" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_l4gkQkkXEeyHOvMI38kLoA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_l4gkQEkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l4hLUEkXEeyHOvMI38kLoA" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_GJUfUCUgEeycgswzYyutmA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_l4hLU0kXEeyHOvMI38kLoA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_l4hLUUkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_mGU90EkXEeyHOvMI38kLoA" name="Class2" tooltipText="Edge_Abstraction_DeleteSemanticTest::Class2" incomingEdges="_mGkOYEkXEeyHOvMI38kLoA" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_mGVk4EkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_mGZPRUkXEeyHOvMI38kLoA" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_mGZ2UUkXEeyHOvMI38kLoA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_mGZPRkkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_mGZ2UkkXEeyHOvMI38kLoA" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_mGZ2VUkXEeyHOvMI38kLoA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_mGZ2U0kXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_mGZ2VkkXEeyHOvMI38kLoA" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Abstraction_DeleteSemanticTest.uml#_Ge2DYCUgEeycgswzYyutmA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_mGadYkkXEeyHOvMI38kLoA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_mGadYEkXEeyHOvMI38kLoA" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" uid="_mGkOYEkXEeyHOvMI38kLoA" name="<<abstraction>>" sourceNode="_l4ZPgEkXEeyHOvMI38kLoA" targetNode="_mGU90EkXEeyHOvMI38kLoA">
+ <target xmi:type="uml:Abstraction" href="Edge_Abstraction_DeleteSemanticTest.uml#_G-P8MCUgEeycgswzYyutmA"/>
+ <semanticElements xmi:type="uml:Abstraction" href="Edge_Abstraction_DeleteSemanticTest.uml#_G-P8MCUgEeycgswzYyutmA"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" uid="_mGlcgEkXEeyHOvMI38kLoA" lineStyle="dash" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Abstraction']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_mGmDkEkXEeyHOvMI38kLoA" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Abstraction']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_lCErgUkXEeyHOvMI38kLoA"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']"/>
+ <target xmi:type="uml:Model" href="Edge_Abstraction_DeleteSemanticTest.uml#_-Dm8cCUfEeycgswzYyutmA"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.uml
new file mode 100755
index 0000000..ade50bf
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_-Dm8cCUfEeycgswzYyutmA" name="Edge_Abstraction_DeleteSemanticTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_GJUfUCUgEeycgswzYyutmA" name="Class1" visibility="public"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Ge2DYCUgEeycgswzYyutmA" name="Class2" visibility="public"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_G-P8MCUgEeycgswzYyutmA" name="EdgeToDelete" client="_GJUfUCUgEeycgswzYyutmA" supplier="_Ge2DYCUgEeycgswzYyutmA"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.aird
new file mode 100755
index 0000000..8f170fc
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.aird
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_tGxj0DcmEey1v5ZgfkSlPg" selectedViews="_tHhKsDcmEey1v5ZgfkSlPg _tIcXwDcmEey1v5ZgfkSlPg _tIn98DcmEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>Edge_Dependency_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_tHhKsDcmEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_tIyWADcmEey1v5ZgfkSlPg" name="Edge_Dependency_Delete_ClassDiagram" repPath="#_tIwg0DcmEey1v5ZgfkSlPg" changeId="1c52e7b3-18c3-4859-91e6-ee584653b43f">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_Dependency_DeleteSemanticTest.uml#_C2rkUCToEey32P1_fK_1UA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_tIcXwDcmEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_tIn98DcmEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_tIwg0DcmEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_tJ-BwjcmEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tJ-BwzcmEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_tI0LMDcmEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_tI0LMTcmEey1v5ZgfkSlPg" type="Sirius" element="_tIwg0DcmEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_JJzwwDcnEey1v5ZgfkSlPg" type="2002" element="_JH9WoDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JJ0X0DcnEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_JJ0X0TcnEey1v5ZgfkSlPg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_JJ0X1DcnEey1v5ZgfkSlPg" type="3009" element="_JIBoEDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JJ0-4DcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JJ0-4TcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JJ0-4jcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JJ0-4zcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JJ0-5DcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JJ0X1TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JJ0X1jcnEey1v5ZgfkSlPg" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JJ1l8DcnEey1v5ZgfkSlPg" type="3009" element="_JICPIjcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JJ1l8zcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JJ1l9DcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JJ1l9TcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JJ1l9jcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JJ1l9zcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JJ1l8TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JJ1l8jcnEey1v5ZgfkSlPg" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JJ1l-DcnEey1v5ZgfkSlPg" type="3009" element="_JIC2MjcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JJ20EDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JJ20ETcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JJ20EjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JJ20EzcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JJ20FDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JJ1l-TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JJ1l-jcnEey1v5ZgfkSlPg" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JJ0X0jcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JJ0X0zcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JJzwwTcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JJzwwjcnEey1v5ZgfkSlPg" x="258" y="282"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JhssUDcnEey1v5ZgfkSlPg" type="2002" element="_Jf7KsDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JhtTYDcnEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_JhtTYTcnEey1v5ZgfkSlPg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_JhtTZDcnEey1v5ZgfkSlPg" type="3009" element="_Jf-1EDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_Jht6cDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_Jht6cTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Jht6cjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Jht6czcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Jht6dDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JhtTZTcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JhtTZjcnEey1v5ZgfkSlPg" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Jht6dTcnEey1v5ZgfkSlPg" type="3009" element="_Jf-1FDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_Jht6eDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_Jht6eTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Jht6ejcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Jht6ezcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JhuhgDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Jht6djcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Jht6dzcnEey1v5ZgfkSlPg" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JhuhgTcnEey1v5ZgfkSlPg" type="3009" element="_Jf_cIDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JhuhhDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JhuhhTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JhuhhjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JhuhhzcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JhuhiDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JhuhgjcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JhuhgzcnEey1v5ZgfkSlPg" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JhtTYjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JhtTYzcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JhssUTcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JhssUjcnEey1v5ZgfkSlPg" x="546" y="276"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_tI0LMjcmEey1v5ZgfkSlPg"/>
+ <edges xmi:type="notation:Edge" xmi:id="_JhvIkDcnEey1v5ZgfkSlPg" type="4001" element="_JgPTwDcnEey1v5ZgfkSlPg" source="_JJzwwDcnEey1v5ZgfkSlPg" target="_JhssUDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JhvIlDcnEey1v5ZgfkSlPg" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JhvIlTcnEey1v5ZgfkSlPg" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JhvIljcnEey1v5ZgfkSlPg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JhvIlzcnEey1v5ZgfkSlPg" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JhvImDcnEey1v5ZgfkSlPg" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JhvImTcnEey1v5ZgfkSlPg" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_JhvIkTcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_JhvIkjcnEey1v5ZgfkSlPg" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JhvIkzcnEey1v5ZgfkSlPg" points="[9, 1, -320, -34]$[289, 30, -40, -5]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JhvvoDcnEey1v5ZgfkSlPg" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JhvvoTcnEey1v5ZgfkSlPg" id="(0.5,0.5)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_tJ-BwDcmEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_tJ-BwTcmEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_JH9WoDcnEey1v5ZgfkSlPg" name="Class1" tooltipText="Edge_Dependency_DeleteSemanticTest::Class1" outgoingEdges="_JgPTwDcnEey1v5ZgfkSlPg" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JH99sDcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_JIBoEDcnEey1v5ZgfkSlPg" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_JICPITcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JIBoETcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_JICPIjcnEey1v5ZgfkSlPg" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_JIC2MTcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JICPIzcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_JIC2MjcnEey1v5ZgfkSlPg" name="Class1">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_J4mu8CToEey32P1_fK_1UA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_JIC2NTcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JIC2MzcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_Jf7KsDcnEey1v5ZgfkSlPg" name="Class2" tooltipText="Edge_Dependency_DeleteSemanticTest::Class2" incomingEdges="_JgPTwDcnEey1v5ZgfkSlPg" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Jf7KsTcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Jf-1EDcnEey1v5ZgfkSlPg" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_Jf-1EzcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Jf-1ETcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Jf-1FDcnEey1v5ZgfkSlPg" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_Jf-1FzcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Jf-1FTcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Jf_cIDcnEey1v5ZgfkSlPg" name="Class2">
+ <target xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Dependency_DeleteSemanticTest.uml#_KT0EQCToEey32P1_fK_1UA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_Jf_cIzcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Jf_cITcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" uid="_JgPTwDcnEey1v5ZgfkSlPg" name="EdgeToDelete" sourceNode="_JH9WoDcnEey1v5ZgfkSlPg" targetNode="_Jf7KsDcnEey1v5ZgfkSlPg">
+ <target xmi:type="uml:Dependency" href="Edge_Dependency_DeleteSemanticTest.uml#_LCAnACToEey32P1_fK_1UA"/>
+ <semanticElements xmi:type="uml:Dependency" href="Edge_Dependency_DeleteSemanticTest.uml#_LCAnACToEey32P1_fK_1UA"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" uid="_JgP60DcnEey1v5ZgfkSlPg" lineStyle="dash" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Dependency']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_JgP60TcnEey1v5ZgfkSlPg" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Dependency']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_tIwg0TcmEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_Dependency_DeleteSemanticTest.uml#_C2rkUCToEey32P1_fK_1UA"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.uml
new file mode 100755
index 0000000..827bbb2
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_C2rkUCToEey32P1_fK_1UA" name="Edge_Dependency_DeleteSemanticTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_J4mu8CToEey32P1_fK_1UA" name="Class1" visibility="public"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_KT0EQCToEey32P1_fK_1UA" name="Class2" visibility="public"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_LCAnACToEey32P1_fK_1UA" name="EdgeToDelete" client="_J4mu8CToEey32P1_fK_1UA" supplier="_KT0EQCToEey32P1_fK_1UA"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.aird
new file mode 100755
index 0000000..4381d06
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.aird
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_d20LUDcnEey1v5ZgfkSlPg" selectedViews="_d3kZQDcnEey1v5ZgfkSlPg _d41kkDcnEey1v5ZgfkSlPg _d5E1IDcnEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>Edge_Generalization_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_d3kZQDcnEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_d5RCYDcnEey1v5ZgfkSlPg" name="Edge_Generalization_Delete_ClassDiagram" repPath="#_d5PNMDcnEey1v5ZgfkSlPg" changeId="7b138a1e-5802-4198-b445-7122a7256afe">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_Generalization_DeleteSemanticTest.uml#_InY2QCW6Eeywec7XbrUPOg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_d41kkDcnEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_d5E1IDcnEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_d5PNMDcnEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_d6cuIDcnEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_d6cuITcnEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_d5SQgDcnEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_d5SQgTcnEey1v5ZgfkSlPg" type="Sirius" element="_d5PNMDcnEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_fl_C4DcnEey1v5ZgfkSlPg" type="2002" element="_fkM6MDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_fmARADcnEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_fmARATcnEey1v5ZgfkSlPg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_fmA4EDcnEey1v5ZgfkSlPg" type="3009" element="_fkP9gjcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_fmA4EzcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_fmA4FDcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fmA4FTcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fmA4FjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_fmBfIDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_fmA4ETcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fmA4EjcnEey1v5ZgfkSlPg" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_fmBfITcnEey1v5ZgfkSlPg" type="3009" element="_fkQkkzcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_fmBfJDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_fmBfJTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fmBfJjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fmBfJzcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_fmBfKDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_fmBfIjcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fmBfIzcnEey1v5ZgfkSlPg" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_fmBfKTcnEey1v5ZgfkSlPg" type="3009" element="_fkQklzcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_fmCGMDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_fmCGMTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fmCGMjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fmCGMzcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_fmCGNDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_fmBfKjcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fmBfKzcnEey1v5ZgfkSlPg" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fmARAjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fmARAzcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_fl_C4TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fl_C4jcnEey1v5ZgfkSlPg" x="234" y="252"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_f31A0DcnEey1v5ZgfkSlPg" type="2002" element="_f2Ab4DcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_f31n4DcnEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_f31n4TcnEey1v5ZgfkSlPg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_f32O8DcnEey1v5ZgfkSlPg" type="3009" element="_f2EGQDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_f32O8zcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_f32O9DcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_f32O9TcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_f32O9jcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_f32O9zcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_f32O8TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f32O8jcnEey1v5ZgfkSlPg" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_f32O-DcnEey1v5ZgfkSlPg" type="3009" element="_f2EGRDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_f322ADcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_f322ATcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_f322AjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_f322AzcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_f322BDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_f32O-TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f32O-jcnEey1v5ZgfkSlPg" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_f322BTcnEey1v5ZgfkSlPg" type="3009" element="_f2EtUjcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_f322CDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_f33dEDcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_f33dETcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_f33dEjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_f33dEzcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_f322BjcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f322BzcnEey1v5ZgfkSlPg" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_f31n4jcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_f31n4zcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_f31A0TcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f31A0jcnEey1v5ZgfkSlPg" x="474" y="246"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_d5SQgjcnEey1v5ZgfkSlPg"/>
+ <edges xmi:type="notation:Edge" xmi:id="_f33dFDcnEey1v5ZgfkSlPg" type="4001" element="_f2mRwDcnEey1v5ZgfkSlPg" source="_fl_C4DcnEey1v5ZgfkSlPg" target="_f31A0DcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_f33dGDcnEey1v5ZgfkSlPg" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f33dGTcnEey1v5ZgfkSlPg" y="-11"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_f33dGjcnEey1v5ZgfkSlPg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f33dGzcnEey1v5ZgfkSlPg" x="-1" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_f34EIDcnEey1v5ZgfkSlPg" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f34EITcnEey1v5ZgfkSlPg" x="-3" y="9"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_f33dFTcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_f33dFjcnEey1v5ZgfkSlPg" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_f33dFzcnEey1v5ZgfkSlPg" points="[39, -1, -201, 5]$[201, -6, -39, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_f34EIjcnEey1v5ZgfkSlPg" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_f34EIzcnEey1v5ZgfkSlPg" id="(0.5,0.5)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_d6cHEDcnEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_d6cHETcnEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_fkM6MDcnEey1v5ZgfkSlPg" name="EdgeSource" tooltipText="Edge_Generalization_DeleteSemanticTest::EdgeSource" outgoingEdges="_f2mRwDcnEey1v5ZgfkSlPg" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_fkNhQDcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_fkP9gjcnEey1v5ZgfkSlPg" name="EdgeSource">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_fkQkkjcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_fkQkkDcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_fkQkkzcnEey1v5ZgfkSlPg" name="EdgeSource">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_fkQkljcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_fkQklDcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_fkQklzcnEey1v5ZgfkSlPg" name="EdgeSource">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_aTLikCW6Eeywec7XbrUPOg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_fkRLojcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_fkRLoDcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_f2Ab4DcnEey1v5ZgfkSlPg" name="EdgeTarget" tooltipText="Edge_Generalization_DeleteSemanticTest::EdgeTarget" incomingEdges="_f2mRwDcnEey1v5ZgfkSlPg" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_f2Ab4TcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_f2EGQDcnEey1v5ZgfkSlPg" name="EdgeTarget">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_f2EGQzcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_f2EGQTcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_f2EGRDcnEey1v5ZgfkSlPg" name="EdgeTarget">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_f2EtUTcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_f2EGRTcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_f2EtUjcnEey1v5ZgfkSlPg" name="EdgeTarget">
+ <target xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Class" href="Edge_Generalization_DeleteSemanticTest.uml#_ayi_ICW6Eeywec7XbrUPOg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_f2EtVTcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_f2EtUzcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" uid="_f2mRwDcnEey1v5ZgfkSlPg" sourceNode="_fkM6MDcnEey1v5ZgfkSlPg" targetNode="_f2Ab4DcnEey1v5ZgfkSlPg">
+ <target xmi:type="uml:Generalization" href="Edge_Generalization_DeleteSemanticTest.uml#_b09eYCW6Eeywec7XbrUPOg"/>
+ <semanticElements xmi:type="uml:Generalization" href="Edge_Generalization_DeleteSemanticTest.uml#_b09eYCW6Eeywec7XbrUPOg"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" uid="_f2oG8DcnEey1v5ZgfkSlPg" targetArrow="InputClosedArrow" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_f2oG8TcnEey1v5ZgfkSlPg" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_Generalization']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_d5PNMTcnEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_Generalization_DeleteSemanticTest.uml#_InY2QCW6Eeywec7XbrUPOg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.uml
new file mode 100755
index 0000000..0e59493
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_InY2QCW6Eeywec7XbrUPOg" name="Edge_Generalization_DeleteSemanticTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_aTLikCW6Eeywec7XbrUPOg" name="EdgeSource" visibility="public">
+ <generalization xmi:id="_b09eYCW6Eeywec7XbrUPOg" name="EdgeToDelete" general="_ayi_ICW6Eeywec7XbrUPOg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_ayi_ICW6Eeywec7XbrUPOg" name="EdgeTarget" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.aird
new file mode 100755
index 0000000..e3d7d66
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.aird
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_pIWxADcnEey1v5ZgfkSlPg" selectedViews="_pJG-8DcnEey1v5ZgfkSlPg _pKEBMDcnEey1v5ZgfkSlPg _pKT40DcnEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>Edge_InformationFlow_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_pJG-8DcnEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_pKjJYDcnEey1v5ZgfkSlPg" name="Edge_InformationFlow_ClassDiagram" repPath="#_pKh7QDcnEey1v5ZgfkSlPg" changeId="61f8fa15-90d8-4480-b3a4-cba8e696db03">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="Edge_InformationFlow_DeleteSemanticTest.uml#_Wv3d0CdwEey4evd-scEcsg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_pKEBMDcnEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_pKT40DcnEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_pKh7QDcnEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_pLrx0jcnEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pLrx0zcnEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_pKna0DcnEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_pKna0TcnEey1v5ZgfkSlPg" type="Sirius" element="_pKh7QDcnEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_rIn_oDcnEey1v5ZgfkSlPg" type="2002" element="_rGyzoDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_rIomsDcnEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_rIomsTcnEey1v5ZgfkSlPg" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_rIomsjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_rIomszcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_rIn_oTcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rIn_ojcnEey1v5ZgfkSlPg" x="210" y="324" width="80" height="80"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_wdmgQDcnEey1v5ZgfkSlPg" type="2002" element="_wbg1kDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_wdnuYDcnEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_wdnuYTcnEey1v5ZgfkSlPg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_wdnuZDcnEey1v5ZgfkSlPg" type="3009" element="_wblHAjcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_wdoVcDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_wdoVcTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wdoVcjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wdoVczcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_wdoVdDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_wdnuZTcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdnuZjcnEey1v5ZgfkSlPg" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_wdoVdTcnEey1v5ZgfkSlPg" type="3009" element="_wbluEjcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_wdoVeDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_wdoVeTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wdoVejcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wdoVezcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_wdo8gDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_wdoVdjcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdoVdzcnEey1v5ZgfkSlPg" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_wdo8gTcnEey1v5ZgfkSlPg" type="3009" element="_wbmVITcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_wdo8hDcnEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_wdo8hTcnEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wdo8hjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wdo8hzcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_wdo8iDcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_wdo8gjcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdo8gzcnEey1v5ZgfkSlPg" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wdnuYjcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wdnuYzcnEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_wdmgQTcnEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdmgQjcnEey1v5ZgfkSlPg" x="396" y="276"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_pKna0jcnEey1v5ZgfkSlPg"/>
+ <edges xmi:type="notation:Edge" xmi:id="_wdo8iTcnEey1v5ZgfkSlPg" type="4001" element="_wcNZIDcnEey1v5ZgfkSlPg" source="_rIn_oDcnEey1v5ZgfkSlPg" target="_wdmgQDcnEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_wdpjkDcnEey1v5ZgfkSlPg" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdpjkTcnEey1v5ZgfkSlPg" x="-1" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_wdpjkjcnEey1v5ZgfkSlPg" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdpjkzcnEey1v5ZgfkSlPg" x="-2" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_wdpjlDcnEey1v5ZgfkSlPg" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wdpjlTcnEey1v5ZgfkSlPg" x="-2" y="9"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_wdo8ijcnEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_wdo8izcnEey1v5ZgfkSlPg" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_wdo8jDcnEey1v5ZgfkSlPg" points="[39, -4, -147, 14]$[147, -15, -39, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wdpjljcnEey1v5ZgfkSlPg" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wdpjlzcnEey1v5ZgfkSlPg" id="(0.5,0.5)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_pLrx0DcnEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_pLrx0TcnEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_rGyzoDcnEey1v5ZgfkSlPg" name="EdgeSource" tooltipText="Edge_InformationFlow_DeleteSemanticTest::EdgeSource" outgoingEdges="_wcNZIDcnEey1v5ZgfkSlPg" width="8" height="8">
+ <target xmi:type="uml:Package" href="Edge_InformationFlow_DeleteSemanticTest.uml#_veRRQCdwEey4evd-scEcsg"/>
+ <semanticElements xmi:type="uml:Package" href="Edge_InformationFlow_DeleteSemanticTest.uml#_veRRQCdwEey4evd-scEcsg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_rGyzoTcnEey1v5ZgfkSlPg" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_wbg1kDcnEey1v5ZgfkSlPg" name="<<Interface>>
EdgeTarget" tooltipText="Edge_InformationFlow_DeleteSemanticTest::EdgeTarget" incomingEdges="_wcNZIDcnEey1v5ZgfkSlPg" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wbhcoDcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_wblHAjcnEey1v5ZgfkSlPg" name="EdgeTarget">
+ <target xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_wbluETcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wblHAzcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_wbluEjcnEey1v5ZgfkSlPg" name="EdgeTarget">
+ <target xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_wbmVIDcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wbluEzcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_wbmVITcnEey1v5ZgfkSlPg" name="EdgeTarget">
+ <target xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <semanticElements xmi:type="uml:Interface" href="Edge_InformationFlow_DeleteSemanticTest.uml#_u0i-0CdwEey4evd-scEcsg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_wbmVJDcnEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_wbmVIjcnEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Interface']/@subContainerMappings[name='CD_InterfaceDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" uid="_wcNZIDcnEey1v5ZgfkSlPg" sourceNode="_rGyzoDcnEey1v5ZgfkSlPg" targetNode="_wbg1kDcnEey1v5ZgfkSlPg">
+ <target xmi:type="uml:InformationFlow" href="Edge_InformationFlow_DeleteSemanticTest.uml#_wXsMkCdwEey4evd-scEcsg"/>
+ <semanticElements xmi:type="uml:InformationFlow" href="Edge_InformationFlow_DeleteSemanticTest.uml#_wXsMkCdwEey4evd-scEcsg"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" uid="_wcNZITcnEey1v5ZgfkSlPg" lineStyle="dash" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InformationFlow']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_wcNZIjcnEey1v5ZgfkSlPg" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@edgeMappings[name='CD_InformationFlow']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_pKh7QTcnEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="Edge_InformationFlow_DeleteSemanticTest.uml#_Wv3d0CdwEey4evd-scEcsg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.uml
new file mode 100755
index 0000000..a51ed61
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Wv3d0CdwEey4evd-scEcsg" name="Edge_InformationFlow_DeleteSemanticTest">
+ <packagedElement xmi:type="uml:Interface" xmi:id="_u0i-0CdwEey4evd-scEcsg" name="EdgeTarget" visibility="public"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_veRRQCdwEey4evd-scEcsg" name="EdgeSource">
+ <packagedElement xmi:type="uml:InformationFlow" xmi:id="_wXsMkCdwEey4evd-scEcsg" informationSource="_veRRQCdwEey4evd-scEcsg" informationTarget="_u0i-0CdwEey4evd-scEcsg"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.aird
new file mode 100755
index 0000000..76133cb
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.aird
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_BjsegDcoEey1v5ZgfkSlPg" selectedViews="_BmlacDcoEey1v5ZgfkSlPg _Bnh1oDcoEey1v5ZgfkSlPg _Bntb0DcoEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>TopNode_Class_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_BmlacDcoEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_Bn4a8DcoEey1v5ZgfkSlPg" name="TopNode_Class_Delete_ClassDiagram" repPath="#_Bn3M0DcoEey1v5ZgfkSlPg" changeId="7711cb25-ea56-4172-95c7-2c36c42bd237">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_Class_DeleteSemanticTest.uml#_b76sMCHvEeyVL_0gaiDGMw"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_Bnh1oDcoEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_Bntb0DcoEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_Bn3M0DcoEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_BqfqEjcoEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BqfqEzcoEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Bn6QIDcoEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_Bn6QITcoEey1v5ZgfkSlPg" type="Sirius" element="_Bn3M0DcoEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_JgtYYDcoEey1v5ZgfkSlPg" type="2002" element="_Jdkk0DcoEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_Jgt_cDcoEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_Jgt_cTcoEey1v5ZgfkSlPg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_Jgt_dDcoEey1v5ZgfkSlPg" type="3009" element="_JdoPMDcoEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JgumgDcoEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JgumgTcoEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JgumgjcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JgumgzcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JgumhDcoEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Jgt_dTcoEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Jgt_djcoEey1v5ZgfkSlPg" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JgumhTcoEey1v5ZgfkSlPg" type="3009" element="_JdoPNDcoEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JgumiDcoEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JgumiTcoEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JgumijcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JgumizcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JgumjDcoEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JgumhjcoEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JgumhzcoEey1v5ZgfkSlPg" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_JgumjTcoEey1v5ZgfkSlPg" type="3009" element="_JdoPODcoEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_JgvNkDcoEey1v5ZgfkSlPg" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_JgvNkTcoEey1v5ZgfkSlPg" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_JgvNkjcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_JgvNkzcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_JgvNlDcoEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JgumjjcoEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JgumjzcoEey1v5ZgfkSlPg" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Jgt_cjcoEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Jgt_czcoEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_JgtYYTcoEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JgtYYjcoEey1v5ZgfkSlPg" x="174" y="216"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Bn6QIjcoEey1v5ZgfkSlPg"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_BqfqEDcoEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_BqfqETcoEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_Jdkk0DcoEey1v5ZgfkSlPg" name="ClassToDelete" tooltipText="TopNode_Class_DeleteSemanticTest::ClassToDelete" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <semanticElements xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JdlL4DcoEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_JdoPMDcoEey1v5ZgfkSlPg" name="ClassToDelete">
+ <target xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <semanticElements xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_JdoPMzcoEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JdoPMTcoEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_JdoPNDcoEey1v5ZgfkSlPg" name="ClassToDelete">
+ <target xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <semanticElements xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_JdoPNzcoEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_JdoPNTcoEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_JdoPODcoEey1v5ZgfkSlPg" name="ClassToDelete">
+ <target xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <semanticElements xmi:type="uml:Class" href="TopNode_Class_DeleteSemanticTest.uml#_o8kfECHvEeyVL_0gaiDGMw"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_Jdo2QjcoEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Jdo2QDcoEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_Bn3M0TcoEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="TopNode_Class_DeleteSemanticTest.uml#_b76sMCHvEeyVL_0gaiDGMw"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.uml
new file mode 100755
index 0000000..c134256
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_b76sMCHvEeyVL_0gaiDGMw" name="TopNode_Class_DeleteSemanticTest">
+ <packageImport xmi:id="_b-YxYCHvEeyVL_0gaiDGMw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_o8kfECHvEeyVL_0gaiDGMw" name="ClassToDelete" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.aird
new file mode 100755
index 0000000..3dd6cd4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.aird
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_u5DNIEkWEeyHOvMI38kLoA" selectedViews="_u8PEAEkWEeyHOvMI38kLoA _u8h-8EkWEeyHOvMI38kLoA _u85yYEkWEeyHOvMI38kLoA" version="14.3.1.202003261200">
+ <semanticResources>TopNode_Comment_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_u8PEAEkWEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_u8h-8EkWEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_u85yYEkWEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_u9538EkWEeyHOvMI38kLoA" name="TopNode_Comment_DeleteSemanticTest" repPath="#_u920oEkWEeyHOvMI38kLoA" changeId="9f45896f-af9c-479b-8620-3641978e1b1a">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_Comment_DeleteSemanticTest.uml#_vi8B4CXbEeyLU97FU6FH_g"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_u920oEkWEeyHOvMI38kLoA">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_vAwXokkWEeyHOvMI38kLoA" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_vAwXo0kWEeyHOvMI38kLoA" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_u-RrYEkWEeyHOvMI38kLoA" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_u-RrYUkWEeyHOvMI38kLoA" type="Sirius" element="_u920oEkWEeyHOvMI38kLoA" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_wR098EkWEeyHOvMI38kLoA" type="2001" element="_wOmDwEkWEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_wSOmkEkWEeyHOvMI38kLoA" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_wSOmkUkWEeyHOvMI38kLoA" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_wSQbwEkWEeyHOvMI38kLoA" type="3013" element="_wOn48EkWEeyHOvMI38kLoA">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_wSQbwUkWEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wSQbwkkWEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_wR098UkWEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wR098kkWEeyHOvMI38kLoA" x="162" y="156" width="181" height="109"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_u-RrYkkWEeyHOvMI38kLoA"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_vAwXoEkWEeyHOvMI38kLoA" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_vAwXoUkWEeyHOvMI38kLoA"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_wOmDwEkWEeyHOvMI38kLoA" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Comment" href="TopNode_Comment_DeleteSemanticTest.uml#_xXqfUDcoEey1v5ZgfkSlPg"/>
+ <semanticElements xmi:type="uml:Comment" href="TopNode_Comment_DeleteSemanticTest.uml#_xXqfUDcoEey1v5ZgfkSlPg"/>
+ <ownedStyle xmi:type="diagram:Note" uid="_wOn48EkWEeyHOvMI38kLoA" labelSize="9" showIcon="false" labelPosition="node" color="255,255,204">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']/@nodeMappings[name='CD_Comment']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_u93bsEkWEeyHOvMI38kLoA"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']"/>
+ <target xmi:type="uml:Model" href="TopNode_Comment_DeleteSemanticTest.uml#_vi8B4CXbEeyLU97FU6FH_g"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.uml
new file mode 100755
index 0000000..5c00538
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_vi8B4CXbEeyLU97FU6FH_g" name="TopNode_Comment_DeleteSemanticTest">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_xXqfUDcoEey1v5ZgfkSlPg"/>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_vlEI0CXbEeyLU97FU6FH_g">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.aird
new file mode 100755
index 0000000..2a8f7b6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.aird
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_CCNKADcpEey1v5ZgfkSlPg" selectedViews="_CEtrcDcpEey1v5ZgfkSlPg _CFnDUDcpEey1v5ZgfkSlPg _CFzQkDcpEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>TopNode_DataType_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_CEtrcDcpEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_CF9BkDcpEey1v5ZgfkSlPg" name="TopNode_DataType_ClassDiagram" repPath="#_CF7zcDcpEey1v5ZgfkSlPg" changeId="4424ce39-aa6c-4a3d-b49f-1cd218dba75a">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_DataType_DeleteSemanticTest.uml#_sl9OMCXtEeyXf_EQF3l5Mg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_CFnDUDcpEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_CFzQkDcpEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_CF7zcDcpEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_CIZRkjcpEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CIZRkzcpEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_CF-PsDcpEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_CF-PsTcpEey1v5ZgfkSlPg" type="Sirius" element="_CF7zcDcpEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_Dcc6cDcpEey1v5ZgfkSlPg" type="2003" element="_DZbboDcpEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_DcdhgDcpEey1v5ZgfkSlPg" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_DcdhgTcpEey1v5ZgfkSlPg" type="7004">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DcdhgjcpEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DcdhgzcpEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Dcc6cTcpEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dcc6cjcpEey1v5ZgfkSlPg" x="234" y="282" width="80" height="80"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_CF-PsjcpEey1v5ZgfkSlPg"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_CIZRkDcpEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_CIZRkTcpEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_DZbboDcpEey1v5ZgfkSlPg" name="<<DataType>>
DataTypeToDelete" tooltipText="TopNode_DataType_DeleteSemanticTest::DataTypeToDelete" width="8" height="8">
+ <target xmi:type="uml:DataType" href="TopNode_DataType_DeleteSemanticTest.uml#_0bhcQCXtEeyXf_EQF3l5Mg"/>
+ <semanticElements xmi:type="uml:DataType" href="TopNode_DataType_DeleteSemanticTest.uml#_0bhcQCXtEeyXf_EQF3l5Mg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_DZbboTcpEey1v5ZgfkSlPg" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_DataType']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_CF7zcTcpEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="TopNode_DataType_DeleteSemanticTest.uml#_sl9OMCXtEeyXf_EQF3l5Mg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.uml
new file mode 100755
index 0000000..3e969bf
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_sl9OMCXtEeyXf_EQF3l5Mg" name="TopNode_DataType_DeleteSemanticTest">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_soNQ8CXtEeyXf_EQF3l5Mg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_0bhcQCXtEeyXf_EQF3l5Mg" name="DataTypeToDelete" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.aird
new file mode 100755
index 0000000..c0336ce
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.aird
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_Bk0IsEkXEeyHOvMI38kLoA" selectedViews="_BlMjMEkXEeyHOvMI38kLoA _BldB4EkXEeyHOvMI38kLoA _BlxyAEkXEeyHOvMI38kLoA" version="14.3.1.202003261200">
+ <semanticResources>TopNode_DurationObservation_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_BlMjMEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_BldB4EkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_BlxyAEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_BmuNMEkXEeyHOvMI38kLoA" name="TopNode_DurationObservation_ClassDiagram" repPath="#_BmsYAEkXEeyHOvMI38kLoA" changeId="7deecd1d-c18e-402d-b59f-ee4aac643775">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_DurationObservation_DeleteSemanticTest.uml#_kJBa8CXpEeymndpXmfJKMg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_BmsYAEkXEeyHOvMI38kLoA">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_Bn5R4kkXEeyHOvMI38kLoA" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Bn548EkXEeyHOvMI38kLoA" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_BmvbUEkXEeyHOvMI38kLoA" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_BmwCYEkXEeyHOvMI38kLoA" type="Sirius" element="_BmsYAEkXEeyHOvMI38kLoA" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_CIk9EEkXEeyHOvMI38kLoA" type="2002" element="_CGcPEUkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_CIlkIEkXEeyHOvMI38kLoA" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_CImLMEkXEeyHOvMI38kLoA" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CImLMUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CImLMkkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CIk9EUkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CIk9EkkXEeyHOvMI38kLoA" x="222" y="258"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_BmwCYUkXEeyHOvMI38kLoA"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Bn5R4EkXEeyHOvMI38kLoA" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_Bn5R4UkXEeyHOvMI38kLoA"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_CGcPEUkXEeyHOvMI38kLoA" name="DurationObservationToDelete">
+ <target xmi:type="uml:DurationObservation" href="TopNode_DurationObservation_DeleteSemanticTest.uml#_sOBMICXpEeymndpXmfJKMg"/>
+ <semanticElements xmi:type="uml:DurationObservation" href="TopNode_DurationObservation_DeleteSemanticTest.uml#_sOBMICXpEeymndpXmfJKMg"/>
+ <decorations xmi:type="viewpoint:Decoration" uid="_CGhHkEkXEeyHOvMI38kLoA">
+ <description xmi:type="description_1:MappingBasedDecoration" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='Observation%20symbol']"/>
+ </decorations>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_CGddMEkXEeyHOvMI38kLoA" labelSize="9" iconPath="/org.eclipse.papyrus.uml.diagram.common/icons/obj16/DurationObservation.gif" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Observation']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_BmsYAUkXEeyHOvMI38kLoA"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']"/>
+ <target xmi:type="uml:Model" href="TopNode_DurationObservation_DeleteSemanticTest.uml#_kJBa8CXpEeymndpXmfJKMg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.uml
new file mode 100755
index 0000000..64f5f1a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_kJBa8CXpEeymndpXmfJKMg" name="TopNode_DurationObservation_DeleteSemanticTest">
+ <packagedElement xmi:type="uml:DurationObservation" xmi:id="_sOBMICXpEeymndpXmfJKMg" name="DurationObservationToDelete" visibility="public"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.aird
new file mode 100755
index 0000000..f4ad6d6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.aird
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_X87aMEkXEeyHOvMI38kLoA" selectedViews="_X9T0sEkXEeyHOvMI38kLoA _X9kTYEkXEeyHOvMI38kLoA _X92nQEkXEeyHOvMI38kLoA" version="14.3.1.202003261200">
+ <semanticResources>TopNode_PackageWithSubNodes_DeleteSemanticTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_X9T0sEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_X9kTYEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_X92nQEkXEeyHOvMI38kLoA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_X-wmMEkXEeyHOvMI38kLoA" name="TopNode_Package_Delete_ClassDiagram" repPath="#_X-uJ8EkXEeyHOvMI38kLoA" changeId="82bac36d-a9ff-4950-85fb-65006dee8052">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_PackageWithSubNodes_DeleteSemanticTest.uml#_daukwCK5Eeygm4ZWaluQ-g"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_X-uJ8EkXEeyHOvMI38kLoA">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_X_8R8UkXEeyHOvMI38kLoA" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_X_8R8kkXEeyHOvMI38kLoA" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_X-ybYEkXEeyHOvMI38kLoA" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_X-ybYUkXEeyHOvMI38kLoA" type="Sirius" element="_X-uJ8EkXEeyHOvMI38kLoA" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_Yh_2IEkXEeyHOvMI38kLoA" type="2002" element="_YgZToEkXEeyHOvMI38kLoA">
+ <children xmi:type="notation:Node" xmi:id="_YiAdMEkXEeyHOvMI38kLoA" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_YiBEQEkXEeyHOvMI38kLoA" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_YiBEQUkXEeyHOvMI38kLoA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_YiBEQkkXEeyHOvMI38kLoA"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Yh_2IUkXEeyHOvMI38kLoA" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yh_2IkkXEeyHOvMI38kLoA" x="114" y="120" width="266" height="164"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_X-ybYkkXEeyHOvMI38kLoA"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_X_7q4EkXEeyHOvMI38kLoA" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_X_8R8EkXEeyHOvMI38kLoA"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_YgZToEkXEeyHOvMI38kLoA" name="PackageToDelete" tooltipText="TopNode_PackageWithSubNodes_DeleteSemanticTest::PackageToDelete" width="8" height="8">
+ <target xmi:type="uml:Package" href="TopNode_PackageWithSubNodes_DeleteSemanticTest.uml#_onA3ACK5Eeygm4ZWaluQ-g"/>
+ <semanticElements xmi:type="uml:Package" href="TopNode_PackageWithSubNodes_DeleteSemanticTest.uml#_onA3ACK5Eeygm4ZWaluQ-g"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_YgZ6sEkXEeyHOvMI38kLoA" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_X-uxAEkXEeyHOvMI38kLoA"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Comment']"/>
+ <target xmi:type="uml:Model" href="TopNode_PackageWithSubNodes_DeleteSemanticTest.uml#_daukwCK5Eeygm4ZWaluQ-g"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.uml
new file mode 100755
index 0000000..bd0b326
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_daukwCK5Eeygm4ZWaluQ-g" name="TopNode_PackageWithSubNodes_DeleteSemanticTest">
+ <packagedElement xmi:type="uml:Package" xmi:id="_onA3ACK5Eeygm4ZWaluQ-g" name="PackageToDelete">
+ <packagedElement xmi:type="uml:Interface" xmi:id="_pBlTICK5Eeygm4ZWaluQ-g" name="InterfaceToDelete" visibility="public"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/TopNode_Class_DropTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/TopNode_Class_DropTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/TopNode_Class_DropTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.aird
new file mode 100755
index 0000000..cbaf68e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.aird
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_8iT9YDcpEey1v5ZgfkSlPg" selectedViews="_8i9doDcpEey1v5ZgfkSlPg _8j9jMDcpEey1v5ZgfkSlPg _8kH7QDcpEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>SubNode_ClassToPackage_DropTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_8i9doDcpEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_8kRsQDcpEey1v5ZgfkSlPg" name="SubNode_ClassToPackage_ClassDiagram" repPath="#_8kQeIDcpEey1v5ZgfkSlPg" changeId="657fcdcf-37dd-4e64-ad76-205f3d6eb482">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="SubNode_ClassToPackage_DropTest.uml#_v6_OcB-ZEeyZP7QGS6vSNw"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_8j9jMDcpEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_8kH7QDcpEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_8kQeIDcpEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_8lYfgjcpEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8lYfgzcpEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_8kThcDcpEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_8kThcTcpEey1v5ZgfkSlPg" type="Sirius" element="_8kQeIDcpEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_Gkl6oDcqEey1v5ZgfkSlPg" type="2002" element="_Gi6foDcqEey1v5ZgfkSlPg">
+ <children xmi:type="notation:Node" xmi:id="_Gkl6ozcqEey1v5ZgfkSlPg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_Gkl6pDcqEey1v5ZgfkSlPg" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gkl6pTcqEey1v5ZgfkSlPg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gkl6pjcqEey1v5ZgfkSlPg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Gkl6oTcqEey1v5ZgfkSlPg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Gkl6ojcqEey1v5ZgfkSlPg" x="180" y="180" width="231" height="183"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_8kThcjcpEey1v5ZgfkSlPg"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_8lYfgDcpEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_8lYfgTcpEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_Gi6foDcqEey1v5ZgfkSlPg" name="Package1" tooltipText="SubNode_ClassToPackage_DropTest::Package1" width="8" height="8">
+ <target xmi:type="uml:Package" href="SubNode_ClassToPackage_DropTest.uml#_RzA40B-aEey8BKucjkJgFA"/>
+ <semanticElements xmi:type="uml:Package" href="SubNode_ClassToPackage_DropTest.uml#_RzA40B-aEey8BKucjkJgFA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Gi7GsDcqEey1v5ZgfkSlPg" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Package']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_8kQeITcpEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="SubNode_ClassToPackage_DropTest.uml#_v6_OcB-ZEeyZP7QGS6vSNw"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.uml
new file mode 100755
index 0000000..ba75cac
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_v6_OcB-ZEeyZP7QGS6vSNw" name="SubNode_ClassToPackage_DropTest">
+ <packagedElement xmi:type="uml:Package" xmi:id="_RzA40B-aEey8BKucjkJgFA" name="Package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_VZvH4B-aEey8BKucjkJgFA" name="ClassToDrop"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.aird
new file mode 100755
index 0000000..5ec9fd6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.aird
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_uDVgcDcrEeySVJ5jrKIH0A" selectedViews="_uR1PcDcrEeySVJ5jrKIH0A _uTus4DcrEeySVJ5jrKIH0A _uUHucDcrEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>SubNode_PackageToModel_DropTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_uR1PcDcrEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_uWRqkDcrEeySVJ5jrKIH0A" name="SubNode_PackageToModel_ClassDiagram" repPath="#_uVwtMDcrEeySVJ5jrKIH0A" changeId="08a10170-f6b0-4406-9715-86f605b2ffac">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="SubNode_PackageToModel_DropTest.uml#_rGoZQCA2EeyRYJqxsi2jow"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_uTus4DcrEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_uUHucDcrEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_uVwtMDcrEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_ubI8cDcrEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ubJjgDcrEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_uXcIMDcrEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_uXcIMTcrEeySVJ5jrKIH0A" type="Sirius" element="_uVwtMDcrEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_6U-4QDcrEeySVJ5jrKIH0A" type="2002" element="_6SzuADcrEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_6VVdkDcrEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_6VcLQDcrEeySVJ5jrKIH0A" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_6VcLQTcrEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_6VcLQjcrEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_6U-4QTcrEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6U-4QjcrEeySVJ5jrKIH0A" x="186" y="198" width="80" height="80"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_uXcIMjcrEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_uagqUDcrEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_uahRYDcrEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_6SzuADcrEeySVJ5jrKIH0A" name="Model1" tooltipText="Model1" width="8" height="8">
+ <target xmi:type="uml:Model" href="SubNode_PackageToModel_DropTest.uml#_6SryMDcrEeySVJ5jrKIH0A"/>
+ <semanticElements xmi:type="uml:Model" href="SubNode_PackageToModel_DropTest.uml#_6SryMDcrEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_6S7p0DcrEeySVJ5jrKIH0A" labelSize="9" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Model']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_uV5QEDcrEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="SubNode_PackageToModel_DropTest.uml#_rGoZQCA2EeyRYJqxsi2jow"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.uml
new file mode 100755
index 0000000..91f477e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_rGoZQCA2EeyRYJqxsi2jow" name="SubNode_PackageToModel_DropTest">
+ <packagedElement xmi:type="uml:Model" xmi:id="_6SryMDcrEeySVJ5jrKIH0A" name="Model1">
+ <packagedElement xmi:type="uml:Package" xmi:id="_4TBiECA2EeyRYJqxsi2jow" name="PackageToDrop"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.aird
new file mode 100755
index 0000000..4cd9920
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.aird
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_E4SpgDctEeySVJ5jrKIH0A" selectedViews="_E5EsoDctEeySVJ5jrKIH0A _E6RmgDctEeySVJ5jrKIH0A _E6heIDctEeySVJ5jrKIH0A" version="14.3.1.202003261200">
+ <semanticResources>SubNode_PropertyOperationToClass_DropTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_E5EsoDctEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_E6trYDctEeySVJ5jrKIH0A" name="SubNode_PropertyOperationToClass_ClassDiagram" repPath="#_E6rPIDctEeySVJ5jrKIH0A" changeId="33020b17-df4a-498e-8965-168d297444de">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="SubNode_PropertyOperationToClass_DropTest.uml#_lOyl0CErEeyGQdCCaLQMiA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_E6RmgDctEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_E6heIDctEeySVJ5jrKIH0A">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_E6rPIDctEeySVJ5jrKIH0A">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_E78acTctEeySVJ5jrKIH0A" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_E78acjctEeySVJ5jrKIH0A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_E6vgkDctEeySVJ5jrKIH0A" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_E6vgkTctEeySVJ5jrKIH0A" type="Sirius" element="_E6rPIDctEeySVJ5jrKIH0A" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_F-0zwDctEeySVJ5jrKIH0A" type="2002" element="_F89LgDctEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_F-2o8DctEeySVJ5jrKIH0A" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_F-3QADctEeySVJ5jrKIH0A" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_F-5FMDctEeySVJ5jrKIH0A" type="3009" element="_F9JYwDctEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_F-5FMzctEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_F-5sQDctEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F-5sQTctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F-5sQjctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F-9WoDctEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F-5FMTctEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F-5FMjctEeySVJ5jrKIH0A" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_F-9WoTctEeySVJ5jrKIH0A" type="3009" element="_F9Km4TctEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_F-99sDctEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_F-99sTctEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F-99sjctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F-99szctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F-99tDctEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F-9WojctEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F-9WozctEeySVJ5jrKIH0A" y="15" width="76" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_F-99tTctEeySVJ5jrKIH0A" type="3009" element="_F9LN8jctEeySVJ5jrKIH0A">
+ <children xmi:type="notation:Node" xmi:id="_F--kwDctEeySVJ5jrKIH0A" visible="false" type="5004"/>
+ <children xmi:type="notation:Node" xmi:id="_F--kwTctEeySVJ5jrKIH0A" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F--kwjctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F--kwzctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F--kxDctEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F-99tjctEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F-99tzctEeySVJ5jrKIH0A" y="30" width="76" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F-3QATctEeySVJ5jrKIH0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F-3QAjctEeySVJ5jrKIH0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F-0zwTctEeySVJ5jrKIH0A" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F-0zwjctEeySVJ5jrKIH0A" x="204" y="258"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_E6vgkjctEeySVJ5jrKIH0A"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_E77zYDctEeySVJ5jrKIH0A" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_E78acDctEeySVJ5jrKIH0A"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_F89LgDctEeySVJ5jrKIH0A" name="Class1" tooltipText="SubNode_PropertyOperationToClass_DropTest::Class1" width="8" height="8" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_F8_nwDctEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_F9JYwDctEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_F9Km4DctEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_F9JYwTctEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Operation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_F9Km4TctEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_F9LN8TctEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_F9Km4jctEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_Attribute']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_F9LN8jctEeySVJ5jrKIH0A" name="Class1">
+ <target xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <semanticElements xmi:type="uml:Class" href="SubNode_PropertyOperationToClass_DropTest.uml#_1BY74CErEeyJYJ-aK3rxjg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_F9LN9TctEeySVJ5jrKIH0A"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_F9LN8zctEeySVJ5jrKIH0A" labelSize="9" borderSize="1" borderSizeComputationExpression="1" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,215,221">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@containerMappings[name='CD_Class']/@subContainerMappings[name='CD_ClassDataTypes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_E6rPITctEeySVJ5jrKIH0A"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="SubNode_PropertyOperationToClass_DropTest.uml#_lOyl0CErEeyGQdCCaLQMiA"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.uml
new file mode 100755
index 0000000..5f909b9
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_lOyl0CErEeyGQdCCaLQMiA" name="SubNode_PropertyOperationToClass_DropTest">
+ <packagedElement xmi:type="uml:Class" xmi:id="_1BY74CErEeyJYJ-aK3rxjg" name="Class1" visibility="public">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_B5zYwCEsEeyJYJ-aK3rxjg" name="PropertyToDrop"/>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_7K-wUCErEeyJYJ-aK3rxjg" name="OperationToDrop"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.aird
new file mode 100755
index 0000000..8a48222
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.aird
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description">
+ <viewpoint:DAnalysis uid="_WjoY8DckEey1v5ZgfkSlPg" selectedViews="_WmGeIDckEey1v5ZgfkSlPg _WoTdkDckEey1v5ZgfkSlPg _Woj8QDckEey1v5ZgfkSlPg" version="14.3.1.202003261200">
+ <semanticResources>TopNode_DropTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_WmGeIDckEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_WpgXcDckEey1v5ZgfkSlPg" name="TopNode_Drop_ClassDiagram" repPath="#_WottQDckEey1v5ZgfkSlPg" changeId="1b032818-d19e-4f2e-b1bd-4d19a339fda1">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <target xmi:type="uml:Model" href="TopNode_DropTest.uml#_uMtEsB1JEeylJZ1m55N5Sw"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_WoTdkDckEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_Woj8QDckEey1v5ZgfkSlPg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_WottQDckEey1v5ZgfkSlPg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_WqtRUjckEey1v5ZgfkSlPg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WqtRUzckEey1v5ZgfkSlPg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.class"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_WpjawDckEey1v5ZgfkSlPg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_WpjawTckEey1v5ZgfkSlPg" type="Sirius" element="_WottQDckEey1v5ZgfkSlPg" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_WpjawjckEey1v5ZgfkSlPg"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_WqtRUDckEey1v5ZgfkSlPg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_WqtRUTckEey1v5ZgfkSlPg"/>
+ </ownedAnnotationEntries>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_WottQTckEey1v5ZgfkSlPg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@additionalLayers[name='Common']"/>
+ <target xmi:type="uml:Model" href="TopNode_DropTest.uml#_uMtEsB1JEeylJZ1m55N5Sw"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.uml
new file mode 100755
index 0000000..9faa63f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/resources/drop/topNode/TopNode_DropTest.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_uMtEsB1JEeylJZ1m55N5Sw" name="TopNode_DropTest">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_reZIgB1CEeyMqqMrfth9Gw"/>
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_tDnZ4B1CEeyMqqMrfth9Gw" name="ConstraintToDrop"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_x99M8B1CEeyMqqMrfth9Gw" name="ClassToDrop"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_0HDAYB1CEeyMqqMrfth9Gw" name="PackageToDrop"/>
+ <packagedElement xmi:type="uml:Component" xmi:id="_9JIE4B1CEeyMqqMrfth9Gw" name="ComponentToDrop"/>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_BiVg0B1DEeyMqqMrfth9Gw" name="DataTypeToDrop"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_FpF60B1DEeyMqqMrfth9Gw" name="InterfaceToDrop"/>
+ <packagedElement xmi:type="uml:Signal" xmi:id="_IHHccB1DEeyMqqMrfth9Gw" name="SignalToDrop"/>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_LZcv4B1DEeyMqqMrfth9Gw" name="EnumerationToDrop"/>
+ <packagedElement xmi:type="uml:InstanceSpecification" xmi:id="_OYGSUB1DEeyMqqMrfth9Gw" name="InstanceSpecificationToDrop"/>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_Rs5D4B1DEeyMqqMrfth9Gw" name="PrimitiveTypeToDrop"/>
+ <packagedElement xmi:type="uml:Model" xmi:id="_VYkEYB1DEeyMqqMrfth9Gw" name="ModelToDrop"/>
+ <packagedElement xmi:type="uml:InformationItem" xmi:id="_erkg0B1DEeyMqqMrfth9Gw" name="InformationItemToDrop"/>
+ <packagedElement xmi:type="uml:DurationObservation" xmi:id="_xmmncB1DEeyMqqMrfth9Gw" name="DurationObservationToDrop"/>
+ <packagedElement xmi:type="uml:TimeObservation" xmi:id="_3RUHgB1DEeyMqqMrfth9Gw" name="TimeObservationToDrop"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/Activator.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/Activator.java
new file mode 100755
index 0000000..7ca09e1
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/Activator.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.siriusdiag.clazz.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllClassDiagramTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllClassDiagramTests.java
new file mode 100755
index 0000000..32bf0a8
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllClassDiagramTests.java
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All Class diagram tests
+ **/
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ AllTopNodesCreationTests.class,
+ AllSubNodesCreationTests.class,
+ AllEdgesCreationTests.class,
+ AllTopNodesDropTests.class,
+ AllSubNodesDropTests.class,
+ AllDeleteTests.class,
+})
+public class AllClassDiagramTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllDeleteTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllDeleteTests.java
new file mode 100755
index 0000000..c7a44ba
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllDeleteTests.java
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges.Edge_Abstraction_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges.Edge_Dependency_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges.Edge_Generalization_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes.TopNode_Class_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes.TopNode_Comment_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes.TopNode_DurationObservation_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes.TopNode_PackageWithSubNodes_DeleteSemanticTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges.Edge_Abstraction_DeleteViewTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges.Edge_Dependency_DeleteViewTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges.Edge_Generalization_DeleteViewTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes.TopNode_Class_DeleteViewTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes.TopNode_Comment_DeleteViewTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes.TopNode_DurationObservation_DeleteViewTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes.TopNode_PackageWithSubNodes_DeleteViewTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All nodes/edges delete tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TopNode_Class_DeleteSemanticTest.class,
+ TopNode_Class_DeleteViewTest.class,
+ TopNode_Comment_DeleteSemanticTest.class,
+ TopNode_Comment_DeleteViewTest.class,
+ TopNode_DurationObservation_DeleteSemanticTest.class,
+ TopNode_DurationObservation_DeleteViewTest.class,
+ Edge_Dependency_DeleteSemanticTest.class,
+ Edge_Abstraction_DeleteSemanticTest.class,
+ Edge_Generalization_DeleteSemanticTest.class,
+ TopNode_PackageWithSubNodes_DeleteSemanticTest.class,
+ TopNode_PackageWithSubNodes_DeleteViewTest.class,
+ Edge_Dependency_DeleteViewTest.class,
+ Edge_Abstraction_DeleteViewTest.class,
+ Edge_Generalization_DeleteViewTest.class
+})
+public class AllDeleteTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllEdgesCreationTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllEdgesCreationTests.java
new file mode 100755
index 0000000..b514ebd
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllEdgesCreationTests.java
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Abstraction_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_AssociationClass_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Association_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_CompositeAssociation_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Containment_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Dependency_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_ElementImport_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_GeneralizationSet_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Generalization_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_InformationFlow_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_InstanceSpecification_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_InterfaceRealization_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Link_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_PackageImport_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_PackageMerge_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Realization_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_SharedAssociation_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Substitution_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges.Edge_Usage_CreationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All edges creation tests
+ **/
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ Edge_Abstraction_CreationTest.class,
+ Edge_Association_CreationTest.class,
+ Edge_AssociationClass_CreationTest.class,
+ Edge_CompositeAssociation_CreationTest.class,
+ Edge_SharedAssociation_CreationTest.class,
+ Edge_Containment_CreationTest.class,
+ Edge_Dependency_CreationTest.class,
+ Edge_ElementImport_CreationTest.class,
+ Edge_Generalization_CreationTest.class,
+ Edge_GeneralizationSet_CreationTest.class,
+ Edge_InformationFlow_CreationTest.class,
+ Edge_InstanceSpecification_CreationTest.class,
+ Edge_InterfaceRealization_CreationTest.class,
+ Edge_Link_CreationTest.class,
+ Edge_PackageImport_CreationTest.class,
+ Edge_PackageMerge_CreationTest.class,
+ Edge_Realization_CreationTest.class,
+ Edge_SharedAssociation_CreationTest.class,
+ Edge_Substitution_CreationTest.class,
+ Edge_Usage_CreationTest.class,
+})
+public class AllEdgesCreationTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllSubNodesCreationTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllSubNodesCreationTests.java
new file mode 100755
index 0000000..58b6e79
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllSubNodesCreationTests.java
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes.SubNode_ClassToPackage_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes.SubNode_Operation_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes.SubNode_Property_CreationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All sub nodes creation tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ SubNode_ClassToPackage_CreationTest.class,
+ SubNode_Operation_CreationTest.class,
+ SubNode_Property_CreationTest.class,
+})
+public class AllSubNodesCreationTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllSubNodesDropTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllSubNodesDropTests.java
new file mode 100755
index 0000000..645661d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllSubNodesDropTests.java
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes.SubNode_ClassToPackage_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes.SubNode_OperationToClass_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes.SubNode_PackageToModel_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes.SubNode_PropertyToClass_DropTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All sub nodes drop tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ SubNode_ClassToPackage_DropTest.class,
+ SubNode_OperationToClass_DropTest.class,
+ SubNode_PackageToModel_DropTest.class,
+ SubNode_PropertyToClass_DropTest.class,
+})
+public class AllSubNodesDropTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllTopNodesCreationTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllTopNodesCreationTests.java
new file mode 100755
index 0000000..439f9bb
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllTopNodesCreationTests.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Class_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Comment_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Component_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Constraint_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_DataType_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_DurationObservation_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Enumeration_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_InformationItem_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_InstanceSpecification_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Interface_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Model_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Package_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_PrimitiveType_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_Signal_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes.TopNode_TimeObservation_CreationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All top nodes creation test
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TopNode_Class_CreationTest.class,
+ TopNode_Comment_CreationTest.class,
+ TopNode_Component_CreationTest.class,
+ TopNode_Constraint_CreationTest.class,
+ TopNode_DataType_CreationTest.class,
+ TopNode_DurationObservation_CreationTest.class,
+ TopNode_Enumeration_CreationTest.class,
+ TopNode_InformationItem_CreationTest.class,
+ TopNode_InstanceSpecification_CreationTest.class,
+ TopNode_Interface_CreationTest.class,
+ TopNode_Model_CreationTest.class,
+ TopNode_Package_CreationTest.class,
+ TopNode_PrimitiveType_CreationTest.class,
+ TopNode_Signal_CreationTest.class,
+ TopNode_TimeObservation_CreationTest.class,
+})
+public class AllTopNodesCreationTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllTopNodesDropTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllTopNodesDropTests.java
new file mode 100755
index 0000000..6e67ac6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/all/AllTopNodesDropTests.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Class_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Comment_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Component_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Constraint_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.DataType_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.DurationObservation_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Enumeration_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.InformationItem_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.InstanceSpecification_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Interface_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Model_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Package_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.PrimitiveType_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.Signal_TopNode_DropTest;
+import org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes.TimeObservation_TopNode_DropTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All top nodes drop tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ Class_TopNode_DropTest.class,
+ Comment_TopNode_DropTest.class,
+ Component_TopNode_DropTest.class,
+ Constraint_TopNode_DropTest.class,
+ DataType_TopNode_DropTest.class,
+ PrimitiveType_TopNode_DropTest.class,
+ Enumeration_TopNode_DropTest.class,
+ DurationObservation_TopNode_DropTest.class,
+ InformationItem_TopNode_DropTest.class,
+ InstanceSpecification_TopNode_DropTest.class,
+ Model_TopNode_DropTest.class,
+ Interface_TopNode_DropTest.class,
+ Package_TopNode_DropTest.class,
+ Signal_TopNode_DropTest.class,
+ TimeObservation_TopNode_DropTest.class,
+})
+public class AllTopNodesDropTests {
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Abstraction_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Abstraction_CreationTest.java
new file mode 100755
index 0000000..ff241c5
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Abstraction_CreationTest.java
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Abstraction_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createAbstractionEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Abstraction", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Abstraction", semanticElement instanceof org.eclipse.uml2.uml.Abstraction);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an Abstraction edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Abstraction", semanticElement instanceof org.eclipse.uml2.uml.Abstraction);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an Abstraction edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_AssociationClass_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_AssociationClass_CreationTest.java
new file mode 100755
index 0000000..8d0783e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_AssociationClass_CreationTest.java
@@ -0,0 +1,128 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_AssociationClass_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createAssociationClassEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Association Class", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain two additional edges after creating an AssociationClass Edge", nbEdge + 2, diagram.getEdges().size());
+
+ // the first created edge (between the two classes)
+ Object firstCreatedEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", firstCreatedEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) firstCreatedEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML AssociationClass", semanticElement instanceof org.eclipse.uml2.uml.AssociationClass);
+ Assert.assertTrue("The source of the first edge created is a DNode", ((DEdgeSpec) siriusNewRepresentation).getSourceNode() instanceof DNodeContainer);
+ Assert.assertTrue("The target of the first edge created is a DNode", ((DEdgeSpec) siriusNewRepresentation).getTargetNode() instanceof DNodeContainer);
+
+ // the second created edge (between the first created edge and the created intermediate association class)
+ Object secondCreatedEdge = diagram.getEdges().get(1);
+ Assert.assertTrue("The created edge must be a View", secondCreatedEdge instanceof View);
+ siriusNewRepresentation = ((View) secondCreatedEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML AssociationClass", semanticElement instanceof org.eclipse.uml2.uml.AssociationClass);
+ Assert.assertTrue("The source of the second edge created is a DNode", ((DEdgeSpec) siriusNewRepresentation).getSourceNode() instanceof DNodeContainer);
+ Assert.assertTrue("The target of the second edge created is a DEdge", ((DEdgeSpec) siriusNewRepresentation).getTargetNode() instanceof DEdgeSpec);
+
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement + 1, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain two additional edges after redoing the creation of an AssociationClass Edge", nbEdge + 2, diagram.getEdges().size());
+
+ // the first created edge (between the two classes)
+ firstCreatedEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", firstCreatedEdge instanceof View);
+ siriusNewRepresentation = ((View) firstCreatedEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML AssociationClass", semanticElement instanceof org.eclipse.uml2.uml.AssociationClass);
+ Assert.assertTrue("The source of the first edge created is a DNode", ((DEdgeSpec) siriusNewRepresentation).getSourceNode() instanceof DNodeContainer);
+ Assert.assertTrue("The target of the first edge created is a DNode", ((DEdgeSpec) siriusNewRepresentation).getTargetNode() instanceof DNodeContainer);
+
+ // the second created edge (between the first created edge and the created intermediate association class)
+ secondCreatedEdge = diagram.getEdges().get(1);
+ Assert.assertTrue("The created edge must be a View", secondCreatedEdge instanceof View);
+ siriusNewRepresentation = ((View) secondCreatedEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML AssociationClass", semanticElement instanceof org.eclipse.uml2.uml.AssociationClass);
+ Assert.assertTrue("The source of the second edge created is a DNode", ((DEdgeSpec) siriusNewRepresentation).getSourceNode() instanceof DNodeContainer);
+ Assert.assertTrue("The target of the second edge created is a DEdge", ((DEdgeSpec) siriusNewRepresentation).getTargetNode() instanceof DEdgeSpec);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Association_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Association_CreationTest.java
new file mode 100755
index 0000000..5373cc9
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Association_CreationTest.java
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Association_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createAssociationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Association", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Association", semanticElement instanceof org.eclipse.uml2.uml.Association);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Association", semanticElement instanceof org.eclipse.uml2.uml.Association);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_CompositeAssociation_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_CompositeAssociation_CreationTest.java
new file mode 100755
index 0000000..c70d962
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_CompositeAssociation_CreationTest.java
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_CompositeAssociation_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createCompositeAssociationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Composite Association (Directed)", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created edge must be a UML Association", semanticElement instanceof org.eclipse.uml2.uml.Association);
+ AggregationKind associationType = ((Association) semanticElement).getMemberEnds().get(1).getAggregation();
+ Assert.assertEquals("The created Association edge is a UML CompositeAssocitaion", associationType, AggregationKind.COMPOSITE_LITERAL);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created edge must be a UML Association", semanticElement instanceof org.eclipse.uml2.uml.Association);
+ associationType = ((Association) semanticElement).getMemberEnds().get(1).getAggregation();
+ Assert.assertEquals("The created Association edge is a UML CompositeAssocitaion", associationType, AggregationKind.COMPOSITE_LITERAL);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Containment_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Containment_CreationTest.java
new file mode 100755
index 0000000..78aa386
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Containment_CreationTest.java
@@ -0,0 +1,103 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Containment_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createContainmentEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Containment Link", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ Classifier sourceNestedClassifier = ((ClassImpl) ((DEdgeSpec) siriusNewRepresentation).getTarget()).getNestedClassifiers().get(0);
+ Classifier targetElem = (ClassImpl) ((DNodeContainer) ((DEdgeSpec) siriusNewRepresentation).getTargetNode()).getTarget();
+ Assert.assertEquals("The target element is added to the liste of NestedClassifeirs of the source element", sourceNestedClassifier, targetElem);
+ Assert.assertEquals("The root model contain one less element after the creation of a Containment edge", nbElement - 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ sourceNestedClassifier = ((ClassImpl) ((DEdgeSpec) siriusNewRepresentation).getTarget()).getNestedClassifiers().get(0);
+ targetElem = (ClassImpl) ((DNodeContainer) ((DEdgeSpec) siriusNewRepresentation).getTargetNode()).getTarget();
+ Assert.assertEquals("The target element is added to the liste of NestedClassifeirs of the source element", sourceNestedClassifier, targetElem);
+ Assert.assertEquals("The root model contain one less element after the creation of a Containment edge", nbElement - 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Dependency_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Dependency_CreationTest.java
new file mode 100755
index 0000000..3d2a711
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Dependency_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Dependency_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createDependencyEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Dependency", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Dependency", semanticElement instanceof org.eclipse.uml2.uml.Dependency);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Dependency", semanticElement instanceof org.eclipse.uml2.uml.Dependency);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_ElementImport_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_ElementImport_CreationTest.java
new file mode 100755
index 0000000..44b4b5a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_ElementImport_CreationTest.java
@@ -0,0 +1,108 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_ElementImport_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createElementImportEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Element Import", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML ElementImport", semanticElement instanceof org.eclipse.uml2.uml.ElementImport);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an ElementImport edge", nbElement, fixture.getModel().getOwnedElements().size());
+ ClassImpl importedElem = (ClassImpl) ((ElementImport) ((DEdgeSpec) siriusNewRepresentation).getTarget()).getImportedElement();
+ Classifier targetElem = (ClassImpl) ((DNodeContainer) ((DEdgeSpec) siriusNewRepresentation).getTargetNode()).getTarget();
+ Assert.assertEquals("The target element is added to the liste of NestedClassifeirs of the source element", importedElem, targetElem);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML ElementImport", semanticElement instanceof org.eclipse.uml2.uml.ElementImport);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an ElementImport edge", nbElement, fixture.getModel().getOwnedElements().size());
+ importedElem = (ClassImpl) ((ElementImport) ((DEdgeSpec) siriusNewRepresentation).getTarget()).getImportedElement();
+ targetElem = (ClassImpl) ((DNodeContainer) ((DEdgeSpec) siriusNewRepresentation).getTargetNode()).getTarget();
+ Assert.assertEquals("The target element is added to the liste of NestedClassifeirs of the source element", importedElem, targetElem);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_GeneralizationSet_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_GeneralizationSet_CreationTest.java
new file mode 100755
index 0000000..312fd48
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_GeneralizationSet_CreationTest.java
@@ -0,0 +1,102 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/generalizationSet/Edge_GeneralizationSet_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_GeneralizationSet_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_GeneralizationSet_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createGeneralizationSetEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have at least two Generalization edges before creating the GeneralizationSet edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+
+ // get the source of the GeneralizationSet edge (source = one of the Generalization edge)
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getEdges().get(0)).getElement();
+
+ // get the target of the GeneralizationSet edge (target = the other Generalization edge)
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getEdges().get(1)).getElement();
+
+ fixture.applyEdgeCreationTool("Generalization Set", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(2);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML GeneralizationSet", semanticElement instanceof org.eclipse.uml2.uml.GeneralizationSet);
+ Assert.assertEquals("The root model must contain an additional element after the creation of an GeneralizationSet edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(2);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML GeneralizationSet", semanticElement instanceof org.eclipse.uml2.uml.GeneralizationSet);
+ Assert.assertEquals("The root model must contain an additional element after the creation of an GeneralizationSet edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Generalization_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Generalization_CreationTest.java
new file mode 100755
index 0000000..90dfce8
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Generalization_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Generalization_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createGeneralizationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Generalization", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Generalization", semanticElement instanceof org.eclipse.uml2.uml.Generalization);
+ Assert.assertEquals("The root model doesn not contain any additional element after the creation of an Generalization edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Generalization", semanticElement instanceof org.eclipse.uml2.uml.Generalization);
+ Assert.assertEquals("The root model doesn not contain any additional element after the creation of an Generalization edge", nbElement, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InformationFlow_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InformationFlow_CreationTest.java
new file mode 100755
index 0000000..96cd739
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InformationFlow_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_InformationFlow_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInformationFlowEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Information Flow", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InformationFlow", semanticElement instanceof org.eclipse.uml2.uml.InformationFlow);
+ Assert.assertEquals("The root model doesn not contain any additional element after the creation of an InformationFlow edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InformationFlow", semanticElement instanceof org.eclipse.uml2.uml.InformationFlow);
+ Assert.assertEquals("The root model doesn not contain any additional element after the creation of an InformationFlow edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InstanceSpecification_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InstanceSpecification_CreationTest.java
new file mode 100755
index 0000000..3fd5fa3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InstanceSpecification_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/instanceSpecification/Edge_InstanceSpecification_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_InstanceSpecification_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_InstanceSpecification_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInstanceSpecificationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+
+ // this tool opens a dialog instead in this case
+ // fixture.applyEdgeCreationTool("InstanceSpecification", diagramRespresentation, edgeSource, edgeTarget);
+ // fixture.flushDisplayEvents();
+ //
+ // Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ // Object createdEdge = diagram.getEdges().get(0);
+ // Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ // EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ // Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ // EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ // Assert.assertTrue("The created element must be a UML InstanceSpecification", semanticElement instanceof org.eclipse.uml2.uml.InstanceSpecification);
+ // Assert.assertEquals("The root model must contains one additional element after the creation of an InstanceSpecification edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ //
+ // // undo
+ // fixture.getEditingDomain().getCommandStack().undo();
+ // fixture.flushDisplayEvents();
+ // Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ // Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+ //
+ // // redo
+ // fixture.getEditingDomain().getCommandStack().redo();
+ // fixture.flushDisplayEvents();
+ // Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ // Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ // createdEdge = diagram.getEdges().get(0);
+ // Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ // siriusNewRepresentation = ((View) createdEdge).getElement();
+ // Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ // semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ // Assert.assertTrue("The created element must be a UML InstanceSpecification", semanticElement instanceof org.eclipse.uml2.uml.InstanceSpecification);
+ // Assert.assertEquals("The root model must contains one additional element after the creation of an InstanceSpecification edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InterfaceRealization_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InterfaceRealization_CreationTest.java
new file mode 100755
index 0000000..4616663
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_InterfaceRealization_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/interfaceRealization/Edge_InterfaceRealization_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_InterfaceRealization_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_InterfaceRealization_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInterfaceRealizationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Interface Realization", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InterfaceRealization", semanticElement instanceof org.eclipse.uml2.uml.InterfaceRealization);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an InterfaceRealization edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InterfaceRealization", semanticElement instanceof org.eclipse.uml2.uml.InterfaceRealization);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an InterfaceRealization edge", nbElement, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Link_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Link_CreationTest.java
new file mode 100755
index 0000000..b60ced4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Link_CreationTest.java
@@ -0,0 +1,103 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/link/Edge_Link_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Link_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_Link_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void l() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Link", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ Element linkedElement = ((Constraint) ((DEdgeSpec) siriusNewRepresentation).getTarget()).getConstrainedElements().get(0);
+ Constraint targetElement = (Constraint) ((DNodeSpec) ((DEdgeSpec) siriusNewRepresentation).getTargetNode()).getTarget();
+ Assert.assertEquals("The target element is added to the liste of ConstrainedElements of the source element", linkedElement, targetElement);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an Link edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ linkedElement = ((Constraint) ((DEdgeSpec) siriusNewRepresentation).getTarget()).getConstrainedElements().get(0);
+ targetElement = (Constraint) ((DNodeSpec) ((DEdgeSpec) siriusNewRepresentation).getTargetNode()).getTarget();
+ Assert.assertEquals("The target element is added to the liste of ConstrainedElements of the source element", linkedElement, targetElement);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an Link edge", nbElement, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_PackageImport_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_PackageImport_CreationTest.java
new file mode 100755
index 0000000..5651b16
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_PackageImport_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_PackageImport_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_PackageImportMerge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPackageImportEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Package Import", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PackageImport", semanticElement instanceof org.eclipse.uml2.uml.PackageImport);
+ Assert.assertEquals("The root model must does not contain any additional element after the creation of an PackageImport edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PackageImport", semanticElement instanceof org.eclipse.uml2.uml.PackageImport);
+ Assert.assertEquals("The root model must does not contain any additional element after the creation of an PackageImport edge", nbElement, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_PackageMerge_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_PackageMerge_CreationTest.java
new file mode 100755
index 0000000..9bdfeb3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_PackageMerge_CreationTest.java
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/packageImportMerge/Edge_PackageImportMerge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_PackageMerge_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_PackageImportMerge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPackageMergeEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Package Merge", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PackageMerge", semanticElement instanceof org.eclipse.uml2.uml.PackageMerge);
+ Assert.assertEquals("The root model must does not contain any additional element after the creation of an PackageMerge edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PackageMerge", semanticElement instanceof org.eclipse.uml2.uml.PackageMerge);
+ Assert.assertEquals("The root model must does not contain any additional element after the creation of an PackageMerge edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Realization_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Realization_CreationTest.java
new file mode 100755
index 0000000..09626b5
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Realization_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Realization_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createRealizationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Realization", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Realization", semanticElement instanceof org.eclipse.uml2.uml.Realization);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an Realization edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Realization", semanticElement instanceof org.eclipse.uml2.uml.Realization);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an Realization edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_SharedAssociation_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_SharedAssociation_CreationTest.java
new file mode 100755
index 0000000..1ffb852
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_SharedAssociation_CreationTest.java
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_SharedAssociation_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createSharedAssociationEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Shared Association (Directed)", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created edge must be a UML Association", semanticElement instanceof org.eclipse.uml2.uml.Association);
+ AggregationKind associationType = ((Association) semanticElement).getMemberEnds().get(1).getAggregation();
+ Assert.assertEquals("The created Association edge is a UML SharedAssocitaion", associationType, AggregationKind.SHARED_LITERAL);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created edge must be a UML Association", semanticElement instanceof org.eclipse.uml2.uml.Association);
+ associationType = ((Association) semanticElement).getMemberEnds().get(1).getAggregation();
+ Assert.assertEquals("The created Association edge is a UML SharedAssocitaion", associationType, AggregationKind.SHARED_LITERAL);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Substitution_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Substitution_CreationTest.java
new file mode 100755
index 0000000..3a6a90d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Substitution_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Substitution_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createSubstitutionEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Substitution", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Substitution", semanticElement instanceof org.eclipse.uml2.uml.Substitution);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an Substitution edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Substitution", semanticElement instanceof org.eclipse.uml2.uml.Substitution);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of an Substitution edge", nbElement, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Usage_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Usage_CreationTest.java
new file mode 100755
index 0000000..c838df1
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/edges/Edge_Usage_CreationTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/edges/common/Edge_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Usage_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "Edge_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createUsageEdgeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = diagram.getChildren().size();
+ int nbEdge = diagram.getEdges().size();
+
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have the source and the target elements of the edge before creating it", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram have no edge before creating an Edge", nbEdge, diagram.getEdges().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ EdgeTarget edgeSource = (EdgeTarget) ((View) diagram.getChildren().get(0)).getElement();
+ EdgeTarget edgeTarget = (EdgeTarget) ((View) diagram.getChildren().get(1)).getElement();
+ fixture.applyEdgeCreationTool("Usage", diagramRespresentation, edgeSource, edgeTarget);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after creating an Edge", nbEdge + 1, diagram.getEdges().size());
+ Object createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ EObject siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Usage", semanticElement instanceof org.eclipse.uml2.uml.Usage);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an Usage edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after undoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain no more edges after undoing the creation of the Edge", nbEdge, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain the source and the target elements of the edge after redoing the creation of the Edge", nbElement, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after redoing the creation of the Edge", nbEdge + 1, diagram.getEdges().size());
+ createdEdge = diagram.getEdges().get(0);
+ Assert.assertTrue("The created edge must be a View", createdEdge instanceof View);
+ siriusNewRepresentation = ((View) createdEdge).getElement();
+ Assert.assertTrue("The created sirus edge must be an DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Usage", semanticElement instanceof org.eclipse.uml2.uml.Usage);
+ Assert.assertEquals("The root model must contains one additional element after the creation of an Usage edge", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_ClassToPackage_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_ClassToPackage_CreationTest.java
new file mode 100755
index 0000000..f978894
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_ClassToPackage_CreationTest.java
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/subNodes/packageSubNodes/SubNode_Package_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class SubNode_ClassToPackage_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_Package_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPackageSubNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have one Package element creating the sub node", 1, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ Object packageElement = diagram.getChildren().get(0);
+ EObject packageRepresentation = ((View) packageElement).getElement();
+ fixture.applyGenericTool("Class", diagramRespresentation, packageRepresentation);
+ fixture.flushDisplayEvents();
+
+ EList<DDiagramElement> packageSubNodes = ((DNodeContainerSpec) packageRepresentation).getOwnedDiagramElements();
+ Assert.assertEquals("The diagram children size does not change on adding a sub node", nbElement, diagram.getChildren().size());
+ EObject siriusNewRepresentation = packageSubNodes.get(0);
+ Assert.assertEquals("The package element contains one additional element", 1, packageSubNodes.size());
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The package element does not contain any element", 0, packageSubNodes.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram children size does not change on adding a sub node", nbElement, diagram.getChildren().size());
+ siriusNewRepresentation = ((DNodeContainerSpec) packageRepresentation).getOwnedDiagramElements().get(0);
+ Assert.assertEquals("The package element contains one additional element", 1, packageSubNodes.size());
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_Operation_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_Operation_CreationTest.java
new file mode 100755
index 0000000..310b0d7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_Operation_CreationTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListElementSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListSpec;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings({ "nls", "restriction" })
+@RunWith(ClassificationRunner.class)
+public class SubNode_Operation_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_PropertyOperation_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createOperationNodeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The root model must have only one Class element before creating the sub node", 1, diagram.getChildren().size());
+
+ Object classElement = diagram.getChildren().get(0);
+ DNodeContainerSpec classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ EObject subNodeContainer = classRepresentation.getOwnedDiagramElements().get(0);
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Operation", diagramRespresentation, subNodeContainer);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram children size does not change on adding a sub node", 1, diagram.getChildren().size());
+
+ classElement = diagram.getChildren().get(0);
+ classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ DNodeListSpec element = (DNodeListSpec) classRepresentation.getOwnedDiagramElements().get(0);
+ Object siriusNewRepresentation = element.getOwnedElements().get(0);
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ EObject semanticElement = ((DNodeListElementSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Operation", semanticElement instanceof org.eclipse.uml2.uml.Operation);
+ ClassImpl classElem = (ClassImpl) classRepresentation.getTarget();
+ Assert.assertEquals("The Class must contains one additional Operation after the creation", 1, classElem.getOwnedOperations().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The class must have no attribut after undoing the creation", 0, classElem.getOwnedOperations().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The class must contain one Operation after creating a sub node", 1, classElem.getOwnedOperations().size());
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ Assert.assertTrue("The created element must be a UML Operation", semanticElement instanceof org.eclipse.uml2.uml.Operation);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_PackageToModel_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_PackageToModel_CreationTest.java
new file mode 100755
index 0000000..ccd8df2
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_PackageToModel_CreationTest.java
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/subNodes/modelSubNodes/SubNode_Model_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class SubNode_PackageToModel_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_Model_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createModelSubNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must have one Model element creating the sub node", 1, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ Object packageElement = diagram.getChildren().get(0);
+ EObject packageRepresentation = ((View) packageElement).getElement();
+ fixture.applyContainerCreationTool("Package", diagramRespresentation, packageRepresentation);
+ fixture.flushDisplayEvents();
+
+ EList<DDiagramElement> modelSubNodes = ((DNodeContainerSpec) packageRepresentation).getOwnedDiagramElements();
+ Assert.assertEquals("The diagram children size does not change on adding a sub node", nbElement, diagram.getChildren().size());
+ EObject siriusNewRepresentation = modelSubNodes.get(0);
+ Assert.assertEquals("The model element contains one additional element", 1, modelSubNodes.size());
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next(); // TODO extact properly
+ Assert.assertTrue("The created element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The model element does not contain any element", 0, modelSubNodes.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram children size does not change on adding a sub node", nbElement, diagram.getChildren().size());
+ siriusNewRepresentation = ((DNodeContainerSpec) packageRepresentation).getOwnedDiagramElements().get(0);
+ Assert.assertEquals("The model element contains one additional element", 1, modelSubNodes.size());
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_Property_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_Property_CreationTest.java
new file mode 100755
index 0000000..192dc06
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/subNodes/SubNode_Property_CreationTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.subNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListElementSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListSpec;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/subNodes/classSubNodes/SubNode_PropertyOperation_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings({ "nls", "restriction" })
+@RunWith(ClassificationRunner.class)
+public class SubNode_Property_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_PropertyOperation_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPropertyNodeTest() {
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The root model must have only one Class element before creating the sub node", 1, diagram.getChildren().size());
+
+ Object classElement = diagram.getChildren().get(0);
+ DNodeContainerSpec classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ EObject subNodeContainer = classRepresentation.getOwnedDiagramElements().get(1);
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Property", diagramRespresentation, subNodeContainer);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram children size does not change on adding a sub node", 1, diagram.getChildren().size());
+
+ classElement = diagram.getChildren().get(0);
+ classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ DNodeListSpec element = (DNodeListSpec) classRepresentation.getOwnedDiagramElements().get(1);
+ Object siriusNewRepresentation = element.getOwnedElements().get(0);
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ EObject semanticElement = ((DNodeListElementSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Property", semanticElement instanceof org.eclipse.uml2.uml.Property);
+ ClassImpl classElem = (ClassImpl) classRepresentation.getTarget();
+ Assert.assertEquals("The Class must contains one additional Attribut after the creation", 1, classElem.getOwnedAttributes().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The class must have no attribut after undoing the creation", 0, classElem.getOwnedAttributes().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The class must contain one Attribut after creating a sub node", 1, classElem.getOwnedAttributes().size());
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ Assert.assertTrue("The created element must be a UML Property", semanticElement instanceof org.eclipse.uml2.uml.Property);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Class_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Class_CreationTest.java
new file mode 100755
index 0000000..c89edad
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Class_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Class_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createClassNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Class", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Comment_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Comment_CreationTest.java
new file mode 100755
index 0000000..662a91b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Comment_CreationTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Comment_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createCommentNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyNodeCreationTool("Comment", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Comment);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Comment);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Component_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Component_CreationTest.java
new file mode 100755
index 0000000..7f2bce0
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Component_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Component_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createComponentNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Component", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Component", semanticElement instanceof org.eclipse.uml2.uml.Component);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Component", semanticElement instanceof org.eclipse.uml2.uml.Component);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Constraint_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Constraint_CreationTest.java
new file mode 100755
index 0000000..950a0d8
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Constraint_CreationTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Constraint_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createConstraintNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyNodeCreationTool("Constraint", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Constraint", semanticElement instanceof org.eclipse.uml2.uml.Constraint);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Constraint", semanticElement instanceof org.eclipse.uml2.uml.Constraint);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_DataType_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_DataType_CreationTest.java
new file mode 100755
index 0000000..56858e2
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_DataType_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_DataType_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createDataTypeNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Data Type", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DataType", semanticElement instanceof org.eclipse.uml2.uml.DataType);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DataType", semanticElement instanceof org.eclipse.uml2.uml.DataType);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_DurationObservation_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_DurationObservation_CreationTest.java
new file mode 100755
index 0000000..fdaadb6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_DurationObservation_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_DurationObservation_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createDurationObservationNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Duration Observation", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();// it is required ?
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DurationObservation", semanticElement instanceof org.eclipse.uml2.uml.DurationObservation);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DurationObservation", semanticElement instanceof org.eclipse.uml2.uml.DurationObservation);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Enumeration_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Enumeration_CreationTest.java
new file mode 100755
index 0000000..bad3e76
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Enumeration_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Enumeration_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createEnumerationNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Enumeration", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();// it is required ?
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Enumeration", semanticElement instanceof org.eclipse.uml2.uml.Enumeration);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Enumeration", semanticElement instanceof org.eclipse.uml2.uml.Enumeration);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_InformationItem_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_InformationItem_CreationTest.java
new file mode 100755
index 0000000..7c226b7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_InformationItem_CreationTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_InformationItem_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInformationItemNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Information Item", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InformationItem", semanticElement instanceof org.eclipse.uml2.uml.InformationItem);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InformationItem", semanticElement instanceof org.eclipse.uml2.uml.InformationItem);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_InstanceSpecification_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_InstanceSpecification_CreationTest.java
new file mode 100755
index 0000000..d4cf834
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_InstanceSpecification_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_InstanceSpecification_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInstanceSpecificationNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Instance Specification", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();// it is required ?
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next(); // TODO extact properly
+ Assert.assertTrue("The created element must be a UML InstanceSpecification", semanticElement instanceof org.eclipse.uml2.uml.InstanceSpecification);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InstanceSpecification", semanticElement instanceof org.eclipse.uml2.uml.InstanceSpecification);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Interface_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Interface_CreationTest.java
new file mode 100755
index 0000000..8944348
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Interface_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Interface_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInterfaceNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Interface", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Interface", semanticElement instanceof org.eclipse.uml2.uml.Interface);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Interface", semanticElement instanceof org.eclipse.uml2.uml.Interface);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Model_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Model_CreationTest.java
new file mode 100755
index 0000000..edded2f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Model_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Model_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createModelNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Model", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Model", semanticElement instanceof org.eclipse.uml2.uml.Model);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Model", semanticElement instanceof org.eclipse.uml2.uml.Model);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Package_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Package_CreationTest.java
new file mode 100755
index 0000000..c8a74ed
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Package_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Package_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPackageNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Package", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_PrimitiveType_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_PrimitiveType_CreationTest.java
new file mode 100755
index 0000000..97450d3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_PrimitiveType_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_PrimitiveType_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPrimitiveTypeNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyGenericTool("PrimitiveType", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PrimitiveType", semanticElement instanceof org.eclipse.uml2.uml.PrimitiveType);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PrimitiveType", semanticElement instanceof org.eclipse.uml2.uml.PrimitiveType);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Signal_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Signal_CreationTest.java
new file mode 100755
index 0000000..960411f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_Signal_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Signal_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createSignalNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Signal", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Signal", semanticElement instanceof org.eclipse.uml2.uml.Signal);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Signal", semanticElement instanceof org.eclipse.uml2.uml.Signal);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_TimeObservation_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_TimeObservation_CreationTest.java
new file mode 100755
index 0000000..d4c9849
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/creation/topNodes/TopNode_TimeObservation_CreationTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.creation.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/creation/topNodes/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_TimeObservation_CreationTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */); // TODO you probably need to add sirius file extension here, but not really sure
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createTimeObservationNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ System.err.println(DIAGRAM_NAME + " ==? " + diagram.getName());
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerCreationTool("Time Observation", diagramRespresentation, diagramRespresentation);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML TimeObservation", semanticElement instanceof org.eclipse.uml2.uml.TimeObservation);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation", 0, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML TimeObservation", semanticElement instanceof org.eclipse.uml2.uml.TimeObservation);
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Abstraction_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Abstraction_DeleteSemanticTest.java
new file mode 100755
index 0000000..a6c674e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Abstraction_DeleteSemanticTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from model test
+ */
+@PluginResource("resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Abstraction_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "EdgeToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_GeneralizationSet_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_AbstractionEdge_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the edge to destroy", element);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", element, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DEdgeSpec) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertNull("The UML model must not contain the destroyed edge", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain the view of teh edge after the destruction", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+
+ // the semantic and the view elements have been reset
+ Assert.assertNotNull("The UML model must contain the destroyed edge after undoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain the view of teh edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNull("The UML model must not contain the destroyed edge after redoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must not contain the view of teh edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Dependency_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Dependency_DeleteSemanticTest.java
new file mode 100755
index 0000000..e46a933
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Dependency_DeleteSemanticTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from model test
+ */
+@PluginResource("resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Dependency_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "EdgeToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_Dependency_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_DependencyEdge_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the edge to destroy", element);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", element, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DEdgeSpec) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertNull("The UML model must not contain the destroyed edge", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain the view of the edge after the destruction", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+
+ // the semantic and the view elements have been reset
+ Assert.assertNotNull("The UML model must contain the destroyed edge after undoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNull("The UML model must not contain the destroyed edge after redoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must not contain the view of the edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Generalization_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Generalization_DeleteSemanticTest.java
new file mode 100755
index 0000000..d145992
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_Generalization_DeleteSemanticTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from model test
+ */
+@PluginResource("resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Generalization_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String EDGE_SOURCE_NAME = "EdgeSource";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_Generalization_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_GeneralizationEdge_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ ClassImpl edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Generalization edgeToBeDeleted = edgeSource.getGeneralizations().get(0);
+ Assert.assertNotNull("We can't find the edge to destroy", edgeToBeDeleted);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", edgeToBeDeleted, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DEdgeSpec) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed edge", 0, edgeSource.getGeneralizations().size());
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain the view of the edge after the destruction", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+
+ // the semantic and the view elements have been reset
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ edgeToBeDeleted = edgeSource.getGeneralizations().get(0);
+ Assert.assertNotNull("The UML model must contain the destroyed edge after undoing the destruction", edgeToBeDeleted);
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed edge after redoing the destruction", 0, edgeSource.getGeneralizations().size());
+ Assert.assertEquals("The class diagram must not contain the view of the edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_InformationFlow_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_InformationFlow_DeleteSemanticTest.java
new file mode 100755
index 0000000..d5e22a7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/edges/Edge_InformationFlow_DeleteSemanticTest.java
@@ -0,0 +1,98 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.edges;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.internal.impl.PackageImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from model test
+ */
+@PluginResource("resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_InformationFlow_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String EDGE_SOURCE_NAME = "EdgeSource";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_InformationFlow_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_InformationFlowEdge_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ PackageImpl edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ PackageableElement edgeTobeDeleted = edgeSource.getPackagedElements().get(0);
+ Assert.assertNotNull("We can't find the edge to destroy", edgeTobeDeleted);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", edgeTobeDeleted, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DEdgeSpec) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed edge", 0, edgeSource.getPackagedElements().size());
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain the view of the edge after the destruction", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+
+ // the semantic and the view elements have been reset
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ edgeTobeDeleted = edgeSource.getPackagedElements().get(0);
+ Assert.assertNotNull("The UML model must contain the destroyed edge after undoing the destruction", edgeTobeDeleted);
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed edge after redoing the destruction", 0, edgeSource.getPackagedElements().size());
+ Assert.assertEquals("The class diagram must not contain the view of teh edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_Class_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_Class_DeleteSemanticTest.java
new file mode 100755
index 0000000..0da4baf
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_Class_DeleteSemanticTest.java
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from model test
+ */
+@PluginResource("resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Class_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "ClassToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Class_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Class_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the Class element to destroy", element);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one Class element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainer);
+ Assert.assertEquals("The found view doesn't represent the Class element to destroy", element, ((DNodeContainer) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DNodeContainer) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertNull("The UML model must not contain the destroyed Class element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain view after destruction of the Class element", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the semantic and the view elements have been reset
+ Assert.assertNotNull("The UML model must contain the destroyed Class element after undoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain the view of the Class element after undoing teh destruction", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNull("The UML model must not contain the destroyed Class element after redoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must not contain the view of the Class element after redoing the destruction", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_Comment_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_Comment_DeleteSemanticTest.java
new file mode 100755
index 0000000..e8f1e08
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_Comment_DeleteSemanticTest.java
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from model test
+ */
+@PluginResource("resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Comment_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Comment_DeleteSemanticTest";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Comment_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ Comment element = rootModel.getOwnedComments().get(0);
+ Assert.assertNotNull("We can't find the Comment element to destroy", element);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one Comment element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeSpec);
+ Assert.assertEquals("The found view doesn't represent the Comment element to destroy", element, ((DNodeSpec) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DNodeSpec) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertEquals("The UML model must not contain the destroyed Comment element", 0, rootModel.getOwnedComments().size());
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain view after destruction of the Comment element", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the semantic and the view elements have been reset
+ Assert.assertEquals("The UML model must not contain the destroyed Comment element", 1, rootModel.getOwnedComments().size());
+ Assert.assertEquals("The class diagram must contain the view of the Comment element after undoing the destruction", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The UML model must not contain the destroyed Comment element", 0, rootModel.getOwnedComments().size());
+ Assert.assertEquals("The class diagram must not contain the view of the Comment element after redoing the destruction", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_DataType_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_DataType_DeleteSemanticTest.java
new file mode 100755
index 0000000..dc54b8e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_DataType_DeleteSemanticTest.java
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from model test
+ */
+@PluginResource("resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_DataType_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "DataTypeToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_DataType_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_DataType_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the element to destroy", element);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainer);
+ Assert.assertEquals("The found view doesn't represent the element to destroy", element, ((DNodeContainer) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DNodeContainer) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertNull("The UML model must not contain the destroyed element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain view after destruction of the class", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the semantic and the view elements have been reset
+ Assert.assertNotNull("The UML model must contain the destroyed element after undo", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain view after destruction of the class after undo", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNull("The UML model must not contain the destroyed element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must not contain view after destruction of the class", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_DurationObservation_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_DurationObservation_DeleteSemanticTest.java
new file mode 100755
index 0000000..0ae5aa7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_DurationObservation_DeleteSemanticTest.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from model test
+ */
+@PluginResource("resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_DurationObservation_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "DurationObservationToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_DurationObservation_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_DurationObservation_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the DurationObservation element to destroy", element);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one DurationObservation element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainerSpec);
+ Assert.assertEquals("The found view doesn't represent the DurationObservation element to destroy", element, ((DNodeContainerSpec) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DNodeContainerSpec) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertNull("The UML model does not contain the DurationObservation element after the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram does not contain the view of the DurationObservation element aftrer the destruction", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the semantic and the view elements have been reset
+ Assert.assertNotNull("The UML model must contain the destroyed the DurationObservation element aftrer undoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain the view of the DurationObservation element aftrer undoing the destruction", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNull("The UML model does not contain the DurationObservation element after redoing the destruction", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram does not contain the view of the DurationObservation element aftrer redoing the destruction", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_PackageWithSubNodes_DeleteSemanticTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_PackageWithSubNodes_DeleteSemanticTest.java
new file mode 100755
index 0000000..80d5c56
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/semantic/nodes/TopNode_PackageWithSubNodes_DeleteSemanticTest.java
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.semantic.nodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.internal.impl.PackageImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Package element and it's sub nodes from model test
+ */
+@PluginResource("resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_PackageWithSubNodes_DeleteSemanticTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "PackageToDelete";
+
+ private static final String SUB_ELEMENT_TO_DESTROY_NAME = "InterfaceToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Package_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings({ "restriction", "unused" })
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Package_Semantic() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ PackageImpl packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the Package element to destroy", packageElement);
+ Assert.assertNotNull("The UML model must not contain the sub element to be destroyed", packageElement.getPackagedElement(SUB_ELEMENT_TO_DESTROY_NAME));
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one Package element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainer);
+ Assert.assertEquals("The found view doesn't represent the Package element to destroy", packageElement, ((DNodeContainer) siriusNewRepresentation).getTarget());
+
+ fixture.applySemanticDeletionTool((DNodeContainer) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has been destroyed
+ Assert.assertNull("The UML model must not contain the destroyed Package element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed too in the diagram
+ Assert.assertEquals("The class diagram must not contain the view of the Package element after the destruction", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the semantic and the view elements have been reset
+ packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("The UML model must contain the destroyed Package element after undoing the destruction", packageElement);
+ Assert.assertNotNull("The UML model must not contain the destroyed sub element after undoing the destruction", packageElement.getPackagedElement(SUB_ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain the view of teh Package element after undoing the destruction", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNull("The UML model must not contain the destroyed Package element after redoing the destruction", packageElement);
+ Assert.assertEquals("The class diagram must not contain the view of the Package element after redoing the destruction", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Abstraction_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Abstraction_DeleteViewTest.java
new file mode 100755
index 0000000..24a4d1a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Abstraction_DeleteViewTest.java
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeEditPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from diagram test
+ */
+@PluginResource("resources/delete/edges/abstraction/Edge_Abstraction_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Abstraction_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String VIEW_TO_DELETE_ELEMENT_NAME = "EdgeToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_GeneralizationSet_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Abstraction_Edge_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME);
+ Assert.assertNotNull(element);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", element, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getConnections();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ if (model instanceof View && ((DEdgeSpec) siriusNewRepresentation).getTarget() == rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME)) {
+ toSelect = (EditPart) current;
+ break;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DEdgeEditPart selectedEdge = (DEdgeEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedEdge.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DEdgeSpec) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view of the edge after delete from diagram", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ Assert.assertNotNull("The UML model must still contain the semantic element after undoing the destruction", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNotNull("The UML model must still contain the semantic element after redoing the destruction", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must not contain the view of the edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Dependency_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Dependency_DeleteViewTest.java
new file mode 100755
index 0000000..cad737d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Dependency_DeleteViewTest.java
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeEditPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from diagram test
+ */
+@PluginResource("resources/delete/edges/dependency/Edge_Dependency_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Dependency_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String VIEW_TO_DELETE_ELEMENT_NAME = "EdgeToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_Dependency_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_DependencyEdge_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME);
+ Assert.assertNotNull(element);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", element, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getConnections();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ if (model instanceof View && ((DEdgeSpec) siriusNewRepresentation).getTarget() == rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME)) {
+ toSelect = (EditPart) current;
+ break;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DEdgeEditPart selectedEdge = (DEdgeEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedEdge.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DEdgeSpec) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view of the edge after delete from diagram", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ Assert.assertNotNull("The UML model must still contain the semantic element after undoing the destruction", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNotNull("The UML model must still contain the semantic element redoing the destruction", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must not contain the view of the edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Generalization_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Generalization_DeleteViewTest.java
new file mode 100755
index 0000000..8b98335
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_Generalization_DeleteViewTest.java
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeEditPart;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from diagram test
+ */
+@PluginResource("resources/delete/edges/generalization/Edge_Generalization_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_Generalization_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String EDGE_SOURCE_NAME = "EdgeSource";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_Generalization_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_GeneralizationEdge_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ ClassImpl edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Generalization edgeToBeDeleted = edgeSource.getGeneralizations().get(0);
+ Assert.assertNotNull("We can't find the edge to destroy", edgeToBeDeleted);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", edgeToBeDeleted, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getConnections();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ if (model instanceof View && ((DEdgeSpec) siriusNewRepresentation).getTarget() == edgeSource.getGeneralizations().get(0)) {
+ toSelect = (EditPart) current;
+ break;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DEdgeEditPart selectedEdge = (DEdgeEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedEdge.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DEdgeSpec) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed edge", 1, edgeSource.getGeneralizations().size());
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view of the edge after delete from diagram", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must contain the destroyed edge after undoing the destruction", 1, edgeSource.getGeneralizations().size());
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ edgeSource = (ClassImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed element after redoing the destruction", 1, edgeSource.getGeneralizations().size());
+ Assert.assertEquals("The class diagram must not contain the view of the edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_InformationFlow_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_InformationFlow_DeleteViewTest.java
new file mode 100755
index 0000000..cf92ef4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/edges/Edge_InformationFlow_DeleteViewTest.java
@@ -0,0 +1,125 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.edges;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DEdgeEditPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.internal.impl.PackageImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Dependency edge from diagram test
+ */
+@PluginResource("resources/delete/edges/informationFlow/Edge_InformationFlow_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Edge_InformationFlow_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String EDGE_SOURCE_NAME = "EdgeSource";
+
+ private static final String CLASS_DIAGRAM_NAME = "Edge_InformationFlow_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_GeneralizationEdge_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ PackageImpl edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ PackageableElement edgeToBeDeleted = edgeSource.getPackagedElements().get(0);
+ Assert.assertNotNull("We can't find the edge to destroy", edgeToBeDeleted);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one edge", 1, classDiagram.getEdges().size());
+ Object elementToBeDeleted = classDiagram.getEdges().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DEdgeSpec);
+ Assert.assertEquals("The found view doesn't represent the edge to destroy", edgeToBeDeleted, ((DEdgeSpec) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getConnections();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ if (model instanceof View && ((DEdgeSpec) siriusNewRepresentation).getTarget() == edgeSource.getPackagedElements().get(0)) {
+ toSelect = (EditPart) current;
+ break;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DEdgeEditPart selectedEdge = (DEdgeEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedEdge.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DEdgeSpec) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed edge", 1, edgeSource.getPackagedElements().size());
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view of the edge after delete from diagram", 0, classDiagram.getEdges().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must contain the destroyed edge after undoing the destruction", 1, edgeSource.getPackagedElements().size());
+ Assert.assertEquals("The class diagram must contain the view of the edge after undoing the destruction", 1, classDiagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ edgeSource = (PackageImpl) rootModel.getMember(EDGE_SOURCE_NAME);
+ Assert.assertEquals("The UML model must not contain the destroyed element after redoing the destruction", 1, edgeSource.getPackagedElements().size());
+ Assert.assertEquals("The class diagram must not contain the view of the edge after redoing the destruction", 0, classDiagram.getEdges().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_Class_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_Class_DeleteViewTest.java
new file mode 100755
index 0000000..b069295
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_Class_DeleteViewTest.java
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerEditPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from diagram test
+ */
+@PluginResource("resources/delete/nodes/class/TopNode_Class_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Class_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String VIEW_TO_DELETE_ELEMENT_NAME = "ClassToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Class_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Class_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME);
+ Assert.assertNotNull(element);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainer);
+ Assert.assertEquals("The found view doesn't represent the element to destroy", element, ((DNodeContainer) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getChildren();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ if (model instanceof View && ((DNodeContainerSpec) siriusNewRepresentation).getTarget() == rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME)) {
+ toSelect = (EditPart) current;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DNodeContainerEditPart selectedContainer = (DNodeContainerEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedContainer.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DNodeContainer) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ Assert.assertNotNull("The UML model must still contain the semantic element after undo", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must contain view after destruction of the class after undo", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_Comment_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_Comment_DeleteViewTest.java
new file mode 100755
index 0000000..cc6b7b3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_Comment_DeleteViewTest.java
@@ -0,0 +1,116 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeEditPart;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from diagram test
+ */
+@PluginResource("resources/delete/nodes/comment/TopNode_Comment_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_Comment_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Comment_DeleteSemanticTest";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Comment_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ Comment element = rootModel.getOwnedComments().get(0);
+ Assert.assertNotNull(element);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeSpec);
+ Assert.assertEquals("The found view doesn't represent the element to destroy", element, ((DNodeSpec) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getChildren();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ if (model instanceof View && ((DNodeSpec) siriusNewRepresentation).getTarget() == rootModel.getOwnedComments().get(0)) {
+ toSelect = (EditPart) current;
+ break;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DNodeEditPart selectedContainer = (DNodeEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedContainer.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DNodeSpec) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ Assert.assertEquals("The UML model must still contain the semantic element", 1, rootModel.getOwnedComments().size());
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ Assert.assertEquals("The UML model must still contain the semantic element", 1, rootModel.getOwnedComments().size());
+ Assert.assertEquals("The class diagram must contain view after destruction of the class after undo", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The UML model must still contain the semantic element", 1, rootModel.getOwnedComments().size());
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_DataType_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_DataType_DeleteViewTest.java
new file mode 100755
index 0000000..2af23eb
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_DataType_DeleteViewTest.java
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerEditPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from diagram test
+ */
+@PluginResource("resources/delete/nodes/dataType/TopNode_DataType_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_DataType_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String VIEW_TO_DELETE_ELEMENT_NAME = "DataTypeToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_DataType_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Class_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME);
+ Assert.assertNotNull(element);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainer);
+ Assert.assertEquals("The found view doesn't represent the element to destroy", element, ((DNodeContainer) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getChildren();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ if (model instanceof View && ((DNodeContainerSpec) siriusNewRepresentation).getTarget() == rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME)) {
+ toSelect = (EditPart) current;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DNodeContainerEditPart selectedContainer = (DNodeContainerEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedContainer.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DNodeContainer) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ Assert.assertNotNull("The UML model must still contain the semantic element after undo", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must contain view after destruction of the class after undo", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(VIEW_TO_DELETE_ELEMENT_NAME));
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_DurationObservation_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_DurationObservation_DeleteViewTest.java
new file mode 100755
index 0000000..e50dd8f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_DurationObservation_DeleteViewTest.java
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerEditPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Class from diagram test
+ */
+@PluginResource("resources/delete/nodes/durationObservation/TopNode_DurationObservation_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_DurationObservation_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "DurationObservationToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_DurationObservation_ClassDiagram";
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_DurationObservation_View() {
+
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement element = rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull(element);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainerSpec);
+ Assert.assertEquals("The found view doesn't represent the element to destroy", element, ((DNodeContainerSpec) siriusNewRepresentation).getTarget());
+
+ EditPart toSelect = null;
+ final List<?> childEP = fixture.getActiveDiagram().getChildren();
+ final Iterator<?> iter = childEP.iterator();
+ while (iter.hasNext() && toSelect == null) {
+ final Object current = iter.next();
+ if (current instanceof EditPart) {
+ final Object model = ((EditPart) current).getModel();
+ siriusNewRepresentation = ((View) model).getElement();
+ if (model instanceof View && ((DNodeContainerSpec) siriusNewRepresentation).getTarget() == rootModel.getMember(ELEMENT_TO_DESTROY_NAME)) {
+ toSelect = (EditPart) current;
+ break;
+ }
+ }
+ }
+
+ Assert.assertNotNull("We don't found the Editpart to select", toSelect);
+ fixture.getActiveDiagramEditor().getSite().getSelectionProvider().setSelection(new StructuredSelection(toSelect));
+ fixture.flushDisplayEvents();
+
+ StructuredSelection selecetdElement = (StructuredSelection) fixture.getActiveDiagramEditor().getSite().getSelectionProvider().getSelection();
+ DNodeContainerEditPart selectedContainer = (DNodeContainerEditPart) selecetdElement.getFirstElement();
+ EObject elemToDelete = ((View) selectedContainer.getModel()).getElement();
+ fixture.applyGraphicalDeletionTool((DNodeContainerSpec) elemToDelete);
+ fixture.flushDisplayEvents();
+
+ // the semantic element has not been destroyed
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ // the view element has been destroyed
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the graphical element has been reset
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain view after destruction of the class after undo", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertNotNull("The UML model must still contain the semantic element", rootModel.getMember(ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must not contain the view after delete from diagram", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_PackageWithSubNodes_DeleteViewTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_PackageWithSubNodes_DeleteViewTest.java
new file mode 100755
index 0000000..367aeb4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/delete/view/nodes/TopNode_PackageWithSubNodes_DeleteViewTest.java
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.delete.view.nodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.internal.impl.PackageImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Delete Package element and it's sub nodes from diagram test
+ */
+@PluginResource("resources/delete/nodes/package/TopNode_PackageWithSubNodes_DeleteSemanticTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TopNode_PackageWithSubNodes_DeleteViewTest extends AbstractPapyrusTest {
+
+ private static final String ELEMENT_TO_DESTROY_NAME = "PackageToDelete";
+
+ private static final String SUB_ELEMENT_TO_DESTROY_NAME = "InterfaceToDelete";
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Package_Delete_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Delete_Package_View() {
+ // setup
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ PackageImpl packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("We can't find the element to destroy", packageElement);
+ Assert.assertNotNull("The UML model must not contain the destroyed sub element", packageElement.getPackagedElement(SUB_ELEMENT_TO_DESTROY_NAME));
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram classDiagram = diagramEditpart.getDiagramView();
+ Assert.assertNotNull("We can't find the class diagram", classDiagram);
+
+ Assert.assertEquals("The diagram must contains one element", 1, classDiagram.getChildren().size());
+ Object elementToBeDeleted = classDiagram.getChildren().get(0);
+ Assert.assertTrue(elementToBeDeleted instanceof View);
+ EObject siriusNewRepresentation = ((View) elementToBeDeleted).getElement();
+ Assert.assertTrue(siriusNewRepresentation instanceof DNodeContainer);
+ Assert.assertEquals("The found view doesn't represent the element to destroy", packageElement, ((DNodeContainer) siriusNewRepresentation).getTarget());
+
+ fixture.applyGraphicalDeletionTool((DNodeContainer) siriusNewRepresentation);
+ fixture.flushDisplayEvents();
+
+ // the semantic elements has not been destroyed
+ packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("The UML model must not contain the destroyed element", packageElement);
+ Assert.assertNotNull("The UML model must not contain the destroyed sub element", packageElement.getPackagedElement(SUB_ELEMENT_TO_DESTROY_NAME));
+
+ // the view has been destroyed in the diagram
+ Assert.assertEquals("The class diagram must not contain view after destruction of the class", 0, classDiagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ // the semantic and the view elements have been reset
+ packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("The UML model must contain the destroyed element after undo", packageElement);
+ Assert.assertNotNull("The UML model must not contain the destroyed sub element", packageElement.getPackagedElement(SUB_ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must contain view after destruction of the class after undo", 1, classDiagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ packageElement = (PackageImpl) rootModel.getMember(ELEMENT_TO_DESTROY_NAME);
+ Assert.assertNotNull("The UML model must contain the destroyed element after undo", packageElement);
+ Assert.assertNotNull("The UML model must not contain the destroyed sub element", packageElement.getPackagedElement(SUB_ELEMENT_TO_DESTROY_NAME));
+ Assert.assertEquals("The class diagram must not contain view after destruction of the class", 0, classDiagram.getChildren().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/AbstractDiagramCreationTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/AbstractDiagramCreationTests.java
new file mode 100755
index 0000000..ddb2f21
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/AbstractDiagramCreationTests.java
@@ -0,0 +1,225 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.diagram;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+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.helper.DiagramPrototype;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle;
+import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage;
+import org.eclipse.papyrus.infra.siriusdiag.ui.internal.sessions.SiriusConstants;
+import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+
+/**
+ * Adapted from Model2Doc tests, class AbstractDocumentTemplateCreationTest
+ */
+@SuppressWarnings("nls")
+public abstract class AbstractDiagramCreationTests extends AbstractPapyrusTest {
+
+ /**
+ * The editor fixture
+ */
+ @Rule
+ public final PapyrusEditorFixture fixture = new PapyrusEditorFixture();
+
+ @Before
+ public void setUp() {
+ // TODO find a nice Papyrus way to check there no diagram available in the initial model
+ }
+
+ /**
+ *
+ * @return
+ * the *.aird resource associated to the current model
+ */
+ protected final Resource getAIRDResourceForCurrentModel() {// TODO rename me as getAIRDResourceForCurrentModel for Sirius
+ for (final Resource current : this.fixture.getResourceSet().getResources()) {
+ if (SiriusConstants.SIRIUS_DIAGRAM_MODEL_FILE_EXTENSION.equals(current.getURI().fileExtension())) {
+ if (this.fixture.getModelResourceURI().trimFileExtension().equals(current.getURI().trimFileExtension())) {
+ return current;
+ }
+ }
+ }
+ return null;
+ }
+ //
+ // /**
+ // *
+ // * @param context
+ // * a semantic element
+ // * @return
+ // * the {@link PapyrusDocumentPrototype} found for this context
+ // */
+ // protected Collection<PapyrusDocumentPrototype> getCreatablePapyrusDocumentPrototype(final EObject context) {
+ // Collection<PapyrusDocumentPrototype> data = new ArrayList<>();
+ //
+ // for (final ViewPrototype proto : PolicyChecker.getFor(context).getPrototypesFor(context)) {
+ // if (!(proto.getRepresentationKind() instanceof PapyrusDocumentPrototype)) {
+ // continue;
+ // }
+ // data.add((PapyrusDocumentPrototype) proto.getRepresentationKind());
+ // }
+ // return data;
+ // }
+
+ /**
+ *
+ * @param context
+ * a semantic element
+ * @return
+ * the {@link PapyrusDocumentPrototype} found for this context
+ */
+ protected Collection<DiagramPrototype> getCreatableDiagramPrototype(final EObject context) {
+ final Collection<DiagramPrototype> viewPrototype = new ArrayList<>();
+ for (final ViewPrototype proto : PolicyChecker.getFor(context).getPrototypesFor(context)) {
+ if (proto instanceof DiagramPrototype) {
+ viewPrototype.add((DiagramPrototype) proto);
+ }
+ }
+ return viewPrototype;
+ }
+
+ // /**
+ // *
+ // * @param context
+ // * a semantic element
+ // * @return
+ // * the collection of {@link DocumentTemplatePrototype} found for this context
+ // */
+ // protected Collection<DocumentTemplatePrototype> getCreatableDocumentTemplatePrototype(final EObject context) {
+ // Collection<DocumentTemplatePrototype> data = new ArrayList<>();
+ // for (final PapyrusDocumentPrototype proto : getCreatablePapyrusDocumentPrototype(context)) {
+ // data.add(proto.getDocumentTemplatePrototype());
+ // }
+ // return data;
+ // }
+ //
+ /**
+ *
+ * @param context
+ * a semantic element
+ * @param type
+ * the type of the wanted {@link DiagramPrototype}
+ * @return
+ * the {@link DiagramPrototype} or <code>null</code> if not found
+ */
+ protected final DiagramPrototype getDiagramPrototype(final EObject context, final String type) {
+ for (final DiagramPrototype current : getCreatableDiagramPrototype(context)) {
+ String toto = current.getImplementation();
+ if (current.getRepresentationKind() instanceof PapyrusDiagram) {
+ final PapyrusDiagram pdp = current.getRepresentationKind();
+ if (type.equals(((PapyrusRepresentationKind) pdp).getId())) {
+ return current;
+ }
+
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param kindId
+ * the kindId of the diagram to create
+ * @throws Exception
+ */
+ protected void checkDocumentCreation(final String kindID, final String type) throws Exception {
+
+ // 1. we look for the view prototype required to create the document
+ final DiagramPrototype docProto = getDiagramPrototype(this.fixture.getRoot(), kindID);
+ Assert.assertNotNull("The DiagramPrototype to create a diagram of type " + kindID + " is not found.", docProto);
+
+ // 2. check if the aird resource exists in the ModelSet
+ // final Resource pdstResource = getPDSTResourceForCurrentModel();
+ // Assert.assertNotNull("The pdst resource is not in the ModelSet.", pdstResource);
+
+ // 3. check pdst resource is empty
+ // Assert.assertEquals("The pdst resource is not empty", 0, pdstResource.getContents().size());
+
+ // 4. check the pdst file is not created
+ // boolean pdstFileExists = pdstResource.getResourceSet().getURIConverter().exists(pdstResource.getURI(), null);
+ // Assert.assertFalse("The pdst file exists, but it should not, because it is empty and nothing has already been stored inside it.", pdstFileExists);
+
+ // 5. get the creation command
+ final String cmdClassName = docProto.getRepresentationKind().getCreationCommandClass();
+ Assert.assertNotNull("The creation command to create the diagram of type " + kindID + " is not registered", cmdClassName);
+ Class<?> cmdClass = ClassLoaderHelper.loadClass(cmdClassName);
+ Object newClass = null;
+ try {
+ newClass = cmdClass.getDeclaredConstructor(new Class<?>[0]).newInstance(new Object[0]);
+ } catch (InstantiationException | IllegalAccessException e) {
+ throw e; // we propagate the exception
+ }
+
+ Assert.assertTrue(newClass instanceof AbstractPapyrusGmfCreateDiagramCommandHandler); // TODO maybe a better way for sirius that looks like to Papyrus-Model2doc
+ final AbstractPapyrusGmfCreateDiagramCommandHandler createEditorCommand = (AbstractPapyrusGmfCreateDiagramCommandHandler) newClass;
+
+ // 6. create a new document template
+ // TODO : several method are probably available
+
+ Diagram result = createEditorCommand.createDiagram(this.fixture.getModelSet(), this.fixture.getRoot(), this.fixture.getRoot(), docProto, "niceDocumentTemplate", true);
+ // TODO here result==null, it is strange
+
+ Assert.assertNotNull("The creation of diagram kind " + kindID + " failed", result);
+ fixture.flushDisplayEvents();
+ Diagram diagram = fixture.getActiveDiagram().getDiagramView();
+ Assert.assertEquals(result, diagram);// must always be true
+ final PapyrusDiagramStyle diagramStyle = (PapyrusDiagramStyle) diagram.getStyle(StylePackage.eINSTANCE.getPapyrusDiagramStyle());
+ Assert.assertEquals("The created diagram has not the expected kindID", kindID, diagramStyle.getDiagramKindId());
+ Assert.assertEquals("The created diagram has not the expected type", type, diagram.getType());
+
+ // TODO to be continued with undo and redo
+
+ // Assert.assertEquals("The pdst file doesn't contains the expected number of element.", 1, pdstResource.getContents().size());
+ // final EObject pdstContents = pdstResource.getContents().get(0);
+ // Assert.assertTrue(pdstContents instanceof TextDocumentTemplate);
+ //
+ // this.fixture.save();
+ // // 7. check the pdst file is now created
+ // pdstFileExists = pdstResource.getResourceSet().getURIConverter().exists(pdstResource.getURI(), null);
+ // Assert.assertTrue("The pdst file doesn't exists, but it should exist, because it contains a DocumentTemplate", pdstFileExists);
+ //
+ // // 8. check Undo/Redo
+ // final CommandStack stack = this.fixture.getEditingDomain().getCommandStack();
+ // stack.undo();
+ // this.fixture.save();
+ //
+ // // 8.1 the pdst file must continue to exists but it must be empty
+ // pdstFileExists = pdstResource.getResourceSet().getURIConverter().exists(pdstResource.getURI(), null);
+ // Assert.assertTrue("The pdst file doesn't exists, but it must exist even after a undoing the creation", pdstFileExists);
+ // Assert.assertEquals("The pdst file doesn't contains the expected number of element after undoing the creation.", 0, pdstResource.getContents().size());
+ //
+ // stack.redo();
+ // this.fixture.save();
+ //
+ // // 8.2 the pdst file must continue to exists but it must not be empty
+ // pdstFileExists = pdstResource.getResourceSet().getURIConverter().exists(pdstResource.getURI(), null);
+ // Assert.assertTrue("The pdst file doesn't exists, but it must exist after redoing the creation", pdstFileExists);
+ // Assert.assertEquals("The pdst file must contains the expected number of element after redoing the creation.", 1, pdstResource.getContents().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/CreateDiagramTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/CreateDiagramTest.java
new file mode 100755
index 0000000..becec44
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/CreateDiagramTest.java
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.diagram;
+
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.junit.Test;
+
+@PluginResource("resources/createDiagram/createDiagram.di")
+@SuppressWarnings("nls")
+public class CreateDiagramTest extends AbstractDiagramCreationTests {
+
+ String IMPLEMENTATION_ID = "PapyrusUMLClassDiagram";
+ String ID = "org.eclipse.papyrus.uml.siriusdiag.class";
+
+ @Test
+ public void createClassDiagramTest() throws Exception {
+ checkDocumentCreation(ID, IMPLEMENTATION_ID);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/DeleteDiagramTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/DeleteDiagramTest.java
new file mode 100755
index 0000000..7813699
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/diagram/DeleteDiagramTest.java
@@ -0,0 +1,21 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.diagram;
+
+/**
+ *
+ */
+public class DeleteDiagramTest {
+ // to be done
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_ClassToPackage_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_ClassToPackage_DropTest.java
new file mode 100755
index 0000000..884b048
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_ClassToPackage_DropTest.java
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.internal.impl.PackageImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/drop/subNode/classToPackage/SubNode_ClassToPackage_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class SubNode_ClassToPackage_DropTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_ClassToPackage_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createClassSubNodeTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+
+ Object packageElement = diagram.getChildren().get(0);
+ DNodeContainerSpec container = (DNodeContainerSpec) ((View) packageElement).getElement();
+ NamedElement elementToBeDropped = ((PackageImpl) container.getTarget()).getPackagedElement("ClassToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Class", elementToBeDropped instanceof org.eclipse.uml2.uml.Class);
+
+ Assert.assertEquals("The diagram must contain the parent Package elment", 1, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Class from Model", container, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ packageElement = diagram.getChildren().get(0);
+ EObject packageRepresentation = ((View) packageElement).getElement();
+ EList<DDiagramElement> packageSubNodes = ((DNodeContainerSpec) packageRepresentation).getOwnedDiagramElements();
+ Assert.assertEquals("The diagram children size does not change on droping a sub node", 1, diagram.getChildren().size());
+ EObject siriusNewRepresentation = packageSubNodes.get(0);
+ Assert.assertEquals("The package element contains one additional element", 1, packageSubNodes.size());
+ Assert.assertTrue("The dropped sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The dropped element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The package element does not contain any element", 0, packageSubNodes.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram children size does not change on dropping a sub node", 1, diagram.getChildren().size());
+ siriusNewRepresentation = ((DNodeContainerSpec) packageRepresentation).getOwnedDiagramElements().get(0);
+ Assert.assertEquals("The package element contains one additional element", 1, packageSubNodes.size());
+ Assert.assertTrue("The dropped sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The dropped element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_OperationToClass_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_OperationToClass_DropTest.java
new file mode 100755
index 0000000..a469ee7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_OperationToClass_DropTest.java
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListElementSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.di")
+@SuppressWarnings({ "nls", "restriction" })
+@RunWith(ClassificationRunner.class)
+public class SubNode_OperationToClass_DropTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_PropertyOperationToClass_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createOperationSubNodeTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+
+ Object classElement = diagram.getChildren().get(0);
+ DNodeContainerSpec classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ DNodeListSpec operationContainer = (DNodeListSpec) classRepresentation.getOwnedDiagramElements().get(0);
+ NamedElement elementToBeDropped = ((ClassImpl) classRepresentation.getTarget()).getOwnedOperations().get(0);
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Attributes or Operations from Model", operationContainer, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ classElement = diagram.getChildren().get(0);
+ classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ DNodeListSpec element = (DNodeListSpec) classRepresentation.getOwnedDiagramElements().get(1);
+ Object siriusNewRepresentation = element.getOwnedElements().get(0);
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ EObject semanticElement = ((DNodeListElementSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Operation", semanticElement instanceof org.eclipse.uml2.uml.Operation);
+ ClassImpl classElem = (ClassImpl) classRepresentation.getTarget();
+ Assert.assertEquals("The Class must contains one additional Operation after the creation", 1, classElem.getOwnedOperations().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The class must have no attribut after undoing the Drop action", 0, element.getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram children size does not change on dropping a sub node", 1, classElem.getOwnedOperations().size());
+ siriusNewRepresentation = element.getOwnedElements().get(0);
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ semanticElement = ((DNodeListElementSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Operation", semanticElement instanceof org.eclipse.uml2.uml.Operation);
+ classElem = (ClassImpl) classRepresentation.getTarget();
+ Assert.assertEquals("The Class must contains one additional Attribut after the Drop action", 1, classElem.getOwnedOperations().size());
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_PackageToModel_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_PackageToModel_DropTest.java
new file mode 100755
index 0000000..42ec817
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_PackageToModel_DropTest.java
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.internal.impl.ModelImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/drop/subNode/packageToModel/SubNode_PackageToModel_DropTest.di")
+@SuppressWarnings({ "nls", "restriction" })
+@RunWith(ClassificationRunner.class)
+public class SubNode_PackageToModel_DropTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_PackageToModel_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPackageSubNodeTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+
+ Object modelElement = diagram.getChildren().get(0);
+ DNodeContainerSpec container = (DNodeContainerSpec) ((View) modelElement).getElement();
+ NamedElement elementToBeDropped = ((ModelImpl) container.getTarget()).getPackagedElement("PackageToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Package", elementToBeDropped instanceof org.eclipse.uml2.uml.Package);
+
+ Assert.assertEquals("The diagram must contain the parent Model elment", 1, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Package from Model", container, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ modelElement = diagram.getChildren().get(0);
+ EObject modelRepresentation = ((View) modelElement).getElement();
+ EList<DDiagramElement> packageSubNodes = ((DNodeContainerSpec) modelRepresentation).getOwnedDiagramElements();
+ Assert.assertEquals("The diagram children size does not change on droping a sub node", 1, diagram.getChildren().size());
+ EObject siriusNewRepresentation = packageSubNodes.get(0);
+ Assert.assertEquals("The package element contains one additional element", 1, packageSubNodes.size());
+ Assert.assertTrue("The dropped sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The dropped element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The package element does not contain any element", 0, packageSubNodes.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram children size does not change on dropping a sub node", 1, diagram.getChildren().size());
+ siriusNewRepresentation = ((DNodeContainerSpec) modelRepresentation).getOwnedDiagramElements().get(0);
+ Assert.assertEquals("The package element contains one additional element", 1, packageSubNodes.size());
+ Assert.assertTrue("The dropped sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The dropped element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_PropertyToClass_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_PropertyToClass_DropTest.java
new file mode 100755
index 0000000..4e761af
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/subNodes/SubNode_PropertyToClass_DropTest.java
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.subNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListElementSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeListSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.internal.impl.ClassImpl;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/drop/subNode/propertyOperationToClass/SubNode_PropertyOperationToClass_DropTest.di")
+@SuppressWarnings({ "nls", "restriction" })
+@RunWith(ClassificationRunner.class)
+public class SubNode_PropertyToClass_DropTest extends AbstractPapyrusTest {
+
+ private static final String DIAGRAM_NAME = "SubNode_PropertyOperationToClass_ClassDiagram";
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createPropertySubNodeTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+
+ Object classElement = diagram.getChildren().get(0);
+ DNodeContainerSpec classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ DNodeListSpec propertyContainer = (DNodeListSpec) classRepresentation.getOwnedDiagramElements().get(1);
+ NamedElement elementToBeDropped = ((ClassImpl) classRepresentation.getTarget()).getOwnedAttributes().get(0);
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Attributes or Operations from Model", propertyContainer, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ classElement = diagram.getChildren().get(0);
+ classRepresentation = (DNodeContainerSpec) ((View) classElement).getElement();
+ DNodeListSpec element = (DNodeListSpec) classRepresentation.getOwnedDiagramElements().get(0);
+ Object siriusNewRepresentation = element.getOwnedElements().get(0);
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ EObject semanticElement = ((DNodeListElementSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Property", semanticElement instanceof org.eclipse.uml2.uml.Property);
+ ClassImpl classElem = (ClassImpl) classRepresentation.getTarget();
+ Assert.assertEquals("The Class must contains one additional Attribut after the creation", 1, classElem.getOwnedAttributes().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The class must have no attribut after undoing the Drop action", 0, element.getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram children size does not change on dropping a sub node", 1, classElem.getOwnedAttributes().size());
+ siriusNewRepresentation = element.getOwnedElements().get(0);
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeListElementSpec);
+ semanticElement = ((DNodeListElementSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Property", semanticElement instanceof org.eclipse.uml2.uml.Property);
+ classElem = (ClassImpl) classRepresentation.getTarget();
+ Assert.assertEquals("The Class must contains one additional Attribut after the Drop action", 1, classElem.getOwnedAttributes().size());
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Class_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Class_TopNode_DropTest.java
new file mode 100755
index 0000000..4d5854b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Class_TopNode_DropTest.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Class_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Class_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("ClassToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Class", elementToBeDropped instanceof org.eclipse.uml2.uml.Class);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Class from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Class", semanticElement instanceof org.eclipse.uml2.uml.Class);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Comment_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Comment_TopNode_DropTest.java
new file mode 100755
index 0000000..11be5e0
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Comment_TopNode_DropTest.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Comment_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Comment_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ EObject elementToBeDropped = rootModel.getOwnedComments().get(0);
+ Assert.assertTrue("The element to be dropped is an instance of UML Comment", elementToBeDropped instanceof org.eclipse.uml2.uml.Comment);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Comment from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Comment);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Component_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Component_TopNode_DropTest.java
new file mode 100755
index 0000000..39571f4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Component_TopNode_DropTest.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Component_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Component_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("ComponentToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Component", elementToBeDropped instanceof org.eclipse.uml2.uml.Component);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Class from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Component", semanticElement instanceof org.eclipse.uml2.uml.Component);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Constraint_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Constraint_TopNode_DropTest.java
new file mode 100755
index 0000000..385d62e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Constraint_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Constraint_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Constraint_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("ConstraintToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Constraint", elementToBeDropped instanceof org.eclipse.uml2.uml.Constraint);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Constraint from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Constraint", semanticElement instanceof org.eclipse.uml2.uml.Constraint);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/DataType_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/DataType_TopNode_DropTest.java
new file mode 100755
index 0000000..318365c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/DataType_TopNode_DropTest.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class DataType_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void DataType_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("DataTypeToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML DataType", elementToBeDropped instanceof org.eclipse.uml2.uml.DataType);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Class DataType from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DataType", semanticElement instanceof org.eclipse.uml2.uml.DataType);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/DurationObservation_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/DurationObservation_TopNode_DropTest.java
new file mode 100755
index 0000000..e41d0b3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/DurationObservation_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class DurationObservation_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void DurationObservation_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("DurationObservationToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML DurationObservation", elementToBeDropped instanceof org.eclipse.uml2.uml.DurationObservation);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Observation from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DurationObservation", semanticElement instanceof org.eclipse.uml2.uml.DurationObservation);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Enumeration_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Enumeration_TopNode_DropTest.java
new file mode 100755
index 0000000..25c415e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Enumeration_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Enumeration_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Enumeration_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("EnumerationToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML PrimitiveType", elementToBeDropped instanceof org.eclipse.uml2.uml.Enumeration);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Class Enumeration from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Enumeration", semanticElement instanceof org.eclipse.uml2.uml.Enumeration);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/InformationItem_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/InformationItem_TopNode_DropTest.java
new file mode 100755
index 0000000..383711d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/InformationItem_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class InformationItem_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void InformationItem_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("InformationItemToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML InformationItem", elementToBeDropped instanceof org.eclipse.uml2.uml.InformationItem);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "InformationItem from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InformationItem", semanticElement instanceof org.eclipse.uml2.uml.InformationItem);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/InstanceSpecification_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/InstanceSpecification_TopNode_DropTest.java
new file mode 100755
index 0000000..7fae1f4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/InstanceSpecification_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class InstanceSpecification_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void InstanceSpecification_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("InstanceSpecificationToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML InstanceSpecification", elementToBeDropped instanceof org.eclipse.uml2.uml.InstanceSpecification);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "InstanceSpecification from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML InstanceSpecification", semanticElement instanceof org.eclipse.uml2.uml.InstanceSpecification);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Interface_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Interface_TopNode_DropTest.java
new file mode 100755
index 0000000..0ef243a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Interface_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Interface_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Interface_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("InterfaceToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Interface", elementToBeDropped instanceof org.eclipse.uml2.uml.Interface);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Interface from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Interface", semanticElement instanceof org.eclipse.uml2.uml.Interface);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Model_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Model_TopNode_DropTest.java
new file mode 100755
index 0000000..164d8ec
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Model_TopNode_DropTest.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Model_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Model_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("ModelToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Model", elementToBeDropped instanceof org.eclipse.uml2.uml.Model);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Model from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Model", semanticElement instanceof org.eclipse.uml2.uml.Model);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Package_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Package_TopNode_DropTest.java
new file mode 100755
index 0000000..fc51290
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Package_TopNode_DropTest.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Package_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Package_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("PackageToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Package", elementToBeDropped instanceof org.eclipse.uml2.uml.Package);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Package from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Package", semanticElement instanceof org.eclipse.uml2.uml.Package);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/PrimitiveType_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/PrimitiveType_TopNode_DropTest.java
new file mode 100755
index 0000000..5fef618
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/PrimitiveType_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class PrimitiveType_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void PrimitiveType_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("PrimitiveTypeToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML PrimitiveType", elementToBeDropped instanceof org.eclipse.uml2.uml.PrimitiveType);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Class PrimitiveType from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML PrimitiveType", semanticElement instanceof org.eclipse.uml2.uml.PrimitiveType);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Signal_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Signal_TopNode_DropTest.java
new file mode 100755
index 0000000..bc6ee8c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/Signal_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeList;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class Signal_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void Signal_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("SignalToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML Signal", elementToBeDropped instanceof org.eclipse.uml2.uml.Signal);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Signal from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNodeList", siriusNewRepresentation instanceof DNodeList);
+ EObject semanticElement = ((DNodeList) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Signal", semanticElement instanceof org.eclipse.uml2.uml.Signal);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/TimeObservation_TopNode_DropTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/TimeObservation_TopNode_DropTest.java
new file mode 100755
index 0000000..441b52f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.clazz.tests/src/org/eclipse/papyrus/uml/siriusdiag/clazz/tests/drop/topNodes/TimeObservation_TopNode_DropTest.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.clazz.tests.drop.topNodes;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationRunner;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Drop Class test
+ */
+@PluginResource("resources/drop/topNode/TopNode_DropTest.di")
+@SuppressWarnings("nls")
+@RunWith(ClassificationRunner.class)
+public class TimeObservation_TopNode_DropTest extends AbstractPapyrusTest {
+
+ private static final String CLASS_DIAGRAM_NAME = "TopNode_Drop_ClassDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture(/* Collections.singletonList("aird") */);
+
+ @SuppressWarnings("restriction")
+ @Test
+ @ActiveDiagram(CLASS_DIAGRAM_NAME)
+ public void TimeObservation_DropTest() {
+
+ Assert.assertTrue(fixture.getModel() instanceof Model);
+ Model rootModel = (Model) fixture.getModel();
+ NamedElement elementToBeDropped = rootModel.getMember("TimeObservationToDrop");
+ Assert.assertTrue("The element to be dropped is an instance of UML TimeObservation", elementToBeDropped instanceof org.eclipse.uml2.uml.TimeObservation);
+
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must not yet have children", 0, diagram.getChildren().size());
+
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyContainerDropDescriptionTool(diagramRespresentation, "Observation from Model", diagramRespresentation, elementToBeDropped);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must have one child after the Drop action", 1, diagram.getChildren().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any children after undoing the Drop action", 0, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one child after redoing the Drop action", 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainer);
+ EObject semanticElement = ((DNodeContainer) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML TimeObservation", semanticElement instanceof org.eclipse.uml2.uml.TimeObservation);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.classpath b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.classpath
new file mode 100755
index 0000000..a42a828
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.classpath
@@ -0,0 +1,11 @@
+<?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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.project b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.project
new file mode 100755
index 0000000..310dc33
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.siriusdiag.sequence.tests</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c9545f0
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..7b670b1
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,44 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sirius diagram Sequence Tests
+Bundle-SymbolicName: org.eclipse.papyrus.uml.siriusdiag.sequence.tests
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.uml.siriusdiag.sequence.tests
+Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.junit;bundle-version="[4.13.0,5.0.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.gmf.runtime.notation;bundle-version="[1.10.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.architecture.representation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.architecture;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[4.1.0,5.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.sirius.sequence.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.modelexplorer;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.properties;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.representation.edit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.sirius;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.siriusdiag.ui;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.sirius.common.diagram;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.sirius.diagram.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.siriusdiag.junit.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.sirius.diagram.sequence;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.ext.base;bundle-version="[6.4.2,7.0.0)",
+ com.google.guava;bundle-version="[30.1.0,31.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.papyrus.junit.utils.rules
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/build.properties b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/build.properties
new file mode 100755
index 0000000..0b3369d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+ resource/
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/pom.xml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/pom.xml
new file mode 100755
index 0000000..455939b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.sequence.tests</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.aird
new file mode 100755
index 0000000..33569d3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.aird
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description">
+ <viewpoint:DAnalysis uid="_y--EoEidEeyfd_ylVWYGzQ" selectedViews="_zCZMEEidEeyfd_ylVWYGzQ _zCy0sEidEeyfd_ylVWYGzQ _zDMdUEidEeyfd_ylVWYGzQ" version="14.3.1.202003261200">
+ <semanticResources>SequenceDiagramTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_zCZMEEidEeyfd_ylVWYGzQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_zCy0sEidEeyfd_ylVWYGzQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_zE0N8EidEeyfd_ylVWYGzQ" name="SequenceDiagram0" repPath="#_zEdooEidEeyfd_ylVWYGzQ" changeId="32560d6b-cc15-4c52-aa97-d967713b7afe">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="SequenceDiagramTest.uml#_y-06sEidEeyfd_ylVWYGzQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_zDMdUEidEeyfd_ylVWYGzQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_zEdooEidEeyfd_ylVWYGzQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_zH-PoEidEeyfd_ylVWYGzQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zH-PoUidEeyfd_ylVWYGzQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_zF2vwEidEeyfd_ylVWYGzQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_zF2vwUidEeyfd_ylVWYGzQ" type="Sirius" element="_zEdooEidEeyfd_ylVWYGzQ" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_zF2vwkidEeyfd_ylVWYGzQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_zHknAEidEeyfd_ylVWYGzQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_zHknAUidEeyfd_ylVWYGzQ"/>
+ </ownedAnnotationEntries>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_zEnZoEidEeyfd_ylVWYGzQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="SequenceDiagramTest.uml#_y-06sEidEeyfd_ylVWYGzQ"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.uml
new file mode 100755
index 0000000..2daf5ff
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/SequenceDiagramTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_TvfPYCanEeyyjbsFhgAvSg" name="SequenceDiagramTest">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_T3_rICanEeyyjbsFhgAvSg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_zzxrQCanEey6bs8WuzH1wg" name="Interaction"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.aird
new file mode 100755
index 0000000..e2997fd
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.aird
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_zVY2YEjmEey2BPmueOZmaQ" selectedViews="_zWb_QEjmEey2BPmueOZmaQ _zYRLQEjmEey2BPmueOZmaQ _zYqM0EjmEey2BPmueOZmaQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_ActionExecution_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_zWb_QEjmEey2BPmueOZmaQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_zYRLQEjmEey2BPmueOZmaQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_zYqM0EjmEey2BPmueOZmaQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_zY-88EjmEey2BPmueOZmaQ" name="TopNode_ActionExecution_SequenceDiagram" repPath="#_zY75oEjmEey2BPmueOZmaQ" changeId="ec703770-b0d3-455e-b5dd-abf1434f2a22">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_ActionExecution_CreationTest.uml#_7OKX8CwzEeyTVI5mBZYAsQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_zY75oEjmEey2BPmueOZmaQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_zbQN0EjmEey2BPmueOZmaQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zbQN0UjmEey2BPmueOZmaQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_zZLKMEjmEey2BPmueOZmaQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_zZLKMUjmEey2BPmueOZmaQ" type="Sirius" element="_zY75oEjmEey2BPmueOZmaQ" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_zbEnokjmEey2BPmueOZmaQ" type="2001" element="_zbA9QEjmEey2BPmueOZmaQ">
+ <children xmi:type="notation:Node" xmi:id="_zbF1wEjmEey2BPmueOZmaQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zbF1wUjmEey2BPmueOZmaQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_zbGc0EjmEey2BPmueOZmaQ" type="3001" element="_zbBkUkjmEey2BPmueOZmaQ">
+ <children xmi:type="notation:Node" xmi:id="_zbHD4EjmEey2BPmueOZmaQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_zbHD4UjmEey2BPmueOZmaQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_zbKuQEjmEey2BPmueOZmaQ" type="3003" element="_zbBkU0jmEey2BPmueOZmaQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_zbKuQUjmEey2BPmueOZmaQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zbKuQkjmEey2BPmueOZmaQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_zbGc0UjmEey2BPmueOZmaQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zbGc0kjmEey2BPmueOZmaQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_zbKHMEjmEey2BPmueOZmaQ" type="3003" element="_zbBkUEjmEey2BPmueOZmaQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_zbKHMUjmEey2BPmueOZmaQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zbKHMkjmEey2BPmueOZmaQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_zbEno0jmEey2BPmueOZmaQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zbEnpEjmEey2BPmueOZmaQ" x="50" y="50" width="100" height="40"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_zZLKMkjmEey2BPmueOZmaQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_zbEnoEjmEey2BPmueOZmaQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_zbEnoUjmEey2BPmueOZmaQ"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_zbA9QEjmEey2BPmueOZmaQ" name="Lifeline1" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_ActionExecution_CreationTest.uml#_-KfmMCwzEeyTVI5mBZYAsQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_ActionExecution_CreationTest.uml#_-KfmMCwzEeyTVI5mBZYAsQ"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_0P4IsEjmEey2BPmueOZmaQ" x="50" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_zbBkUkjmEey2BPmueOZmaQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_ActionExecution_CreationTest.uml#_-KfmMCwzEeyTVI5mBZYAsQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_ActionExecution_CreationTest.uml#_-KfmMCwzEeyTVI5mBZYAsQ"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_zbBkU0jmEey2BPmueOZmaQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_zbBkUEjmEey2BPmueOZmaQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_zY9HwEjmEey2BPmueOZmaQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_ActionExecution_CreationTest.uml#_7OKX8CwzEeyTVI5mBZYAsQ"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.uml
new file mode 100755
index 0000000..9cd261c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_3cp1MCwzEeyTVI5mBZYAsQ" name="TopNode_ActionExecution_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_7OKX8CwzEeyTVI5mBZYAsQ" name="Interaction">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_-KfmMCwzEeyTVI5mBZYAsQ" name="Lifeline1"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.aird
new file mode 100755
index 0000000..c87dd2e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.aird
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_N0WLoEieEeyfd_ylVWYGzQ" selectedViews="_N0xCYEieEeyfd_ylVWYGzQ _N1FygEieEeyfd_ylVWYGzQ _N1YtcEieEeyfd_ylVWYGzQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_N0xCYEieEeyfd_ylVWYGzQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_N1FygEieEeyfd_ylVWYGzQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_N2WWwEieEeyfd_ylVWYGzQ" name="TopNode_Creation_SequenceDiagram" repPath="#_N2VIoEieEeyfd_ylVWYGzQ" changeId="a0b46324-2ed7-40e5-bcab-9419c69abddf">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_-O3VYCweEeyLSO2caXKSPA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_N1YtcEieEeyfd_ylVWYGzQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_N2VIoEieEeyfd_ylVWYGzQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_N6f28EieEeyfd_ylVWYGzQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_N6f28UieEeyfd_ylVWYGzQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_N2YL8EieEeyfd_ylVWYGzQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_N2YL8UieEeyfd_ylVWYGzQ" type="Sirius" element="_N2VIoEieEeyfd_ylVWYGzQ" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_N3ipkEieEeyfd_ylVWYGzQ" type="2001" element="_N3dKAEieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N3jQoEieEeyfd_ylVWYGzQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N3jQoUieEeyfd_ylVWYGzQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6X7IEieEeyfd_ylVWYGzQ" type="3001" element="_N3eYIkieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N6X7I0ieEeyfd_ylVWYGzQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N6X7JEieEeyfd_ylVWYGzQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6YiM0ieEeyfd_ylVWYGzQ" type="3003" element="_N3eYI0ieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6YiNEieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6YiNUieEeyfd_ylVWYGzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6X7IUieEeyfd_ylVWYGzQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6X7IkieEeyfd_ylVWYGzQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6YiMEieEeyfd_ylVWYGzQ" type="3003" element="_N3dxEEieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6YiMUieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6YiMkieEeyfd_ylVWYGzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N3ipkUieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N3ipkkieEeyfd_ylVWYGzQ" x="50" y="50" width="100" height="40"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N3jQokieEeyfd_ylVWYGzQ" type="2001" element="_N3dxEkieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N3j3sEieEeyfd_ylVWYGzQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N3j3sUieEeyfd_ylVWYGzQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6YiNkieEeyfd_ylVWYGzQ" type="3001" element="_N3e_MEieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N6YiOUieEeyfd_ylVWYGzQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N6YiOkieEeyfd_ylVWYGzQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6ZJQ0ieEeyfd_ylVWYGzQ" type="3003" element="_N3e_MUieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6ZJREieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6ZJRUieEeyfd_ylVWYGzQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6ZJRkieEeyfd_ylVWYGzQ" type="3001" element="_N3e_M0ieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N6ZwUEieEeyfd_ylVWYGzQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N6ZwUUieEeyfd_ylVWYGzQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6aXYEieEeyfd_ylVWYGzQ" type="3003" element="_N3fmQEieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6aXYUieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6aXYkieEeyfd_ylVWYGzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6ZJR0ieEeyfd_ylVWYGzQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6ZJSEieEeyfd_ylVWYGzQ" x="-43" y="30" width="20" height="50"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6YiN0ieEeyfd_ylVWYGzQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6YiOEieEeyfd_ylVWYGzQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6ZJQEieEeyfd_ylVWYGzQ" type="3003" element="_N3eYIEieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6ZJQUieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6ZJQkieEeyfd_ylVWYGzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N3jQo0ieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N3jQpEieEeyfd_ylVWYGzQ" x="180" y="50" width="100" height="40"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N3j3skieEeyfd_ylVWYGzQ" type="2001" element="_N3gNUEieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N3kewEieEeyfd_ylVWYGzQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N3kewUieEeyfd_ylVWYGzQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6a-cEieEeyfd_ylVWYGzQ" type="3005" element="_N3gNUUieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6a-cUieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6a-ckieEeyfd_ylVWYGzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N3j3s0ieEeyfd_ylVWYGzQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N3j3tEieEeyfd_ylVWYGzQ" x="225" y="115" width="10" height="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6U30EieEeyfd_ylVWYGzQ" type="2001" element="_N3gNU0ieEeyfd_ylVWYGzQ">
+ <children xmi:type="notation:Node" xmi:id="_N6U300ieEeyfd_ylVWYGzQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_N6U31EieEeyfd_ylVWYGzQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_N6a-c0ieEeyfd_ylVWYGzQ" type="3005" element="_N3g0YEieEeyfd_ylVWYGzQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6a-dEieEeyfd_ylVWYGzQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6a-dUieEeyfd_ylVWYGzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_N6U30UieEeyfd_ylVWYGzQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N6U30kieEeyfd_ylVWYGzQ" x="225" y="165" width="10" height="10"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_N2YL8kieEeyfd_ylVWYGzQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_N3iCgEieEeyfd_ylVWYGzQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_N3iCgUieEeyfd_ylVWYGzQ"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_N3dKAEieEeyfd_ylVWYGzQ" name="Lifeline1" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_Bo_58CwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_Bo_58CwfEeyLSO2caXKSPA"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_OIvHQUieEeyfd_ylVWYGzQ" x="50" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_N3eYIkieEeyfd_ylVWYGzQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_Bo_58CwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_Bo_58CwfEeyLSO2caXKSPA"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_N3eYI0ieEeyfd_ylVWYGzQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_N3dxEEieEeyfd_ylVWYGzQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_N3dxEkieEeyfd_ylVWYGzQ" name="Lifeline2" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_B-We4CwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_B-We4CwfEeyLSO2caXKSPA"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_OIvHQkieEeyfd_ylVWYGzQ" x="180" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_N3e_MEieEeyfd_ylVWYGzQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_B-We4CwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_B-We4CwfEeyLSO2caXKSPA"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_N3e_M0ieEeyfd_ylVWYGzQ" width="2" height="5" resizeKind="NORTH_SOUTH">
+ <target xmi:type="uml:BehaviorExecutionSpecification" href="TopNode_CreationTest.uml#_ILbFICwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:BehaviorExecutionSpecification" href="TopNode_CreationTest.uml#_ILbFICwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_ILWzsCwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_ILbsMCwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_B-We4CwfEeyLSO2caXKSPA"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_OIvHQEieEeyfd_ylVWYGzQ" x="220" y="120" height="50" width="20"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_N3fmQEieEeyfd_ylVWYGzQ" labelSize="12" showIcon="false" width="2" height="5" color="195,209,213">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_N3e_MUieEeyfd_ylVWYGzQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_N3eYIEieEeyfd_ylVWYGzQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_N3gNUEieEeyfd_ylVWYGzQ" width="1" height="1">
+ <target xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_ILWzsCwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_ILWzsCwfEeyLSO2caXKSPA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_N3gNUUieEeyfd_ylVWYGzQ" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ObservationPointMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_N3gNU0ieEeyfd_ylVWYGzQ" width="1" height="1">
+ <target xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_ILbsMCwfEeyLSO2caXKSPA"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_ILbsMCwfEeyLSO2caXKSPA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_N3g0YEieEeyfd_ylVWYGzQ" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ObservationPointMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_N2VIoUieEeyfd_ylVWYGzQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_-O3VYCweEeyLSO2caXKSPA"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.uml
new file mode 100755
index 0000000..49e159a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/behaviorExecution/TopNode_CreationTest.uml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_6nxS4CweEeyLSO2caXKSPA" name="TopNode_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_-O3VYCweEeyLSO2caXKSPA" name="Interaction">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_Bo_58CwfEeyLSO2caXKSPA" name="Lifeline1"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_B-We4CwfEeyLSO2caXKSPA" name="Lifeline2" coveredBy="_ILWzsCwfEeyLSO2caXKSPA _ILbFICwfEeyLSO2caXKSPA _ILbsMCwfEeyLSO2caXKSPA"/>
+ <fragment xmi:type="uml:ExecutionOccurrenceSpecification" xmi:id="_ILWzsCwfEeyLSO2caXKSPA" name="ExecutionOccurrenceSpecification1start" covered="_B-We4CwfEeyLSO2caXKSPA" execution="_ILbFICwfEeyLSO2caXKSPA"/>
+ <fragment xmi:type="uml:BehaviorExecutionSpecification" xmi:id="_ILbFICwfEeyLSO2caXKSPA" name="BehaviorExecutionSpecification1" covered="_B-We4CwfEeyLSO2caXKSPA" finish="_ILbsMCwfEeyLSO2caXKSPA" start="_ILWzsCwfEeyLSO2caXKSPA"/>
+ <fragment xmi:type="uml:ExecutionOccurrenceSpecification" xmi:id="_ILbsMCwfEeyLSO2caXKSPA" name="ExecutionOccurrenceSpecification2finish" covered="_B-We4CwfEeyLSO2caXKSPA" execution="_ILbFICwfEeyLSO2caXKSPA"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.aird
new file mode 100755
index 0000000..f143f7a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.aird
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_RerdcEigEeyweoovpFuWdQ" selectedViews="_Rp4A0EigEeyweoovpFuWdQ _RrX1oEigEeyweoovpFuWdQ _RrslwEigEeyweoovpFuWdQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_Rp4A0EigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_RrX1oEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_RtiY0EigEeyweoovpFuWdQ" name="TopNode_Creation_SequenceDiagram" repPath="#_RtNosEigEeyweoovpFuWdQ" changeId="cbd1aa1a-5c17-4f31-b19f-23d4dd495aee">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_VJFt8DAbEeydv5Lx234yNQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_RrslwEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_RtNosEigEeyweoovpFuWdQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_Rzyx0EigEeyweoovpFuWdQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RzzY4EigEeyweoovpFuWdQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Rus2cEigEeyweoovpFuWdQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_Rus2cUigEeyweoovpFuWdQ" type="Sirius" element="_RtNosEigEeyweoovpFuWdQ" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_RyfKQEigEeyweoovpFuWdQ" type="2001" element="_RxfEsEigEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_RzDK8EigEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RzDK8UigEeyweoovpFuWdQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_RzXUAEigEeyweoovpFuWdQ" type="3001" element="_RxqD0EigEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_RzX7EEigEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RzX7EUigEeyweoovpFuWdQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Rzf24EigEeyweoovpFuWdQ" type="3003" element="_RxqD0UigEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Rzf24UigEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rzf24kigEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_RzXUAUigEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RzXUAkigEeyweoovpFuWdQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_RzfP0EigEeyweoovpFuWdQ" type="3003" element="_RxmZcEigEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_RzfP0UigEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RzfP0kigEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_RyfKQUigEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RyfKQkigEeyweoovpFuWdQ" x="50" y="50" width="100" height="40"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_RzLt0EigEeyweoovpFuWdQ" type="2002" element="_RxuVQEigEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_RzM78EigEeyweoovpFuWdQ" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_RzWF4EigEeyweoovpFuWdQ" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_Rzgd8EigEeyweoovpFuWdQ" type="3008" element="_RxwxgEigEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_RzhFAEigEeyweoovpFuWdQ" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_RzhsEEigEeyweoovpFuWdQ" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_RzhsEUigEeyweoovpFuWdQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_RzhsEkigEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Rzgd8UigEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rzgd8kigEeyweoovpFuWdQ" y="30" width="100" height="60"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_RzWF4UigEeyweoovpFuWdQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_RzWF4kigEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_RzLt0UigEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RzLt0kigEeyweoovpFuWdQ" x="50" y="120" width="100" height="110"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Rus2ckigEeyweoovpFuWdQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_Rx24IEigEeyweoovpFuWdQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_Rx3fMEigEeyweoovpFuWdQ"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_RxfEsEigEeyweoovpFuWdQ" name="Lifeline1" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_l_EeQDC4Eey8z7cM5j74tw"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_l_EeQDC4Eey8z7cM5j74tw"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_SgdDgUigEeyweoovpFuWdQ" x="50" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_RxqD0EigEeyweoovpFuWdQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_l_EeQDC4Eey8z7cM5j74tw"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_l_EeQDC4Eey8z7cM5j74tw"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_RxqD0UigEeyweoovpFuWdQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_RxmZcEigEeyweoovpFuWdQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_RxuVQEigEeyweoovpFuWdQ" name="seq">
+ <target xmi:type="uml:CombinedFragment" href="TopNode_CreationTest.uml#_m-pE4DC4Eey8z7cM5j74tw"/>
+ <semanticElements xmi:type="uml:CombinedFragment" href="TopNode_CreationTest.uml#_m-pE4DC4Eey8z7cM5j74tw"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_SgcccEigEeyweoovpFuWdQ" x="50" y="120" height="110" width="100"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_RxvjYEigEeyweoovpFuWdQ" labelSize="12" showIcon="false" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:CombinedFragmentMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_RxwxgEigEeyweoovpFuWdQ" name="InteractionOperand1">
+ <target xmi:type="uml:InteractionOperand" href="TopNode_CreationTest.uml#_m-qTAjC4Eey8z7cM5j74tw"/>
+ <semanticElements xmi:type="uml:InteractionOperand" href="TopNode_CreationTest.uml#_m-qTAjC4Eey8z7cM5j74tw"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_SgdDgEigEeyweoovpFuWdQ" x="50" y="150" height="60" width="100"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_RxwxgUigEeyweoovpFuWdQ" labelSize="12" showIcon="false" labelAlignment="LEFT" borderSize="1" borderSizeComputationExpression="1" foregroundColor="255,255,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:OperandMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@containerMappings[name='SD_CombinedFragment']/@subContainerMappings[name='SD_Operand']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_RtVkgEigEeyweoovpFuWdQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_VJFt8DAbEeydv5Lx234yNQ"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.uml
new file mode 100755
index 0000000..f545bbe
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.uml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_SfPW0DAbEeydv5Lx234yNQ" name="TopNode_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_VJFt8DAbEeydv5Lx234yNQ" name="Interaction">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_l_EeQDC4Eey8z7cM5j74tw" name="Lifeline1" coveredBy="_m-pE4DC4Eey8z7cM5j74tw _m-qTAjC4Eey8z7cM5j74tw"/>
+ <fragment xmi:type="uml:CombinedFragment" xmi:id="_m-pE4DC4Eey8z7cM5j74tw" name="CombinedFragment1" covered="_l_EeQDC4Eey8z7cM5j74tw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m-qTADC4Eey8z7cM5j74tw" source="CombinedFragment1_start"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m-qTATC4Eey8z7cM5j74tw" source="CombinedFragment1_end"/>
+ <operand xmi:type="uml:InteractionOperand" xmi:id="_m-qTAjC4Eey8z7cM5j74tw" name="InteractionOperand1" covered="_l_EeQDC4Eey8z7cM5j74tw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m-q6EDC4Eey8z7cM5j74tw" source="InteractionOperand1_start"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m-q6ETC4Eey8z7cM5j74tw" source="InteractionOperand1_end"/>
+ <guard xmi:type="uml:InteractionConstraint" xmi:id="_m-svQDC4Eey8z7cM5j74tw" name="InteractionConstraint1"/>
+ </operand>
+ </fragment>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.aird
new file mode 100755
index 0000000..ff63223
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.aird
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description">
+ <viewpoint:DAnalysis uid="_qXB3EEigEeyweoovpFuWdQ" selectedViews="_qXns8EigEeyweoovpFuWdQ _qY3DEEigEeyweoovpFuWdQ _qZHhwEigEeyweoovpFuWdQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_qXns8EigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_qY3DEEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_qZR50kigEeyweoovpFuWdQ" name="TopNode_Creation_SequenceDiagram" repPath="#_qZR50EigEeyweoovpFuWdQ" changeId="3f9fc996-fd66-4eba-8856-c919e41f8f07">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_zzxrQCanEey6bs8WuzH1wg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_qZHhwEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_qZR50EigEeyweoovpFuWdQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_qalhYEigEeyweoovpFuWdQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qalhYUigEeyweoovpFuWdQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_qZWLQEigEeyweoovpFuWdQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_qZWLQUigEeyweoovpFuWdQ" type="Sirius" element="_qZR50EigEeyweoovpFuWdQ" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_qZWLQkigEeyweoovpFuWdQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_qak6UEigEeyweoovpFuWdQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_qak6UUigEeyweoovpFuWdQ"/>
+ </ownedAnnotationEntries>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_qZR50UigEeyweoovpFuWdQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_zzxrQCanEey6bs8WuzH1wg"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.uml
new file mode 100755
index 0000000..89b0cb1
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_TvfPYCanEeyyjbsFhgAvSg" name="TopNode_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_zzxrQCanEey6bs8WuzH1wg" name="Interaction"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.aird
new file mode 100755
index 0000000..c2fff91
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.aird
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_9F2tsEigEeyweoovpFuWdQ" selectedViews="_9GSLgEigEeyweoovpFuWdQ _9HgTgEigEeyweoovpFuWdQ _9HvkEEigEeyweoovpFuWdQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_9GSLgEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_9HgTgEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_9H4uAEigEeyweoovpFuWdQ" name="TopNode_Creation_SequenceDiagram" repPath="#_9H4G8EigEeyweoovpFuWdQ" changeId="cc272861-47f5-4ac4-882f-a331ea0e2d51">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_pyg8QCw6EeyvFeHa40zobA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_9HvkEEigEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_9H4G8EigEeyweoovpFuWdQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_9JKgYEigEeyweoovpFuWdQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9JKgYUigEeyweoovpFuWdQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_9H6jMEigEeyweoovpFuWdQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_9H6jMUigEeyweoovpFuWdQ" type="Sirius" element="_9H4G8EigEeyweoovpFuWdQ" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_9JG2AEigEeyweoovpFuWdQ" type="2001" element="_9JEZwEigEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_9JHdEEigEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_9JHdEUigEeyweoovpFuWdQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_9JHdEkigEeyweoovpFuWdQ" type="3001" element="_9JFA0EigEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_9JHdFUigEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_9JHdFkigEeyweoovpFuWdQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_9JIEI0igEeyweoovpFuWdQ" type="3003" element="_9JFA0UigEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_9JIEJEigEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9JIEJUigEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_9JHdE0igEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9JHdFEigEeyweoovpFuWdQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_9JIEIEigEeyweoovpFuWdQ" type="3003" element="_9JEZwUigEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_9JIEIUigEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9JIEIkigEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_9JG2AUigEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9JG2AkigEeyweoovpFuWdQ" x="50" y="50" width="100" height="40"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_9H6jMkigEeyweoovpFuWdQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_9JGO8EigEeyweoovpFuWdQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_9JGO8UigEeyweoovpFuWdQ"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_9JEZwEigEeyweoovpFuWdQ" name="Lifeline1" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_t2-3QCw6EeyvFeHa40zobA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_t2-3QCw6EeyvFeHa40zobA"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_DRP48EihEeyweoovpFuWdQ" x="50" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_9JFA0EigEeyweoovpFuWdQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_t2-3QCw6EeyvFeHa40zobA"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_t2-3QCw6EeyvFeHa40zobA"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_9JFA0UigEeyweoovpFuWdQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_9JEZwUigEeyweoovpFuWdQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_9H4G8UigEeyweoovpFuWdQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_pyg8QCw6EeyvFeHa40zobA"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.uml
new file mode 100755
index 0000000..cde6954
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_ljewACw6EeyvFeHa40zobA" name="TopNode_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_pyg8QCw6EeyvFeHa40zobA" name="Interaction">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_t2-3QCw6EeyvFeHa40zobA" name="Lifeline1"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.aird
new file mode 100755
index 0000000..154ccaf
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.aird
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_TBSqQEihEeyweoovpFuWdQ" selectedViews="_i3z3AEihEeyweoovpFuWdQ _i5q4MEihEeyweoovpFuWdQ _i5798EihEeyweoovpFuWdQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_i3z3AEihEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_i5q4MEihEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_i6U_gEihEeyweoovpFuWdQ" name="TopNode_Creation_SequenceDiagram" repPath="#_i6TxYEihEeyweoovpFuWdQ" changeId="d4796a03-2aeb-4811-b4c6-a85858a80f31">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_kf3CkDDqEeyVLqxSEx0OjQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_i5798EihEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_i6TxYEihEeyweoovpFuWdQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_jFBMkEihEeyweoovpFuWdQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_jFBMkUihEeyweoovpFuWdQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_i6W0sEihEeyweoovpFuWdQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_i6W0sUihEeyweoovpFuWdQ" type="Sirius" element="_i6TxYEihEeyweoovpFuWdQ" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_i7pOIEihEeyweoovpFuWdQ" type="2001" element="_i7jHgEihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_i7p1MEihEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i7p1MUihEeyweoovpFuWdQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE7tAEihEeyweoovpFuWdQ" type="3001" element="_i7jukUihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_jE8UEEihEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jE8UEUihEeyweoovpFuWdQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE8UFUihEeyweoovpFuWdQ" type="3003" element="_i7jukkihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE8UFkihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE8UF0ihEeyweoovpFuWdQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE87IEihEeyweoovpFuWdQ" type="3001" element="_i7kVoEihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_jE87I0ihEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jE87JEihEeyweoovpFuWdQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE9iMEihEeyweoovpFuWdQ" type="3003" element="_i7kVoUihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE9iMUihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE9iMkihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE87IUihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE87IkihEeyweoovpFuWdQ" x="-43" y="30" width="20" height="50"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE87JUihEeyweoovpFuWdQ" type="3001" element="_i7k8sUihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_jE87KEihEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jE87KUihEeyweoovpFuWdQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE9iM0ihEeyweoovpFuWdQ" type="3003" element="_i7ljwEihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE9iNEihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE9iNUihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE87JkihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE87J0ihEeyweoovpFuWdQ" x="-43" y="100" width="20" height="50"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE7tAUihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE7tAkihEeyweoovpFuWdQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE8UEkihEeyweoovpFuWdQ" type="3003" element="_i7jHgUihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE8UE0ihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE8UFEihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i7pOIUihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i7pOIkihEeyweoovpFuWdQ" x="50" y="50" width="100" height="40"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_i7qcQEihEeyweoovpFuWdQ" type="2001" element="_i7mK0EihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_i7qcQ0ihEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_i7qcREihEeyweoovpFuWdQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE-JQEihEeyweoovpFuWdQ" type="3005" element="_i7mK0UihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE-JQUihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE-JQkihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_i7qcQUihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i7qcQkihEeyweoovpFuWdQ" x="95" y="115" width="10" height="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jEzxMEihEeyweoovpFuWdQ" type="2001" element="_i7nY8EihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_jE0YQEihEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jE0YQUihEeyweoovpFuWdQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE-JQ0ihEeyweoovpFuWdQ" type="3005" element="_i7nY8UihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE-JREihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE-JRUihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jEzxMUihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jEzxMkihEeyweoovpFuWdQ" x="95" y="165" width="10" height="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE20gEihEeyweoovpFuWdQ" type="2001" element="_i7nY80ihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_jE3bkEihEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jE3bkUihEeyweoovpFuWdQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE-JRkihEeyweoovpFuWdQ" type="3005" element="_i7nY9EihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE-JR0ihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE-JSEihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE20gUihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE20gkihEeyweoovpFuWdQ" x="95" y="185" width="10" height="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE5QwEihEeyweoovpFuWdQ" type="2001" element="_i7nY9kihEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_jE530EihEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jE530UihEeyweoovpFuWdQ" x="-1"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jE-JSUihEeyweoovpFuWdQ" type="3005" element="_i7nY90ihEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE-JSkihEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE-JS0ihEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jE5QwUihEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jE5QwkihEeyweoovpFuWdQ" x="95" y="235" width="10" height="10"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_i6W0skihEeyweoovpFuWdQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_i7onEEihEeyweoovpFuWdQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_i7onEUihEeyweoovpFuWdQ"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_i7jHgEihEeyweoovpFuWdQ" name="Lifeline1" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_nBsGIDDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_nBsGIDDqEeyVLqxSEx0OjQ"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_jUo88kihEeyweoovpFuWdQ" x="50" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_i7jukUihEeyweoovpFuWdQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_nBsGIDDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_nBsGIDDqEeyVLqxSEx0OjQ"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_i7kVoEihEeyweoovpFuWdQ" width="2" height="5" resizeKind="NORTH_SOUTH">
+ <target xmi:type="uml:ActionExecutionSpecification" href="TopNode_CreationTest.uml#_oDbP8DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ActionExecutionSpecification" href="TopNode_CreationTest.uml#_oDbP8DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_oDao4DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_oDbP8TDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_nBsGIDDqEeyVLqxSEx0OjQ"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_jUo88EihEeyweoovpFuWdQ" x="90" y="120" height="50" width="20"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_i7kVoUihEeyweoovpFuWdQ" labelSize="12" showIcon="false" width="2" height="5" color="195,209,213">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_i7k8sUihEeyweoovpFuWdQ" width="2" height="5" resizeKind="NORTH_SOUTH">
+ <target xmi:type="uml:ActionExecutionSpecification" href="TopNode_CreationTest.uml#_nnzD4DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ActionExecutionSpecification" href="TopNode_CreationTest.uml#_nnzD4DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_nnwnoDDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_nnzq8DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_nBsGIDDqEeyVLqxSEx0OjQ"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_jUo88UihEeyweoovpFuWdQ" x="90" y="190" height="50" width="20"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_i7ljwEihEeyweoovpFuWdQ" labelSize="12" showIcon="false" width="2" height="5" color="195,209,213">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@borderedNodeMappings[name='SD_ExecutionSpecificationNode']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_i7jukkihEeyweoovpFuWdQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_i7jHgUihEeyweoovpFuWdQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_i7mK0EihEeyweoovpFuWdQ" width="1" height="1">
+ <target xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_oDao4DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_oDao4DDqEeyVLqxSEx0OjQ"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_i7mK0UihEeyweoovpFuWdQ" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ObservationPointMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_i7nY8EihEeyweoovpFuWdQ" width="1" height="1">
+ <target xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_oDbP8TDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_oDbP8TDqEeyVLqxSEx0OjQ"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_i7nY8UihEeyweoovpFuWdQ" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ObservationPointMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_i7nY80ihEeyweoovpFuWdQ" width="1" height="1">
+ <target xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_nnwnoDDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_nnwnoDDqEeyVLqxSEx0OjQ"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_i7nY9EihEeyweoovpFuWdQ" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ObservationPointMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_i7nY9kihEeyweoovpFuWdQ" width="1" height="1">
+ <target xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_nnzq8DDqEeyVLqxSEx0OjQ"/>
+ <semanticElements xmi:type="uml:ExecutionOccurrenceSpecification" href="TopNode_CreationTest.uml#_nnzq8DDqEeyVLqxSEx0OjQ"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_i7nY90ihEeyweoovpFuWdQ" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.sequence.diagram/icons/observation_opaque.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ObservationPointMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='Observation']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_i6TxYUihEeyweoovpFuWdQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_kf3CkDDqEeyVLqxSEx0OjQ"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.uml
new file mode 100755
index 0000000..b2fa3fa
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.uml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_gkgAQDDqEeyVLqxSEx0OjQ" name="TopNode_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_kf3CkDDqEeyVLqxSEx0OjQ" name="Interaction">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_nBsGIDDqEeyVLqxSEx0OjQ" name="Lifeline1" coveredBy="_nnwnoDDqEeyVLqxSEx0OjQ _nnzD4DDqEeyVLqxSEx0OjQ _nnzq8DDqEeyVLqxSEx0OjQ _oDao4DDqEeyVLqxSEx0OjQ _oDbP8DDqEeyVLqxSEx0OjQ _oDbP8TDqEeyVLqxSEx0OjQ"/>
+ <fragment xmi:type="uml:ExecutionOccurrenceSpecification" xmi:id="_oDao4DDqEeyVLqxSEx0OjQ" name="ExecutionOccurrenceSpecification3start" covered="_nBsGIDDqEeyVLqxSEx0OjQ" execution="_oDbP8DDqEeyVLqxSEx0OjQ"/>
+ <fragment xmi:type="uml:ActionExecutionSpecification" xmi:id="_oDbP8DDqEeyVLqxSEx0OjQ" name="ActionExecutionSpecification2" covered="_nBsGIDDqEeyVLqxSEx0OjQ" finish="_oDbP8TDqEeyVLqxSEx0OjQ" start="_oDao4DDqEeyVLqxSEx0OjQ"/>
+ <fragment xmi:type="uml:ExecutionOccurrenceSpecification" xmi:id="_oDbP8TDqEeyVLqxSEx0OjQ" name="ExecutionOccurrenceSpecification4finish" covered="_nBsGIDDqEeyVLqxSEx0OjQ" execution="_oDbP8DDqEeyVLqxSEx0OjQ"/>
+ <fragment xmi:type="uml:ExecutionOccurrenceSpecification" xmi:id="_nnwnoDDqEeyVLqxSEx0OjQ" name="ExecutionOccurrenceSpecification1start" covered="_nBsGIDDqEeyVLqxSEx0OjQ" execution="_nnzD4DDqEeyVLqxSEx0OjQ"/>
+ <fragment xmi:type="uml:ActionExecutionSpecification" xmi:id="_nnzD4DDqEeyVLqxSEx0OjQ" name="ActionExecutionSpecification1" covered="_nBsGIDDqEeyVLqxSEx0OjQ" finish="_nnzq8DDqEeyVLqxSEx0OjQ" start="_nnwnoDDqEeyVLqxSEx0OjQ"/>
+ <fragment xmi:type="uml:ExecutionOccurrenceSpecification" xmi:id="_nnzq8DDqEeyVLqxSEx0OjQ" name="ExecutionOccurrenceSpecification2finish" covered="_nBsGIDDqEeyVLqxSEx0OjQ" execution="_nnzD4DDqEeyVLqxSEx0OjQ"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.aird
new file mode 100755
index 0000000..da3e01e
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.aird
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_8DwiEEihEeyweoovpFuWdQ" selectedViews="_DoPAIEiiEeyweoovpFuWdQ _DpK0QEiiEeyweoovpFuWdQ _DpVzYEiiEeyweoovpFuWdQ" version="14.3.1.202003261200">
+ <semanticResources>TopNode_CreationTest.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_DoPAIEiiEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_DpK0QEiiEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_DpchEkiiEeyweoovpFuWdQ" name="TopNode_Creation_SequenceDiagram" repPath="#_DpchEEiiEeyweoovpFuWdQ" changeId="7349161a-1f18-450a-af15-a92c9650843a">
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_VJFt8DAbEeydv5Lx234yNQ"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_DpVzYEiiEeyweoovpFuWdQ">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <sequence:SequenceDDiagram uid="_DpchEEiiEeyweoovpFuWdQ">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_DqseQEiiEeyweoovpFuWdQ" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DqseQUiiEeyweoovpFuWdQ" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.sequence"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_DpeWQEiiEeyweoovpFuWdQ" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_DpeWQUiiEeyweoovpFuWdQ" type="Sirius" element="_DpchEEiiEeyweoovpFuWdQ" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_DqlwkkiiEeyweoovpFuWdQ" type="2001" element="_DqjUUEiiEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_DqmXokiiEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DqmXo0iiEeyweoovpFuWdQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Dqm-skiiEeyweoovpFuWdQ" type="3001" element="_Dqkic0iiEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_Dqm-tUiiEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Dqm-tkiiEeyweoovpFuWdQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DqnlwEiiEeyweoovpFuWdQ" type="3003" element="_DqkidEiiEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DqnlwUiiEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DqnlwkiiEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Dqm-s0iiEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dqm-tEiiEeyweoovpFuWdQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Dqm-t0iiEeyweoovpFuWdQ" type="3003" element="_Dqj7YEiiEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Dqm-uEiiEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dqm-uUiiEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DqmXoEiiEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DqmXoUiiEeyweoovpFuWdQ" x="50" y="50" width="100" height="40"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DqmXpEiiEeyweoovpFuWdQ" type="2001" element="_DqkicEiiEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_Dqm-sEiiEeyweoovpFuWdQ" type="5002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Dqm-sUiiEeyweoovpFuWdQ" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Dqnlw0iiEeyweoovpFuWdQ" type="3001" element="_DqkidkiiEeyweoovpFuWdQ">
+ <children xmi:type="notation:Node" xmi:id="_DqoM0EiiEeyweoovpFuWdQ" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DqoM0UiiEeyweoovpFuWdQ" x="-34"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DqoM1UiiEeyweoovpFuWdQ" type="3003" element="_Dqkid0iiEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DqoM1kiiEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DqoM10iiEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DqnlxEiiEeyweoovpFuWdQ" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DqnlxUiiEeyweoovpFuWdQ" y="32" width="10" height="400"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DqoM0kiiEeyweoovpFuWdQ" type="3003" element="_DqkicUiiEeyweoovpFuWdQ">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DqoM00iiEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DqoM1EiiEeyweoovpFuWdQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DqmXpUiiEeyweoovpFuWdQ" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DqmXpkiiEeyweoovpFuWdQ" x="180" y="50" width="100" height="40"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_DpeWQkiiEeyweoovpFuWdQ"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_DqlwkEiiEeyweoovpFuWdQ" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_DqlwkUiiEeyweoovpFuWdQ"/>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_DqjUUEiiEeyweoovpFuWdQ" name="Lifeline1" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_XPBfsDAbEeydv5Lx234yNQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_XPBfsDAbEeydv5Lx234yNQ"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_D5mc8EiiEeyweoovpFuWdQ" x="50" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_Dqkic0iiEeyweoovpFuWdQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_XPBfsDAbEeydv5Lx234yNQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_XPBfsDAbEeydv5Lx234yNQ"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_DqkidEiiEeyweoovpFuWdQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_Dqj7YEiiEeyweoovpFuWdQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_DqkicEiiEeyweoovpFuWdQ" name="Lifeline2" width="10" height="4" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_ep25kDAbEeydv5Lx234yNQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_ep25kDAbEeydv5Lx234yNQ"/>
+ <graphicalFilters xmi:type="diagram:AbsoluteBoundsFilter" uid="_D5mc8UiiEeyweoovpFuWdQ" x="180" y="50" height="40" width="100"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_DqkidkiiEeyweoovpFuWdQ" width="1" height="40" resizeKind="NSEW">
+ <target xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_ep25kDAbEeydv5Lx234yNQ"/>
+ <semanticElements xmi:type="uml:Lifeline" href="TopNode_CreationTest.uml#_ep25kDAbEeydv5Lx234yNQ"/>
+ <ownedStyle xmi:type="diagram:Square" uid="_Dqkid0iiEeyweoovpFuWdQ" showIcon="false" borderSize="1" borderSizeComputationExpression="1" width="1" height="40" color="0,0,0">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ExecutionMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@borderedNodeMappings[name='SD_Lifeline']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:Square" uid="_DqkicUiiEeyweoovpFuWdQ" labelSize="9" labelPosition="node" width="10" height="4" color="255,255,255">
+ <description xmi:type="style:SquareDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:InstanceRoleMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer/@nodeMappings[name='SD_LifelineRole']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:SequenceDiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_DpchEUiiEeyweoovpFuWdQ"/>
+ <activatedLayers xmi:type="description_2:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']/@ownedRepresentations[name='SequenceDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:Interaction" href="TopNode_CreationTest.uml#_VJFt8DAbEeydv5Lx234yNQ"/>
+ </sequence:SequenceDDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.uml
new file mode 100755
index 0000000..f949482
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.uml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_SfPW0DAbEeydv5Lx234yNQ" name="TopNode_CreationTest">
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_VJFt8DAbEeydv5Lx234yNQ" name="Interaction">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_XPBfsDAbEeydv5Lx234yNQ" name="Lifeline1"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_ep25kDAbEeydv5Lx234yNQ" name="Lifeline2"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/Activator.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/Activator.java
new file mode 100755
index 0000000..070d889
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/Activator.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.siriusdiag.sequence.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/SequenceDiagramTestsTool.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/SequenceDiagramTestsTool.java
new file mode 100755
index 0000000..a0b5979
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/SequenceDiagramTestsTool.java
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests;
+
+import static org.junit.Assert.assertFalse;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.sequence.SequenceDDiagram;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Tools for the tests of Sequence diagram
+ * @author battal
+ *
+ */
+public class SequenceDiagramTestsTool
+{
+ public SequenceDiagramTestsTool()
+ {
+ // nothing to do here
+ }
+
+ /**
+ * Get a list of View elements for a specified element type
+ * @param fixture the current Sirius diagram editor fixture
+ * @param viewpointElementPredicate the researched element type
+ * @return a list of View elements corresponding to the specified element type
+ */
+ public static List<View> getView(SiriusDiagramEditorFixture fixture, Predicate<DDiagramElement> viewpointElementPredicate) {
+ final SequenceDDiagram element = (SequenceDDiagram) fixture.getActiveDiagram().getDiagramView().getElement();
+ List<DDiagramElement> elements = Lists.newArrayList(Iterables.filter(element.getDiagramElements(), viewpointElementPredicate));
+ assertFalse(elements.isEmpty());
+ List<View> results = elements.stream().map(e -> fixture.findEditPart(e)).filter(e -> e instanceof IGraphicalEditPart).map(e -> ((IGraphicalEditPart) e).getNotationView()).collect(Collectors.toList());
+ return results;
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllEdgesCreationTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllEdgesCreationTests.java
new file mode 100755
index 0000000..2447051
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllEdgesCreationTests.java
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_AsynchroMessage_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_AsynchroMessage_LifelineExecution_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_DeleteMessage_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_DurationConstraint_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_DurationObservation_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_GeneralOrdering_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_MessageFound_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_MessageLost_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_Message_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_ReplyMessage_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges.Edge_SynchroMessage_CreationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All Edges creation tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ Edge_AsynchroMessage_CreationTest.class,
+ Edge_AsynchroMessage_LifelineExecution_CreationTest.class,
+ Edge_SynchroMessage_CreationTest.class,
+ Edge_Message_CreationTest.class,
+ Edge_DeleteMessage_CreationTest.class,
+ Edge_ReplyMessage_CreationTest.class,
+ Edge_DurationConstraint_CreationTest.class,
+ Edge_DurationObservation_CreationTest.class,
+ Edge_GeneralOrdering_CreationTest.class,
+ Edge_MessageFound_CreationTest.class,
+ Edge_MessageLost_CreationTest.class
+ })
+ public class AllEdgesCreationTests {
+
+ }
\ No newline at end of file
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllNodesCreationTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllNodesCreationTests.java
new file mode 100755
index 0000000..a4da02c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllNodesCreationTests.java
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_ActionExecution_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_CombinedFragment_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_Comment_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_Constraint_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_Gate_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_InteractionOperand_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_InteractionUse_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_Lifeline_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes.Node_StateInvariant_CreationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All Nodes creation tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ Node_ActionExecution_CreationTest.class,
+ Node_CombinedFragment_CreationTest.class,
+ Node_Comment_CreationTest.class,
+ Node_Constraint_CreationTest.class,
+ Node_InteractionUse_CreationTest.class,
+ Node_Lifeline_CreationTest.class,
+ Node_StateInvariant_CreationTest.class,
+ Node_Gate_CreationTest.class,
+ Node_InteractionOperand_CreationTest.class
+
+})
+public class AllNodesCreationTests {
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllSequenceDiagramTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllSequenceDiagramTests.java
new file mode 100755
index 0000000..e4d0191
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/all/AllSequenceDiagramTests.java
@@ -0,0 +1,30 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.all;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All sequence diagram tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ AllEdgesCreationTests.class,
+ AllNodesCreationTests.class,
+})
+public class AllSequenceDiagramTests {
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/DummyTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/DummyTest.java
new file mode 100755
index 0000000..e22615b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/DummyTest.java
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation;
+
+import static org.junit.Assert.assertFalse;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.sequence.SequenceDDiagram;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Execution;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceEvent;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class DummyTest {
+
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void dummyTest() {
+
+ // Get diagram edit part as for all diagram
+ final DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ final var diagramView = diagramEditpart.getDiagramView();
+ // Get gmf notation.Diagram
+ final Diagram diagram = diagramView;
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+
+ // Create a lifeline from odesign tool -/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign - (id)
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ // we need the sirius diagram representation
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(100, 100), null);
+ fixture.flushDisplayEvents();// it is required ?
+ // lifeline is created and it is a GMF view notation.node
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 1, diagram.getChildren().size());
+
+ // create a second lifeline to be able to create message
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(400, 100), null);
+ fixture.flushDisplayEvents();// it is required ?
+ // A second lifeline is created and it is a GMF view notation.node
+ // - But we can navigate via Sequence digram API if necessary
+ // - request the view
+ // -- the code is inspired from org.eclipse.sirius.tests.unit.diagram.sequence.structure.SequenceDiagramElementsIdentificationTests
+ List<View> lifeLines = getView(Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one element after creating a top node", 2, lifeLines.size());
+ Lifeline lifeLine1 = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline lifeLine2 = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+
+
+ // Create a message between 2 lifelines
+ // from odesign tool -/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign - (id)
+ final var lifeline1DRep = (EdgeTarget)lifeLine1.getNotationNode().getElement();
+ final var lifeline2DRep = (EdgeTarget)lifeLine2.getNotationNode().getElement();
+ IGraphicalEditPart lifelineAEditPart = (IGraphicalEditPart) fixture.findEditPart(lifeline1DRep);
+ IGraphicalEditPart lifelineBEditPart = (IGraphicalEditPart) fixture.findEditPart(lifeline2DRep);
+ Point messageAbsoluteStartConnectionPoint = lifelineAEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ Point messageAbsoluteEndConnectionPoint = lifelineBEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("CR_Synchronous_Operation", diagramRespresentation, lifeline1DRep, lifeline2DRep, messageAbsoluteStartConnectionPoint, messageAbsoluteEndConnectionPoint);
+ fixture.flushDisplayEvents();// it is required ?
+
+
+ List<View> executions = getView(Execution.viewpointElementPredicate());
+ Assert.assertEquals("CR_Synchronous_Operation should create 1 execution", 1, executions.size());
+ ISequenceEvent createdEvent = lifeLine2.getSubEvents().stream().filter(e -> e instanceof Execution).findFirst().get();
+ Assert.assertEquals("The created event should be on the second lifeline", createdEvent.getNotationView(), executions.get(0));
+
+ // Create a second execution
+ // Execution position
+ Rectangle endOfExecution = createdEvent.getProperLogicalBounds();
+ Point point = endOfExecution.getBottomLeft().getCopy().translate(5, 0);
+ fixture.applyNodeCreationToolFromPalette("Behavior Execution Specification", diagramRespresentation, lifeline2DRep, point, null);
+ fixture.flushDisplayEvents();// it is required ?
+ // ==> quick get
+ ISequenceEvent execution2 = lifeLine2.getSubEvents().stream().filter(e -> (e instanceof Execution) && !e.equals(createdEvent)).findFirst().get();
+ final var execution2Bounds = execution2.getProperLogicalBounds();
+ int yMiddle = execution2Bounds.getTopLeft().y + execution2Bounds.height /2;
+ final var execution2messageStartPoint = messageAbsoluteStartConnectionPoint.getCopy();
+ execution2messageStartPoint.y = yMiddle;
+
+ // Create a message between a lifeline and an execution
+ final var execution2Rep = (EdgeTarget) execution2.getNotationView().getElement();
+ fixture.applyEdgeCreationToolFromPalette("CR_Asynchronous_Operation", diagramRespresentation, lifeline1DRep, execution2Rep, execution2messageStartPoint, execution2Bounds.getCenter());
+ fixture.flushDisplayEvents();// it is required ?
+
+
+ // create combine fragment
+ Point combinedFStart = lifeLine1.getProperLogicalBounds().getTopLeft();
+ Point combinedEnd = endOfExecution.getBottomRight();
+ Dimension cfSize = new Dimension(combinedEnd.x - combinedFStart.x , combinedEnd.y - combinedFStart.y);
+ fixture.applyNodeCreationToolFromPalette("CombinedFragment", diagramRespresentation, diagramRespresentation, combinedFStart, cfSize);
+ fixture.flushDisplayEvents();// it is required ?
+
+ fixture.save();
+
+ }
+
+ // TODO => there is aa accessor for view directy <Predicate<View> notationPredicate()> => replace ? to abstract class ?
+ private List<View> getView(Predicate<DDiagramElement> viewpointElementPredicate) {
+ final SequenceDDiagram element = (SequenceDDiagram) fixture.getActiveDiagram().getDiagramView().getElement();
+ List<DDiagramElement> elements = Lists.newArrayList(Iterables.filter(element.getDiagramElements(), viewpointElementPredicate));
+ assertFalse(elements.isEmpty());
+ List<View> results = elements.stream().map(e -> fixture.findEditPart(e)).filter(e -> e instanceof IGraphicalEditPart).map(e -> ((IGraphicalEditPart) e).getNotationView()).collect(Collectors.toList());
+ return results;
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_AsynchroMessage_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_AsynchroMessage_CreationTest.java
new file mode 100755
index 0000000..fa5438f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_AsynchroMessage_CreationTest.java
@@ -0,0 +1,187 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.Signal;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create an Asynchronous message edge between two Lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_AsynchroMessage_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message_0";
+
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createAsynchroMessageEdgeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, nbDiagramChild);
+ Assert.assertEquals("The diagram does not contain any edge", 0, nbEdges);
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+
+ // Create a first lifeline
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(100, 100), null);
+ fixture.flushDisplayEvents();
+
+ // lifeline is created and it is a GMF view notation.node
+ Assert.assertEquals("The diagram must contain one element after creating the first Lifeline", nbDiagramChild + 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ nbDiagramChild = diagram.getChildren().size();
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ DNodeSpec firstLifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject firstLifelineSemanticElement = firstLifeLineRep.getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Lifeline", firstLifelineSemanticElement instanceof org.eclipse.uml2.uml.Lifeline);
+ Assert.assertEquals("The root does not contain any additional element after the creation of a Lifeline", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // create a second lifeline to be able to create message
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(400, 100), null);
+ fixture.flushDisplayEvents();
+
+ // A second lifeline is created and it is a GMF view notation.node
+ Assert.assertEquals("The diagram must contain one additional element after creating the second Lifeline", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ nbDiagramChild = diagram.getChildren().size();
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ DNodeSpec secondLifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject secondLifelineSemanticElement = ((DNodeSpec) secondLifeLineRep).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Lifeline", secondLifelineSemanticElement instanceof org.eclipse.uml2.uml.Lifeline);
+
+ // Create a message between the two created lifelines
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain two lifelines", 2, lifeLines.size());
+ Lifeline firstLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline secondLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+
+ EdgeTarget firstLifelineDRep = (EdgeTarget)firstLifeLine.getNotationNode().getElement();
+ EdgeTarget secondLifelineDRep = (EdgeTarget)secondLifeLine.getNotationNode().getElement();
+ IGraphicalEditPart firstLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(firstLifelineDRep);
+ IGraphicalEditPart secondLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(secondLifelineDRep);
+ Point messageAbsoluteStartConnectionPoint = firstLifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ Point messageAbsoluteEndConnectionPoint = secondLifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("CR_Asynchronous_Operation", diagramRespresentation, firstLifelineDRep, secondLifelineDRep, messageAbsoluteStartConnectionPoint, messageAbsoluteEndConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram does not contain any additional element after creating of an Asynchronous message", nbDiagramChild, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain one additional edge after creating of a Asynchronous message", nbEdges + 1, diagram.getEdges().size());
+ Assert.assertEquals("The root model contains one additional element after the creation of an Asynchronus message", nbElement + 1 , fixture.getModel().getOwnedElements().size());
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+
+ // check the added Fragment elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("Two fragments have been added to the interaction element", 2, fragments.size());
+
+ Object sendEvent = ((Message) msgSemanticElement).getSendEvent();
+ Assert.assertTrue("The send event element must be an UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the send event message name", MESSAGE_NAME + "_sender", ((MessageOccurrenceSpecification) sendEvent).getName());
+ Assert.assertEquals("The send event must be on the first Lifeline", ((MessageOccurrenceSpecification) sendEvent).getCovereds().get(0), firstLifelineSemanticElement);
+ Object receiveEvent = ((Message) msgSemanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event element must be an UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the receive event message name", MESSAGE_NAME + "_receiver", ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("The receive event must be on the second Lifeline", ((MessageOccurrenceSpecification) receiveEvent).getCovereds().get(0), secondLifelineSemanticElement);
+
+ // check the created Message element
+ EList<Message> messages = interactionElem.getMessages();
+ Assert.assertNotNull("The list of messages is not null", messages);
+ Assert.assertEquals("One message has been created", 1, messages.size());
+ Message createdMsg = messages.get(0);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((Message) createdMsg).getName());
+
+ // check the created Signal element
+ EObject signalElem = fixture.getModel().getOwnedElements().get(1);
+ Assert.assertTrue("A Signal element is created", signalElem instanceof org.eclipse.uml2.uml.Signal);
+ Assert.assertEquals("Check the name of the created Signal element", MESSAGE_NAME + "_signal", ((Signal) signalElem).getName());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Fragment element after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains two Fragment element after redoing the creation of the message", 2, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message after redoing teh creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_AsynchroMessage_LifelineExecution_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_AsynchroMessage_LifelineExecution_CreationTest.java
new file mode 100755
index 0000000..e432a6f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_AsynchroMessage_LifelineExecution_CreationTest.java
@@ -0,0 +1,205 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Execution;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceEvent;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.Signal;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create an Asynchronous message edge between a Lifeline and an execution
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_AsynchroMessage_LifelineExecution_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The execution specification name */
+ private static final String EXECUTION_NAME = "ExecutionOccurrenceSpecification";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message_0";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createAsynchroMessageEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbElement = fixture.getModel().getOwnedElements().size();
+ int nbDiagramChild = diagram.getChildren().size();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram contains two lifelines before the creation of an AsynchronousMessage", 2, nbDiagramChild);
+ Assert.assertEquals("The root model contains one interaction element", 1, nbElement);
+ Assert.assertEquals("The diagram does not contain any edge", 0, nbEdges);
+
+ // check the initial fragments
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ int fragmentsSize = fragments.size();
+ Assert.assertEquals("The interaction element does not contain any fragment", 0, fragmentsSize);
+
+ // Compute the execution position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain two lifelines", 2, lifeLines.size());
+ Lifeline firstLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline secondLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+ EdgeTarget firstLifelineDRep = (EdgeTarget)firstLifeLine.getNotationNode().getElement();
+ EdgeTarget secondLifelineDRep = (EdgeTarget)secondLifeLine.getNotationNode().getElement();
+ IGraphicalEditPart firstLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(firstLifelineDRep);
+ Point executionPosition = firstLifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+
+ // 1. Create the execution on the second lifeline
+ fixture.applyNodeCreationToolFromPalette("Behavior Execution Specification", diagramRespresentation, secondLifelineDRep, executionPosition, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains two additional elements after creating a BehaviorExecution node", nbDiagramChild + 2, diagram.getChildren().size());
+
+ // check the added first element
+ Object element = diagram.getChildren().get(2);
+ Assert.assertTrue("The created first element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject executionStart = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created first element must be an UML ExecutionOccurrenceSpecification", executionStart instanceof org.eclipse.uml2.uml.ExecutionOccurrenceSpecification);
+ Assert.assertEquals("Check the execution start name", EXECUTION_NAME + "1start", ((ExecutionOccurrenceSpecification) executionStart).getName());
+ Assert.assertEquals("The created execution is on the second Lifeline", ((DNodeSpec) secondLifelineDRep).getTarget(), ((ExecutionOccurrenceSpecification) executionStart).getCovered());
+
+ // check the added second element
+ element = diagram.getChildren().get(3);
+ Assert.assertTrue("The created second element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject executionEnd = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created second element must be an UML ExecutionOccurrenceSpecification", executionEnd instanceof org.eclipse.uml2.uml.ExecutionOccurrenceSpecification);
+ Assert.assertEquals("Check the execution finsih name", EXECUTION_NAME + "2finish", ((ExecutionOccurrenceSpecification) executionEnd).getName());
+ Assert.assertEquals("The created execution is on the second Lifeline", ((DNodeSpec) secondLifelineDRep).getTarget(), ((ExecutionOccurrenceSpecification) executionEnd).getCovered());
+
+ Object createdExecution = ((ExecutionOccurrenceSpecification) executionEnd).getExecution();
+ Assert.assertTrue("The created execution must be a UML BehaviorExecutionSpecification", createdExecution instanceof org.eclipse.uml2.uml.BehaviorExecutionSpecification);
+ Assert.assertEquals("Check the execution start element", executionStart, ((BehaviorExecutionSpecification) createdExecution).getStart());
+ Assert.assertEquals("Check the execution finish element", executionEnd, ((BehaviorExecutionSpecification) createdExecution).getFinish());
+
+ // check the added fragments
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ fragments = interactionElem.getFragments();
+ Assert.assertEquals("Three fragments have been added to the interaction element", fragmentsSize + 3, fragments.size());
+ fragmentsSize = fragments.size();
+
+ // 2. Create an Asynchronous message between the created execution and the first lifeline
+ // Compute the message start point
+ ISequenceEvent execution = secondLifeLine.getSubEvents().stream().filter(e -> (e instanceof Execution)).findFirst().get();
+ Rectangle executionBounds = execution.getProperLogicalBounds();
+ int yMiddle = executionBounds.getTopLeft().y + executionBounds.height /2;
+ Point executionMessageStartPoint = executionPosition.getCopy();
+ executionMessageStartPoint.y = yMiddle;
+
+ // Create the message
+ EdgeTarget executionRep = (EdgeTarget) execution.getNotationView().getElement();
+ fixture.applyEdgeCreationToolFromPalette("CR_Asynchronous_Operation", diagramRespresentation, firstLifelineDRep, executionRep, executionMessageStartPoint, executionBounds.getCenter());
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge", nbEdges + 1, diagram.getEdges().size());
+ Assert.assertEquals("The root model contains one additional element after the creation of an Asynchronus message", nbElement + 1 , fixture.getModel().getOwnedElements().size());
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+
+ // check the added message fragments
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ fragments = interactionElem.getFragments();
+ Assert.assertEquals("Two fragments have been added to the interaction element", fragmentsSize + 2, fragments.size());
+
+ Object sendEvent = ((Message) msgSemanticElement).getSendEvent();
+ Assert.assertTrue("The send event must be an UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("The send event must be on the first lifeline", ((DNodeSpec) firstLifelineDRep).getTarget(), ((MessageOccurrenceSpecification) sendEvent).getCovered());
+ Assert.assertEquals("Check the send event message name", MESSAGE_NAME + "_sender", ((MessageOccurrenceSpecification) sendEvent).getName());
+ Object receiveEvent = ((Message) msgSemanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event must be an UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("The receive event must be on the second lifeline", ((DNodeSpec) secondLifelineDRep).getTarget(), ((MessageOccurrenceSpecification) receiveEvent).getCovered());
+ Assert.assertEquals("Check the receive event message name", MESSAGE_NAME + "_receiver", ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((Message) msgSemanticElement).getName());
+
+ // check the created Signal element
+ EObject signalElem = fixture.getModel().getOwnedElements().get(1);
+ Assert.assertTrue("An UML Signal element is created", signalElem instanceof org.eclipse.uml2.uml.Signal);
+ Assert.assertEquals("Check the name of the created Signal element", MESSAGE_NAME + "_signal", ((Signal) signalElem).getName());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains only the fragments corresponding to the Execution element after undoing teh creation of the message", 3, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message after undoing teh creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains five Fragments element after redoing teh creation of the message", 5, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message after redoing teh creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DeleteMessage_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DeleteMessage_CreationTest.java
new file mode 100755
index 0000000..5e9661c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DeleteMessage_CreationTest.java
@@ -0,0 +1,156 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageSort;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a MessageDelete edge between two lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_DeleteMessage_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message1";
+
+ /** The send event message name */
+ private static final String SEND_EVENT_MESSAGE_NAME = "MessageOccurrenceSpecification1SendEvent";
+
+ /** The receive event message name */
+ private static final String RECEIVER_EVENT_MESSAGE_NAME = "DestructionOccurrenceSpecification1ReceiveEvent";
+
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createDeleteMessageEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must contain two Lifelines before creating the Message", 2, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", 0, nbEdges);
+
+ // Create a DeleteMessage between the two lifelines
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain two Lifelines", 2, lifeLines.size());
+ Lifeline firstLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline secondLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+
+ EdgeTarget firstLifelineDRep = (EdgeTarget)firstLifeLine.getNotationNode().getElement();
+ EdgeTarget secondLifelineDRep = (EdgeTarget)secondLifeLine.getNotationNode().getElement();
+ IGraphicalEditPart firstLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(firstLifelineDRep);
+ IGraphicalEditPart secondLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(secondLifelineDRep);
+ Point messageAbsoluteStartConnectionPoint = firstLifelineEditPart.getFigure().getBounds().getTopLeft().translate(0, 15);
+ Point messageAbsoluteEndConnectionPoint = secondLifelineEditPart.getFigure().getBounds().getTopLeft().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("Message Delete", diagramRespresentation, firstLifelineDRep, secondLifelineDRep, messageAbsoluteStartConnectionPoint, messageAbsoluteEndConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one edge after the creation of a Message", nbEdges + 1 , diagram.getEdges().size());
+ Object element = diagram.getChildren().get(0);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ DNodeSpec lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject firstLifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+ element = diagram.getChildren().get(1);
+ siriusNewRepresentation = ((View) element).getElement();
+ lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject secondLifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ Assert.assertEquals("Check the message sort", MessageSort.DELETE_MESSAGE_LITERAL, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getMessageSort());
+
+ // check the added Fragment elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("Two fragments have been added to the interaction element", 2, fragments.size());
+
+ Object sendEvent = ((Message) msgSemanticElement).getSendEvent();
+ Assert.assertTrue("The send event must be an UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the send event message name", SEND_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) sendEvent).getName());
+ Assert.assertEquals("The send event is on the first Lifeline", ((MessageOccurrenceSpecification) sendEvent).getCovereds().get(0), firstLifelineSemanticElement);
+ Object receiveEvent = ((Message) msgSemanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event must be an UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the receive event message name", RECEIVER_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("The receiver event is on the second Lifeline", ((MessageOccurrenceSpecification) receiveEvent).getCovereds().get(0), secondLifelineSemanticElement);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Fragment element after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message element after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message edge", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains two Fragment element after redoing the creation of the message", 2, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message element after redoing the creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message edge", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ Assert.assertEquals("Check the message sort", MessageSort.DELETE_MESSAGE_LITERAL, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getMessageSort());
+
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DurationConstraint_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DurationConstraint_CreationTest.java
new file mode 100755
index 0000000..bf3a420
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DurationConstraint_CreationTest.java
@@ -0,0 +1,141 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Execution;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.uml2.uml.ActionExecutionSpecification;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.DurationInterval;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a DurationConstraint edge between two action executions
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_DurationConstraint_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createDurationConstraintEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ int nbEdges = diagram.getEdges().size();
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ Assert.assertEquals("The diagram must contain one lifeline and two Action exectuions before creating the DurationConstraint edge", nbDiagramChild, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", nbEdges, diagram.getEdges().size());
+ Assert.assertEquals("The root element contains only the interaction element", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // Create a DurationConstraint between the two Action executions
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> actionExecutions = SequenceDiagramTestsTool.getView(fixture, Execution.viewpointElementPredicate());
+ Execution firstExecution = ISequenceElementAccessor.getExecution(actionExecutions.get(0)).get();
+ Execution secondExecution = ISequenceElementAccessor.getExecution(actionExecutions.get(1)).get();
+
+ EdgeTarget firstExecutionDRep = (EdgeTarget)firstExecution.getNotationNode().getElement();
+ EdgeTarget secondExecutionDRep = (EdgeTarget)secondExecution.getNotationNode().getElement();
+ IGraphicalEditPart firstExecutionEditPart = (IGraphicalEditPart) fixture.findEditPart(firstExecutionDRep);
+ IGraphicalEditPart secondExecutionEditPart = (IGraphicalEditPart) fixture.findEditPart(secondExecutionDRep);
+ Point startConnectionPoint = firstExecutionEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ Point endConnectionPoint = secondExecutionEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("Duration Constraint", diagramRespresentation, firstExecutionDRep, secondExecutionDRep, startConnectionPoint, endConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one edge after creating a DurationConstraint", nbEdges + 1, diagram.getEdges().size());
+ Assert.assertEquals("The root element contains two additional elements after the creation of a DurationConstraint", nbElement + 2, fixture.getModel().getOwnedElements().size());
+
+ Object firstDuration = fixture.getModel().getOwnedElements().get(1);
+ Assert.assertTrue("The first created element is an UML Duration", firstDuration instanceof org.eclipse.uml2.uml.Duration);
+ Object secondDuration = fixture.getModel().getOwnedElements().get(2);
+ Assert.assertTrue("The second created element is an UML Duration", secondDuration instanceof org.eclipse.uml2.uml.Duration);
+
+ Object element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML DurationConstraint", semanticElement instanceof org.eclipse.uml2.uml.DurationConstraint);
+ Assert.assertEquals("The Constraint is applied to two elements", 2, ((DurationConstraint) semanticElement).getConstrainedElements().size());
+
+ Object firstConstrainedElement = ((DurationConstraint) semanticElement).getConstrainedElements().get(0);
+ Object secondConstrainedElement = ((DurationConstraint) semanticElement).getConstrainedElements().get(1);
+ Object firstExecEnd = ((ActionExecutionSpecification ) ((DNodeSpec) firstExecutionDRep).getTarget()).getFinish();
+ Object secondExecBegin = ((ActionExecutionSpecification ) ((DNodeSpec) secondExecutionDRep).getTarget()).getStart();
+ Assert.assertEquals("The constraint starts at the end of the first execution", firstExecEnd, firstConstrainedElement);
+ Assert.assertEquals("The constraint ends at the begin of the second execution", secondExecBegin, secondConstrainedElement);
+
+ element = ((DurationConstraint) semanticElement).getSpecification();
+ Assert.assertTrue("The constraint specification is an UML DurationInterval", element instanceof org.eclipse.uml2.uml.DurationInterval);
+ Assert.assertEquals("The Min of the specification is the first duration element", firstDuration, ((DurationInterval) element).getMin());
+ Assert.assertEquals("The Max of the specification is the second duration element", secondDuration, ((DurationInterval) element).getMax());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of a DurationConstraint edge", nbEdges, diagram.getEdges().size());
+ Assert.assertEquals("The root element does not contain any additional elements after undoing the creation of a DurationConstraint edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one edge after redoing the creation of a DurationConstraint message", nbEdges + 1, diagram.getEdges().size());
+ Assert.assertEquals("The root element contains two additional elements after redoing the creation of a DurationConstraint", nbElement + 2, fixture.getModel().getOwnedElements().size());
+
+ firstDuration = fixture.getModel().getOwnedElements().get(1);
+ Assert.assertTrue("The first created element is an UML Duration", firstDuration instanceof org.eclipse.uml2.uml.Duration);
+ secondDuration = fixture.getModel().getOwnedElements().get(2);
+ Assert.assertTrue("The second created element is an UML Duration", secondDuration instanceof org.eclipse.uml2.uml.Duration);
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML DurationConstraint", semanticElement instanceof org.eclipse.uml2.uml.DurationConstraint);
+ Assert.assertEquals("The Constraint is applied to two elements", 2, ((DurationConstraint) semanticElement).getConstrainedElements().size());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DurationObservation_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DurationObservation_CreationTest.java
new file mode 100755
index 0000000..1b1018f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_DurationObservation_CreationTest.java
@@ -0,0 +1,130 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Execution;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.uml2.uml.ActionExecutionSpecification;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a DurationObservation edge between two action executions
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_DurationObservation_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createDurationObservationEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ int nbEdges = diagram.getEdges().size();
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ Assert.assertEquals("The diagram must contain one lifeline and two Action exectuions before creating the DurationObservation edge", nbDiagramChild, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", nbEdges, diagram.getEdges().size());
+ Assert.assertEquals("The root element contains only the interaction element", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // Create a DurationObservation between the two Action executions
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> actionExecutions = SequenceDiagramTestsTool.getView(fixture, Execution.viewpointElementPredicate());
+ Execution firstExecution = ISequenceElementAccessor.getExecution(actionExecutions.get(0)).get();
+ Execution secondExecution = ISequenceElementAccessor.getExecution(actionExecutions.get(1)).get();
+
+ EdgeTarget firstExecutionDRep = (EdgeTarget)firstExecution.getNotationNode().getElement();
+ EdgeTarget secondExecutionDRep = (EdgeTarget)secondExecution.getNotationNode().getElement();
+ IGraphicalEditPart firstExecutionEditPart = (IGraphicalEditPart) fixture.findEditPart(firstExecutionDRep);
+ IGraphicalEditPart secondExecutionEditPart = (IGraphicalEditPart) fixture.findEditPart(secondExecutionDRep);
+ Point startConnectionPoint = firstExecutionEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ Point endConnectionPoint = secondExecutionEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("Duration Observation", diagramRespresentation, firstExecutionDRep, secondExecutionDRep, startConnectionPoint, endConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one edge after creating a DurationObservation", nbEdges + 1, diagram.getEdges().size());
+ Assert.assertEquals("The root element contains one additional elements after the creation of a DurationObservation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ Object durationElement = fixture.getModel().getOwnedElements().get(1);
+ Assert.assertTrue("The first created element is an UML DurationObservation", durationElement instanceof org.eclipse.uml2.uml.DurationObservation);
+
+ Object element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML DurationObservation", semanticElement instanceof org.eclipse.uml2.uml.DurationObservation);
+ Assert.assertEquals("The observation element is applied to two elements", 2, ((org.eclipse.uml2.uml.DurationObservation) semanticElement).getEvents().size());
+
+ Object firstEvent = ((org.eclipse.uml2.uml.DurationObservation) semanticElement).getEvents().get(0);
+ Object secondEvent = ((org.eclipse.uml2.uml.DurationObservation) semanticElement).getEvents().get(1);
+ Object firstExecEnd = ((ActionExecutionSpecification ) ((DNodeSpec) firstExecutionDRep).getTarget()).getFinish();
+ Object secondExecBegin = ((ActionExecutionSpecification ) ((DNodeSpec) secondExecutionDRep).getTarget()).getStart();
+ Assert.assertEquals("The duration observation starts at the end of the first execution", firstExecEnd, firstEvent);
+ Assert.assertEquals("The duration observation ends at the begin of the second execution", secondExecBegin, secondEvent);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of a DurationObservation edge", nbEdges, diagram.getEdges().size());
+ Assert.assertEquals("The root element does not contain any additional elements after undoing the creation of a DurationObservation edge", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one edge after redoing the creation of a DurationObservation message", nbEdges + 1, diagram.getEdges().size());
+ Assert.assertEquals("The root element contains two additional elements after redoing the creation of a DurationObservation", nbElement + 1, fixture.getModel().getOwnedElements().size());
+
+ durationElement = fixture.getModel().getOwnedElements().get(1);
+ Assert.assertTrue("The created element is an UML DurationObservation", durationElement instanceof org.eclipse.uml2.uml.DurationObservation);
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML DurationObservation", semanticElement instanceof org.eclipse.uml2.uml.DurationObservation);
+ Assert.assertEquals("The duration observation is applied to two elements", 2, ((org.eclipse.uml2.uml.DurationObservation) semanticElement).getEvents().size());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_GeneralOrdering_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_GeneralOrdering_CreationTest.java
new file mode 100755
index 0000000..6361c84
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_GeneralOrdering_CreationTest.java
@@ -0,0 +1,124 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Execution;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.uml2.uml.ActionExecutionSpecification;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a GeneralOrdering edge between two action executions
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoActionExecutions/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_GeneralOrdering_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createGeneralOrderingEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must contain one lifeline and two Action exectuions before creating the GeneralOrdering edge", nbDiagramChild, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", nbEdges, diagram.getEdges().size());
+
+ // Create a GeneralOrdering between the two Action executions
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> actionExecutions = SequenceDiagramTestsTool.getView(fixture, Execution.viewpointElementPredicate());
+ Execution firstExecution = ISequenceElementAccessor.getExecution(actionExecutions.get(0)).get();
+ Execution secondExecution = ISequenceElementAccessor.getExecution(actionExecutions.get(1)).get();
+
+ EdgeTarget firstExecutionDRep = (EdgeTarget)firstExecution.getNotationNode().getElement();
+ EdgeTarget secondExecutionDRep = (EdgeTarget)secondExecution.getNotationNode().getElement();
+ IGraphicalEditPart firstExecutionEditPart = (IGraphicalEditPart) fixture.findEditPart(firstExecutionDRep);
+ IGraphicalEditPart secondExecutionEditPart = (IGraphicalEditPart) fixture.findEditPart(secondExecutionDRep);
+ Point startConnectionPoint = firstExecutionEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ Point endConnectionPoint = secondExecutionEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("General Ordering", diagramRespresentation, firstExecutionDRep, secondExecutionDRep, startConnectionPoint, endConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one edge after creating a GeneralOrdering", nbEdges + 1, diagram.getEdges().size());
+
+ Object element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML GeneralOrdering", semanticElement instanceof org.eclipse.uml2.uml.GeneralOrdering);
+
+ Object generalOrderingBeforeElem = ((org.eclipse.uml2.uml.GeneralOrdering) semanticElement).getBefore();
+ Object generalOrderingAfterElem = ((org.eclipse.uml2.uml.GeneralOrdering) semanticElement).getAfter();
+ Object firstExecEnd = ((ActionExecutionSpecification ) ((DNodeSpec) firstExecutionDRep).getTarget()).getFinish();
+ Object secondExecBegin = ((ActionExecutionSpecification ) ((DNodeSpec) secondExecutionDRep).getTarget()).getStart();
+ Assert.assertEquals("The before element of the GeneralOrdering is the first execution", firstExecEnd, generalOrderingBeforeElem);
+ Assert.assertEquals("The after element of the GeneralOrdering is the second execution", secondExecBegin, generalOrderingAfterElem);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of a GeneralOrdering edge", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one edge after redoing the creation of a GeneralOrdering message", nbEdges + 1, diagram.getEdges().size());
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML GeneralOrdering", semanticElement instanceof org.eclipse.uml2.uml.GeneralOrdering);
+
+ generalOrderingBeforeElem = ((org.eclipse.uml2.uml.GeneralOrdering) semanticElement).getBefore();
+ generalOrderingAfterElem = ((org.eclipse.uml2.uml.GeneralOrdering) semanticElement).getAfter();
+ firstExecEnd = ((ActionExecutionSpecification ) ((DNodeSpec) firstExecutionDRep).getTarget()).getFinish();
+ secondExecBegin = ((ActionExecutionSpecification ) ((DNodeSpec) secondExecutionDRep).getTarget()).getStart();
+ Assert.assertEquals("The before element of the GeneralOrdering the first execution", firstExecEnd, generalOrderingBeforeElem);
+ Assert.assertEquals("The after element of the GeneralOrdering the second execution", secondExecBegin, generalOrderingAfterElem);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_MessageFound_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_MessageFound_CreationTest.java
new file mode 100755
index 0000000..1483708
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_MessageFound_CreationTest.java
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a MessageFound edge between two lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_MessageFound_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message1";
+
+ /** The send event message name */
+ private static final String SEND_EVENT_MESSAGE_NAME = "MessageOccurrenceSpecification1ReceiveEvent";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createMessageFoundEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must contain one Lifeline before creating the MessageFound", 1, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", 0, diagram.getEdges().size());
+
+ // Create a MessageFound
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one Lifeline before creating a MessageFound", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+
+ EdgeTarget lifeLineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifeLineDRep);
+ Point messageAbsoluteStartConnectionPoint = lifelineEditPart.getFigure().getBounds().getBottomLeft().translate(0, 15);
+
+ fixture.applyNodeCreationToolFromPalette("Message Found", diagramRespresentation, lifeLineDRep, messageAbsoluteStartConnectionPoint, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after the creation of a MessageFound", nbEdges + 1 , diagram.getEdges().size());
+ Object element = diagram.getChildren().get(0);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ DNodeSpec lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject lifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+
+ // check the added Fragment elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("One fragment have been added to the interaction element", 1, fragments.size());
+
+ Object receiveEvent = ((Message) msgSemanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event be an UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the receive event message name", SEND_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("The receive event is on the Lifeline", ((MessageOccurrenceSpecification) receiveEvent).getCovereds().get(0), lifelineSemanticElement);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Fragment element after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message element after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message edge", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains one Fragment element after redoing the creation of the message", 1, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message element after redoing the creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message edge", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_MessageLost_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_MessageLost_CreationTest.java
new file mode 100755
index 0000000..1555a37
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_MessageLost_CreationTest.java
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a MessageLost edge between two lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_MessageLost_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message1";
+
+ /** The send event message name */
+ private static final String SEND_EVENT_MESSAGE_NAME = "MessageOccurrenceSpecification1SendEvent";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createMessageLostEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must contain one Lifelines before creating the MessageLost", 1, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", 0, diagram.getEdges().size());
+
+ // Create a MessageLost
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one Lifeline before creating a MessageLost", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+
+ EdgeTarget lifeLineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifeLineDRep);
+ Point messageAbsoluteStartConnectionPoint = lifelineEditPart.getFigure().getBounds().getBottomLeft().translate(0, 15);
+
+ fixture.applyNodeCreationToolFromPalette("Message Lost", diagramRespresentation, lifeLineDRep, messageAbsoluteStartConnectionPoint, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one additional edge after the creation of a MessageLost", nbEdges + 1 , diagram.getEdges().size());
+ Object element = diagram.getChildren().get(0);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ DNodeSpec lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject lifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+
+ // check the added Fragment elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("One fragment have been added to the interaction element", 1, fragments.size());
+
+ Object sendEvent = ((Message) msgSemanticElement).getSendEvent();
+ Assert.assertTrue("The send event be a UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the send event message name", SEND_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) sendEvent).getName());
+ Assert.assertEquals("The send event is on the first Lifeline", ((MessageOccurrenceSpecification) sendEvent).getCovereds().get(0), lifelineSemanticElement);
+
+ EList<EAnnotation> eAnnotations = ((MessageOccurrenceSpecification) sendEvent).getEAnnotations();
+ Assert.assertEquals("The sender fragment has on eEAnnotation", 1, eAnnotations.size());
+ Assert.assertEquals("Check the eAnnotation source", SEND_EVENT_MESSAGE_NAME + "LOSTMESSAGE", eAnnotations.get(0).getSource());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Fragment element after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message element after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message edge", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains one Fragment element after redoing the creation of the message", 1, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message element after redoing the creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message edge", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_Message_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_Message_CreationTest.java
new file mode 100755
index 0000000..8e719f5
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_Message_CreationTest.java
@@ -0,0 +1,155 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageSort;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a Message edge between two lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_Message_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message1";
+
+ /** The send event message name */
+ private static final String SEND_EVENT_MESSAGE_NAME = "MessageOccurrenceSpecification1SendEvent";
+
+ /** The receive event message name */
+ private static final String RECEIVER_EVENT_MESSAGE_NAME = "MessageOccurrenceSpecification2ReceiveEvent";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createMessageEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must contain two Lifelines before creating the Message", 2, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", 0, diagram.getEdges().size());
+
+ // Create a message between the two lifelines
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram contains two Lifelines", 2, lifeLines.size());
+ Lifeline firstLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline secondLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+
+ EdgeTarget firstLifelineDRep = (EdgeTarget)firstLifeLine.getNotationNode().getElement();
+ EdgeTarget secondLifelineDRep = (EdgeTarget)secondLifeLine.getNotationNode().getElement();
+ IGraphicalEditPart firstLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(firstLifelineDRep);
+ IGraphicalEditPart secondLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(secondLifelineDRep);
+ Point messageAbsoluteStartConnectionPoint = firstLifelineEditPart.getFigure().getBounds().getTopLeft().translate(0, 15);
+ Point messageAbsoluteEndConnectionPoint = secondLifelineEditPart.getFigure().getBounds().getTopLeft().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("Message Create", diagramRespresentation, firstLifelineDRep, secondLifelineDRep, messageAbsoluteStartConnectionPoint, messageAbsoluteEndConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one addiional edge after the creation of a Message", nbEdges + 1 , diagram.getEdges().size());
+ Object element = diagram.getChildren().get(0);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ DNodeSpec lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject firstLifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+ element = diagram.getChildren().get(1);
+ siriusNewRepresentation = ((View) element).getElement();
+ lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject secondLifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ Assert.assertEquals("Check the message sort", MessageSort.CREATE_MESSAGE_LITERAL, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getMessageSort());
+
+ // check the added Fragment elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("Two fragments have been added to the interaction element", 2, fragments.size());
+
+ Object sendEvent = ((Message) msgSemanticElement).getSendEvent();
+ Assert.assertTrue("The send event be a UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the send event message name", SEND_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) sendEvent).getName());
+ Assert.assertEquals("The send event is on the first Lifeline", ((MessageOccurrenceSpecification) sendEvent).getCovereds().get(0), firstLifelineSemanticElement);
+ Object receiveEvent = ((Message) msgSemanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event must be a UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the receive event message name", RECEIVER_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("The receiver event is on the second Lifeline", ((MessageOccurrenceSpecification) receiveEvent).getCovereds().get(0), secondLifelineSemanticElement);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Fragment element after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message element after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message edge", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains two Fragment element after redoing the creation of the message", 2, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message element after redoing the creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message edge", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ Assert.assertEquals("Check the message sort", MessageSort.CREATE_MESSAGE_LITERAL, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getMessageSort());
+
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_ReplyMessage_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_ReplyMessage_CreationTest.java
new file mode 100755
index 0000000..7a64f69
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_ReplyMessage_CreationTest.java
@@ -0,0 +1,155 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageSort;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a MessageReply edge between two lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/twoLifelines/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_ReplyMessage_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message reply name */
+ private static final String MESSAGE_NAME = "Message_0_reply";
+
+ /** The created message reply sender name */
+ private static final String SEND_EVENT_MESSAGE_NAME = "Message_0_reply_sender";
+
+ /** The created message reply receiver name */
+ private static final String RECEIVER_EVENT_MESSAGE_NAME = "Message_0_reply_receiver";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createReplyMessageEdgeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must contain two Lifelines before creating the ReplyMessage", 2, diagram.getChildren().size());
+ Assert.assertEquals("The diagram does not contain any edge", 0, diagram.getEdges().size());
+
+ // Create a ReplyMessage between the two lifelines
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain two Lifelines before creating a ReplyMessage", 2, lifeLines.size());
+ Lifeline firstLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline secondLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+
+ EdgeTarget firstLifelineDRep = (EdgeTarget)firstLifeLine.getNotationNode().getElement();
+ EdgeTarget secondLifelineDRep = (EdgeTarget)secondLifeLine.getNotationNode().getElement();
+ IGraphicalEditPart firstLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(firstLifelineDRep);
+ IGraphicalEditPart secondLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(secondLifelineDRep);
+ Point messageAbsoluteStartConnectionPoint = firstLifelineEditPart.getFigure().getBounds().getTopLeft().translate(0, 15);
+ Point messageAbsoluteEndConnectionPoint = secondLifelineEditPart.getFigure().getBounds().getTopLeft().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("Message Reply", diagramRespresentation, firstLifelineDRep, secondLifelineDRep, messageAbsoluteStartConnectionPoint, messageAbsoluteEndConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one edge after the creation of a Message", nbEdges + 1 , diagram.getEdges().size());
+ Object element = diagram.getChildren().get(0);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ DNodeSpec lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject firstLifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+ element = diagram.getChildren().get(1);
+ siriusNewRepresentation = ((View) element).getElement();
+ lifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject secondLifelineSemanticElement = lifeLineRep.getSemanticElements().iterator().next();
+
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ Assert.assertEquals("Check the message sort", MessageSort.REPLY_LITERAL, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getMessageSort());
+
+ // check the added Fragment elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("Two fragments have been added to the interaction element", 2, fragments.size());
+
+ Object sendEvent = ((Message) msgSemanticElement).getSendEvent();
+ Assert.assertTrue("The send event be a UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the send event message name", SEND_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) sendEvent).getName());
+ Assert.assertEquals("The send event is on the first Lifeline", ((MessageOccurrenceSpecification) sendEvent).getCovereds().get(0), firstLifelineSemanticElement);
+ Object receiveEvent = ((Message) msgSemanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event must be a UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the receive event message name", RECEIVER_EVENT_MESSAGE_NAME, ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("The receiver event is on the second Lifeline", ((MessageOccurrenceSpecification) receiveEvent).getCovereds().get(0), secondLifelineSemanticElement);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Fragment element after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message element after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message edge", nbEdges, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains two Fragment element after redoing the creation of the message", 2, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message element after redoing the creation of the message", 1, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message edge", nbEdges + 1, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ msgSemanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Message", msgSemanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getName());
+ Assert.assertEquals("Check the message sort", MessageSort.REPLY_LITERAL, ((org.eclipse.uml2.uml.Message) msgSemanticElement).getMessageSort());
+
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_SynchroMessage_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_SynchroMessage_CreationTest.java
new file mode 100755
index 0000000..b15630a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/edges/Edge_SynchroMessage_CreationTest.java
@@ -0,0 +1,195 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.edges;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DEdgeSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Create a synchronous message edge between two lifelines
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Edge_SynchroMessage_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created message name */
+ private static final String MESSAGE_NAME = "Message_0";
+
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createSynchroMessageEdgeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ int nbEdges = diagram.getEdges().size();
+
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, nbDiagramChild);
+ Assert.assertEquals("The diagram does not contain any edge", 0, nbEdges);
+
+ // Create a first lifeline
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(100, 100), null);
+ fixture.flushDisplayEvents();
+
+ // lifeline is created
+ Assert.assertEquals("The diagram must contain one additional element after creating the first Lifeline", nbDiagramChild + 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ nbDiagramChild = diagram.getChildren().size();
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ DNodeSpec firstLifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject firstLifelineSemanticElement = firstLifeLineRep.getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Lifeline", firstLifelineSemanticElement instanceof org.eclipse.uml2.uml.Lifeline);
+ Assert.assertEquals("The root model does not contain any additional element after the creation of a Lifeline", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // create a second lifeline to be able to create message
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(400, 100), null);
+ fixture.flushDisplayEvents();
+
+ // A second lifeline is created and it is a GMF view notation.node
+ Assert.assertEquals("The diagram must contain one additional element after creating the second Lifeline", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ nbDiagramChild = diagram.getChildren().size();
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ DNodeSpec secondLifeLineRep = (DNodeSpec) siriusNewRepresentation;
+ EObject secondLifelineSemanticElement = ((DNodeSpec) secondLifeLineRep).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Lifeline", secondLifelineSemanticElement instanceof org.eclipse.uml2.uml.Lifeline);
+
+ // Create a message between the two created lifelines
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain two Lifelines", 2, lifeLines.size());
+ Lifeline firstLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ Lifeline secondLifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(1)).get();
+
+ EdgeTarget firstLifelineDRep = (EdgeTarget)firstLifeLine.getNotationNode().getElement();
+ EdgeTarget secondLifelineDRep = (EdgeTarget)secondLifeLine.getNotationNode().getElement();
+ IGraphicalEditPart firstLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(firstLifelineDRep);
+ IGraphicalEditPart secondLifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(secondLifelineDRep);
+ Point messageAbsoluteStartConnectionPoint = firstLifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ Point messageAbsoluteEndConnectionPoint = secondLifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+ fixture.applyEdgeCreationToolFromPalette("CR_Synchronous_Operation", diagramRespresentation, firstLifelineDRep, secondLifelineDRep, messageAbsoluteStartConnectionPoint, messageAbsoluteEndConnectionPoint);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain two additional elements after creating a Synchronous message correspondin to the created execution", 4, diagram.getChildren().size());
+ Assert.assertEquals("The diagram must contain two edges after creating a Synchronous message", nbEdges + 2, diagram.getEdges().size());
+ Assert.assertEquals("The diagram contains two additional elements after creating a BehaviorExecution node", nbDiagramChild + 2, diagram.getChildren().size());
+
+ // check the created messages
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ Assert.assertEquals("Five fragments have been added to the interaction element", 5, fragments.size());
+
+ // check the created message
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ EObject semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", semanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((Message) semanticElement).getName());
+
+ Object sendEvent = ((Message) semanticElement).getSendEvent();
+ Assert.assertTrue("The send event must be an UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("The send event must be on the first lifeline", ((DNodeSpec) firstLifelineDRep).getTarget(), ((MessageOccurrenceSpecification) sendEvent).getCovered());
+ Assert.assertEquals("Check the send event message name", MESSAGE_NAME + "_sender", ((MessageOccurrenceSpecification) sendEvent).getName());
+ Object receiveEvent = ((Message) semanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event must be an UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("The receive event must be on the second lifeline", ((DNodeSpec) secondLifelineDRep).getTarget(), ((MessageOccurrenceSpecification) receiveEvent).getCovered());
+ Assert.assertEquals("Check the receive event message name", MESSAGE_NAME + "_receiver", ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((Message) semanticElement).getName());
+
+ // check the reply message
+ element = diagram.getEdges().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML Message", semanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME + "_reply", ((Message) semanticElement).getName());
+
+ sendEvent = ((Message) semanticElement).getSendEvent();
+ Assert.assertTrue("The send event must be an UML MessageOccurrenceSpecification", sendEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the send event message name", MESSAGE_NAME + "_reply_sender", ((MessageOccurrenceSpecification) sendEvent).getName());
+ Assert.assertEquals("The send event must be on the seond Lifeline", ((MessageOccurrenceSpecification) sendEvent).getCovereds().get(0), secondLifelineSemanticElement);
+
+ receiveEvent = ((Message) semanticElement).getReceiveEvent();
+ Assert.assertTrue("The receive event must be an UML MessageOccurrenceSpecification", receiveEvent instanceof org.eclipse.uml2.uml.MessageOccurrenceSpecification);
+ Assert.assertEquals("Check the receive event message name", MESSAGE_NAME + "_reply_receiver", ((MessageOccurrenceSpecification) receiveEvent).getName());
+ Assert.assertEquals("The receive event must be on the first Lifeline", ((MessageOccurrenceSpecification) receiveEvent).getCovereds().get(0), firstLifelineSemanticElement);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any fragments after undoing the creation of the message", 0, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element does not contain any Message after undoing the creation of the message", 0, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram does not contain any edge after undoing the creation of the Message", 0, diagram.getEdges().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element contains five Fragments element after redoing the creation of the message", 5, interactionElem.getFragments().size());
+ Assert.assertEquals("The interaction element contains one Message after redoing the creation of the message", 2, interactionElem.getMessages().size());
+ Assert.assertEquals("The diagram contains one edge after redoing the creation of the Message", 2, diagram.getEdges().size());
+ element = diagram.getEdges().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DEdge", siriusNewRepresentation instanceof DEdgeSpec);
+ semanticElement = ((DEdgeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Message", semanticElement instanceof org.eclipse.uml2.uml.Message);
+ Assert.assertEquals("Check the message name", MESSAGE_NAME, ((org.eclipse.uml2.uml.Message) semanticElement).getName());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_ActionExecution_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_ActionExecution_CreationTest.java
new file mode 100755
index 0000000..9959f4c
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_ActionExecution_CreationTest.java
@@ -0,0 +1,158 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.ActionExecutionSpecification;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * ActionExecution node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/actionExecution/TopNode_ActionExecution_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_ActionExecution_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_ActionExecution_SequenceDiagram";
+
+ private static final String EXECUTION_NAME = "ExecutionOccurrenceSpecification";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createActionExecutionNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ Assert.assertEquals("The diagram must contains one Lifeline", 1, nbDiagramChild);
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+
+ // check the initial fragments of the interaction element
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ int fragmentsSize = fragments.size();
+ Assert.assertEquals("The interaction element does not contain any fragment", 0, fragmentsSize);
+
+ // Compute the execution position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one lifeline", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifelineDRep);
+ Point executionPosition = lifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+
+ // Create the execution on the lifeline
+ fixture.applyNodeCreationToolFromPalette("Action Execution Specification", diagramRespresentation, lifelineDRep, executionPosition, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains two additional elements after creating an ActionExecution node", nbDiagramChild + 2, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created first element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject executionStart = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created first element must be an UML ExecutionOccurrenceSpecification", executionStart instanceof org.eclipse.uml2.uml.ExecutionOccurrenceSpecification);
+ Assert.assertEquals("Check the execution start name", EXECUTION_NAME + "1start", ((ExecutionOccurrenceSpecification) executionStart).getName());
+ Assert.assertEquals("The execution is on the lifeline", ((DNodeSpec) lifelineDRep).getTarget(), ((ExecutionOccurrenceSpecification) executionStart).getCovered());
+
+ element = diagram.getChildren().get(2);
+ Assert.assertTrue("The created second element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject executionEnd = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created second element must be a UML ExecutionOccurrenceSpecification", executionEnd instanceof org.eclipse.uml2.uml.ExecutionOccurrenceSpecification);
+ Assert.assertEquals("check the execution finish name", EXECUTION_NAME + "2finish", ((ExecutionOccurrenceSpecification) executionEnd).getName());
+ Assert.assertEquals("The execution is on the lifeline", ((DNodeSpec) lifelineDRep).getTarget(), ((ExecutionOccurrenceSpecification) executionEnd).getCovered());
+
+ Object createdExecution = ((ExecutionOccurrenceSpecification) executionEnd).getExecution();
+ Assert.assertTrue("The created execution must be an UML ActionExecutionSpecification", createdExecution instanceof org.eclipse.uml2.uml.ActionExecutionSpecification);
+ Assert.assertEquals("Check the execution start element", executionStart, ((ActionExecutionSpecification) createdExecution).getStart());
+ Assert.assertEquals("Check the execution finsh element", executionEnd, ((ActionExecutionSpecification) createdExecution).getFinish());
+
+ // check the added fragments
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ Assert.assertEquals("Three fragments have been added to the interaction element", fragmentsSize + 3, interactionElem.getFragments().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of an ActionExecution node", nbDiagramChild, diagram.getChildren().size());
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ fragments = interactionElem.getFragments();
+ Assert.assertEquals("Three interaction element does not contain any fragments after undoing the creation of an ActionExecution node", 0, fragments.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains two additional elements after redoing the creation of an ActionExecution node", nbDiagramChild + 2, diagram.getChildren().size());
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ fragments = interactionElem.getFragments();
+ Assert.assertEquals("Three interaction element contains three fragments after redoing the creation of an ActionExecution node", 3, fragments.size());
+
+ element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created first element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ executionStart = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created first element must be a UML ExecutionOccurrenceSpecification", executionStart instanceof org.eclipse.uml2.uml.ExecutionOccurrenceSpecification);
+ Assert.assertEquals("Check the execution start name", EXECUTION_NAME + "1start", ((ExecutionOccurrenceSpecification) executionStart).getName());
+ Assert.assertEquals("The execution is on the lifeline", ((DNodeSpec) lifelineDRep).getTarget(), ((ExecutionOccurrenceSpecification) executionStart).getCovered());
+
+ element = diagram.getChildren().get(2);
+ Assert.assertTrue("The created second element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ executionEnd = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created second element must be a UML ExecutionOccurrenceSpecification", executionEnd instanceof org.eclipse.uml2.uml.ExecutionOccurrenceSpecification);
+ Assert.assertEquals("check the execution finish name", EXECUTION_NAME + "2finish", ((ExecutionOccurrenceSpecification) executionEnd).getName());
+ Assert.assertEquals("The execution is on the lifeline", ((DNodeSpec) lifelineDRep).getTarget(), ((ExecutionOccurrenceSpecification) executionEnd).getCovered());
+
+ createdExecution = ((ExecutionOccurrenceSpecification) executionEnd).getExecution();
+ Assert.assertTrue("The created execution must be an UML ActionExecutionSpecification", createdExecution instanceof org.eclipse.uml2.uml.ActionExecutionSpecification);
+ Assert.assertEquals("Check the execution start element", executionStart, ((ActionExecutionSpecification) createdExecution).getStart());
+ Assert.assertEquals("Check the execution finish element", executionEnd, ((ActionExecutionSpecification) createdExecution).getFinish());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_CombinedFragment_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_CombinedFragment_CreationTest.java
new file mode 100755
index 0000000..828c759
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_CombinedFragment_CreationTest.java
@@ -0,0 +1,153 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionConstraint;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * CombinedFragment node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_CombinedFragment_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created combined fragment name */
+ private static final String COMBINED_FRAGMENT_NAME = "CombinedFragment1";
+
+ /** The created interaction operand name */
+ private static final String INTERACTION_OPERAND_NAME = "InteractionOperand1";
+
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createCombinedFragmenNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ Assert.assertEquals("The diagram must contains one Lifeline before creating the CombinedFragment node", 1, nbDiagramChild);
+
+ // check the initial number of interaction's fragments
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ int fragmentsSize = interactionElem.getFragments().size();
+ Assert.assertEquals("The interaction element does not conatin any fragment before the creation of the CombinedFragment", 0, fragmentsSize);
+
+ // get the position/size of the CombinedFragment to be created
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ Point cfStartPosition = lifeLine.getProperLogicalBounds().getTopLeft().translate(0,15);
+
+ // create the combined fragment
+ fixture.applyNodeCreationToolFromPalette("CombinedFragment", diagramRespresentation, diagramRespresentation, cfStartPosition, new Dimension(120,80));
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains one additional element after creating a CombinedFragment node", nbDiagramChild + 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainerSpec);
+ EObject semanticElement = ((DNodeContainerSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML CombinedFragment", semanticElement instanceof org.eclipse.uml2.uml.CombinedFragment);
+
+ // check the number of added fragments
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ Assert.assertEquals("The interaction element conatins one additional fragment after the creation of the combined fragment", fragmentsSize + 1, interactionElem.getFragments().size());
+
+ // check the combined fragment
+ CombinedFragment combinedFragment = (CombinedFragment) semanticElement;
+ Assert.assertEquals("The CombinedFragment is on the Lifeline", ((DNodeSpec) lifelineDRep).getTarget(), combinedFragment.getCovereds().get(0));
+
+ // check the eAnnotations
+ EList<EAnnotation> cfEAnnotations = combinedFragment.getEAnnotations();
+ Assert.assertEquals("The created CombinedFragment element has two eAnnotation elements", 2, cfEAnnotations.size());
+ EAnnotation eAnnotation = cfEAnnotations.get(0);
+ Assert.assertEquals("Check the first eAnnotation name", COMBINED_FRAGMENT_NAME + "_start", eAnnotation.getSource());
+ eAnnotation = cfEAnnotations.get(1);
+ Assert.assertEquals("Check the second eAnnotation name", COMBINED_FRAGMENT_NAME + "_end", eAnnotation.getSource());
+
+ // check the created operand element
+ EList<InteractionOperand> operands = combinedFragment.getOperands();
+ Assert.assertNotNull("The Operands list of the created CombinedFragment is not null", operands);
+ Assert.assertEquals("The created CombinedFragment element has one Operand element", 1, operands.size());
+ InteractionOperand operand = operands.get(0);
+ Assert.assertEquals("Check the name of the created Operand element", INTERACTION_OPERAND_NAME, operand.getName());
+
+ // check the eAnnotations of the operand
+ EList<EAnnotation> operandEAnnotations = operand.getEAnnotations();
+ Assert.assertEquals("The created Operand element has two eAnnotation elements", 2, operandEAnnotations.size());
+ eAnnotation = operandEAnnotations.get(0);
+ Assert.assertEquals("Check the first eAnnotation name", INTERACTION_OPERAND_NAME + "_start", eAnnotation.getSource());
+ eAnnotation = operandEAnnotations.get(1);
+ Assert.assertEquals("Check the second eAnnotation name", INTERACTION_OPERAND_NAME + "_end", eAnnotation.getSource());
+
+ // check the created InteractionConstraint of the operand element
+ InteractionConstraint guard = operand.getGuard();
+ Assert.assertNotNull("The Operand has one InteractionConstraint element after the creation of the combined fragment", guard);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of a CombinedFragment", nbDiagramChild, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one additional element after redoing the creation of a CombinedFragment", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainerSpec);
+ semanticElement = ((DNodeContainerSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be a UML CombinedFragment", semanticElement instanceof org.eclipse.uml2.uml.CombinedFragment);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Comment_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Comment_CreationTest.java
new file mode 100755
index 0000000..3761ff4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Comment_CreationTest.java
@@ -0,0 +1,111 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Comment node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_Comment_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createCommentNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+
+ Assert.assertEquals("The diagram contains one Lifeline", 1, nbDiagramChild);
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ Assert.assertEquals("The interaction element does not contain any Comment element", 0, interactionElem.getOwnedComments().size());
+
+ // Compute the Comment position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one lifeline", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifelineDRep);
+ Point commentPosition = lifelineEditPart.getFigure().getBounds().getTop().translate(75, 115);
+
+ // Create the Comment
+ fixture.applyNodeCreationToolFromPalette("Comment", diagramRespresentation, diagramRespresentation, commentPosition, new Dimension(80,50));
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains one additional element after creating a top node", nbDiagramChild + 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Comment);
+ Assert.assertEquals("The interaction element contains one Comment element", 1, interactionElem.getOwnedComments().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Comment element after undoing the creation of the Comment", 0, interactionElem.getOwnedComments().size());
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of the Comment", nbDiagramChild, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one additional element after redoing the creation of the Comment", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Comment);
+ Assert.assertEquals("The interaction element contains one Comment element", 1, interactionElem.getOwnedComments().size());
+ }
+
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Constraint_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Constraint_CreationTest.java
new file mode 100755
index 0000000..639f55f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Constraint_CreationTest.java
@@ -0,0 +1,110 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Constraint node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_Constraint_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createCommentNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+
+ Assert.assertEquals("The diagram contains one Lifeline", 1, nbDiagramChild);
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ Assert.assertEquals("The interaction element does not contain any Constraint element", 0, interactionElem.getOwnedRules().size());
+
+ // Compute the Constraint position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one lifeline", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifelineDRep);
+ Point constraintPosition = lifelineEditPart.getFigure().getBounds().getTop().translate(5, 15);
+
+ // Create the Constraint
+ fixture.applyNodeCreationToolFromPalette("Constraint", diagramRespresentation, diagramRespresentation, constraintPosition, new Dimension(150,80));
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains one additional element after creating a top node", nbDiagramChild + 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Constraint", semanticElement instanceof org.eclipse.uml2.uml.Constraint);
+ Assert.assertEquals("The interaction element contains one Constraint element", 1, interactionElem.getOwnedRules().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The interaction element does not contain any Constraint element after undoing the creation of the Constraint", 0, interactionElem.getOwnedRules().size());
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of the Constraint", nbDiagramChild, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one additional element after redoing the creation of the Constraint", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Constraint", semanticElement instanceof org.eclipse.uml2.uml.Constraint);
+ Assert.assertEquals("The interaction element contains one Constraint element", 1, interactionElem.getOwnedRules().size());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Gate_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Gate_CreationTest.java
new file mode 100755
index 0000000..5585ac6
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Gate_CreationTest.java
@@ -0,0 +1,111 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Gate;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Gate node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_Gate_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The created Gate name */
+ private static final String GATE_NAME = "Gate1";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createGateNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+
+ Assert.assertEquals("The diagram contains one Lifeline", 1, diagram.getChildren().size());
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+
+ // Compute the Gate position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one lifeline", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifelineDRep);
+ Point gatePosition = lifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+
+ // Create the Gate
+ fixture.applyNodeCreationToolFromPalette("Gate", diagramRespresentation, diagramRespresentation, gatePosition, new Dimension (100, 50));
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains one additional element after the creation of a Gate node", nbDiagramChild + 1 , diagram.getChildren().size());
+ Object element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Gate);
+ Assert.assertEquals("Check the name of the gate", GATE_NAME, ((Gate) semanticElement).getName());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of a Gate node", nbDiagramChild , diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one additional element after redoing the creation of a Gate node", nbDiagramChild + 1 , diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Comment", semanticElement instanceof org.eclipse.uml2.uml.Gate);
+ Assert.assertEquals("Check the name of the gate", GATE_NAME, ((Gate) semanticElement).getName());
+
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_InteractionOperand_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_InteractionOperand_CreationTest.java
new file mode 100755
index 0000000..f8c2cb5
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_InteractionOperand_CreationTest.java
@@ -0,0 +1,168 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * InteractionOperand node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/combinedFragment/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_InteractionOperand_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ /** The first created interaction operand name */
+ private static final String INTERACTION_OPERAND1_NAME = "InteractionOperand2";
+
+ /** The second created interaction operand name */
+ private static final String INTERACTION_OPERAND2_NAME = "InteractionOperand3";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInteractionOperandNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+ Assert.assertEquals("The diagram must contains one Lifline and one CombinedFragment before creating the InteractionOperand node", 2, nbDiagramChild);
+
+ // check the initial Operand elements
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ InteractionFragment combinedFragment = interactionElem.getFragments().get(0);
+ EList<InteractionOperand> operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertNotNull("The list of operands is not null", operands);
+ int operandsSize = operands.size();
+ Assert.assertEquals("The combinedFragment conatins only one InteractionOperand by default before the creation of an InteractionOperand node", operandsSize, operands.size());
+
+ // get the position of the InteractinOperand to be created
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ Object interactionOperandContainer = diagram.getChildren().get(1);
+ org.eclipse.sirius.diagram.sequence.business.internal.elements.CombinedFragment cf = ISequenceElementAccessor.getCombinedFragment((View) interactionOperandContainer).get();
+ EdgeTarget cfDRep = (EdgeTarget)cf.getNotationNode().getElement();
+ IGraphicalEditPart cfEditPart = (IGraphicalEditPart) fixture.findEditPart(cfDRep);
+ Point interOperandPosition = cfEditPart.getFigure().getBounds().getTop().translate(0, 15);
+
+ // create the first InteractionOperand fragment
+ fixture.applyNodeCreationToolFromPalette("Interaction Operand", diagramRespresentation, cfDRep, interOperandPosition, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram does not contain any additional element after creating an InteractionOperand sub node", nbDiagramChild, diagram.getChildren().size());
+
+ // check the number of added operands
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ combinedFragment = interactionElem.getFragments().get(0);
+ operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertNotNull("The list of operands is not null", operands);
+ Assert.assertEquals("The CombinedFragment conatins one additional operand after the creation of an InteractionOperand node", operandsSize + 1, operands.size());
+
+ InteractionOperand createdOperand = operands.get(1);
+ Assert.assertEquals("Check the name of the created Operand element", INTERACTION_OPERAND1_NAME, createdOperand.getName());
+
+ // check the eAnnotations of the operand
+ EList<EAnnotation> operandEAnnotations = createdOperand.getEAnnotations();
+ Assert.assertEquals("The created Operand element has two eAnnotation elements", 2, operandEAnnotations.size());
+ EAnnotation eAnnotation = operandEAnnotations.get(0);
+ Assert.assertEquals("Check the first eAnnotation name", INTERACTION_OPERAND1_NAME + "_start", eAnnotation.getSource());
+ eAnnotation = operandEAnnotations.get(1);
+ Assert.assertEquals("Check the second eAnnotation name", INTERACTION_OPERAND1_NAME + "_end", eAnnotation.getSource());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ combinedFragment = interactionElem.getFragments().get(0);
+ operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertEquals("The CombinedFragment conatins only one Operand after undoing the creation of an InteractionOperand node", operandsSize, operands.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ combinedFragment = interactionElem.getFragments().get(0);
+ operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertEquals("The CombinedFragment conatins one additional Operand after redoing the creation of an InteractionOperand node", operandsSize + 1, operands.size());
+ operandsSize = operands.size();
+
+ // create the second InteractionOperand fragment
+ fixture.applyNodeCreationToolFromPalette("Interaction Operand", diagramRespresentation, cfDRep, interOperandPosition, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram does not contain any additional element after creating a second InteractionOperand node", nbDiagramChild, diagram.getChildren().size());
+
+ // check the number of added operands
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ combinedFragment = interactionElem.getFragments().get(0);
+ operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertNotNull("The list of operands is not null", operands);
+ Assert.assertEquals("The CombinedFragment conatins one additional operand after the creation of a second InteractionOperand node", operandsSize + 1, operands.size());
+
+ createdOperand = operands.get(2);
+ Assert.assertEquals("Check the name of the created Operand element", INTERACTION_OPERAND2_NAME, createdOperand.getName());
+
+ // check the eAnnotations of the operand
+ operandEAnnotations = createdOperand.getEAnnotations();
+ Assert.assertEquals("The created Operand element has two eAnnotation elements", 2, operandEAnnotations.size());
+ eAnnotation = operandEAnnotations.get(0);
+ Assert.assertEquals("Check the first eAnnotation name", INTERACTION_OPERAND2_NAME + "_start", eAnnotation.getSource());
+ eAnnotation = operandEAnnotations.get(1);
+ Assert.assertEquals("Check the second eAnnotation name", INTERACTION_OPERAND2_NAME + "_end", eAnnotation.getSource());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ combinedFragment = interactionElem.getFragments().get(0);
+ operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertEquals("The CombinedFragment conatins only two Operand after undoing the creation of the second InteractionOperand node", operandsSize, operands.size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ combinedFragment = interactionElem.getFragments().get(0);
+ operands = ((CombinedFragment) combinedFragment).getOperands();
+ Assert.assertEquals("The CombinedFragment conatins two additional Operand after redoing the creation of the second InteractionOperand node", operandsSize + 1, operands.size());
+
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_InteractionUse_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_InteractionUse_CreationTest.java
new file mode 100755
index 0000000..2c9bb3d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_InteractionUse_CreationTest.java
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * InteractionUse node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_InteractionUse_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createInteractionUseNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+
+ Assert.assertEquals("The diagram must contains one Lifeline", 1, nbDiagramChild);
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+
+ // Compute the InteractionUse position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one lifeline", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifelineDRep);
+ Point interactionUsePosition = lifelineEditPart.getFigure().getBounds().getTop().translate(5, 15);
+
+ // Create the InteractionUse
+ fixture.applyNodeCreationToolFromPalette("Interaction Use", diagramRespresentation, diagramRespresentation, interactionUsePosition, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram contains one additional element the creation of an InteractionUse", nbDiagramChild + 1 , diagram.getChildren().size());
+ Object element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainerSpec);
+ EObject semanticElement = ((DNodeContainerSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML InteractionUse", semanticElement instanceof org.eclipse.uml2.uml.InteractionUse);
+
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ int fragmentsSize = fragments.size();
+ Assert.assertEquals("One fragment has been added to the interaction element", 1, fragmentsSize);
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of an InteractionUse", nbDiagramChild, diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram contains one additional element after redoing the creation of an InteractionUse", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(1);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeContainerSpec);
+ semanticElement = ((DNodeContainerSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML InteractionUse", semanticElement instanceof org.eclipse.uml2.uml.InteractionUse);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Lifeline_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Lifeline_CreationTest.java
new file mode 100755
index 0000000..e30a0f0
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_Lifeline_CreationTest.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Lifeline node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/empty/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_Lifeline_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createLifelineNodeTest() {
+
+ int nbElement = fixture.getModel().getOwnedElements().size();
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ Assert.assertEquals("The diagram must be empty before creating the top node", 0, diagram.getChildren().size());
+ int nbDiagramChild = diagram.getChildren().size();
+
+ // Create a lifeline
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ fixture.applyNodeCreationToolFromPalette("Lifeline", diagramRespresentation, diagramRespresentation, new Point(100, 100), null);
+ fixture.flushDisplayEvents();
+
+ // Lifeline is created and it is a GMF view notation.node
+ Assert.assertEquals("The diagram must contain one additional element after creating a Lifeline", nbDiagramChild + 1, diagram.getChildren().size());
+ Object element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ EObject siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ EObject semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Lifeline", semanticElement instanceof org.eclipse.uml2.uml.Lifeline);
+ Assert.assertEquals("The root does not contain any additional element after the creation of a Lifeline sub node", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must be empty after undoing the creation of the Lifeline", nbDiagramChild, diagram.getChildren().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElement, fixture.getModel().getOwnedElements().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram must contain one addtional element after redoing the creation of a Lifeline", nbDiagramChild + 1, diagram.getChildren().size());
+ element = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", element instanceof View);
+ siriusNewRepresentation = ((View) element).getElement();
+ Assert.assertTrue("The created sirus node must be a DNode", siriusNewRepresentation instanceof DNodeSpec);
+ semanticElement = ((DNodeSpec) siriusNewRepresentation).getSemanticElements().iterator().next();
+ Assert.assertTrue("The created element must be an UML Lifeline", semanticElement instanceof org.eclipse.uml2.uml.Lifeline);
+ Assert.assertEquals("The root does not contain any additional element after the creation of a sub node", nbElement, fixture.getModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_StateInvariant_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_StateInvariant_CreationTest.java
new file mode 100755
index 0000000..cc42806
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.sequence.tests/src/org/eclipse/papyrus/uml/siriusdiag/sequence/tests/creation/nodes/Node_StateInvariant_CreationTest.java
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Rengin Battal (ARTAL) - rengin.battal@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.sequence.tests.creation.nodes;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.papyrus.uml.siriusdiag.sequence.tests.SequenceDiagramTestsTool;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeSpec;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElementAccessor;
+import org.eclipse.sirius.diagram.sequence.business.internal.elements.Lifeline;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.StateInvariant;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * StateInvariant node creation test
+ * @author battal
+ *
+ */
+@SuppressWarnings("restriction")
+@PluginResource("resource/SequenceDiagramTest/creation/oneLifeline/TopNode_CreationTest.di") // the resource to import for the test in the workspace
+public class Node_StateInvariant_CreationTest {
+
+ /** The sequence diagram name */
+ private static final String DIAGRAM_NAME = "TopNode_Creation_SequenceDiagram";
+
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void createStateInvariantNodeTest() {
+
+ // Get diagram edit part as for all diagram
+ DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ Diagram diagram = diagramEditpart.getDiagramView();
+ int nbDiagramChild = diagram.getChildren().size();
+
+ Assert.assertEquals("The diagram must contains one Lifeline", 1, diagram.getChildren().size());
+ Assert.assertEquals("The root model contains one interaction element", 1, fixture.getModel().getOwnedElements().size());
+
+ // Compute the StateInvariant position
+ DDiagram diagramRespresentation = (DDiagram) diagram.getElement();
+ List<View> lifeLines = SequenceDiagramTestsTool.getView(fixture, Lifeline.viewpointElementPredicate());
+ Assert.assertEquals("The diagram must contain one Lifeline", 1, lifeLines.size());
+ Lifeline lifeLine = ISequenceElementAccessor.getLifeline(lifeLines.get(0)).get();
+ EdgeTarget lifelineDRep = (EdgeTarget)lifeLine.getNotationNode().getElement();
+ IGraphicalEditPart lifelineEditPart = (IGraphicalEditPart) fixture.findEditPart(lifelineDRep);
+ Point statePosition = lifelineEditPart.getFigure().getBounds().getTop().translate(0, 15);
+
+ // Create the StateInvariant on the lifeline
+ fixture.applyNodeCreationToolFromPalette("State Invariant", diagramRespresentation, lifelineDRep, statePosition, null);
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram does not contain any additional element after the creation of a StateInvariant node", nbDiagramChild , diagram.getChildren().size());
+
+ Interaction interactionElem = (Interaction) fixture.getModel().getOwnedElements().get(0);
+ EList<InteractionFragment> fragments = interactionElem.getFragments();
+ Assert.assertNotNull("The list of fragments is not null", fragments);
+ int fragmentsSize = fragments.size();
+ Assert.assertEquals("One fragment has been added to the interaction element", 1, fragmentsSize);
+
+ InteractionFragment fragment = fragments.iterator().next();
+ Assert.assertTrue("The created element must be an UML StateInvariant", fragment instanceof org.eclipse.uml2.uml.StateInvariant);
+ Assert.assertEquals("The StateVariant is on the Lifeline", ((DNodeSpec) lifelineDRep).getTarget(), ((StateInvariant) fragment).getCovereds().get(0));
+
+ // undo
+ fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any additional element after undoing the creation of a StateInvariant node", nbDiagramChild , diagram.getChildren().size());
+
+ // redo
+ fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+ Assert.assertEquals("The diagram does not contain any additional element after redoing the creation of a StateInvariant node", nbDiagramChild , diagram.getChildren().size());
+ fragment = fragments.iterator().next();
+ Assert.assertTrue("The created element must be an UML StateInvariant", fragment instanceof org.eclipse.uml2.uml.StateInvariant);
+ Assert.assertEquals("The StateVariant is on the Lifeline", ((DNodeSpec) lifelineDRep).getTarget(), ((StateInvariant) fragment).getCovereds().get(0));
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.classpath b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.classpath
new file mode 100755
index 0000000..a42a828
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.classpath
@@ -0,0 +1,11 @@
+<?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-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.project b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.project
new file mode 100755
index 0000000..d9ed747
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.siriusdiag.statemachine.tests</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..5b83d23
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,110 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
+org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=ignore
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..353104a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sirius - UML State Machine Diagram Tests
+Bundle-SymbolicName: org.eclipse.papyrus.uml.siriusdiag.statemachine.tests
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.StateMachineTestPlugin
+Bundle-Vendor: Eclipse Modeling Project
+Require-Bundle: org.eclipse.papyrus.junit.utils;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[2.1.0,3.0.0)",
+ org.junit;bundle-version="[4.13.0,5.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.5.0,6.0.0)",
+ org.eclipse.sirius.tests.junit;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.sirius.diagram.ui;bundle-version="[6.4.2,7.0.0)",
+ org.eclipse.papyrus.siriusdiag.junit.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.emf.gmf;bundle-version="[2.1.0,3.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: uml.diagram.clazz.tests.examples
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.papyrus.junit.utils.rules
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/about.html b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/about.html
new file mode 100755
index 0000000..997c5a2
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/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>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") 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>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/build.properties b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/build.properties
new file mode 100755
index 0000000..9384875
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ about.html
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/pom.xml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/pom.xml
new file mode 100755
index 0000000..2b1002b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.statemachine.tests</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.aird
new file mode 100755
index 0000000..d21fbd8
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.aird
@@ -0,0 +1,1012 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:style_1="http://www.eclipse.org/sirius/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style http://www.eclipse.org/sirius/description/style/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_9tS3QEiXEeyrg4BfyzIMvw" selectedViews="_9xQKMEiXEeyrg4BfyzIMvw _9yh8kEiXEeyrg4BfyzIMvw _9y0QcEiXEeyrg4BfyzIMvw" version="14.3.1.202003261200">
+ <semanticResources>test_create_sm_edges.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_9xQKMEiXEeyrg4BfyzIMvw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_9yh8kEiXEeyrg4BfyzIMvw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_91piAEiXEeyrg4BfyzIMvw" name="test_create_sm_edges" repPath="#_90ay8EiXEeyrg4BfyzIMvw" changeId="b1e63a13-a167-4ce6-a253-6d2f5d3cd599">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ <target xmi:type="uml:StateMachine" href="test_create_sm_edges.uml#__UnQoBeSEeye9rbTyh9wBA"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_9y0QcEiXEeyrg4BfyzIMvw">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_90ay8EiXEeyrg4BfyzIMvw">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_94IOQEiXEeyrg4BfyzIMvw" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_94IOQUiXEeyrg4BfyzIMvw" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.statemachine"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_92pAgEiXEeyrg4BfyzIMvw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_92pAgUiXEeyrg4BfyzIMvw" type="Sirius" element="_90ay8EiXEeyrg4BfyzIMvw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_93pGEEiXEeyrg4BfyzIMvw" type="2002" element="_93NBMEiXEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_94AScEiXEeyrg4BfyzIMvw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_94A5gEiXEeyrg4BfyzIMvw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_-5070EiXEeyrg4BfyzIMvw" type="3008" element="_-5sY8EiXEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_-51i4EiXEeyrg4BfyzIMvw" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_-52xAEiXEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_DKVuwEiYEeyrg4BfyzIMvw" type="3008" element="_DKHsUEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_DKW84EiYEeyrg4BfyzIMvw" type="3012" element="_DKJhgEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_DKZZIEiYEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DKZZIUiYEeyrg4BfyzIMvw" x="17" y="-6"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DUrWgEiYEeyrg4BfyzIMvw" type="3005" element="_DKLWsEiYEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DUrWgUiYEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DUrWgkiYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DKW84UiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DKW84kiYEeyrg4BfyzIMvw" x="-8" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DUg-cEiYEeyrg4BfyzIMvw" type="3012" element="_DKL9wEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_DUg-c0iYEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DUg-dEiYEeyrg4BfyzIMvw" x="-41" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DUr9kEiYEeyrg4BfyzIMvw" type="3005" element="_DKMk0EiYEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DUr9kUiYEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DUr9kkiYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DUg-cUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DUg-ckiYEeyrg4BfyzIMvw" x="-8" y="18" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DKWV0EiYEeyrg4BfyzIMvw" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_DKWV0UiYEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_F8KWIEiYEeyrg4BfyzIMvw" type="3008" element="_F8BzQEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_F8K9MEiYEeyrg4BfyzIMvw" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_F8K9MUiYEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_Xq7ogEiZEeyrg4BfyzIMvw" type="3007" element="_Xq1h4EiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Xq8PkEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Xq8PkUiZEeyrg4BfyzIMvw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Xq8PkkiZEeyrg4BfyzIMvw" type="3013" element="_Xq2I8EiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Xq8Pk0iZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Xq8PlEiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Xq7ogUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Xq7ogkiZEeyrg4BfyzIMvw" x="18" y="18" width="67" height="55"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z32MAEiZEeyrg4BfyzIMvw" type="3007" element="_Z3m7cEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z32zEEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z32zEUiZEeyrg4BfyzIMvw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4HRwEiZEeyrg4BfyzIMvw" type="3013" element="_Z3m7cUiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4HRwUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4HRwkiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z32MAUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z32MAkiZEeyrg4BfyzIMvw" x="18" y="84" width="67" height="49"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z32zEkiZEeyrg4BfyzIMvw" type="3007" element="_Z3nigkiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z32zFUiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z32zFkiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4HRw0iZEeyrg4BfyzIMvw" type="3002" element="_Z3nig0iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4HRxEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4HRxUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z32zE0iZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z32zFEiZEeyrg4BfyzIMvw" x="134" y="18" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z33aIEiZEeyrg4BfyzIMvw" type="3007" element="_Z3owoUiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z34oQEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z34oQUiZEeyrg4BfyzIMvw" y="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4HRxkiZEeyrg4BfyzIMvw" type="3005" element="_Z3owokiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4HRx0iZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4HRyEiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z33aIUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z33aIkiZEeyrg4BfyzIMvw" x="246" y="12" width="60" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z36dcEiZEeyrg4BfyzIMvw" type="3007" element="_Z3pXsEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z36dc0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z36ddEiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4HRyUiZEeyrg4BfyzIMvw" type="3005" element="_Z3pXsUiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4HRykiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4HRy0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z36dcUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z36dckiZEeyrg4BfyzIMvw" x="126" y="53" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z385sEiZEeyrg4BfyzIMvw" type="3007" element="_Z3p-wEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z39gwEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z39gwUiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4H40EiZEeyrg4BfyzIMvw" type="3005" element="_Z3p-wUiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4H40UiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4H40kiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z385sUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z385skiZEeyrg4BfyzIMvw" x="16" y="223" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z3_9AEiZEeyrg4BfyzIMvw" type="3007" element="_Z3ql0kiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z3_9A0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z3_9BEiZEeyrg4BfyzIMvw" x="16" y="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4H400iZEeyrg4BfyzIMvw" type="3005" element="_Z3ql00iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4H41EiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4H41UiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z3_9AUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z3_9AkiZEeyrg4BfyzIMvw" x="18" y="146" width="15" height="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4CZQEiZEeyrg4BfyzIMvw" type="3007" element="_Z3rM4kiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z4DAUEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z4DAUUiZEeyrg4BfyzIMvw" x="-10" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4H41kiZEeyrg4BfyzIMvw" type="3005" element="_Z3rM40iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4H410iZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4H42EiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4CZQUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4CZQkiZEeyrg4BfyzIMvw" x="252" y="164" width="60" height="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4EOcEiZEeyrg4BfyzIMvw" type="3007" element="_Z3rz8kiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z4E1gEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z4E1gUiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4If4EiZEeyrg4BfyzIMvw" type="3002" element="_Z3rz80iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4If4UiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4If4kiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4EOcUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4EOckiZEeyrg4BfyzIMvw" x="216" y="228" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4E1gkiZEeyrg4BfyzIMvw" type="3007" element="_Z3tpIkiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z4E1hUiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z4E1hkiZEeyrg4BfyzIMvw" x="17"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4If40iZEeyrg4BfyzIMvw" type="3005" element="_Z3tpI0iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4If5EiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4If5UiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4E1g0iZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4E1hEiZEeyrg4BfyzIMvw" x="72" y="206" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4GqsEiZEeyrg4BfyzIMvw" type="3008" element="_Z3sbAkiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z4If5kiZEeyrg4BfyzIMvw" type="3012" element="_Z3sbBUiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z4JG8EiZEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z4JG8UiZEeyrg4BfyzIMvw" x="-53" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4NYYEiZEeyrg4BfyzIMvw" type="3005" element="_Z3sbBkiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4NYYUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4NYYkiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4If50iZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4If6EiZEeyrg4BfyzIMvw" x="-8" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4K8IEiZEeyrg4BfyzIMvw" type="3012" element="_Z3tCEEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_Z4LjMEiZEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Z4LjMUiZEeyrg4BfyzIMvw" x="17" y="-6"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4N_cEiZEeyrg4BfyzIMvw" type="3005" element="_Z3tCEUiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4N_cUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4N_ckiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4K8IUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4K8IkiZEeyrg4BfyzIMvw" x="60" y="15" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Z4Gqs0iZEeyrg4BfyzIMvw" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_Z4GqtEiZEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_fXmZQEiZEeyrg4BfyzIMvw" type="3008" element="_fXdPUEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_fXmZQ0iZEeyrg4BfyzIMvw" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_fXmZREiZEeyrg4BfyzIMvw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fXmZRUiZEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fXmZRkiZEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_fXmZR0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_fXmZQUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fXmZQkiZEeyrg4BfyzIMvw" x="39" y="3"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Z4GqtUiZEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Z4GqtkiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4GqsUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4GqskiZEeyrg4BfyzIMvw" x="134" y="102"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F8K9MkiYEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F8K9M0iYEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F8K9NEiYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F8KWIUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F8KWIkiYEeyrg4BfyzIMvw" y="3" width="371" height="264"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DKWV0kiYEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DKWV00iYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DKVuwUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DKVuwkiYEeyrg4BfyzIMvw" x="54" y="27"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DoUEMEiYEeyrg4BfyzIMvw" type="3008" element="_DoK6QEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_DoVSUEiYEeyrg4BfyzIMvw" type="3012" element="_DoLhUEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_DoVSU0iYEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DoVSVEiYEeyrg4BfyzIMvw" x="-48" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DobY8EiYEeyrg4BfyzIMvw" type="3005" element="_DoMIYEiYEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DobY8UiYEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DobY8kiYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DoVSUUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DoVSUkiYEeyrg4BfyzIMvw" x="-8" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DoYVoEiYEeyrg4BfyzIMvw" type="3012" element="_DoMvcEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_DoY8sEiYEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DoY8sUiYEeyrg4BfyzIMvw" x="17" y="-6"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DocnEEiYEeyrg4BfyzIMvw" type="3005" element="_DoMvcUiYEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DocnEUiYEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DocnEkiYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DoYVoUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DoYVokiYEeyrg4BfyzIMvw" x="-8" y="18" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DoUrQEiYEeyrg4BfyzIMvw" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_DoUrQUiYEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_HW-HQEiYEeyrg4BfyzIMvw" type="3008" element="_HW2LcEiYEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_HW-uUEiYEeyrg4BfyzIMvw" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_HW-uUUiYEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_jsxCsEiZEeyrg4BfyzIMvw" type="3007" element="_jspG4EiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_jsxCs0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jsxCtEiZEeyrg4BfyzIMvw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jsxCtUiZEeyrg4BfyzIMvw" type="3013" element="_jspt8EiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jsxCtkiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jsxCt0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jsxCsUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jsxCskiZEeyrg4BfyzIMvw" x="6" width="73" height="55"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljhwAEiZEeyrg4BfyzIMvw" type="3007" element="_ljTGgEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljiXEEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljiXEUiZEeyrg4BfyzIMvw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7YpEiZEeyrg4BfyzIMvw" type="3013" element="_ljTtkEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj7YpUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj7YpkiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljhwAUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljhwAkiZEeyrg4BfyzIMvw" x="6" y="64" width="73" height="49"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljiXEkiZEeyrg4BfyzIMvw" type="3007" element="_ljTtlEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljiXFUiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljiXFkiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7Yp0iZEeyrg4BfyzIMvw" type="3002" element="_ljUUoEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj7YqEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj7YqUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljiXE0iZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljiXFEiZEeyrg4BfyzIMvw" x="33" y="326" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lji-IEiZEeyrg4BfyzIMvw" type="3007" element="_ljViwkiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_lji-I0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lji-JEiZEeyrg4BfyzIMvw" y="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7_sEiZEeyrg4BfyzIMvw" type="3005" element="_ljViw0iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj7_sUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj7_skiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lji-IUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lji-IkiZEeyrg4BfyzIMvw" x="174" y="274" width="60" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljmBcEiZEeyrg4BfyzIMvw" type="3007" element="_ljWJ10iZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljmogEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljmogUiZEeyrg4BfyzIMvw" x="16" y="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7_s0iZEeyrg4BfyzIMvw" type="3005" element="_ljWw4EiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj7_tEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj7_tUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljmBcUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljmBckiZEeyrg4BfyzIMvw" x="300" y="274" width="15" height="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljqS4EiZEeyrg4BfyzIMvw" type="3007" element="_ljWw5EiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljq58EiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljq58UiZEeyrg4BfyzIMvw" x="-10" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7_tkiZEeyrg4BfyzIMvw" type="3005" element="_ljWw5UiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj7_t0iZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj7_uEiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljqS4UiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljqS4kiZEeyrg4BfyzIMvw" x="361" y="286" width="60" height="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljt9QEiZEeyrg4BfyzIMvw" type="3007" element="_ljXX8kiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljt9Q0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljt9REiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7_uUiZEeyrg4BfyzIMvw" type="3002" element="_ljXX80iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj7_ukiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj7_u0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljt9QUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljt9QkiZEeyrg4BfyzIMvw" x="33" y="226" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljukUEiZEeyrg4BfyzIMvw" type="3007" element="_ljX_AkiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljukU0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljukVEiZEeyrg4BfyzIMvw" x="17" y="-6"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj8mwEiZEeyrg4BfyzIMvw" type="3005" element="_ljX_A0iZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj8mwUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj8mwkiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljukUUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljukUkiZEeyrg4BfyzIMvw" x="35" y="288" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ljyOsEiZEeyrg4BfyzIMvw" type="3007" element="_ljYmEUiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_ljyOs0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ljyOtEiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj8mw0iZEeyrg4BfyzIMvw" type="3005" element="_ljYmEkiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj8mxEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj8mxUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ljyOsUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ljyOskiZEeyrg4BfyzIMvw" x="33" y="136" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj2gIEiZEeyrg4BfyzIMvw" type="3007" element="_ljYmFkiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_lj2gI0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lj2gJEiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj8mxkiZEeyrg4BfyzIMvw" type="3005" element="_ljZNIEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj8mx0iZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj8myEiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj2gIUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj2gIkiZEeyrg4BfyzIMvw" x="33" y="184" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj6xkEiZEeyrg4BfyzIMvw" type="3008" element="_ljUUpEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_lj8myUiZEeyrg4BfyzIMvw" type="3012" element="_ljU7sUiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_lj9N0EiZEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lj9N0UiZEeyrg4BfyzIMvw" x="-124"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lkDUcEiZEeyrg4BfyzIMvw" type="3005" element="_ljU7skiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lkDUcUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lkDUckiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj8mykiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj8my0iZEeyrg4BfyzIMvw" x="-8" y="63" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj_qEEiZEeyrg4BfyzIMvw" type="3012" element="_ljU7s0iZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_lkARIEiZEeyrg4BfyzIMvw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lkARIUiZEeyrg4BfyzIMvw" x="-46" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lkDUc0iZEeyrg4BfyzIMvw" type="3005" element="_ljU7tEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lkDUdEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lkDUdUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj_qEUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj_qEkiZEeyrg4BfyzIMvw" x="102" y="66" width="16" height="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lj7YoEiZEeyrg4BfyzIMvw" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_lj7YoUiZEeyrg4BfyzIMvw" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_s1vZYEiZEeyrg4BfyzIMvw" type="3008" element="_s1kaQEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_s1vZY0iZEeyrg4BfyzIMvw" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_s1vZZEiZEeyrg4BfyzIMvw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_s1vZZUiZEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_s1vZZkiZEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_s1vZZ0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_s1vZYUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_s1vZYkiZEeyrg4BfyzIMvw" y="3" width="108" height="72"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_lj7YokiZEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_lj7Yo0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_lj6xkUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lj6xkkiZEeyrg4BfyzIMvw" x="294" y="10"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_HW-uUkiYEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_HW-uU0iYEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_HW-uVEiYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_HW-HQUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_HW-HQkiYEeyrg4BfyzIMvw" y="9" width="479" height="394"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DoUrQkiYEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DoUrQ0iYEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_DoUEMUiYEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DoUEMkiYEeyrg4BfyzIMvw" x="480" y="24"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_MxojsEiZEeyrg4BfyzIMvw" type="3007" element="_Mxh2AEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_MxpKwEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MxpKwUiZEeyrg4BfyzIMvw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Mxpx0EiZEeyrg4BfyzIMvw" type="3013" element="_Mxh2AUiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Mxpx0UiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Mxpx0kiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_MxojsUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MxojskiZEeyrg4BfyzIMvw" x="54" y="488" width="133" height="109"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PWj-kEiZEeyrg4BfyzIMvw" type="3007" element="_PWUG8EiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PWkloEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PWkloUiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaOWkEiZEeyrg4BfyzIMvw" type="3002" element="_PWVVEEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaOWkUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaOWkkiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PWj-kUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PWj-kkiZEeyrg4BfyzIMvw" x="438" y="513" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PWklokiZEeyrg4BfyzIMvw" type="3007" element="_PWWjM0iZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PWklpUiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PWklpkiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaOWk0iZEeyrg4BfyzIMvw" type="3005" element="_PWXxUEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaOWlEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaOWlUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PWklo0iZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PWklpEiZEeyrg4BfyzIMvw" x="438" y="552" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PZhzAEiZEeyrg4BfyzIMvw" type="3007" element="_PWYYYEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PZiaEEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PZiaEUiZEeyrg4BfyzIMvw" x="21" y="-4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaO9oEiZEeyrg4BfyzIMvw" type="3005" element="_PWYYYUiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaO9oUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaO9okiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PZhzAUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PZhzAkiZEeyrg4BfyzIMvw" x="692" y="513" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PZsyIEiZEeyrg4BfyzIMvw" type="3007" element="_PWY_cEiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PZtZMEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PZtZMUiZEeyrg4BfyzIMvw" y="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaO9o0iZEeyrg4BfyzIMvw" type="3005" element="_PWZmgEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaO9pEiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaO9pUiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PZsyIUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PZsyIkiZEeyrg4BfyzIMvw" x="234" y="515" width="60" height="15"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PZ5mcEiZEeyrg4BfyzIMvw" type="3007" element="_PWaNkUiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PZ5mc0iZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PZ5mdEiZEeyrg4BfyzIMvw" x="16" y="16"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaO9pkiZEeyrg4BfyzIMvw" type="3005" element="_PWaNkkiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaO9p0iZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaO9qEiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PZ5mcUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PZ5mckiZEeyrg4BfyzIMvw" x="330" y="513" width="15" height="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaAUIEiZEeyrg4BfyzIMvw" type="3007" element="_PWa0oUiZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PaA7MEiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PaA7MUiZEeyrg4BfyzIMvw" x="-5" y="-29"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaO9qUiZEeyrg4BfyzIMvw" type="3005" element="_PWa0okiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaO9qkiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaO9q0iZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaAUIUiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaAUIkiZEeyrg4BfyzIMvw" x="876" y="532" width="60" height="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaHB0EiZEeyrg4BfyzIMvw" type="3007" element="_PWbbs0iZEeyrg4BfyzIMvw">
+ <children xmi:type="notation:Node" xmi:id="_PaHo4EiZEeyrg4BfyzIMvw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PaHo4UiZEeyrg4BfyzIMvw" x="17" y="-6"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_PaPksEiZEeyrg4BfyzIMvw" type="3005" element="_PWbbtEiZEeyrg4BfyzIMvw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaPksUiZEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaPkskiZEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_PaHB0UiZEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PaHB0kiZEeyrg4BfyzIMvw" x="696" y="567" width="16" height="16"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-52xAUiXEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-52xAkiXEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_-53YEEiXEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_-5070UiXEeyrg4BfyzIMvw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-5070kiXEeyrg4BfyzIMvw" width="1025" height="633"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_94A5gUiXEeyrg4BfyzIMvw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_94A5gkiXEeyrg4BfyzIMvw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_93pGEUiXEeyrg4BfyzIMvw" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_93pGEkiXEeyrg4BfyzIMvw" x="138" y="12"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_92pAgkiXEeyrg4BfyzIMvw"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_93YnYEiXEeyrg4BfyzIMvw" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_93YnYUiXEeyrg4BfyzIMvw">
+ <computedStyleDescriptions xmi:type="style:FlatContainerStyleDescription" xmi:id="__x7BcEiXEeyrg4BfyzIMvw" borderSizeComputationExpression="1" borderLineStyle="dot" labelSize="12" showIcon="false" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom">
+ <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xmi:type="description:UserFixedColor" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']"/>
+ <labelBorderStyle xmi:type="style_1:LabelBorderStyleDescription" href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </computedStyleDescriptions>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_93NBMEiXEeyrg4BfyzIMvw" name="StateMachine" childrenPresentation="HorizontalStack">
+ <target xmi:type="uml:StateMachine" href="test_create_sm_edges.uml#__UnQoBeSEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:StateMachine" href="test_create_sm_edges.uml#__UnQoBeSEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_93QEgEiXEeyrg4BfyzIMvw" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_-5sY8EiXEeyrg4BfyzIMvw" name="Region0">
+ <target xmi:type="uml:Region" href="test_create_sm_edges.uml#_C8y4QBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Region" href="test_create_sm_edges.uml#_C8y4QBeTEeye9rbTyh9wBA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_-5tnEEiXEeyrg4BfyzIMvw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="__x7BcUiXEeyrg4BfyzIMvw" labelSize="12" showIcon="false" description="__x7BcEiXEeyrg4BfyzIMvw" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_DKHsUEiYEeyrg4BfyzIMvw" name="State0" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:State" href="test_create_sm_edges.uml#_EyQlEBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:State" href="test_create_sm_edges.uml#_EyQlEBeTEeye9rbTyh9wBA"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_DKJhgEiYEeyrg4BfyzIMvw" name="EntryPoint00" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_Wc2iEBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_Wc2iEBeUEeye9rbTyh9wBA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_DKLWsEiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_DKL9wEiYEeyrg4BfyzIMvw" name="ExitPoint00" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_ZIzyABeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_ZIzyABeUEeye9rbTyh9wBA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_DKMk0EiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_DKHsUUiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_F8BzQEiYEeyrg4BfyzIMvw" name="Region00">
+ <target xmi:type="uml:Region" href="test_create_sm_edges.uml#_GE__UBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Region" href="test_create_sm_edges.uml#_GE__UBeTEeye9rbTyh9wBA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_F8DBYUiYEeyrg4BfyzIMvw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_F8CaUEiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" description="__x7BcEiXEeyrg4BfyzIMvw" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Xq1h4EiZEeyrg4BfyzIMvw" name="Constraint00
{{OCL} true}" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Constraint" href="test_create_sm_edges.uml#_KXzmYBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Constraint" href="test_create_sm_edges.uml#_KXzmYBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_Xq2I8EiZEeyrg4BfyzIMvw" labelSize="12" labelPosition="node" color="200,255,230">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Constraint']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Constraint']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3m7cEiZEeyrg4BfyzIMvw" name="Comment0	0" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Comment" href="test_create_sm_edges.uml#_xMQj8BeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Comment" href="test_create_sm_edges.uml#_xMQj8BeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_Z3m7cUiZEeyrg4BfyzIMvw" labelSize="12" borderColor="252,233,79" labelPosition="node" color="255,245,181">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Comment']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Comment']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3nigkiZEeyrg4BfyzIMvw" name="Initial00" width="2" height="2" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OEN4oBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OEN4oBeTEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Dot" uid="_Z3nig0iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" backgroundColor="0,0,0">
+ <description xmi:type="style:DotDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3owoUiZEeyrg4BfyzIMvw" name="Fork00" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OQPF8BeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OQPF8BeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3owokiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.7/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3pXsEiZEeyrg4BfyzIMvw" name="ShallowHistory00" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_QdEJ4BeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_QdEJ4BeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3pXsUiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.3/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3p-wEiZEeyrg4BfyzIMvw" name="DeepHistory00" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_RUEqYBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_RUEqYBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3p-wUiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.2/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3ql0kiZEeyrg4BfyzIMvw" name="Join00" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_SyHVsBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_SyHVsBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3ql00iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.6/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3rM4kiZEeyrg4BfyzIMvw" name="Choice00" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_UkjjsBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_UkjjsBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3rM40iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.4/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3rz8kiZEeyrg4BfyzIMvw" name="Junction00" width="2" height="2" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_Vt9bwBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_Vt9bwBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Dot" uid="_Z3rz80iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" backgroundColor="0,0,0">
+ <description xmi:type="style:DotDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Z3tpIkiZEeyrg4BfyzIMvw" name="Terminate00" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_wGDw4BeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_wGDw4BeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3tpI0iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.5/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_Z3sbAkiZEeyrg4BfyzIMvw" name="State00" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:State" href="test_create_sm_edges.uml#_imhpoBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:State" href="test_create_sm_edges.uml#_imhpoBeUEeye9rbTyh9wBA"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_Z3sbBUiZEeyrg4BfyzIMvw" name="EntryPoint000" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_kQNkQBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_kQNkQBeUEeye9rbTyh9wBA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3sbBkiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_Z3tCEEiZEeyrg4BfyzIMvw" name="ExitPoint000" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_k_-NQBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_k_-NQBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_Z3tCEUiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Z3sbA0iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_fXdPUEiZEeyrg4BfyzIMvw" name="Region000">
+ <target xmi:type="uml:Region" href="test_create_sm_edges.uml#_i7cwwBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Region" href="test_create_sm_edges.uml#_i7cwwBeUEeye9rbTyh9wBA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_fXd2YkiZEeyrg4BfyzIMvw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_fXd2YEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" description="__x7BcEiXEeyrg4BfyzIMvw" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_DoK6QEiYEeyrg4BfyzIMvw" name="State1" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:State" href="test_create_sm_edges.uml#_FZ9eQBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:State" href="test_create_sm_edges.uml#_FZ9eQBeTEeye9rbTyh9wBA"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_DoLhUEiYEeyrg4BfyzIMvw" name="EntryPoint10" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OaXc4BeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OaXc4BeVEeye9rbTyh9wBA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_DoMIYEiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_DoMvcEiYEeyrg4BfyzIMvw" name="ExitPoint10" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_PT3QsBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_PT3QsBeVEeye9rbTyh9wBA"/>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_DoMvcUiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_DoK6QUiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_HW2LcEiYEeyrg4BfyzIMvw" name="Region10">
+ <target xmi:type="uml:Region" href="test_create_sm_edges.uml#_Gf6ZsBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Region" href="test_create_sm_edges.uml#_Gf6ZsBeTEeye9rbTyh9wBA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_HW3ZkUiYEeyrg4BfyzIMvw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_HW2ygEiYEeyrg4BfyzIMvw" labelSize="12" showIcon="false" description="__x7BcEiXEeyrg4BfyzIMvw" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_jspG4EiZEeyrg4BfyzIMvw" name="Constraint10
{{OCL} true}" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Constraint" href="test_create_sm_edges.uml#_Yf9M0BeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Constraint" href="test_create_sm_edges.uml#_Yf9M0BeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_jspt8EiZEeyrg4BfyzIMvw" labelSize="12" labelPosition="node" color="200,255,230">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Constraint']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Constraint']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljTGgEiZEeyrg4BfyzIMvw" name="Comment10" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Comment" href="test_create_sm_edges.uml#_YNNP8BeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Comment" href="test_create_sm_edges.uml#_YNNP8BeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_ljTtkEiZEeyrg4BfyzIMvw" labelSize="12" borderColor="252,233,79" labelPosition="node" color="255,245,181">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Comment']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Comment']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljTtlEiZEeyrg4BfyzIMvw" name="Initial10" width="2" height="2" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OpJKoBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_OpJKoBeTEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Dot" uid="_ljUUoEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" backgroundColor="0,0,0">
+ <description xmi:type="style:DotDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljViwkiZEeyrg4BfyzIMvw" name="Fork10" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_Os5z0BeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_Os5z0BeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljViw0iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.7/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljWJ10iZEeyrg4BfyzIMvw" name="Join10" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_UovqsBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_UovqsBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljWw4EiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.6/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljWw5EiZEeyrg4BfyzIMvw" name="Choice10" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_WLvugBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_WLvugBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljWw5UiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.4/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljXX8kiZEeyrg4BfyzIMvw" name="Junction10" width="2" height="2" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_XVI_gBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_XVI_gBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Dot" uid="_ljXX80iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" backgroundColor="0,0,0">
+ <description xmi:type="style:DotDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljX_AkiZEeyrg4BfyzIMvw" name="Terminate10" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_X3e3kBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_X3e3kBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljX_A0iZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.5/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljYmEUiZEeyrg4BfyzIMvw" name="ShallowHistory10" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_bVXTsBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_bVXTsBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljYmEkiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.3/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_ljYmFkiZEeyrg4BfyzIMvw" name="DeepHistory10" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_bxCjEBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_bxCjEBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljZNIEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.2/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_ljUUpEiZEeyrg4BfyzIMvw" name="State10" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:State" href="test_create_sm_edges.uml#_4fU-YBeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:State" href="test_create_sm_edges.uml#_4fU-YBeTEeye9rbTyh9wBA"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_ljU7sUiZEeyrg4BfyzIMvw" name="EntryPoint100" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_zY6owBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_zY6owBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljU7skiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Entry.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" uid="_ljU7s0iZEeyrg4BfyzIMvw" name="ExitPoint100" width="-1" height="-1">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_zu9xQBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_zu9xQBeUEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_ljU7tEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Exit.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@borderedNodeMappings[name='BorderPseudoState']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_ljUUpUiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_s1kaQEiZEeyrg4BfyzIMvw" name="Region100">
+ <target xmi:type="uml:Region" href="test_create_sm_edges.uml#_ympeUBeUEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Region" href="test_create_sm_edges.uml#_ympeUBeUEeye9rbTyh9wBA"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_s1lBUkiZEeyrg4BfyzIMvw"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_s1lBUEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" description="__x7BcEiXEeyrg4BfyzIMvw" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_Mxh2AEiZEeyrg4BfyzIMvw" name="Comment0" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="uml:Comment" href="test_create_sm_edges.uml#_BGcTQBeWEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Comment" href="test_create_sm_edges.uml#_BGcTQBeWEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Note" uid="_Mxh2AUiZEeyrg4BfyzIMvw" labelSize="12" borderColor="252,233,79" labelPosition="node" color="255,245,181">
+ <description xmi:type="style:NoteDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Comment']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Comment']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWUG8EiZEeyrg4BfyzIMvw" name="Initial0" width="2" height="2" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_NozvABeTEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_NozvABeTEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Dot" uid="_PWVVEEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" backgroundColor="0,0,0">
+ <description xmi:type="style:DotDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.0/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWWjM0iZEeyrg4BfyzIMvw" name="ShallowHistory0" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_iwoycBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_iwoycBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_PWXxUEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.3/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWYYYEiZEeyrg4BfyzIMvw" name="DeepHistory0" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_jJWNYBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_jJWNYBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_PWYYYUiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.2/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWY_cEiZEeyrg4BfyzIMvw" name="Fork0" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_5A2sMBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_5A2sMBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_PWZmgEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Fork.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.7/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWaNkUiZEeyrg4BfyzIMvw" name="Join0" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_5jk-wBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_5jk-wBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_PWaNkkiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Join.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.6/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWa0oUiZEeyrg4BfyzIMvw" name="Choice0" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_6ePQMBeVEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_6ePQMBeVEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_PWa0okiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Choice.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.4/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" uid="_PWbbs0iZEeyrg4BfyzIMvw" name="Terminate0" width="-1" height="-1" resizeKind="NSEW">
+ <target xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_ApIsMBeWEeye9rbTyh9wBA"/>
+ <semanticElements xmi:type="uml:Pseudostate" href="test_create_sm_edges.uml#_ApIsMBeWEeye9rbTyh9wBA"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:WorkspaceImage" uid="_PWbbtEiZEeyrg4BfyzIMvw" labelSize="12" showIcon="false" workspacePath="/org.eclipse.papyrus.uml.sirius.statemachine.diagram/icons/Terminate.svg">
+ <description xmi:type="style:WorkspaceImageDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']/@conditionnalStyles.5/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subNodeMappings[name='Pseudostate']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_91fJ8EiXEeyrg4BfyzIMvw"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:StateMachine" href="test_create_sm_edges.uml#__UnQoBeSEeye9rbTyh9wBA"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.uml
new file mode 100755
index 0000000..8f80793
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/edges/test_create_sm_edges.uml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_3Gn7gBeSEeye9rbTyh9wBA" name="test_create_sm_edges">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_3ParIBeSEeye9rbTyh9wBA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:StateMachine" xmi:id="__UnQoBeSEeye9rbTyh9wBA" name="StateMachine">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_CPRjkBeWEeye9rbTyh9wBA" name="Constraint0">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_CPSKoBeWEeye9rbTyh9wBA" name="constraintSpec">
+ <language>OCL</language>
+ <body>true</body>
+ </specification>
+ </ownedRule>
+ <region xmi:type="uml:Region" xmi:id="_C8y4QBeTEeye9rbTyh9wBA" name="Region0">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_BGcTQBeWEeye9rbTyh9wBA">
+ <body>Comment0</body>
+ </ownedComment>
+ <subvertex xmi:type="uml:State" xmi:id="_EyQlEBeTEeye9rbTyh9wBA" name="State0">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_KXzmYBeVEeye9rbTyh9wBA" name="Constraint00">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_KX0NcBeVEeye9rbTyh9wBA" name="constraintSpec">
+ <language>OCL</language>
+ <body>true</body>
+ </specification>
+ </ownedRule>
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_Wc2iEBeUEeye9rbTyh9wBA" name="EntryPoint00" kind="entryPoint"/>
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_ZIzyABeUEeye9rbTyh9wBA" name="ExitPoint00" kind="exitPoint"/>
+ <region xmi:type="uml:Region" xmi:id="_GE__UBeTEeye9rbTyh9wBA" name="Region00">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_xMQj8BeUEeye9rbTyh9wBA">
+ <body>Comment0 0</body>
+ </ownedComment>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_OEN4oBeTEeye9rbTyh9wBA" name="Initial00"/>
+ <subvertex xmi:type="uml:FinalState" xmi:id="_82bhgBeTEeye9rbTyh9wBA" name="Final00"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_OQPF8BeUEeye9rbTyh9wBA" name="Fork00" kind="fork"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_QdEJ4BeUEeye9rbTyh9wBA" name="ShallowHistory00" kind="shallowHistory"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_RUEqYBeUEeye9rbTyh9wBA" name="DeepHistory00" kind="deepHistory"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_SyHVsBeUEeye9rbTyh9wBA" name="Join00" kind="join"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_UkjjsBeUEeye9rbTyh9wBA" name="Choice00" kind="choice"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_Vt9bwBeUEeye9rbTyh9wBA" name="Junction00" kind="junction"/>
+ <subvertex xmi:type="uml:State" xmi:id="_imhpoBeUEeye9rbTyh9wBA" name="State00">
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_kQNkQBeUEeye9rbTyh9wBA" name="EntryPoint000" kind="entryPoint"/>
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_k_-NQBeUEeye9rbTyh9wBA" name="ExitPoint000" kind="exitPoint"/>
+ <region xmi:type="uml:Region" xmi:id="_i7cwwBeUEeye9rbTyh9wBA" name="Region000"/>
+ </subvertex>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_wGDw4BeUEeye9rbTyh9wBA" name="Terminate00" kind="terminate"/>
+ </region>
+ </subvertex>
+ <subvertex xmi:type="uml:State" xmi:id="_FZ9eQBeTEeye9rbTyh9wBA" name="State1">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_Yf9M0BeVEeye9rbTyh9wBA" name="Constraint10">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_Yf9z4BeVEeye9rbTyh9wBA" name="constraintSpec">
+ <language>OCL</language>
+ <body>true</body>
+ </specification>
+ </ownedRule>
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_OaXc4BeVEeye9rbTyh9wBA" name="EntryPoint10" kind="entryPoint"/>
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_PT3QsBeVEeye9rbTyh9wBA" name="ExitPoint10" kind="exitPoint"/>
+ <region xmi:type="uml:Region" xmi:id="_Gf6ZsBeTEeye9rbTyh9wBA" name="Region10">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_YNNP8BeVEeye9rbTyh9wBA">
+ <body>Comment10</body>
+ </ownedComment>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_OpJKoBeTEeye9rbTyh9wBA" name="Initial10"/>
+ <subvertex xmi:type="uml:State" xmi:id="_4fU-YBeTEeye9rbTyh9wBA" name="State10">
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_zY6owBeUEeye9rbTyh9wBA" name="EntryPoint100" kind="entryPoint"/>
+ <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_zu9xQBeUEeye9rbTyh9wBA" name="ExitPoint100" kind="exitPoint"/>
+ <region xmi:type="uml:Region" xmi:id="_ympeUBeUEeye9rbTyh9wBA" name="Region100"/>
+ </subvertex>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_Os5z0BeUEeye9rbTyh9wBA" name="Fork10" kind="fork"/>
+ <subvertex xmi:type="uml:FinalState" xmi:id="_2XpqwBeUEeye9rbTyh9wBA" name="Final10"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_UovqsBeVEeye9rbTyh9wBA" name="Join10" kind="join"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_WLvugBeVEeye9rbTyh9wBA" name="Choice10" kind="choice"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_XVI_gBeVEeye9rbTyh9wBA" name="Junction10" kind="junction"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_X3e3kBeVEeye9rbTyh9wBA" name="Terminate10" kind="terminate"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_bVXTsBeVEeye9rbTyh9wBA" name="ShallowHistory10" kind="shallowHistory"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_bxCjEBeVEeye9rbTyh9wBA" name="DeepHistory10" kind="deepHistory"/>
+ </region>
+ </subvertex>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_NozvABeTEeye9rbTyh9wBA" name="Initial0"/>
+ <subvertex xmi:type="uml:FinalState" xmi:id="_B0SioBeUEeye9rbTyh9wBA" name="Final0"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_iwoycBeVEeye9rbTyh9wBA" name="ShallowHistory0" kind="shallowHistory"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_jJWNYBeVEeye9rbTyh9wBA" name="DeepHistory0" kind="deepHistory"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_5A2sMBeVEeye9rbTyh9wBA" name="Fork0" kind="fork"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_5jk-wBeVEeye9rbTyh9wBA" name="Join0" kind="join"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_6ePQMBeVEeye9rbTyh9wBA" name="Choice0" kind="choice"/>
+ <subvertex xmi:type="uml:Pseudostate" xmi:id="_ApIsMBeWEeye9rbTyh9wBA" name="Terminate0" kind="terminate"/>
+ </region>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.aird b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.aird
new file mode 100755
index 0000000..2a2728a
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.aird
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:style_1="http://www.eclipse.org/sirius/description/style/1.1.0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style http://www.eclipse.org/sirius/description/style/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description/style">
+ <viewpoint:DAnalysis uid="_r-X6EEh5EeyZTZejBwLctg" selectedViews="_sBnbUEh5EeyZTZejBwLctg _sCF8cEh5EeyZTZejBwLctg _sDdOYEh5EeyZTZejBwLctg" version="14.3.1.202003261200">
+ <semanticResources>create_statemachine_node.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Ecore.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml</semanticResources>
+ <semanticResources>pathmap://UML_PROFILES/Standard.profile.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/UML.metamodel.uml</semanticResources>
+ <semanticResources>pathmap://UML_METAMODELS/Ecore.metamodel.uml</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" uid="_sBnbUEh5EeyZTZejBwLctg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.sequence.diagram/description/papyrus_sequence.odesign#//@ownedViewpoints[name='SequenceDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_sCF8cEh5EeyZTZejBwLctg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.clazz.diagram/description/papyrus_class.odesign#//@ownedViewpoints[name='ClassDiagram']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" uid="_sDdOYEh5EeyZTZejBwLctg">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_sE3joEh5EeyZTZejBwLctg" name="create_statemachine_node" repPath="#_sDnmcEh5EeyZTZejBwLctg" changeId="01cc61c6-7070-4d90-b8b2-bf43aac3a6b8">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ <target xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_66nywBU7Eeyoy_nckgy9qg"/>
+ </ownedRepresentationDescriptors>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_-h6PQEiQEeyw8bkdlqqp6g" name="create_state_subnode" repPath="#_-gNmIEiQEeyw8bkdlqqp6g" changeId="b82fdc4e-e4e0-4e96-bb7a-b3b00a6dc73b">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ <target xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_eGoB4BrsEeyUYZmtMIggwg"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram uid="_sDnmcEh5EeyZTZejBwLctg">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_sE9qQEh5EeyZTZejBwLctg" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sE9qQUh5EeyZTZejBwLctg" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.statemachine"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_sE5_4Eh5EeyZTZejBwLctg" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_sE5_4Uh5EeyZTZejBwLctg" type="Sirius" element="_sDnmcEh5EeyZTZejBwLctg" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_sE71Ekh5EeyZTZejBwLctg" type="2002" element="_sE6m8Eh5EeyZTZejBwLctg">
+ <children xmi:type="notation:Node" xmi:id="_sE9DMEh5EeyZTZejBwLctg" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_sE9DMUh5EeyZTZejBwLctg" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_sFAtkEh5EeyZTZejBwLctg" type="3008" element="_sE-RUEh5EeyZTZejBwLctg">
+ <children xmi:type="notation:Node" xmi:id="_sFBUoEh5EeyZTZejBwLctg" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_sFB7sEh5EeyZTZejBwLctg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_sFB7sUh5EeyZTZejBwLctg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_sFB7skh5EeyZTZejBwLctg"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_sFB7s0h5EeyZTZejBwLctg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_sFAtkUh5EeyZTZejBwLctg" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sFAtkkh5EeyZTZejBwLctg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_sE9DMkh5EeyZTZejBwLctg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_sE9DM0h5EeyZTZejBwLctg"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_sE71E0h5EeyZTZejBwLctg" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sE71FEh5EeyZTZejBwLctg"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_sE5_4kh5EeyZTZejBwLctg"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_sE71EEh5EeyZTZejBwLctg" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_sE71EUh5EeyZTZejBwLctg">
+ <computedStyleDescriptions xmi:type="style:FlatContainerStyleDescription" xmi:id="_sS9C8kh5EeyZTZejBwLctg" borderSizeComputationExpression="1" borderLineStyle="dot" labelSize="12" showIcon="false" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom">
+ <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xmi:type="description:UserFixedColor" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']"/>
+ <labelBorderStyle xmi:type="style_1:LabelBorderStyleDescription" href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </computedStyleDescriptions>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_sE6m8Eh5EeyZTZejBwLctg" name="StateMachine" childrenPresentation="HorizontalStack">
+ <target xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_66nywBU7Eeyoy_nckgy9qg"/>
+ <semanticElements xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_66nywBU7Eeyoy_nckgy9qg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_sE6m8Uh5EeyZTZejBwLctg" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_sE-RUEh5EeyZTZejBwLctg" name="Region1">
+ <target xmi:type="uml:Region" href="create_statemachine_node.uml#_9DKMkBU7Eeyoy_nckgy9qg"/>
+ <semanticElements xmi:type="uml:Region" href="create_statemachine_node.uml#_9DKMkBU7Eeyoy_nckgy9qg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_sE-RUUh5EeyZTZejBwLctg"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_sS9qAEh5EeyZTZejBwLctg" labelSize="12" showIcon="false" description="_sS9C8kh5EeyZTZejBwLctg" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_sE2VgEh5EeyZTZejBwLctg"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_66nywBU7Eeyoy_nckgy9qg"/>
+ </diagram:DSemanticDiagram>
+ <diagram:DSemanticDiagram uid="_-gNmIEiQEeyw8bkdlqqp6g">
+ <eAnnotations xmi:type="description:DAnnotation" uid="_-j2wAEiQEeyw8bkdlqqp6g" source="Papyrus-SiriusDiagram">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-j2wAUiQEeyw8bkdlqqp6g" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.infra.siriusdiag.statemachine"/>
+ </eAnnotations>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_-iqdMEiQEeyw8bkdlqqp6g" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_-iqdMUiQEeyw8bkdlqqp6g" type="Sirius" element="_-gNmIEiQEeyw8bkdlqqp6g" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_-jXAwEiQEeyw8bkdlqqp6g" type="2002" element="_-i8xEEiQEeyw8bkdlqqp6g">
+ <children xmi:type="notation:Node" xmi:id="_-jp7sEiQEeyw8bkdlqqp6g" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_-jrJ0EiQEeyw8bkdlqqp6g" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_-kDkUEiQEeyw8bkdlqqp6g" type="3008" element="_-j8PkEiQEeyw8bkdlqqp6g">
+ <children xmi:type="notation:Node" xmi:id="_-kELYEiQEeyw8bkdlqqp6g" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_-kELYUiQEeyw8bkdlqqp6g" type="7002">
+ <children xmi:type="notation:Node" xmi:id="__hNJEEiQEeyw8bkdlqqp6g" type="3008" element="__hCJ8EiQEeyw8bkdlqqp6g">
+ <children xmi:type="notation:Node" xmi:id="__hOXMEiQEeyw8bkdlqqp6g" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="__hOXMUiQEeyw8bkdlqqp6g" type="7002">
+ <children xmi:type="notation:Node" xmi:id="_AISXMEiREeyw8bkdlqqp6g" type="3008" element="_AIKbYEiREeyw8bkdlqqp6g">
+ <children xmi:type="notation:Node" xmi:id="_AIS-QEiREeyw8bkdlqqp6g" visible="false" type="5005"/>
+ <children xmi:type="notation:Node" xmi:id="_AITlUEiREeyw8bkdlqqp6g" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_AITlUUiREeyw8bkdlqqp6g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_AITlUkiREeyw8bkdlqqp6g"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_AITlU0iREeyw8bkdlqqp6g"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_AISXMUiREeyw8bkdlqqp6g" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AISXMkiREeyw8bkdlqqp6g" width="251" height="117"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__hOXMkiQEeyw8bkdlqqp6g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__hOXM0iQEeyw8bkdlqqp6g"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="__hNJEUiQEeyw8bkdlqqp6g" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__hNJEkiQEeyw8bkdlqqp6g" x="54" y="27"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-kELYkiQEeyw8bkdlqqp6g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-kELY0iQEeyw8bkdlqqp6g"/>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_-kEycEiQEeyw8bkdlqqp6g"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_-kDkUUiQEeyw8bkdlqqp6g" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-kDkUkiQEeyw8bkdlqqp6g" width="383" height="231"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-jrJ0UiQEeyw8bkdlqqp6g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-jrJ0kiQEeyw8bkdlqqp6g"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_-jXAwUiQEeyw8bkdlqqp6g" fontName="Segoe UI" fontHeight="12"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-jXAwkiQEeyw8bkdlqqp6g" x="120" y="48"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_-iqdMkiQEeyw8bkdlqqp6g"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_-jGiEEiQEeyw8bkdlqqp6g" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" uid="_-jGiEUiQEeyw8bkdlqqp6g">
+ <computedStyleDescriptions xmi:type="style:FlatContainerStyleDescription" xmi:id="_-v62EEiQEeyw8bkdlqqp6g" borderSizeComputationExpression="1" borderLineStyle="dot" labelSize="12" showIcon="false" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom">
+ <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xmi:type="description:UserFixedColor" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@userColorsPalettes[name=null]/@entries[name='StateMachine_Gray']"/>
+ <labelBorderStyle xmi:type="style_1:LabelBorderStyleDescription" href="environment:/viewpoint#//@labelBorderStyles/@labelBorderStyleDescriptions.2"/>
+ </computedStyleDescriptions>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_-i8xEEiQEeyw8bkdlqqp6g" name="StateMachine" childrenPresentation="HorizontalStack">
+ <target xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_eGoB4BrsEeyUYZmtMIggwg"/>
+ <semanticElements xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_eGoB4BrsEeyUYZmtMIggwg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_-i_NUEiQEeyw8bkdlqqp6g" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_-j8PkEiQEeyw8bkdlqqp6g" name="Region1">
+ <target xmi:type="uml:Region" href="create_statemachine_node.uml#_f0YkMBrsEeyUYZmtMIggwg"/>
+ <semanticElements xmi:type="uml:Region" href="create_statemachine_node.uml#_f0YkMBrsEeyUYZmtMIggwg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_-j8PkUiQEeyw8bkdlqqp6g"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_-v7dIEiQEeyw8bkdlqqp6g" labelSize="12" showIcon="false" description="_-v62EEiQEeyw8bkdlqqp6g" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="__hCJ8EiQEeyw8bkdlqqp6g" name="State1" childrenPresentation="VerticalStack">
+ <target xmi:type="uml:State" href="create_statemachine_node.uml#_htI1kBrsEeyUYZmtMIggwg"/>
+ <semanticElements xmi:type="uml:State" href="create_statemachine_node.uml#_htI1kBrsEeyUYZmtMIggwg"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="__hCxAEiQEeyw8bkdlqqp6g" labelSize="12" showIcon="false" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']/@subContainerMappings[name='State']"/>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_AIKbYEiREeyw8bkdlqqp6g" name="Region1">
+ <target xmi:type="uml:Region" href="create_statemachine_node.uml#_iR6WkBrsEeyUYZmtMIggwg"/>
+ <semanticElements xmi:type="uml:Region" href="create_statemachine_node.uml#_iR6WkBrsEeyUYZmtMIggwg"/>
+ <graphicalFilters xmi:type="diagram:HideLabelFilter" uid="_AILpgEiREeyw8bkdlqqp6g"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_AILCcEiREeyw8bkdlqqp6g" labelSize="12" showIcon="false" description="_-v62EEiQEeyw8bkdlqqp6g" borderSize="1" borderSizeComputationExpression="1" borderLineStyle="dot" hideLabelByDefault="true" backgroundStyle="GradientTopToBottom" foregroundColor="195,209,213"/>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer/@containerMappings[name='StateMachine']/@subContainerMappings[name='Region']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_-hsz4EiQEeyw8bkdlqqp6g"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.papyrus.uml.sirius.statemachine.diagram/description/papyrus_statemachine.odesign#//@ownedViewpoints[name='StateMachineDiagram']/@ownedRepresentations[name='StateMachineDiagram']/@defaultLayer"/>
+ <target xmi:type="uml:StateMachine" href="create_statemachine_node.uml#_eGoB4BrsEeyUYZmtMIggwg"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.di b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.di
new file mode 100755
index 0000000..8c549ee
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.notation b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.uml b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.uml
new file mode 100755
index 0000000..b8b67bc
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/resources/nodes/create_statemachine_node.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_1suKgBU7Eeyoy_nckgy9qg" name="create_statemachine_node">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_11tHYBU7Eeyoy_nckgy9qg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:StateMachine" xmi:id="_66nywBU7Eeyoy_nckgy9qg" name="StateMachine">
+ <region xmi:type="uml:Region" xmi:id="_9DKMkBU7Eeyoy_nckgy9qg" name="Region1"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:StateMachine" xmi:id="_eGoB4BrsEeyUYZmtMIggwg" name="StateMachine">
+ <region xmi:type="uml:Region" xmi:id="_f0YkMBrsEeyUYZmtMIggwg" name="Region1">
+ <subvertex xmi:type="uml:State" xmi:id="_htI1kBrsEeyUYZmtMIggwg" name="State1">
+ <region xmi:type="uml:Region" xmi:id="_iR6WkBrsEeyUYZmtMIggwg" name="Region1"/>
+ </subvertex>
+ </region>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/AllStateMachineTests.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/AllStateMachineTests.java
new file mode 100755
index 0000000..41b3ea7
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/AllStateMachineTests.java
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Aurélien Didier (ARTAL) - aurelien.didier51@gmail.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.FinalStateCreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.PseudostateCreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.StateBorderedNodesCreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.State_statemachine_CreationTest;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.edges.TestTransitionLinks;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.edges.Transition_statemachine_EdgeCreation;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.delete.semantic.StateDelete;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All Nodes creation tests
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ FinalStateCreationTest.class,
+ PseudostateCreationTest.class,
+ State_statemachine_CreationTest.class,
+ StateBorderedNodesCreationTest.class,
+ TestTransitionLinks.class,
+ Transition_statemachine_EdgeCreation.class,
+ StateDelete.class,
+
+})
+public class AllStateMachineTests {
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/StateMachineTestPlugin.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/StateMachineTestPlugin.java
new file mode 100755
index 0000000..2ca1c80
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/StateMachineTestPlugin.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The StateMachineTestPlugin class controls the plug-in life cycle
+ */
+public class StateMachineTestPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.siriusdiag.statemachine.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static StateMachineTestPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public StateMachineTestPlugin() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static StateMachineTestPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/AbstractStatemachineTopNodeCreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/AbstractStatemachineTopNodeCreationTest.java
new file mode 100755
index 0000000..4559bc4
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/AbstractStatemachineTopNodeCreationTest.java
@@ -0,0 +1,218 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation;
+
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.sirusdiag.junit.utils.rules.SiriusDiagramEditorFixture;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.Vertex;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Rule;
+
+public abstract class AbstractStatemachineTopNodeCreationTest extends AbstractPapyrusTest {
+
+
+ /**
+ * this fixture is used to access to Papyrus environment (editor/diagram/commandstack/editingdomain/...)
+ */
+ @Rule
+ public final SiriusDiagramEditorFixture fixture = new SiriusDiagramEditorFixture();
+
+
+ public AbstractStatemachineTopNodeCreationTest() {
+ super();
+ }
+
+ // Abstract test class for using the Classification Runner
+ @After
+ public void afterTest() {
+ fixture.save();
+ }
+
+ public DNodeContainer getRootSiriusRegion() {
+ final DiagramEditPart diagramEditpart = fixture.getActiveDiagram();
+
+ Assert.assertNotNull("The diagram edit part has not been found", diagramEditpart);
+ final Diagram diagram = diagramEditpart.getDiagramView();
+
+ Assert.assertEquals("The diagram must contain one element (region)", 1, diagram.getChildren().size());
+ Object node = diagram.getChildren().get(0);
+ Assert.assertTrue("The created element must be a View", node instanceof View);
+ EObject siriusElement = ((View) node).getElement();
+ Assert.assertTrue("The root element must be a DNodeContainer", siriusElement instanceof DNodeContainer);
+ DNodeContainer container = (DNodeContainer) siriusElement;
+ EObject stateMachine = container.getSemanticElements().iterator().next();
+ Assert.assertTrue("The root element must be a UML state machine", stateMachine instanceof org.eclipse.uml2.uml.StateMachine);
+
+ DNodeContainer regionSirius = (DNodeContainer) container.getOwnedDiagramElements().get(0);
+ Assert.assertTrue("The root region semantic element is not an uml region", regionSirius.getSemanticElements().get(0) instanceof Region);
+ return regionSirius;
+ }
+
+
+ /**
+ * @param oldOnes
+ * @param newOnes
+ * @return
+ */
+ private Object findUniqueDiffs(Object[] oldOnes, Object[] newOnes) {
+ Object newOne = null;
+ for (Object newItem : newOnes) {
+ boolean found = false;
+ for (Object oldItem : oldOnes) {
+ if (oldItem != null && oldItem.equals(newItem)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ if (newOne != null) {
+ Assert.assertEquals("More than one item created after node creation command", newOne, newItem);
+
+ }
+ newOne = newItem;
+ }
+ }
+ return newOne;
+ }
+
+ /**
+ * @return
+ */
+ protected DNodeContainer checkAndGetEmptyStateNodeRegion() {
+ final var regionSirius = getRootSiriusRegion();
+ Assert.assertEquals("To create sub nodes the statemachine root region should conain one state node", 1, regionSirius.getOwnedDiagramElements().size());
+
+ AbstractDNode existingNode = getExistingStateNode();
+ Assert.assertTrue("The existing node should be state container node", existingNode instanceof DNodeContainer);
+ DNodeContainer stateSiriusElement = (DNodeContainer) existingNode;
+ Assert.assertEquals("The existing state should contain a region", 1, stateSiriusElement.getOwnedDiagramElements().size());
+ DDiagramElement existingStateRegion = stateSiriusElement.getOwnedDiagramElements().get(0);
+ Assert.assertTrue("The existing node region should be container node", existingStateRegion instanceof DNodeContainer);
+ final var subStateContainer = (DNodeContainer) existingStateRegion;
+ Assert.assertEquals("The state region should be empty before sub state createion", 0, subStateContainer.getOwnedDiagramElements().size());
+ return subStateContainer;
+ }
+
+ /**
+ * @return
+ */
+ protected AbstractDNode getExistingStateNode() {
+ final var regionSirius = getRootSiriusRegion();
+ if (!regionSirius.getOwnedDiagramElements().isEmpty()) {
+ DDiagramElement existingNode = regionSirius.getOwnedDiagramElements().get(0);
+ return (AbstractDNode) existingNode;
+ }
+ return null;
+
+ }
+
+ protected AbstractDNode createStateNode(DNodeContainer container, String toolName) {
+ final var nbElements = container.getOwnedDiagramElements().size();
+ Object[] oldOnes = container.getOwnedDiagramElements().toArray();
+ fixture.applyNodeCreationTool(toolName, container.getParentDiagram(), container);
+ fixture.flushDisplayEvents();
+
+ // check UI via sirius
+ Assert.assertEquals("The diagram must contain one element after creating a top node", nbElements + 1, container.getOwnedDiagramElements().size());
+ Object[] newOnes = container.getOwnedDiagramElements().toArray();
+ Object newOne = findUniqueDiffs(oldOnes, newOnes);
+ Assert.assertTrue("No new created item found in the diagram", newOne instanceof AbstractDNode);
+ return (AbstractDNode) newOne; // from getOwnedDiagramElements
+ }
+
+ protected AbstractDNode createStateNode(String toolName) {
+ return createStateNode(getRootSiriusRegion(), toolName);
+ }
+
+ /**
+ * @param toolName
+ * TODO
+ * @param siriusExpectedClazz
+ * @param umlExpectedClazz
+ * @return
+ */
+ AbstractDNode createAndCheckStateNode(String toolName, Class<? extends AbstractDNode> siriusExpectedClazz, Class<? extends Element> umlExpectedClazz, DNodeContainer container) {
+
+ // create node
+ final var nbElements = container.getOwnedDiagramElements().size();
+ Object[] oldOnes = container.getOwnedDiagramElements().toArray();
+
+ DDiagramElement ownedDiagramElement = createStateNode(container, toolName);
+ Assert.assertTrue("The created element must be a " + siriusExpectedClazz.getSimpleName() + " and not of type " + classname(ownedDiagramElement), siriusExpectedClazz.isInstance(ownedDiagramElement));
+ AbstractDNode element = siriusExpectedClazz.cast(ownedDiagramElement);
+
+ // check uml semantic
+ EObject containerSemantic = container.getSemanticElements().get(0);
+ Assert.assertTrue("Semantic Container should be an uml element", containerSemantic instanceof Element);
+ Element containerUml = (Element) containerSemantic;
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElements + 1, containerUml.getOwnedElements().size());
+ var umlElement = element.getSemanticElements().get(0);
+ Assert.assertTrue("he newly created semantic element should be attached to the newly created sirius element", containerUml.getOwnedElements().contains(umlElement));
+ Element semmanticElement = (Element) umlElement;
+ Assert.assertTrue("The created element must be a " + umlExpectedClazz.getSimpleName() + " and not of type " + classname(semmanticElement), umlExpectedClazz.isInstance(semmanticElement));
+
+ // undo
+ this.fixture.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The region must be empty after undoing the creation", nbElements, container.getOwnedDiagramElements().size());
+ Assert.assertEquals("The root must contains the same number of elements as initially", nbElements, containerUml.getOwnedElements().size());
+
+ // redo
+ this.fixture.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+
+ Assert.assertEquals("The diagram must contain one element after creating a top node", nbElements + 1, container.getOwnedDiagramElements().size());
+ Object[] newOnes = container.getOwnedDiagramElements().toArray();
+ ownedDiagramElement = (DDiagramElement) findUniqueDiffs(oldOnes, newOnes);
+
+ Assert.assertTrue("The created element must be a " + siriusExpectedClazz.getSimpleName(), siriusExpectedClazz.isInstance(ownedDiagramElement));
+ element = siriusExpectedClazz.cast(ownedDiagramElement);
+ // check uml semantic
+ Assert.assertEquals("The root must only contains one additional element after the creation", nbElements + 1, containerUml.getOwnedElements().size());
+ umlElement = element.getSemanticElements().get(0);
+ Assert.assertTrue("he newly created semantic element should be attached to the newly created sirius element", containerUml.getOwnedElements().contains(umlElement));
+ semmanticElement = (Element) element.getSemanticElements().get(0);
+ Assert.assertTrue("The created element must be a " + umlExpectedClazz.getSimpleName(), umlExpectedClazz.isInstance(semmanticElement));
+
+ fixture.flushDisplayEvents();
+ return element;
+ }
+
+ /**
+ * @param semmanticElement
+ * @return
+ */
+ private String classname(EObject semmanticElement) {
+ return semmanticElement == null ? null : semmanticElement.eClass().getName();
+ }
+
+
+ AbstractDNode createAndCheckStateNode(String toolName, Class<? extends AbstractDNode> siriusExpectedClazz, Class<? extends Vertex> umlExpectedClazz) {
+ return createAndCheckStateNode(toolName, siriusExpectedClazz, umlExpectedClazz, getRootSiriusRegion() /* root */);
+ }
+
+}
\ No newline at end of file
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/FinalStateCreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/FinalStateCreationTest.java
new file mode 100755
index 0000000..75eb0c3
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/FinalStateCreationTest.java
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation;
+
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.uml2.uml.FinalState;
+import org.junit.Test;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/nodes/create_statemachine_node.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+public class FinalStateCreationTest extends AbstractStatemachineTopNodeCreationTest {
+
+ private static final String STATEMACHINE_TAB = "create_statemachine_node";
+
+ private static final String STATE_SUB_NODE_TAB = "create_state_subnode";
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_subnode_final_state() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+
+ createAndCheckStateNode("FinalState", DNode.class, FinalState.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void test_create_statemachine_final_state() {
+ createAndCheckStateNode("FinalState", DNode.class, FinalState.class);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/PseudostateCreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/PseudostateCreationTest.java
new file mode 100755
index 0000000..f306b78
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/PseudostateCreationTest.java
@@ -0,0 +1,161 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.junit.Test;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/nodes/create_statemachine_node.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+public class PseudostateCreationTest extends AbstractStatemachineTopNodeCreationTest {
+
+ private static final String STATEMACHINE_TAB = "create_statemachine_node";
+
+ private static final String STATE_SUB_NODE_TAB = "create_state_subnode";
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB)
+ public void test_create_state_subnode_terminate() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("Terminate", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB)
+ public void test_create_statemachine_terminate() {
+ createAndCheckStateNode("Terminate", DNode.class, Pseudostate.class);
+ }
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_subnode_choice() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("Choice", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB)
+ public void test_create_statemachine_choice() {
+ DNode choiceSource = (DNode) createStateNode("Choice");
+ // GraphicalEditPart choiceEditPart = (GraphicalEditPart) fixture.findEditPart(choiceNode);
+ fixture.flushDisplayEvents();
+
+ DNode choiceTarget = (DNode) createStateNode("Choice");
+ GraphicalEditPart choiceTargetEditPart = (GraphicalEditPart) fixture.findEditPart(choiceTarget);
+ fixture.move(choiceTargetEditPart, choiceTargetEditPart.getFigure().getBounds().translate(100, 100).getLocation());
+ fixture.flushDisplayEvents();
+
+ fixture.applyEdgeCreationTool("Transition", getRootSiriusRegion().getParentDiagram(), choiceSource, choiceTarget);
+ fixture.flushDisplayEvents();
+ fixture.flushDisplayEvents();
+
+ }
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB)
+ public void test_create_state_subnode_deep_history() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("DeepHistory", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB)
+ public void test_create_statemachine_deep_history() {
+ createAndCheckStateNode("DeepHistory", DNode.class, Pseudostate.class);
+ }
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB)
+ public void test_create_state_subnode_fork() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("Fork", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB)
+ public void test_create_statemachine_fork() {
+ createAndCheckStateNode("Fork", DNode.class, Pseudostate.class);
+ }
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB)
+ public void test_create_state_subnode_initial() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("Initial", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB)
+ public void test_create_statemachine_initial() {
+ createAndCheckStateNode("Initial", DNode.class, Pseudostate.class);
+ }
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB)
+ public void test_create_state_subnode_join() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("Join", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB)
+ public void test_create_statemachine_join() {
+ createAndCheckStateNode("Join", DNode.class, Pseudostate.class);
+ }
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_junction() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("Junction", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void test_create_statemachine_junction() {
+ createAndCheckStateNode("Junction", DNode.class, Pseudostate.class);
+ }
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_subnode_shallow_history() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("ShallowHistory", DNode.class, Pseudostate.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void test_create_statemachine_shallow_history() {
+ createAndCheckStateNode("ShallowHistory", DNode.class, Pseudostate.class);
+ }
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_all_subnodes() {
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/StateBorderedNodesCreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/StateBorderedNodesCreationTest.java
new file mode 100755
index 0000000..4c638f1
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/StateBorderedNodesCreationTest.java
@@ -0,0 +1,94 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation;
+
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.DNode;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/nodes/create_statemachine_node.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+public class StateBorderedNodesCreationTest extends AbstractStatemachineTopNodeCreationTest {
+
+ private static final String STATEMACHINE_TAB = "create_statemachine_node";
+
+ private static final String STATE_SUB_NODE_TAB = "create_state_subnode";
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_subnode_entry_point() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+
+ // create sub state container
+ AbstractDNode stateSiriusElement = createStateNode(subStateContainer, "State");
+
+ // create entry point Bordered Node
+ Assert.assertTrue("The state not should not have any existing bordered node before ", stateSiriusElement.getOwnedBorderedNodes().isEmpty());
+ createAndCheckStateNode("EntryPoint", DNode.class, Pseudostate.class, DNodeContainer.class.cast(stateSiriusElement));
+ Assert.assertEquals("The entry point should be a new borrderedNode after creation ", 1, stateSiriusElement.getOwnedBorderedNodes().size());
+
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void test_create_statemachine_entry_point() {
+ // create sub state container
+ AbstractDNode stateSiriusElement = createStateNode("State");
+
+ // create entry point Bordered Node
+ Assert.assertTrue("The state not should not have any existing bordered node before ", stateSiriusElement.getOwnedBorderedNodes().isEmpty());
+ createAndCheckStateNode("EntryPoint", DNode.class, Pseudostate.class, DNodeContainer.class.cast(stateSiriusElement));
+ Assert.assertEquals("The entry point should be a new borrderedNode after creation ", 1, stateSiriusElement.getOwnedBorderedNodes().size());
+
+ }
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_subnode_exit_point() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+
+ // create sub state container
+ AbstractDNode stateSiriusElement = createStateNode(subStateContainer, "State");
+
+ // create exit point Bordered Node
+ Assert.assertTrue("The state not should not have any existing bordered node before ", stateSiriusElement.getOwnedBorderedNodes().isEmpty());
+ createAndCheckStateNode("ExitPoint", DNode.class, Pseudostate.class, DNodeContainer.class.cast(stateSiriusElement));
+ Assert.assertEquals("The create exit point node should be a bordered node ", 1, stateSiriusElement.getOwnedBorderedNodes().size());
+
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void test_create_statemachine_exit_point() {
+ // create sub state container
+ AbstractDNode stateSiriusElement = (AbstractDNode) createStateNode("State");
+
+ // create exit point Bordered Node
+ Assert.assertTrue("The state not should not have any existing bordered node before ", stateSiriusElement.getOwnedBorderedNodes().isEmpty());
+ createAndCheckStateNode("ExitPoint", DNode.class, Pseudostate.class, DNodeContainer.class.cast(stateSiriusElement));
+ Assert.assertEquals("The create exit point node should be a bordered node ", 1, stateSiriusElement.getOwnedBorderedNodes().size());
+
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/State_statemachine_CreationTest.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/State_statemachine_CreationTest.java
new file mode 100755
index 0000000..831029f
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/State_statemachine_CreationTest.java
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation;
+
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.State;
+import org.junit.Test;
+
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/nodes/create_statemachine_node.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+public class State_statemachine_CreationTest extends AbstractStatemachineTopNodeCreationTest {
+
+ private static final String STATEMACHINE_TAB = "create_statemachine_node";
+
+ private static final String STATE_SUB_NODE_TAB = "create_state_subnode";
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void test_create_state_subnode_deep_state() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+ createAndCheckStateNode("State", DNodeContainer.class, State.class, subStateContainer);
+ }
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void test_create_statemachine_state() {
+ createAndCheckStateNode("State", DNodeContainer.class, State.class);
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/edges/TestTransitionLinks.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/edges/TestTransitionLinks.java
new file mode 100755
index 0000000..d69cb7b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/edges/TestTransitionLinks.java
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.edges;
+
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.AbstractStatemachineTopNodeCreationTest;
+import org.eclipse.sirius.diagram.AbstractDNode;
+import org.eclipse.sirius.diagram.DEdge;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.junit.Assert;
+import org.junit.Test;
+
+@PluginResource("resources/nodes/create_statemachine_node.di") // the resource to import for the test in the workspace
+public class TestTransitionLinks extends AbstractStatemachineTopNodeCreationTest {
+
+ private static final String STATEMACHINE_TAB = "create_statemachine_node";
+ private static final String STATE_SUB_NODE_TAB = "create_state_subnode";
+
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void testTransitionLink() {
+ AbstractDNode stateEP = createStateNode("State");
+ AbstractDNode pseudostateEP = createStateNode("Choice");
+ checkTransitionLink(stateEP, pseudostateEP);
+ }
+
+
+ @Test
+ @ActiveDiagram(STATEMACHINE_TAB) // open the diagram
+ public void testTransitionLinkWithSameSourceAndTarget() {
+ AbstractDNode stateEP = createStateNode("State");
+ checkTransitionLink(stateEP, stateEP);
+ }
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void testTransitionLinkSub() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+
+ AbstractDNode stateEP = createStateNode(subStateContainer, "State");
+ AbstractDNode pseudostateEP = createStateNode(subStateContainer, "Choice");
+ checkTransitionLink(stateEP, pseudostateEP);
+ }
+
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB) // open the diagram
+ public void testTransitionLinkWithSameSourceAndTargetSub() {
+ final var subStateContainer = checkAndGetEmptyStateNodeRegion();
+
+ AbstractDNode stateEP = createStateNode(subStateContainer, "State");
+ checkTransitionLink(stateEP, stateEP);
+ }
+
+
+
+ private DEdge checkTransitionLink(AbstractDNode source, AbstractDNode target) {
+ return checkTransitionLink((EdgeTarget)source, (EdgeTarget)target, 1);
+ }
+
+ private DEdge checkTransitionLink(EdgeTarget source, EdgeTarget target, int expectedConnections) {
+ final var diagram = getRootSiriusRegion().getParentDiagram();
+ boolean endCommand = fixture.applyEdgeCreationTool("Transition", diagram, source, target);
+ Assert.assertTrue(endCommand);
+ Assert.assertEquals(expectedConnections, diagram.getEdges().size());
+ DEdge transitionConnection = diagram.getEdges().get(expectedConnections - 1);
+ Assert.assertEquals(transitionConnection.getSemanticElements().get(0).eContainer(), ((AbstractDNode)source).getSemanticElements().get(0).eContainer());
+ return transitionConnection;
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/edges/Transition_statemachine_EdgeCreation.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/edges/Transition_statemachine_EdgeCreation.java
new file mode 100755
index 0000000..c922efe
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/creation/edges/Transition_statemachine_EdgeCreation.java
@@ -0,0 +1,108 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.edges;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.AbstractStatemachineTopNodeCreationTest;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.DDiagramElement;
+import org.eclipse.sirius.diagram.DDiagramElementContainer;
+import org.eclipse.sirius.diagram.EdgeTarget;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Test;
+
+@PluginResource("resources/edges/test_create_sm_edges.di")
+public class Transition_statemachine_EdgeCreation extends AbstractStatemachineTopNodeCreationTest {
+
+ protected DDiagramElement findNodeWithText(String text) {
+ DDiagramElementContainer rootNode = getRootSiriusRegion();
+ return findNodeWithText(rootNode, text);
+ }
+
+ /**
+ * @param rootNode
+ * @param text
+ */
+ private DDiagramElement findNodeWithText(DDiagramElementContainer rootNode, String text) {
+ EList<DDiagramElement> elements = rootNode.getElements();
+ for (DDiagramElement dDiagramElement : elements) {
+ if (isSemanticElementHasText(text, dDiagramElement)) {
+ return dDiagramElement;
+ }
+ if (dDiagramElement instanceof DDiagramElementContainer) {
+ DDiagramElement subFind = findNodeWithText((DDiagramElementContainer) dDiagramElement, text);
+ if (subFind != null) {
+ return subFind;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @param text
+ * @param dDiagramElement
+ */
+ private boolean isSemanticElementHasText(String text, DDiagramElement dDiagramElement) {
+ EList<EObject> semantics = dDiagramElement.getSemanticElements();
+ if (!semantics.isEmpty()) {
+ EObject semantic = semantics.get(0);
+ String name = null;
+ if (semantic instanceof NamedElement) {
+ name = ((NamedElement) semantic).getName();
+ }
+ else if(semantic instanceof Comment) {
+ name = ((Comment) semantic).getBody();
+ }
+ return name != null && name.equals(text);
+ }
+ return false;
+ }
+ private static final String DIAGRAM_NAME = "test_create_sm_edges";
+
+ @Test
+ @ActiveDiagram(DIAGRAM_NAME) // open the diagram
+ public void test_create_sm_transition() {
+ DDiagramElement init00 = findNodeWithText("Initial00");
+ DDiagramElement init10 = findNodeWithText("Initial10");
+ DDiagramElement entyPoint100 = findNodeWithText("EntryPoint100");
+ DDiagramElement comment0 = findNodeWithText("Comment0");
+
+ fixture.applyEdgeCreationTool("Transition", getSirusDiagram(), (EdgeTarget)init00, (EdgeTarget)entyPoint100);
+ fixture.flushDisplayEvents();
+
+ fixture.applyEdgeCreationTool("Transition", getSirusDiagram(), (EdgeTarget)init00, (EdgeTarget)entyPoint100);
+ fixture.flushDisplayEvents();
+
+ fixture.applyEdgeCreationTool("Transition", getSirusDiagram(), (EdgeTarget)entyPoint100, (EdgeTarget)init10);
+ fixture.flushDisplayEvents();
+
+ fixture.applyEdgeCreationTool("Link", getSirusDiagram(), (EdgeTarget)comment0, (EdgeTarget)init10);
+ fixture.flushDisplayEvents();
+ fixture.flushDisplayEvents();
+
+
+ }
+
+ /**
+ * @return
+ */
+ private DDiagram getSirusDiagram() {
+ return getRootSiriusRegion().getParentDiagram();
+ }
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/delete/semantic/StateDelete.java b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/delete/semantic/StateDelete.java
new file mode 100755
index 0000000..c11e43d
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/org.eclipse.papyrus.uml.siriusdiag.statemachine.tests/src/org/eclipse/papyrus/uml/siriusdiag/statemachine/tests/delete/semantic/StateDelete.java
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * Copyright (c) 2021 CEA LIST, Artal Technologies
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Etienne Allogo (ARTAL) - etienne.allogo@artal.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.delete.semantic;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.siriusdiag.statemachine.tests.creation.AbstractStatemachineTopNodeCreationTest;
+import org.eclipse.sirius.diagram.DNodeContainer;
+import org.eclipse.uml2.uml.Region;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ */
+/**
+ * adapted from org.eclipse.papyrus.uml.diagram.clazz.test.canonical.TestClassDiagramTopNode
+ */
+@PluginResource("resources/nodes/create_statemachine_node.di") // the resource to import for the test in the workspace
+@SuppressWarnings("nls")
+public class StateDelete extends AbstractStatemachineTopNodeCreationTest {
+
+
+ private static final String STATE_SUB_NODE_TAB = "create_state_subnode";
+
+
+
+ @Test
+ @ActiveDiagram(STATE_SUB_NODE_TAB)
+ public void destroySemanticElementFromDiagram() {
+ Region root = (Region) getRootSiriusRegion().getSemanticElements().get(0);
+
+ DNodeContainer stateNode = (DNodeContainer) getExistingStateNode();
+ EditPart toSelect = fixture.findEditPart(stateNode);
+ Assert.assertNotNull("We don't found the Editpart to select for destruction", toSelect);
+
+ fixture.applySemanticDeletionTool(stateNode);
+
+ this.fixture.flushDisplayEvents();
+ // the semantic element has been destroy
+ Assert.assertNull("The UML model must not contain the destroyed element", root.getMember("State1"));
+ Assert.assertNull("The class diagram must not contain view after destruction of the class", getExistingStateNode());
+
+ // undo
+ this.fixture.getEditingDomain().getCommandStack().undo();
+ Assert.assertNotNull("The UML model must contain the destroyed element after undo", root.getMember("State1"));
+ Assert.assertNotNull("The class diagram must contain view after destruction of the class after undo", getExistingStateNode());
+
+ // redo
+ this.fixture.getEditingDomain().getCommandStack().redo();
+ Assert.assertNull("The UML model must not contain the destroyed element", root.getMember("State1"));
+ Assert.assertNull("The class diagram must not contain view after destruction of the class", getExistingStateNode());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/siriusdiag/pom.xml b/tests/junit/plugins/uml/siriusdiag/pom.xml
new file mode 100755
index 0000000..5cbc49b
--- /dev/null
+++ b/tests/junit/plugins/uml/siriusdiag/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.siriusdiag.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <description>Tests for the sirius diagrams.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.uml.siriusdiag.clazz.tests</module>
+ <module>org.eclipse.papyrus.uml.siriusdiag.sequence.tests</module>
+ <module>org.eclipse.papyrus.uml.siriusdiag.statemachine.tests</module>
+ </modules>
+
+</project>