Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-05-03 09:59:03 +0000
committercletavernie2013-05-03 09:59:03 +0000
commit640ee46f583c9e4316c9c1f250836abb0d428be9 (patch)
treed0ca7fb0b31596cbbc95be69680af36d2b5ae822 /incoming
parent6ede8a54e9974075fcbf4171c0e0107eff51aa5f (diff)
downloadorg.eclipse.papyrus-640ee46f583c9e4316c9c1f250836abb0d428be9.tar.gz
org.eclipse.papyrus-640ee46f583c9e4316c9c1f250836abb0d428be9.tar.xz
org.eclipse.papyrus-640ee46f583c9e4316c9c1f250836abb0d428be9.zip
394893: [All Diagrams] Papyrus shall support symbols in the diagrams
https://bugs.eclipse.org/bugs/show_bug.cgi?id=394893
Diffstat (limited to 'incoming')
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/.classpath7
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/.project28
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF29
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/OSGI-INF/l10n/bundle.properties3
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/about.html28
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/build.properties14
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/documentation.pdoc4
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/icons/symbols.gifbin0 -> 344 bytes
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml79
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.di23
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.notation114
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.uml105
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/Activator.java69
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/IPapyrusInternalProfileConstants.java44
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java149
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentEditPartProvider.java34
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentViewProvider.java81
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeEditPolicyProvider.java59
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/StereotypedElementShapeProvider.java171
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/TypedElementShapeProvider.java234
21 files changed, 1286 insertions, 0 deletions
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/.classpath b/incoming/org.eclipse.papyrus.uml.diagram.symbols/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/.project b/incoming/org.eclipse.papyrus.uml.diagram.symbols/.project
new file mode 100644
index 00000000000..4aed139c11b
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.symbols</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/incoming/org.eclipse.papyrus.uml.diagram.symbols/.settings/org.eclipse.jdt.core.prefs b/incoming/org.eclipse.papyrus.uml.diagram.symbols/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..060c5ee3d2e
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF b/incoming/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..576893911eb
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.symbols;singleton:=true
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.symbols.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.profile;bundle-version="0.10.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.6.0",
+ org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.diagram.symbols,
+ org.eclipse.papyrus.uml.diagram.symbols.provider
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/OSGI-INF/l10n/bundle.properties b/incoming/org.eclipse.papyrus.uml.diagram.symbols/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..62cb7ba3b92
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.uml.diagram.symbols
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Symbols Support (Incubation) \ No newline at end of file
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/about.html b/incoming/org.eclipse.papyrus.uml.diagram.symbols/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/build.properties b/incoming/org.eclipse.papyrus.uml.diagram.symbols/build.properties
new file mode 100644
index 00000000000..bc13f8e21c2
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/build.properties
@@ -0,0 +1,14 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ plugin.xml,\
+ icons/,\
+ about.html,\
+ OSGI-INF/,\
+ documentation.pdoc
+src.includes = about.html,\
+ icons/,\
+ documentation.pdoc,\
+ resources/
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/documentation.pdoc b/incoming/org.eclipse.papyrus.uml.diagram.symbols/documentation.pdoc
new file mode 100644
index 00000000000..31230365dbc
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/documentation.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin contributes to the Shape Service. It proposes a profile to annote elements in a UML model. First implementation is the possibility to annote Types and to display the associated shape on this type representations and the representations of TypedElement typed by this annotated type.">
+ <referent firstName="Remi" lastName="Schnekenburger" eMail="remi.schnekenburger@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/icons/symbols.gif b/incoming/org.eclipse.papyrus.uml.diagram.symbols/icons/symbols.gif
new file mode 100644
index 00000000000..e9a6bd966a5
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/icons/symbols.gif
Binary files differ
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml b/incoming/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml
new file mode 100644
index 00000000000..58627697f40
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.TypedElementShapeProvider"
+ description="Provides the shapes based on the type for a typed element, based on a stereotype description of the stereotype"
+ id="org.eclipse.papyrus.uml.diagram.symbols.typedelementshapeprovider"
+ name="Typed Element Shape Provider">
+ <Priority
+ name="Lowest"></Priority>
+ </shapeProvider>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.uri_mapping">
+ <mapping
+ source="pathmap://PAPYRUS_INTERNAL_PROFILES/"
+ target="platform:/plugin/org.eclipse.papyrus.uml.diagram.symbols/resources/"/>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
+ <profile
+ description="Profile that provides annotations for the tool itself (Decorations, etc.)"
+ iconpath="icons/symbols.gif"
+ name="Papyrus Internal"
+ path="pathmap://PAPYRUS_INTERNAL_PROFILES/PapyrusInternal.profile.uml"
+ provider="CEA LIST">
+ </profile>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.ActorShapeProvider"
+ description="Provides the shapes for UML::Actors or elements typed by an Actor"
+ id="org.eclipse.papyrus.uml.diagram.symbols.actorshapeprovider"
+ name="Actor Shape Provider">
+ <Priority
+ name="Lowest"></Priority>
+ </shapeProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.StereotypedElementShapeProvider"
+ description="Provides the shapes based on symbols defined on stereotypes"
+ id="org.eclipse.papyrus.uml.diagram.symbols.stereotypedelementshapeprovider"
+ name="Stereotyped Element Shape Provider">
+ <Priority
+ name="Lowest"></Priority>
+ </shapeProvider>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.ShapeCompartmentEditPartProvider">
+ <Priority
+ name="Medium">
+ </Priority>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.editpart.ShapeCompartmentDisplay">
+ <method
+ name="getType()"
+ value="compartment_shape_display">
+ </method>
+ </object>
+ </editpartProvider>
+</extension>
+
+<!-- edit policy provider for shape compartments -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.ShapeEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+</plugin>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.di b/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.di
new file mode 100644
index 00000000000..87cd1f6a95d
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.di
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="PapyrusInternal.profile.notation#_dYqdUPXAEeGSQON-DQ-5eg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="PapyrusInternal.profile.notation#_sxNmgD_AEeKj6r7ThQagKA"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="PapyrusInternal.profile.notation#_sxNmgD_AEeKj6r7ThQagKA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="PapyrusInternal.profile.notation#_dYqdUPXAEeGSQON-DQ-5eg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.notation b/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.notation
new file mode 100644
index 00000000000..54ec2249f45
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.notation
@@ -0,0 +1,114 @@
+<?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:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
+ <notation:Diagram xmi:id="_dYqdUPXAEeGSQON-DQ-5eg" type="PapyrusUMLProfileDiagram" name="Symbols" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_k4SQkPXAEeGSQON-DQ-5eg" type="1026" fillColor="12621752" gradient="16777215, 16777215, 0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_cDhQED-SEeKj6r7ThQagKA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cDh3ID-SEeKj6r7ThQagKA" key="displayNameLabelIcon_value" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_k4SQkvXAEeGSQON-DQ-5eg" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_k4bagPXAEeGSQON-DQ-5eg" type="1071">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k44GcPXAEeGSQON-DQ-5eg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k44GcfXAEeGSQON-DQ-5eg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_FVWY0fXBEeGSQON-DQ-5eg" type="3002">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hYfwsD-SEeKj6r7ThQagKA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hYfwsT-SEeKj6r7ThQagKA" key="displayNameLabelIcon_value" value="true"/>
+ </eAnnotations>
+ <element xmi:type="uml:Property" href="PapyrusInternal.profile.uml#_FVWY0PXBEeGSQON-DQ-5eg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_FVWY0vXBEeGSQON-DQ-5eg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_k4bagfXAEeGSQON-DQ-5eg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_k4bagvXAEeGSQON-DQ-5eg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_k4bag_XAEeGSQON-DQ-5eg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k4bahPXAEeGSQON-DQ-5eg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_k4bahfXAEeGSQON-DQ-5eg" visible="false" type="1019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k44GcvXAEeGSQON-DQ-5eg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k44Gc_XAEeGSQON-DQ-5eg" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_k4bahvXAEeGSQON-DQ-5eg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_k4bah_XAEeGSQON-DQ-5eg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_k4baiPXAEeGSQON-DQ-5eg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k4baifXAEeGSQON-DQ-5eg"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="PapyrusInternal.profile.uml#_k3fmYPXAEeGSQON-DQ-5eg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k4SQkfXAEeGSQON-DQ-5eg" x="130" y="190"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ILql8D_AEeKj6r7ThQagKA" type="1031" fontName="Segoe UI" fillColor="12560536" gradient="16777215, 16777215, 0" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ILx6sD_AEeKj6r7ThQagKA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ILx6sT_AEeKj6r7ThQagKA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IL1lED_AEeKj6r7ThQagKA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IL2MID_AEeKj6r7ThQagKA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IL2MIT_AEeKj6r7ThQagKA" key="StereotypeList" value="StandardProfileL2::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IL2MIj_AEeKj6r7ThQagKA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IL2MIz_AEeKj6r7ThQagKA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IL2zMD_AEeKj6r7ThQagKA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_KXY2oD_AEeKj6r7ThQagKA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KXY2oT_AEeKj6r7ThQagKA" key="displayNameLabelIcon_value" value="true"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_KoP9ID_AEeKj6r7ThQagKA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KoP9IT_AEeKj6r7ThQagKA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ILx6sj_AEeKj6r7ThQagKA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ILzI0D_AEeKj6r7ThQagKA" x="155" y="55"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_cEvpMD_AEeKj6r7ThQagKA" type="1002" fontName="Segoe UI" gradient="8905185, 16777215, 0" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_cEw3UD_AEeKj6r7ThQagKA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cEw3UT_AEeKj6r7ThQagKA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_cExeYD_AEeKj6r7ThQagKA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cExeYT_AEeKj6r7ThQagKA" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_cExeYj_AEeKj6r7ThQagKA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cExeYz_AEeKj6r7ThQagKA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_cExeZD_AEeKj6r7ThQagKA" type="3"/>
+ <element xmi:type="uml:Comment" href="PapyrusInternal.profile.uml#_cDnn0D_AEeKj6r7ThQagKA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cEvpMT_AEeKj6r7ThQagKA" x="350" y="205" width="246" height="66"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_dYqdUfXAEeGSQON-DQ-5eg"/>
+ <element xmi:type="uml:Profile" href="PapyrusInternal.profile.uml#_16oYAD-SEeKj6r7ThQagKA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_I4SbYD_AEeKj6r7ThQagKA" type="1013" source="_k4SQkPXAEeGSQON-DQ-5eg" target="_ILql8D_AEeKj6r7ThQagKA" lineColor="0">
+ <styles xmi:type="notation:FontStyle" xmi:id="_I4SbYT_AEeKj6r7ThQagKA" fontName="Segoe UI"/>
+ <element xmi:type="uml:Extension" href="PapyrusInternal.profile.uml#_qLTCUfXAEeGSQON-DQ-5eg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_I4SbYj_AEeKj6r7ThQagKA" points="[-5, -50, 0, 111]$[0, -136, 5, 25]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_lHeN8D_AEeKj6r7ThQagKA" type="1022" source="_cEvpMD_AEeKj6r7ThQagKA" target="_k4SQkPXAEeGSQON-DQ-5eg" lineColor="0">
+ <styles xmi:type="notation:FontStyle" xmi:id="_lHe1AD_AEeKj6r7ThQagKA" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lHe1AT_AEeKj6r7ThQagKA"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lPStMD_AEeKj6r7ThQagKA" id="(0.0,0.5294117647058824)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nhgncD_AEeKj6r7ThQagKA" id="(1.0,0.5)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_sxNmgD_AEeKj6r7ThQagKA" type="PapyrusUMLProfileDiagram" name="MainDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_tyRa4D_AEeKj6r7ThQagKA" type="1030" fontName="Segoe UI" fillColor="12560536" gradient="16777215, 16777215, 0" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tyTQED_AEeKj6r7ThQagKA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tyTQET_AEeKj6r7ThQagKA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tyT3Ij_AEeKj6r7ThQagKA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tyT3Iz_AEeKj6r7ThQagKA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_w_I_gD_AEeKj6r7ThQagKA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_w_JmkD_AEeKj6r7ThQagKA" key="displayNameLabelIcon_value" value="true"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_20vg8D_AEeKj6r7ThQagKA" source="PapyrusHyperLink_Diagram" references="_dYqdUPXAEeGSQON-DQ-5eg">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_20vg8T_AEeKj6r7ThQagKA" key="tooltip_text" value="Symbols"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_20vg8j_AEeKj6r7ThQagKA" key="diagram_name" value="Symbols"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_20vg8z_AEeKj6r7ThQagKA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tyT3JD_AEeKj6r7ThQagKA" type="1047"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tyUeMD_AEeKj6r7ThQagKA" type="1042">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tyUeMT_AEeKj6r7ThQagKA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tyUeMj_AEeKj6r7ThQagKA"/>
+ </children>
+ <element xmi:type="uml:Profile" href="PapyrusInternal.profile.uml#_16oYAD-SEeKj6r7ThQagKA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tyRa4T_AEeKj6r7ThQagKA" x="55" y="35" width="221" height="145"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_sxNmgT_AEeKj6r7ThQagKA"/>
+ <element xmi:type="uml:Profile" href="PapyrusInternal.profile.uml#_dL4lkPXAEeGSQON-DQ-5eg"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.uml b/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.uml
new file mode 100644
index 00000000000..5cad73077e9
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/resources/PapyrusInternal.profile.uml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_dL4lkPXAEeGSQON-DQ-5eg" name="PapyrusInternal" metaclassReference="_ikJDsPXAEeGSQON-DQ-5eg" metamodelReference="_dL4lkfXAEeGSQON-DQ-5eg">
+ <eAnnotations xmi:id="_eijPgEBcEeKj6r7ThQagKA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_eijPgUBcEeKj6r7ThQagKA" name="PapyrusInternal" nsURI="http:///schemas/PapyrusInternal/_eiiocEBcEeKj6r7ThQagKA/0" nsPrefix="PapyrusInternal">
+ <eAnnotations xmi:id="_eijPgkBcEeKj6r7ThQagKA" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_16oYAD-SEeKj6r7ThQagKA"/>
+ <eAnnotations xmi:id="_eikdp0BcEeKj6r7ThQagKA" source="PapyrusVersion">
+ <details xmi:id="_eikdqEBcEeKj6r7ThQagKA" key="Version" value="0.0.1"/>
+ <details xmi:id="_eikdqUBcEeKj6r7ThQagKA" key="Comment" value=""/>
+ <details xmi:id="_eikdqkBcEeKj6r7ThQagKA" key="Copyright" value="CEA LIST - Initial API and Implementation&#xD;&#xA;"/>
+ <details xmi:id="_eikdq0BcEeKj6r7ThQagKA" key="Date" value="2012-12-07"/>
+ <details xmi:id="_eikdrEBcEeKj6r7ThQagKA" key="Author" value=""/>
+ </eAnnotations>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:id="_ikJDsPXAEeGSQON-DQ-5eg" alias="Type">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/>
+ </elementImport>
+ <packageImport xmi:id="_dL4lkfXAEeGSQON-DQ-5eg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_dL4lkvXAEeGSQON-DQ-5eg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_16oYAD-SEeKj6r7ThQagKA" name="Symbols" metaclassReference="_ILVOwD_AEeKj6r7ThQagKA">
+ <eAnnotations xmi:id="_b9G6sD_BEeKj6r7ThQagKA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_eikdoEBcEeKj6r7ThQagKA" name="Symbols" nsURI="http://PapyrusInternal/schemas/Symbols/_eij2kEBcEeKj6r7ThQagKA/2" nsPrefix="Symbols">
+ <eAnnotations xmi:id="_eilEsUBcEeKj6r7ThQagKA" source="PapyrusVersion">
+ <details xmi:id="_eilEskBcEeKj6r7ThQagKA" key="Version" value="0.0.1"/>
+ <details xmi:id="_eilEs0BcEeKj6r7ThQagKA" key="Comment" value=""/>
+ <details xmi:id="_eilEtEBcEeKj6r7ThQagKA" key="Copyright" value="CEA LIST - Initial API and Implementation&#xD;&#xA;"/>
+ <details xmi:id="_eilEtUBcEeKj6r7ThQagKA" key="Date" value="2012-12-07"/>
+ <details xmi:id="_eilEtkBcEeKj6r7ThQagKA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_eikdoUBcEeKj6r7ThQagKA" name="TypeSymbolDefinition">
+ <eAnnotations xmi:id="_eikdokBcEeKj6r7ThQagKA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_k3fmYPXAEeGSQON-DQ-5eg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_eikdo0BcEeKj6r7ThQagKA" name="base_Type" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_eikdpUBcEeKj6r7ThQagKA" name="symbolPath" ordered="false" lowerBound="1" defaultValueLiteral="">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="__uWigUBbEeKj6r7ThQagKA" name="Symbols" nsURI="http://PapyrusInternal/schemas/Symbols/__uWigEBbEeKj6r7ThQagKA/1" nsPrefix="Symbols">
+ <eAnnotations xmi:id="__uXwoEBbEeKj6r7ThQagKA" source="PapyrusVersion">
+ <details xmi:id="__uXwoUBbEeKj6r7ThQagKA" key="Version" value="0.0.2"/>
+ <details xmi:id="__uXwokBbEeKj6r7ThQagKA" key="Comment" value="First version of the Papyrus Internal profile. It contains first version of the Type Symbol support in Papyrus."/>
+ <details xmi:id="__uXwo0BbEeKj6r7ThQagKA" key="Copyright" value="CEA LIST - Initial API and Implementation&#xD;&#xA;"/>
+ <details xmi:id="__uXwpEBbEeKj6r7ThQagKA" key="Date" value="2012-12-07"/>
+ <details xmi:id="__uXwpUBbEeKj6r7ThQagKA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="__uWigkBbEeKj6r7ThQagKA" name="TypeSymbolDefinition">
+ <eAnnotations xmi:id="__uWig0BbEeKj6r7ThQagKA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_k3fmYPXAEeGSQON-DQ-5eg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="__uWihEBbEeKj6r7ThQagKA" name="base_Type" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="__uWihkBbEeKj6r7ThQagKA" name="symbolPath" ordered="false" lowerBound="1" defaultValueLiteral="">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_b9HhwD_BEeKj6r7ThQagKA" name="Symbols" nsURI="http://PapyrusInternal/schemas/Symbols/_b9ANAD_BEeKj6r7ThQagKA/0" nsPrefix="Symbols">
+ <eAnnotations xmi:id="_b9MaQD_BEeKj6r7ThQagKA" source="PapyrusVersion">
+ <details xmi:id="_b9MaQT_BEeKj6r7ThQagKA" key="Version" value="0.0.1"/>
+ <details xmi:id="_b9MaQj_BEeKj6r7ThQagKA" key="Comment" value="First version of the Papyrus Internal profile. It contains first version of the Type Symbol support in Papyrus."/>
+ <details xmi:id="_b9MaQz_BEeKj6r7ThQagKA" key="Copyright" value="CEA LIST - Initial API and Implementation&#xD;&#xA;"/>
+ <details xmi:id="_b9MaRD_BEeKj6r7ThQagKA" key="Date" value="2012-12-06"/>
+ <details xmi:id="_b9MaRT_BEeKj6r7ThQagKA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_b9HhwT_BEeKj6r7ThQagKA" name="TypeSymbolDefinition">
+ <eAnnotations xmi:id="_b9Hhwj_BEeKj6r7ThQagKA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_k3fmYPXAEeGSQON-DQ-5eg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_b9Hhwz_BEeKj6r7ThQagKA" name="base_Type" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_b9HhxT_BEeKj6r7ThQagKA" name="symbolPath" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <ownedComment xmi:id="_cDnn0D_AEeKj6r7ThQagKA" annotatedElement="_k3fmYPXAEeGSQON-DQ-5eg">
+ <body>Stereotype associated to Types.&#xD;
+&#xD;
+It will be available to display for the stereotyped Type and the TypedElement that have this Type.</body>
+ </ownedComment>
+ <elementImport xmi:id="_ILVOwD_AEeKj6r7ThQagKA" alias="Type">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/>
+ </elementImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_k3fmYPXAEeGSQON-DQ-5eg" name="TypeSymbolDefinition">
+ <ownedAttribute xmi:id="_qLTCUPXAEeGSQON-DQ-5eg" name="base_Type" association="_qLTCUfXAEeGSQON-DQ-5eg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Type"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_FVWY0PXBEeGSQON-DQ-5eg" name="symbolPath" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_JkaaQPXBEeGSQON-DQ-5eg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_JkaaQfXBEeGSQON-DQ-5eg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_JkaaQvXBEeGSQON-DQ-5eg" name="defaultValue" value=""/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_qLTCUfXAEeGSQON-DQ-5eg" name="E_TypeSymbolDefinition_Type1" memberEnd="_qLTCUvXAEeGSQON-DQ-5eg _qLTCUPXAEeGSQON-DQ-5eg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_qLTCUvXAEeGSQON-DQ-5eg" name="extension_TypeSymbolDefinition" type="_k3fmYPXAEeGSQON-DQ-5eg" aggregation="composite" association="_qLTCUfXAEeGSQON-DQ-5eg"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_Z27N4EBcEeKj6r7ThQagKA" name="Path"/>
+</uml:Profile>
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/Activator.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/Activator.java
new file mode 100644
index 00000000000..b493acbcb06
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols;
+
+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.uml.diagram.symbols"; //$NON-NLS-1$
+
+ /** The shared instance */
+ private static Activator plugin;
+
+ /** The log service */
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/IPapyrusInternalProfileConstants.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/IPapyrusInternalProfileConstants.java
new file mode 100644
index 00000000000..5cb18bc5671
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/IPapyrusInternalProfileConstants.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols;
+
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+
+/**
+ * Interface that stores all constants for the symbol profile
+ */
+public interface IPapyrusInternalProfileConstants {
+
+ // profile
+ /** main profile name */
+ public final static String PAPYRUS_INTERNAL_PROFILE_NAME = "PapyrusInternal";
+
+ /** Symbols Sub Profile name */
+ public final static String SYMBOL_PROFILE_NAME = PAPYRUS_INTERNAL_PROFILE_NAME + NamedElementUtil.QUALIFIED_NAME_SEPARATOR + "Symbols";
+
+ // stereotypes definition
+
+ /** TypeSymbolDefinition stereotype name */
+ public final static String TYPE_SYMBOL_DEFINITION_QUALIFIED_NAME = SYMBOL_PROFILE_NAME + NamedElementUtil.QUALIFIED_NAME_SEPARATOR + "TypeSymbolDefinition";
+
+ // Stereotype properties definition
+
+ /** TypeSymbolDefinition::symbolPath property name */
+ public final static String TYPE_SYMBOL_DEFINITION_SYMBOL_PATH = "symbolPath";
+
+ // Extension definition
+ /** profile name as defined in the extension point */
+ public final static String PAPYRUS_INTERNAL_PROFILE_EXTENSION_NAME = "Papyrus Internal";
+
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java
new file mode 100644
index 00000000000..aa462ad6907
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.draw2d.ui.render.factory.RenderedImageFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.AbstractShapeProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ProviderNotificationManager;
+import org.eclipse.papyrus.uml.diagram.symbols.Activator;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+
+/**
+ * Shape Provider for {@link Actor} or for {@link TypedElement} that are typed by an {@link Actor}.
+ */
+public class ActorShapeProvider extends AbstractShapeProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<RenderedImage> getShapes(EObject view) {
+ if(providesShapes(view)) {
+ URL url;
+ try {
+ url = new URL("platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/symbols/actor.svg"); //$NON-NLS-1$
+ return Arrays.asList(RenderedImageFactory.getInstance(url));
+ } catch (MalformedURLException e) {
+ Activator.log.error(e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean providesShapes(EObject view) {
+ if(!(view instanceof View)) {
+ return false;
+ }
+
+ EObject element = ((View)view).getElement();
+
+ if(element instanceof Actor || (element instanceof TypedElement && ((TypedElement)element).getType() instanceof Actor)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ProviderNotificationManager createProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ // retrieve semantic element from the view and add a notification listener on the Type feature if the semantic element is a TypedElement
+ if(view == null || !(view instanceof View)) {
+ return null;
+ }
+
+ ActorShapeProviderNotificationManager notificationManager = new ActorShapeProviderNotificationManager(diagramEventBroker, view, listener);
+ return notificationManager;
+ }
+
+ /**
+ * Notification Manager for the {@link ActorShapeProvider}.
+ */
+ public class ActorShapeProviderNotificationManager extends ProviderNotificationManager implements NotificationListener {
+
+ /**
+ * Creates a new ActorShapeProviderNotificationManager.
+ *
+ * @param diagramEventBroker
+ * event broker specific to the diargam displaying the shapes.
+ * @param view
+ * the view from which all elements to listen will be computed.
+ * @param listener
+ * the listener to which notifications will be forwarded.
+ */
+ public ActorShapeProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ super(diagramEventBroker, view, listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void registerListeners() {
+ if(view == null || !(view instanceof View)) {
+ return;
+ }
+ Object semanticElement = BusinessModelResolver.getInstance().getBusinessModel(view);
+ if(semanticElement instanceof Element) {
+ diagramEventBroker.addNotificationListener((Element)semanticElement, this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ if(view == null || !(view instanceof View)) {
+ return;
+ }
+ Object semanticElement = BusinessModelResolver.getInstance().getBusinessModel(view);
+ if(semanticElement instanceof Element) {
+ diagramEventBroker.removeNotificationListener((Element)semanticElement, this);
+ }
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void notifyChanged(Notification notification) {
+ if(listener == null) {
+ return;
+ }
+ if(UMLPackage.eINSTANCE.getTypedElement_Type().equals(notification.getFeature())) {
+ listener.notifyChanged(notification);
+ }
+ }
+ }
+
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentEditPartProvider.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentEditPartProvider.java
new file mode 100644
index 00000000000..1b13a6f3733
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentEditPartProvider.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.AbstractShapeCompartmentEditPartProvider;
+
+/**
+ * provides edit part to display shapes in compartment for all Papyrus diagrams
+ */
+public class ShapeCompartmentEditPartProvider extends AbstractShapeCompartmentEditPartProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ // should test here for Papyrus?
+
+ return super.provides(operation);
+ }
+
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentViewProvider.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentViewProvider.java
new file mode 100644
index 00000000000..0d9802ac1c5
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeCompartmentViewProvider.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IShapeCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.AbstractShapeCompartmentViewProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.GraphicalTypeRegistry;
+
+/**
+ * View Provider for Internal Block Diagram. It adds the shape compartment edit parts
+ */
+public class ShapeCompartmentViewProvider extends AbstractShapeCompartmentViewProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+ // This method should generally not be called (https://bugs.eclipse.org/bugs/show_bug.cgi?id=346739).
+ if((diagramType == null) || (!diagramType.equals(op.getContainerView().getDiagram().getType()))) {
+ return false;
+ }
+ throw new UnsupportedOperationException("Should never be called by the " + diagramType + " diagram.");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean provides(CreateEdgeViewOperation operation) {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean provides(CreateNodeViewOperation operation) {
+ return (getNodeViewClass(operation.getSemanticAdapter(), operation.getContainerView(), operation.getSemanticHint()) != null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initGraphicalTypeRegistry() {
+ this.registry = new ShapeCompartmentGraphicalTypeRegistry();
+ }
+
+ /**
+ * Graphical Type Registry specific to this view provider
+ */
+ public class ShapeCompartmentGraphicalTypeRegistry extends GraphicalTypeRegistry {
+
+ public ShapeCompartmentGraphicalTypeRegistry() {
+ knownNodes.add(IShapeCompartmentEditPart.VIEW_TYPE);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initDiagramType() {
+ // nothing here. provides will be tested differently
+ }
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeEditPolicyProvider.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeEditPolicyProvider.java
new file mode 100644
index 00000000000..ae514c76cc7
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ShapeEditPolicyProvider.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2010-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Arthur Daussy - arthur.daussy@atos.net - 395920: [Block Diagram Definition] All element contained by a block should be able to be linked to constraint or comment
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+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.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ShapeCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+
+/**
+ * Edit policy provider for the shape compartement
+ */
+public class ShapeEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean provides(IOperation operation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
+ if(!(epOperation.getEditPart() instanceof IGraphicalEditPart)) {
+ return false;
+ }
+
+ // Make sure this concern Block Definition Diagram only
+ IGraphicalEditPart gep = (IGraphicalEditPart)epOperation.getEditPart();
+ // Provides for edit parts that represent nodes in Block Definition diagram
+ if(gep instanceof NamedElementEditPart) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createEditPolicies(EditPart editPart) {
+ // add behavior for the shapes display
+ if(editPart instanceof NamedElementEditPart) { // add to Block Property Composite and Block Composite
+ editPart.installEditPolicy(ShapeCompartmentEditPolicy.SHAPE_COMPARTMENT_EDIT_POLICY, new ShapeCompartmentEditPolicy());
+ }
+ }
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/StereotypedElementShapeProvider.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/StereotypedElementShapeProvider.java
new file mode 100644
index 00000000000..ea602281c0b
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/StereotypedElementShapeProvider.java
@@ -0,0 +1,171 @@
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.draw2d.ui.render.factory.RenderedImageFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.AbstractShapeProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ProviderNotificationManager;
+import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper;
+import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant;
+import org.eclipse.papyrus.uml.diagram.symbols.Activator;
+import org.eclipse.papyrus.uml.tools.utils.ElementUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * This provider is linked to the {@link ShapeService}. It returns the shapes for a given element corresponding to the stereotypes applied on the
+ * business element.
+ */
+public class StereotypedElementShapeProvider extends AbstractShapeProvider {
+
+ private static final String SHAPE_CONSTANT = "shape";
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<RenderedImage> getShapes(EObject view) {
+ if(!(view instanceof View)) {
+ return null;
+ }
+ EObject element = ((View)view).getElement();
+ if(element instanceof Element) {
+ List<RenderedImage> images = new ArrayList<RenderedImage>();
+ // it has already been checked that
+ URL url;
+ try {
+ String stereotypesToDisplay = AppliedStereotypeHelper.getStereotypesToDisplay((View)view);
+ StringTokenizer tokenizer = new StringTokenizer(stereotypesToDisplay, ",");
+ while(tokenizer.hasMoreTokens()) {
+ String stereotypeName = tokenizer.nextToken();
+ Stereotype stereotype = ((Element)element).getAppliedStereotype(stereotypeName);
+ org.eclipse.uml2.uml.Image icon = ElementUtil.getStereotypeImage(((Element)element), stereotype, SHAPE_CONSTANT);
+ if(icon != null) {
+ if(icon.getLocation() != "" && icon.getLocation() != null) {
+ url = new URL(icon.getLocation());
+ images.add(RenderedImageFactory.getInstance(url));
+ }
+ }
+ }
+
+ return images;
+ } catch (MalformedURLException e) {
+ Activator.log.error(e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean providesShapes(EObject view) {
+ if(!(view instanceof View)) {
+ return false;
+ }
+
+ EObject element = ((View)view).getElement();
+ if(element instanceof Element) {
+
+ // This is an element. does it have stereotypes ? If yes, do the stereotypes have shapes associated ?
+ String stereotypesToDisplay = AppliedStereotypeHelper.getStereotypesToDisplay((View)view);
+ StringTokenizer tokenizer = new StringTokenizer(stereotypesToDisplay, ",");
+ if(tokenizer.hasMoreTokens()) {
+ String firstStereotypeName = tokenizer.nextToken();
+ Stereotype stereotype = ((Element)element).getAppliedStereotype(firstStereotypeName);
+ org.eclipse.uml2.uml.Image icon = ElementUtil.getStereotypeImage(((Element)element), stereotype, SHAPE_CONSTANT);
+ if(icon != null) {
+ if(icon.getLocation() != "" && icon.getLocation() != null) {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ProviderNotificationManager createProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ // retrieve semantic element from the view and add a notification listener on the Type feature if the semantic element is a TypedElement
+ if(view == null || !(view instanceof View)) {
+ return null;
+ }
+
+ StereotypedElementShapeProviderNotificationManager notificationManager = new StereotypedElementShapeProviderNotificationManager(diagramEventBroker, view, listener);
+ return notificationManager;
+ }
+
+ /**
+ * Notification Manager for the {@link StereotypedElementShapeProvider}.
+ */
+ public class StereotypedElementShapeProviderNotificationManager extends ProviderNotificationManager implements NotificationListener {
+
+ /**
+ * Creates a new StereotypedElementShapeProviderNotificationManager.
+ *
+ * @param diagramEventBroker
+ * event broker specific to the diargam displaying the shapes.
+ * @param view
+ * the view from which all elements to listen will be computed.
+ * @param listener
+ * the listener to which notifications will be forwarded.
+ */
+ public StereotypedElementShapeProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ super(diagramEventBroker, view, listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void registerListeners() {
+ if(view == null || !(view instanceof View)) {
+ return;
+ }
+ diagramEventBroker.addNotificationListener(view, this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ if(view == null || !(view instanceof View)) {
+ return;
+ }
+ diagramEventBroker.removeNotificationListener(view, this);
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void notifyChanged(Notification notification) {
+ if(listener == null) {
+ return;
+ }
+ if(EcorePackage.eINSTANCE.getEModelElement_EAnnotations().equals(notification.getFeature())) {
+ Object newValue = notification.getNewValue();
+ if(newValue instanceof EAnnotation && UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION.equals(((EAnnotation)newValue).getSource())) {
+ // the stereotype annotation was modified => refresh
+ listener.notifyChanged(notification);
+ }
+ }
+ }
+ }
+
+}
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/TypedElementShapeProvider.java b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/TypedElementShapeProvider.java
new file mode 100644
index 00000000000..b7b1cf67e41
--- /dev/null
+++ b/incoming/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/TypedElementShapeProvider.java
@@ -0,0 +1,234 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.draw2d.ui.render.factory.RenderedImageFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.AbstractShapeProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ProviderNotificationManager;
+import org.eclipse.papyrus.uml.diagram.symbols.Activator;
+import org.eclipse.papyrus.uml.diagram.symbols.IPapyrusInternalProfileConstants;
+import org.eclipse.papyrus.uml.tools.listeners.PapyrusStereotypeListener.StereotypeCustomNotification;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This provider is linked to the {@link ShapeService}. It returns the shapes for a given typed element corresponding to the stereotypes applied on
+ * the business element.
+ */
+public class TypedElementShapeProvider extends AbstractShapeProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<RenderedImage> getShapes(EObject view) {
+ Type type = getType(view);
+ String path = getSymbolPath(type);
+ if(path != null && path.length() > 0) {
+ URL url;
+ try {
+ url = new URL(path);
+ return Arrays.asList(RenderedImageFactory.getInstance(url));
+ } catch (MalformedURLException e) {
+ URI typeResourceURI = type.eResource().getURI();
+ if(typeResourceURI != null) {
+ String workspaceRelativeFolderPath = typeResourceURI.trimSegments(1).toPlatformString(true);
+ try {
+ url = new URL("platform:/resource/" + workspaceRelativeFolderPath + File.separatorChar + path);
+ return Arrays.asList(RenderedImageFactory.getInstance(url));
+ } catch (MalformedURLException e1) {
+ Activator.log.error(e1);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean providesShapes(EObject view) {
+ Type type = getType(view);
+ String path = getSymbolPath(type);
+ if(path != null && path.length() > 0) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the type associated to the semantic element linkerd to the view
+ *
+ * @param view
+ * the view from which type should be looked
+ * @return the type of the semantic element or <code>null</code> if none was found
+ */
+ protected Type getType(EObject view) {
+ if(!(view instanceof View)) {
+ return null;
+ }
+
+ Object element = ((View)view).getElement();
+ if(element instanceof Type) {
+ return (Type)element;
+ } else if(element instanceof TypedElement) {
+ // retrieve type and tries to find a shape for it
+ return ((TypedElement)element).getType();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the path for the symbol associated to the element
+ *
+ * @param view
+ * @return
+ */
+ protected String getSymbolPath(Type type) {
+ if(type == null) {
+ return null;
+ }
+
+ // type is not null. Look for the stereotype symbol definition
+ Stereotype stereotype = type.getAppliedStereotype(IPapyrusInternalProfileConstants.TYPE_SYMBOL_DEFINITION_QUALIFIED_NAME);
+ if(stereotype == null) {
+ return null;
+ }
+
+ Object path = type.getValue(stereotype, IPapyrusInternalProfileConstants.TYPE_SYMBOL_DEFINITION_SYMBOL_PATH);
+ if(path instanceof String && ((String)path).length() > 0) {
+ return path.toString();
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ProviderNotificationManager createProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ if(view == null || !(view instanceof View)) {
+ return null;
+ }
+ TypedElementShapeProviderNotificationManager notificationManager = new TypedElementShapeProviderNotificationManager(diagramEventBroker, view, listener);
+ return notificationManager;
+ }
+
+ /**
+ * Notification Manager for the {@link TypedElementShapeProvider}.
+ */
+ public class TypedElementShapeProviderNotificationManager extends ProviderNotificationManager implements NotificationListener {
+
+ /**
+ * Creates a new StereotypedElementShapeProviderNotificationManager.
+ *
+ * @param diagramEventBroker
+ * event broker specific to the diargam displaying the shapes.
+ * @param view
+ * the view from which all elements to listen will be computed.
+ * @param listener
+ * the listener to which notifications will be forwarded.
+ */
+ public TypedElementShapeProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ super(diagramEventBroker, view, listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void registerListeners() {
+ if(view == null || !(view instanceof View)) {
+ return;
+ }
+ // should register this listener on the type, to listen for stereotype modification
+ // should listen to new value of the typedElement_type feature, in order to remove/add the stereotype listener...
+ Object semanticElement = ((View)view).getElement();
+ if(semanticElement instanceof Type) {
+ diagramEventBroker.addNotificationListener((Type)semanticElement, this);
+ } else if(semanticElement instanceof TypedElement) {
+ diagramEventBroker.addNotificationListener((TypedElement)semanticElement, this);
+ Type type = ((TypedElement)semanticElement).getType();
+ if(type != null) {
+ diagramEventBroker.addNotificationListener(type, this);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ if(view == null || !(view instanceof View)) {
+ return;
+ }
+ Object semanticElement = ((View)view).getElement();
+ if(semanticElement instanceof Type) {
+ diagramEventBroker.removeNotificationListener((Type)semanticElement, this);
+ } else if(semanticElement instanceof TypedElement) {
+ diagramEventBroker.removeNotificationListener((TypedElement)semanticElement, this);
+
+ Type type = ((TypedElement)semanticElement).getType();
+ if(type != null) {
+ diagramEventBroker.removeNotificationListener(type, this);
+ }
+ }
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void notifyChanged(Notification notification) {
+ if(listener == null) {
+ return;
+ }
+
+ if(UMLPackage.eINSTANCE.getTypedElement_Type().equals(notification.getFeature())) {
+ listener.notifyChanged(notification);
+ // add/remove stereotype listener if needed...
+ Object oldValue = notification.getOldValue();
+ if(oldValue instanceof Type) {
+ // a type was removed => remove the listener from this old type
+ diagramEventBroker.removeNotificationListener((Type)oldValue, this);
+ }
+ Object newValue = notification.getNewValue();
+ if(newValue instanceof Type) {
+ // a type was added => adds the listener from this new type
+ diagramEventBroker.removeNotificationListener((Type)newValue, this);
+ }
+ } else if(notification instanceof StereotypeCustomNotification) {
+ // call refresh for all stereotype notifications. could target specific modification on the stereotype Symbol definition
+ listener.notifyChanged(notification);
+ }
+
+ }
+ }
+
+}

Back to the top