Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaadia dhouib2015-04-30 08:07:53 +0000
committersdhouib2015-05-28 12:54:07 +0000
commit406652e2bb7c6cd1865118006346057fe4fdb29e (patch)
treec064643b93d47fc57e70ffddc4000ec80f5ad163 /extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common
parentaae2a6a125db226ec5d104c3f2298ce7a80c4f9b (diff)
downloadorg.eclipse.papyrus-406652e2bb7c6cd1865118006346057fe4fdb29e.tar.gz
org.eclipse.papyrus-406652e2bb7c6cd1865118006346057fe4fdb29e.tar.xz
org.eclipse.papyrus-406652e2bb7c6cd1865118006346057fe4fdb29e.zip
First commit of SoaML plugins
Diffstat (limited to 'extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common')
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.classpath7
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.project28
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/META-INF/MANIFEST.MF24
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/build.properties10
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/custom.css18
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/style.css5
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability.xml29
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability16x16.pngbin0 -> 1094 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capabilityDiag16x16.pngbin0 -> 533 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/message.xml79
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtype16x16.pngbin0 -> 1099 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtypeDiag16x16.pngbin0 -> 554 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent.gifbin0 -> 1021 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent16x16.gifbin0 -> 983 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant.palette.xml104
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant16x16.pngbin0 -> 1056 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participantDiag16x16.pngbin0 -> 552 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/sc16x16.pngbin0 -> 1104 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/scDiag16x16.pngbin0 -> 572 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/servicecontract.xml39
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/request16x16.pngbin0 -> 1018 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/service16x16.pngbin0 -> 1011 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/serviceinterface.xml91
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/si16x16.pngbin0 -> 1070 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/siDiag16x16.pngbin0 -> 487 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/sa16x16.pngbin0 -> 1092 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/saDiag16x16.pngbin0 -> 553 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/servicesarchitecture.xml49
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/SoaML_Header_32x32.pngbin0 -> 1282 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/soaml_header.pngbin0 -> 1280 bytes
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.properties3
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.xml63
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/Activator.java64
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/commands/CreateSoamlModelCommand.java78
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java90
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicy/provider/SoaMLDiagramsEditPolicyProvider.java91
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java155
-rw-r--r--extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/viewpoints/soaml.configuration68
39 files changed, 1102 insertions, 0 deletions
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.classpath b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.classpath
new file mode 100644
index 00000000000..6e16b23d695
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.project b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.project
new file mode 100644
index 00000000000..a187c36539f
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.soaml.diagram.common</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/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.settings/org.eclipse.jdt.core.prefs b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..11f6e462df7
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/META-INF/MANIFEST.MF b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..3350bd08806
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.soaml.diagram.common;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.soaml.diagram.common.Activator
+Require-Bundle: org.eclipse.papyrus.infra.core,
+ org.eclipse.papyrus.uml.tools.utils,
+ org.eclipse.papyrus.uml.diagram.common,
+ org.eclipse.papyrus.uml.tools,
+ org.eclipse.papyrus.soaml.profile,
+ org.eclipse.papyrus.uml.diagram.composite,
+ org.eclipse.papyrus.uml.diagram.clazz,
+ org.eclipse.papyrus.infra.emf,
+ org.eclipse.papyrus.infra.core.log,
+ org.eclipse.papyrus.infra.viewpoints.policy,
+ org.eclipse.papyrus.infra.gmfdiag.common,
+ org.eclipse.core.expressions,
+ org.eclipse.papyrus.uml.diagram.communication
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.soaml.diagram.common.commands
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/build.properties b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/build.properties
new file mode 100644
index 00000000000..a401769eb26
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ diagrams/,\
+ viewpoints/,\
+ build.properties,\
+ plugin.properties
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/custom.css b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/custom.css
new file mode 100644
index 00000000000..96ba780a44f
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/custom.css
@@ -0,0 +1,18 @@
+
+Collaboration, CollaborationUse {
+ isOval: true;
+ borderStyle: custom;
+ dashStyle: 10 10;
+}
+Dependency > Label:name{
+ visible:true;
+}
+Association > Label:targetMultiplicity {
+ visible:false;
+}
+Port > Label {
+ maskLabel: name;
+}
+Property {
+ maskLabel: name type multiplicity;
+}
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/style.css b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/style.css
new file mode 100644
index 00000000000..abcf14dcf50
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/css/style.css
@@ -0,0 +1,5 @@
+Property {maskLabel:name; elementIcon:false;}
+Property[type] {maskLabel:name type; }
+Port>Label {maskLabel:name; elementIcon:flase;}
+Port>Label:stereotype{visible: false;}
+Class {elementIcon:false;} \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability.xml
new file mode 100644
index 00000000000..7bcf792d81f
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability.xml
@@ -0,0 +1,29 @@
+
+ <paletteDefinition>
+ <content>
+ <drawer iconpath="/icons/drawer.gif" id="Drawer__1423839017140" name="Nodes">
+ <aspectTool description="Create a new Capability" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability16x16.png"
+ id="clazz.tool.class_1423842473984" name="Capability" refToolId="clazz.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Capability"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ </drawer>
+ <drawer iconpath="/icons/drawer.gif" id="drawer_1423839049252" name="Edges">
+ <aspectTool description="Create a dependency" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ id="clazz.tool.dependency_1423839094273" name="Expose (dependency)" refToolId="clazz.tool.dependency">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Expose"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool name="Realization" id="clazz.tool.realization_1425055155828" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ refToolId="clazz.tool.realization" description="Create a Realization"/>
+ <aspectTool name="Usage" id="clazz.tool.usage_1425055160756" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ refToolId="clazz.tool.usage" description="Create an Usage"/>
+ </drawer>
+ </content>
+ </paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability16x16.png
new file mode 100644
index 00000000000..fc6ef1fbd0d
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capabilityDiag16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capabilityDiag16x16.png
new file mode 100644
index 00000000000..948fcdcb440
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capabilityDiag16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/message.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/message.xml
new file mode 100644
index 00000000000..827d87b4a1e
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/message.xml
@@ -0,0 +1,79 @@
+<paletteDefinition>
+ <content>
+ <drawer iconpath="/icons/drawer.gif" id="Drawer__1423836698360" name="Nodes">
+ <aspectTool description="Create a constraint" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="clazz.tool.constraint_1423837567787" name="Constraint" refToolId="clazz.tool.constraint"/>
+ <aspectTool description="Create a comment" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ id="clazz.tool.comment_1423837578898" name="Comment" refToolId="clazz.tool.comment"/>
+ <aspectTool description="Create a new MessageType" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ id="clazz.tool.class_1423837588074" name="MessageType (Class)" refToolId="clazz.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::MessageType"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new Class" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ id="clazz.tool.class_1423837588073" name="Class" refToolId="clazz.tool.class">
+ </aspectTool>
+ <aspectTool description="Create a new MessageType" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
+ id="clazz.tool.datatype_1423837615369" name="MessageType (DataType)" refToolId="clazz.tool.datatype">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::MessageType"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new DataType" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
+ id="clazz.tool.datatype_1423837617369" name="DataType" refToolId="clazz.tool.datatype">
+ </aspectTool>
+ <aspectTool description="Create a new MessageType" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ id="clazz.tool.datatype_1423837615368" name="MessageType (Signal)" refToolId="clazz.tool.signal">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::MessageType"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new Signal" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ id="clazz.tool.datatype_1423837614368" name="Signal" refToolId="clazz.tool.signal">
+ </aspectTool>
+ <aspectTool name="PrimitiveType" id="clazz.tool.primitivetype_1425036407777" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif" refToolId="clazz.tool.primitivetype" description="Create a Primitivetype"/>
+ <aspectTool description="Create an Enumeation" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
+ id="clazz.tool.enumeration_1423837666277" name="Enumeration" refToolId="clazz.tool.enumeration">
+ </aspectTool>
+ <aspectTool description="Create a new Attachment" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="clazz.tool.property_1423838740983" name="Attachment" refToolId="clazz.tool.property">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Attachment"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new SoaML Property" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="clazz.tool.property_1423838807283" name="Property (Property)" refToolId="clazz.tool.property">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Property"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new Property" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="clazz.tool.property_1423838807283" name="Property" refToolId="clazz.tool.property">
+ </aspectTool>
+ </drawer>
+ <drawer iconpath="/icons/drawer.gif" id="drawer_1423837373936" name="Edges">
+ <aspectTool description="Create an association" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ id="clazz.tool.association_1423838727280" name="Association" refToolId="clazz.tool.association"/>
+ <aspectTool description="AssociationClass" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
+ id="clazz.tool.associationclass_1423838731336" name="AssociationClass" refToolId="clazz.tool.associationclass"/>
+ <aspectTool description="Create a dependency" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ id="clazz.tool.dependency_1423838849616" name="Dependency" refToolId="clazz.tool.dependency"/>
+ <aspectTool description="Create a generalization" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ id="clazz.tool.generalization_1423838870519" name="Generalization" refToolId="clazz.tool.generalization"/>
+ <aspectTool description="Creation of a link for comment, constraint, TimeObservation,
+ DurationObservation" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ id="clazz.tool.link_1423838947570" name="Link" refToolId="clazz.tool.link"/>
+ </drawer>
+ </content>
+</paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtype16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtype16x16.png
new file mode 100644
index 00000000000..e9611c89ed4
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtype16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtypeDiag16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtypeDiag16x16.png
new file mode 100644
index 00000000000..b0ee6cd0d74
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtypeDiag16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent.gif b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent.gif
new file mode 100644
index 00000000000..2c78daf02b1
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent.gif
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent16x16.gif b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent16x16.gif
new file mode 100644
index 00000000000..c756a8ec9c6
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent16x16.gif
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant.palette.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant.palette.xml
new file mode 100644
index 00000000000..334d02145c2
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant.palette.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+
+ <content>
+
+ <drawer name="Nodes" id="Drawer__1423845330154" iconpath="/icons/drawer.gif">
+ <aspectTool name="Constraint" id="composite.tool.constraint_1423845371594" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ refToolId="composite.tool.constraint" description="Create new Constraint"/>
+ <aspectTool name="Comment" id="composite.tool.comment_1423845384370" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ refToolId="composite.tool.comment" description="Create new Comment"/>
+
+ <aspectTool name="Participant" id="composite.tool.class_1423845405128" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant16x16.png"
+ refToolId="composite.tool.class" description="Create new Participant">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Participant"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create new Property" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="composite.tool.property_1423841062642" name="Property (Property)" refToolId="composite.tool.property">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Property"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool name="Part (Property)" id="composite.tool.property_1423845441638" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ refToolId="composite.tool.property" description="Create new Property"/>
+ <aspectTool name="Agent" id="composite.tool.class_1424165232576" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/agent16x16.gif"
+ refToolId="composite.tool.class" description="Create new Agent (Class)">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Agent"/>
+ </stereotypesToApply>
+ </postAction>
+
+ <postAction id="org.eclipse.papyrus.postaction.semanticactionprovider">
+ <feature name="isActive" value="true" separator=",,"/>
+ <runtimeFeature name="isActive"/>
+ </postAction>
+ </aspectTool>
+ <aspectTool name="Request" id="composite.tool.port_1424180535597" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/request16x16.png"
+ refToolId="composite.tool.port" description="Create new Request (Port)">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Port"/>
+ <stereotype stereotypeName="SoaML::Request"/>
+ </stereotypesToApply>
+ </postAction>
+ <postAction id="org.eclipse.papyrus.postaction.semanticactionprovider">
+ <feature name="isConjugated" value="true" separator=",,"/>
+ <runtimeFeature name="isConjugated"/>
+ </postAction>
+ </aspectTool>
+
+ <aspectTool name="Service" id="composite.tool.port_1423845481355" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/service16x16.png"
+ refToolId="composite.tool.port" description="Create new Service">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Port"/>
+ <stereotype stereotypeName="SoaML::Service"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+ <aspectTool name="ServicesArchitectureUse" id="composite.tool.collaborationuse_1423845686326"
+ iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
+ refToolId="composite.tool.collaborationuse" description="Create new CollaborationUse">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::CollaborationUse"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+
+ </drawer>
+
+ <drawer name="Edges" id="drawer_1423845345816" iconpath="/icons/drawer.gif">
+
+ <aspectTool name="ServiceChannel" id="composite.tool.connector_1423845569046" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector_assembly.gif"
+ refToolId="composite.tool.connector" description="Create new ServiceChannel">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::ServiceChannel"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool name="Connector" id="composite.tool.connector_1423845660552" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
+ refToolId="composite.tool.connector" description="Create new Connector"/>
+ </drawer>
+ </content>
+</paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant16x16.png
new file mode 100644
index 00000000000..82b5ace7f44
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participantDiag16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participantDiag16x16.png
new file mode 100644
index 00000000000..303a9ff9697
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participantDiag16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/sc16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/sc16x16.png
new file mode 100644
index 00000000000..cd925c24072
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/sc16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/scDiag16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/scDiag16x16.png
new file mode 100644
index 00000000000..e47b69f2624
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/scDiag16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/servicecontract.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/servicecontract.xml
new file mode 100644
index 00000000000..4759e0eac8c
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/servicecontract.xml
@@ -0,0 +1,39 @@
+<paletteDefinition>
+ <content>
+ <drawer iconpath="/icons/drawer.gif" id="Drawer__1423841519545" name="Nodes">
+ <aspectTool description="Create new Constraint" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="composite.tool.constraint_1423841579591" name="Constraint" refToolId="composite.tool.constraint"/>
+ <aspectTool description="Create new Comment" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ id="composite.tool.comment_1423841585672" name="Comment" refToolId="composite.tool.comment"/>
+ <aspectTool description="Create new Property" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="composite.tool.property_1423841739077" name="Role" refToolId="composite.tool.property"/>
+ <aspectTool description="Create new ServiceContract" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/sc16x16.png"
+ id="composite.tool.collaboration_1423841800423" name="ServiceContract" refToolId="composite.tool.collaboration">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Collaboration"/>
+ <stereotype stereotypeName="SoaML::ServiceContract"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create new CollaborationUse" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
+ id="composite.tool.collaborationuse_1423841810679" name="ServiceContractUse" refToolId="composite.tool.collaborationuse">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::CollaborationUse"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ </drawer>
+ <drawer iconpath="/icons/drawer.gif" id="drawer_1423841548869" name="Edges">
+ <aspectTool description="Create new RoleBinding" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
+ id="composite.tool.rolebinding_1423841830857" name="RoleBinding" refToolId="composite.tool.rolebinding">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply/>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create new Connector" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
+ id="composite.tool.connector_1423841855201" name="Connector" refToolId="composite.tool.connector"/>
+ </drawer>
+ </content>
+</paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/request16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/request16x16.png
new file mode 100644
index 00000000000..f5bcd35f51b
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/request16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/service16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/service16x16.png
new file mode 100644
index 00000000000..fb32b628975
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/service16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/serviceinterface.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/serviceinterface.xml
new file mode 100644
index 00000000000..5e99c455989
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/serviceinterface.xml
@@ -0,0 +1,91 @@
+
+ <paletteDefinition>
+ <content>
+ <drawer iconpath="/icons/drawer.gif" id="Drawer__1423842126770" name="Nodes">
+ <aspectTool description="Create a constraint" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="clazz.tool.constraint_1423842571851" name="Constraint" refToolId="clazz.tool.constraint"/>
+ <aspectTool description="Create a comment" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ id="clazz.tool.comment_1423842592860" name="Comment" refToolId="clazz.tool.comment"/>
+ <aspectTool description="Create new Package" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ id="clazz.tool.package_1423842604524" name="Package" refToolId="clazz.tool.package"/>
+ <aspectTool description="Create a new ServiceInterface" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ id="clazz.tool.class_1423842612749" name="ServiceInterface (Class)" refToolId="clazz.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::ServiceInterface"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create an ServiceInterface" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ id="clazz.tool.interface_1423842626741" name="ServiceInterface (Interface)" refToolId="clazz.tool.interface">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::ServiceInterface"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new Consumer" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ id="clazz.tool.class_1423842688319" name="Consumer (Class)" refToolId="clazz.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Consumer"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create an Consumer" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ id="clazz.tool.interface_1423842697423" name="Consumer (Interface)" refToolId="clazz.tool.interface">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Consumer"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new Provider" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ id="clazz.tool.class_1423842718904" name="Provider (Class)" refToolId="clazz.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Provider"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create an Provider" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ id="clazz.tool.interface_1423842724288" name="Provider (Interface)" refToolId="clazz.tool.interface">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Provider"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create an operation" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
+ id="clazz.tool.operation_1423842731913" name="Operation" refToolId="clazz.tool.operation"/>
+ <aspectTool description="Create a signal" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ id="clazz.tool.signal_1423842736872" name="Signal" refToolId="clazz.tool.signal"/>
+ <aspectTool description="Create a new Property" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="clazz.tool.property_1423838847283" name="Property" refToolId="clazz.tool.property">
+ </aspectTool>
+ <aspectTool description="Create a new Capability" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability16x16.png"
+ id="clazz.tool.class_1423842373984" name="Capability" refToolId="clazz.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Capability"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+ </drawer>
+ <drawer iconpath="/icons/drawer.gif" id="drawer_1423842141932" name="Edges">
+ <aspectTool name="Expose (Dependency)" id="clazz.tool.dependency_1425056221677" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ refToolId="clazz.tool.dependency" description="Create an Expose">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Expose"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a Realization" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ id="clazz.tool.realization_1423842808363" name="Realization" refToolId="clazz.tool.realization"/>
+ <aspectTool description="Create an Usage" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ id="clazz.tool.usage_1423842829164" name="Usage" refToolId="clazz.tool.usage"/>
+ </drawer>
+ </content>
+ </paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/si16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/si16x16.png
new file mode 100644
index 00000000000..e7b2567e1f6
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/si16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/siDiag16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/siDiag16x16.png
new file mode 100644
index 00000000000..affdb7cc73a
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/siDiag16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/sa16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/sa16x16.png
new file mode 100644
index 00000000000..a1a0369bbfa
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/sa16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/saDiag16x16.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/saDiag16x16.png
new file mode 100644
index 00000000000..0ad92314d9b
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/saDiag16x16.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/servicesarchitecture.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/servicesarchitecture.xml
new file mode 100644
index 00000000000..115bc01c05c
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/servicesarchitecture.xml
@@ -0,0 +1,49 @@
+<paletteDefinition>
+ <content>
+ <drawer iconpath="/icons/drawer.gif" id="Drawer__1423839794015" name="Nodes">
+ <aspectTool description="Create new Constraint" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="composite.tool.constraint_1423839842697" name="Constraint" refToolId="composite.tool.constraint"/>
+ <aspectTool description="Create new Comment" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ id="composite.tool.comment_1423839850320" name="Comment" refToolId="composite.tool.comment"/>
+ <aspectTool description="Create new CollaborationUse" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
+ id="composite.tool.collaborationuse_1423839923875" name="ServiceContractUse" refToolId="composite.tool.collaborationuse">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::CollaborationUse"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create new ServicesArchitecture" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/sa16x16.png"
+ id="composite.tool.collaboration_1423840024325" name="ServicesArchitecture" refToolId="composite.tool.collaboration">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Collaboration"/>
+ <stereotype stereotypeName="SoaML::ServicesArchitecture"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create new Part" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="composite.tool.property_1423840062642" name="Part (Property)" refToolId="composite.tool.property">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Property"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create new Participant" iconpath="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant16x16.png"
+ id="composite.tool.class_1423840112343" name="Participant" refToolId="composite.tool.class">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SoaML::Participant"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ </drawer>
+ <drawer iconpath="/icons/drawer.gif" id="drawer_1423839823156" name="Edges">
+ <aspectTool description="Create new Realization" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ id="composite.tool.realization_1423840153750" name="Realization" refToolId="composite.tool.realization"/>
+ <aspectTool description="Create new RoleBinding" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
+ id="composite.tool.rolebinding_1423840157639" name="RoleBinding" refToolId="composite.tool.rolebinding"/>
+ </drawer>
+ </content>
+</paletteDefinition> \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/SoaML_Header_32x32.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/SoaML_Header_32x32.png
new file mode 100644
index 00000000000..71c39ae1e02
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/SoaML_Header_32x32.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/soaml_header.png b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/soaml_header.png
new file mode 100644
index 00000000000..af0ec2cdc41
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/icons/soaml_header.png
Binary files differ
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.properties b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.properties
new file mode 100644
index 00000000000..7a639095f3c
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.soaml.diagram.common
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SoaML Diagrams \ No newline at end of file
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.xml b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.xml
new file mode 100644
index 00000000000..f49eb05064b
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/plugin.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.core.papyrusDiagram">
+ <diagramCategory
+ class="org.eclipse.papyrus.soaml.diagram.common.commands.CreateSoamlModelCommand"
+ description="SoaML diagrams"
+ icon="icons/SoaML_Header_32x32.png"
+ id="soaML"
+ label="SoaML">
+ </diagramCategory>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.definitions">
+ <definition
+ id="org.eclipse.papyrus.soaml.diagram.common.IsPapyrusActiveWithSoaml">
+ <and>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.SoamlSelectionTester.isSoamlModel"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.soaml.diagram.common.utils.SoamlSelectionTester"
+ id="org.eclipse.papyrus.SoamlSelectionTester"
+ namespace="org.eclipse.papyrus.SoamlSelectionTester"
+ properties="isSoamlModel"
+ type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
+ <contribution
+ file="viewpoints/soaml.configuration"
+ original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
+ </contribution>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.soaml.diagram.common.editpolicy.provider.SoaMLDiagramsEditPolicyProvider">
+ <Priority
+ name="Low">
+ </Priority>
+ </editpolicyProvider>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/Activator.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/Activator.java
new file mode 100644
index 00000000000..450ad44b56b
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Fadwa TMAR (CEA LIST) fadwa.tmar@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.soaml.diagram.common;
+
+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.soaml.diagram.common"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+ /** Logging helper */
+ public static LogHelper log;
+
+ /**
+ * 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;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/commands/CreateSoamlModelCommand.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/commands/CreateSoamlModelCommand.java
new file mode 100644
index 00000000000..6c2c409a942
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/commands/CreateSoamlModelCommand.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Fadwa TMAR (CEA LIST) fadwa.tmar@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.soaml.diagram.common.commands;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.diagram.common.commands.ModelCreationCommandBase;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLFactory;
+
+public class CreateSoamlModelCommand extends ModelCreationCommandBase {
+
+ public static final String COMMAND_ID = "soaML";
+
+
+
+ public static final String PROFILES_PATHMAP = "pathmap://SoaML_PROFILES/"; //$NON-NLS-1$
+
+
+ public static final String SOAML_PROFILE_URI = PROFILES_PATHMAP + "SoaMLProfile.profile.uml"; //$NON-NLS-1$
+
+ //public static final String FCM_PROFILE_URI = "pathmap://FCM_PROFILES/FCM.profile.uml";
+
+ //public static final String SOAML_PROFILE_URI = PROFILES_PATHMAP + "SoaML.profile.uml"; //$NON-NLS-1$
+
+
+ /**
+ * @see org.eclipse.papyrus.core.extension.commands.ModelCreationCommandBase#createRootElement()
+ *
+ * @return
+ */
+
+ @Override
+ protected EObject createRootElement() {
+ return UMLFactory.eINSTANCE.createModel();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.core.extension.commands.ModelCreationCommandBase#initializeModel(org.eclipse.emf.ecore.EObject)
+ *
+ * @param owner
+ */
+
+ @Override
+ protected void initializeModel(EObject owner) {
+ super.initializeModel(owner);
+ ((org.eclipse.uml2.uml.Package)owner).setName(getModelName());
+
+ // Retrieve soaml profile and apply with Sub-profile
+ org.eclipse.uml2.uml.Package soaml = PackageUtil.loadPackage(URI.createURI(SOAML_PROFILE_URI), owner.eResource().getResourceSet());
+ //org.eclipse.uml2.uml.Package fcm = PackageUtil.loadPackage(URI.createURI(FCM_PROFILE_URI), owner.eResource().getResourceSet());
+ if((soaml != null) && (soaml instanceof Profile)) {
+ PackageUtil.applyProfile(((org.eclipse.uml2.uml.Package)owner), (org.eclipse.uml2.uml.Profile)soaml, true);
+ //PackageUtil.applyProfile(((org.eclipse.uml2.uml.Package)owner), (org.eclipse.uml2.uml.Profile) fcm, true);
+ }
+ }
+
+ /**
+ * Gets the model name.
+ *
+ * @return the model name
+ */
+ protected String getModelName() {
+ return "SoaMLModel";
+ }
+
+
+}
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java
new file mode 100644
index 00000000000..592004719f2
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Fadwa TMAR (CEA LIST) fadwa.tmar@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.soaml.diagram.common.editpolicies;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.custom.helper.RotationHelper;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Stereotype;
+
+
+
+public class PortNodeLabelDisplayEditPolicy extends AppliedStereotypeNodeLabelDisplayEditPolicy {
+
+
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ final Object feature = notification.getFeature();
+ if (feature == NotationPackage.eINSTANCE.getLocation_X() || feature == NotationPackage.eINSTANCE.getLocation_Y()) {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ refreshStereotypeDisplay();
+ }
+ });
+ }
+ super.notifyChanged(notification);
+ }
+
+
+
+ @Override
+ public Image stereotypeIconToDisplay() {
+
+ // retrieve the first stereotype in the list of displayed stereotype
+
+ // String firstStereotypeName = tokenizer.nextToken();
+ EList<Stereotype> stereotype_list = getUMLElement().getAppliedStereotypes();
+ if (stereotype_list.size() != 0) {
+ Stereotype stereotype = stereotype_list.get(0);
+ if (stereotype.getName().equals("Request") || stereotype.getName().equals("Service")) {
+ Image icon = Activator.getIconElement(getUMLElement(), stereotype, false);
+
+ IFigure portView = getHostFigure();
+ IFigure parentView = portView.getParent().getParent();
+
+ Rectangle parentBounds = parentView.getBounds();
+ Rectangle portBounds = portView.getBounds();
+
+ if (portBounds.x() <= parentBounds.x()) {
+ // left
+ return icon;
+ } else if (portBounds.x() >= (parentBounds.right() - portBounds.width())) {
+ // right
+
+ return new Image(icon.getDevice(), RotationHelper.rotateImage(icon, 180), SWT.IMAGE_COPY);
+ } else if (portBounds.y() <= parentBounds.y()) {
+ // top
+ return new Image(icon.getDevice(), RotationHelper.rotateImage(icon, 90), SWT.IMAGE_COPY);
+ } else if (portBounds.y() >= parentBounds.bottom() - portBounds.height()) {
+ // bottom
+ return new Image(icon.getDevice(), RotationHelper.rotateImage(icon, -90), SWT.IMAGE_COPY);
+ } else {
+ return null;
+ }
+ }
+ return Activator.getIconElement(getUMLElement(), stereotype, false);
+
+ }
+ return null;
+
+ }
+}
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicy/provider/SoaMLDiagramsEditPolicyProvider.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicy/provider/SoaMLDiagramsEditPolicyProvider.java
new file mode 100644
index 00000000000..040331259cc
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/editpolicy/provider/SoaMLDiagramsEditPolicyProvider.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Fadwa TMAR (CEA LIST) fadwa.tmar@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.soaml.diagram.common.editpolicy.provider;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.soaml.diagram.common.editpolicies.PortNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CompositeStructureDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart;
+import org.eclipse.uml2.uml.Element;
+
+public class SoaMLDiagramsEditPolicyProvider extends AbstractProvider
+ implements IEditPolicyProvider {
+
+ public static String SOAML_ID = "SoaML";
+
+ public boolean provides(IOperation operation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+
+ if (editPart.getModel() instanceof View) {
+ EObject element = ((View) editPart.getModel()).getElement();
+ if (element instanceof Element) {
+ if (((Element) element).getNearestPackage().getAppliedProfile(
+ SOAML_ID) != null) {
+ // System.err.println(list.get(i).getProfile().getName());
+ if (editPart instanceof PortEditPart) {
+ NotificationListener editPolicy = new PortNodeLabelDisplayEditPolicy();
+ editPart.installEditPolicy(
+ AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
+ (EditPolicy) editPolicy);
+ Object model = editPart.getModel();
+ LayoutConstraint notifier = ((Shape) model)
+ .getLayoutConstraint();
+ if (model instanceof Shape) {
+ // to force refreshing the port icon when the
+ // diagram is opening
+ Notification notification = new ENotificationImpl(
+ (InternalEObject) notifier,
+ Notification.SET,
+ NotationPackage.eINSTANCE.getLocation_X(),
+ 0, 0);
+ editPolicy.notifyChanged(notification);
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java
new file mode 100644
index 00000000000..6633234eff6
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/src/org/eclipse/papyrus/soaml/diagram/common/utils/SoamlSelectionTester.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Fadwa TMAR (CEA LIST) fadwa.tmar@cea.fr - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.soaml.diagram.common.utils;
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelsReader;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
+import org.eclipse.papyrus.soaml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * This class is a Property tester used to check if current model (meaning the model currently opened in Papyrus) is a Proteus Model.
+ * This class is used in order to create test for deciding whether a diagram creation command should be visible or not.
+ * This property tester assumes that currently active editor is Papyrus, it should be used with care (simultaneously with a test to ensure Papyrus is
+ * currently opened and active).
+ *
+ */
+public class SoamlSelectionTester extends PropertyTester {
+
+ /** Tester ID for UML Model nature */
+ public final static String IS_SOAML_MODEL = "isSoamlModel";
+
+
+ //public static String SOAML_ID = "SoaML";
+
+ /** Default constructor */
+ public SoamlSelectionTester() {
+ }
+
+ /** Test the receiver against the selected property */
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+
+ // Ensure Papyrus is the active editor
+ IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if((editor == null) || (!(editor instanceof IMultiDiagramEditor))) {
+ return false;
+ }
+
+ Object currentValue = null;
+ if(IS_SOAML_MODEL.equals(property)) {
+ currentValue = testSoamlModelNature(receiver);
+ return (currentValue == expectedValue);
+ }
+
+
+ return false;
+ }
+
+ /** True is root object is a UML Model with SoaML Profile (and sub profiles) applied */
+ protected boolean testSoamlModelNature(Object receiver) {
+ boolean isSoamlModel = false;
+
+
+
+ EObject root = getRoot(receiver);
+ if(root instanceof Package) {
+ return (((Package)root).getAppliedProfile("SoaML") != null);
+
+ //FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.
+ //
+ // Profile soaml = UMLUtil.getProfile(SoaMLPackage.eINSTANCE, root);
+ //
+ // if(((Package)root).isProfileApplied(soaml)) {
+ // isSoamlModel = true;
+ // }
+ }
+
+
+ return isSoamlModel;
+ }
+
+
+ /** Returns the root EObject of currently opened model */
+ private EObject getRoot(Object receiver) {
+ EObject root = null;
+
+ if(receiver instanceof ISelection) {
+ ISelection selection = (ISelection)receiver;
+ if(selection.isEmpty()) {
+ return null;
+ }
+
+ try {
+ //this is the case where the selection is on the Project Explorer
+ IStructuredSelection selectionstructured = (IStructuredSelection)selection;
+
+ Object selectedElement = selectionstructured.getFirstElement();
+
+ Object selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);
+
+
+ if(selectedAdapter instanceof IFile) {
+ final IFile selectedFile = (IFile)selectedAdapter;
+ ModelSet modelSet = new ModelSet();
+ ModelsReader reader = new ModelsReader();
+ reader.readModel(modelSet);
+
+
+ IPath workspacePath = selectedFile.getFullPath();
+
+ URI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);
+ modelSet.loadModels(workspaceURI);
+
+ UmlModel openedModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);
+ if(openedModel != null) {
+ root = openedModel.lookupRoot();
+ }
+ } else {
+ //this is the case where the selection is on the Model Explorer
+ ServiceUtilsForSelection serviceUtils = ServiceUtilsForSelection.getInstance();
+ UmlModel openedModel = (UmlModel)serviceUtils.getModelSet(selection).getModel(UmlModel.MODEL_ID);
+ if(openedModel != null) {
+ root = openedModel.lookupRoot();
+ }
+ }
+
+ } catch (ServiceException e) {
+ //Ignored: The selection cannot be used to retrieve the ServicesRegistry
+ } catch (NotFoundException e) {
+ Activator.log.error(e);
+ } catch (ModelMultiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ return root;
+ }
+
+
+}
diff --git a/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/viewpoints/soaml.configuration b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/viewpoints/soaml.configuration
new file mode 100644
index 00000000000..ad7044c8df5
--- /dev/null
+++ b/extraplugins/soaml/org.eclipse.papyrus.soaml.diagram.common/viewpoints/soaml.configuration
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration:PapyrusConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmi:id="_KV5GcLA_EeS9wNtIM8RWaA" defaultStakeholder="_5nZ6cLA_EeS9wNtIM8RWaA">
+ <stakeholders xmi:id="_5nZ6cLA_EeS9wNtIM8RWaA" name="SoaML Modeler"/>
+ <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_RwNtgLBAEeS9wNtIM8RWaA" name="Default Papyrus Viewpoint">
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_1EZM0LBAEeS9wNtIM8RWaA" name="SoaML Capability Diagram" icon="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capabilityDiag16x16.png" implementationID="PapyrusUMLClassDiagram" categories="_62OrwLBEEeS9wNtIM8RWaA" customPalette="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/capability/capability.xml" customStyle="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/css/style.css">
+ <modelRules xmi:id="_DHHNsLODEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_qun_4LOCEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="__dpzsLOCEeSI8fXEtgAE5Q"/>
+ <paletteRules xmi:id="_zVhhELENEeSHrIcATORhCQ" permit="false" element="clazz.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_BOd1oLBEEeS9wNtIM8RWaA" name="SoaML Message Diagram" icon="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/msgtypeDiag16x16.png" implementationID="PapyrusUMLClassDiagram" categories="_62OrwLBEEeS9wNtIM8RWaA" customPalette="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/message/message.xml" customStyle="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/css/style.css">
+ <modelRules xmi:id="_E9uxELODEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_2j6y4LOCEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_I973ILODEeSI8fXEtgAE5Q"/>
+ <paletteRules xmi:id="_8rFiQLENEeSHrIcATORhCQ" permit="false" element="clazz.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_I-OWoLBEEeS9wNtIM8RWaA" name="SoaML Participant Diagram" icon="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participantDiag16x16.png" implementationID="CompositeStructure" categories="_62OrwLBEEeS9wNtIM8RWaA" customPalette="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/participant/participant.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/css/custom.css">
+ <modelRules xmi:id="_FOETILODEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_21YWULOCEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_JOQyILODEeSI8fXEtgAE5Q"/>
+ <paletteRules xmi:id="_CrygcLEOEeSHrIcATORhCQ" permit="false" element="composite.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_JhUcoLBEEeS9wNtIM8RWaA" name="SoaML ServicesArchitecture Diagram" icon="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/saDiag16x16.png" implementationID="CompositeStructure" categories="_62OrwLBEEeS9wNtIM8RWaA" customPalette="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/servicesArchitecture/servicesarchitecture.xml" customStyle="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/css/custom.css">
+ <modelRules xmi:id="_FePdILODEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_3FoY0LOCEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_Jg9rsLODEeSI8fXEtgAE5Q"/>
+ <paletteRules xmi:id="_C7uZ4LEOEeSHrIcATORhCQ" permit="false" element="composite.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_J7VfILBEEeS9wNtIM8RWaA" name="SoaML ServiceContract Diagram" icon="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/scDiag16x16.png" implementationID="CompositeStructure" categories="_62OrwLBEEeS9wNtIM8RWaA" customPalette="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceContract/servicecontract.xml" customStyle="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/css/custom.css">
+ <modelRules xmi:id="_GEYQELODEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_3UqTULOCEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_JyqfsLODEeSI8fXEtgAE5Q"/>
+ <paletteRules xmi:id="_DKTBYLEOEeSHrIcATORhCQ" permit="false" element="composite.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" xmi:id="_U49qULBEEeS9wNtIM8RWaA" name="SoaML ServiceInterface Diagram" icon="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/siDiag16x16.png" implementationID="PapyrusUMLClassDiagram" categories="_62OrwLBEEeS9wNtIM8RWaA" customPalette="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/diagrams/serviceInterface/serviceinterface.xml" customStyle="platform:/plugin/org.eclipse.papyrus.soaml.diagram.common/css/style.css">
+ <modelRules xmi:id="_GUjaELODEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_3lJmYLOCEeSI8fXEtgAE5Q">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_KEIqMLODEeSI8fXEtgAE5Q"/>
+ <paletteRules xmi:id="_DbOZULEOEeSHrIcATORhCQ" permit="false" element="composite.group.*"/>
+ </modelKinds>
+ </viewpoints>
+ <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+ <categories xmi:id="_62OrwLBEEeS9wNtIM8RWaA" name="soaML"/>
+</configuration:PapyrusConfiguration>

Back to the top