Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-04-01 11:28:51 -0400
committerptessier2014-04-01 11:28:51 -0400
commitaa8fe3c74d0e20ad56edab6678f4b41862c5216a (patch)
treea2b43ce94e22befcde98cc9803d64e5366a3e9b1
parent2753321f21e52fc143bda2b58b47b51586316b88 (diff)
downloadorg.eclipse.papyrus-aa8fe3c74d0e20ad56edab6678f4b41862c5216a.tar.gz
org.eclipse.papyrus-aa8fe3c74d0e20ad56edab6678f4b41862c5216a.tar.xz
org.eclipse.papyrus-aa8fe3c74d0e20ad56edab6678f4b41862c5216a.zip
431723: [Test] property of stereotypes must be tested with a Junit
https://bugs.eclipse.org/bugs/show_bug.cgi?id=431723
-rw-r--r--doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.uml340
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/META-INF/MANIFEST.MF1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/build.properties4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/StereotypePropertyCommentv2.docx (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/docs/StereotypePropertyCommentv2.docx)bin393534 -> 393534 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/UserGuide.docx (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/docs/UserGuide.docx)bin342267 -> 342267 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/ChangeAppearance.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/ChangeAppearance.PNG)bin19646 -> 19646 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/Deletion.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/Deletion.PNG)bin39172 -> 39172 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/StereotypeDisplay1.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/StereotypeDisplay1.PNG)bin14046 -> 14046 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/StereotypeDisplay2.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/StereotypeDisplay2.PNG)bin18725 -> 18725 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/TechnicalProposition.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/TechnicalProposition.PNG)bin56464 -> 56464 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/displayAsComment.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/displayAsComment.PNG)bin27560 -> 27560 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/hide.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/hide.PNG)bin45238 -> 45238 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/removeDisplayAppliedStereotypeProperty.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/removeDisplayAppliedStereotypeProperty.PNG)bin22486 -> 22486 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/removeStereotype.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/removeStereotype.PNG)bin26145 -> 26145 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/resultDisplay.PNG (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/resultDisplay.PNG)bin19462 -> 19462 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.di (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.di)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.notation (renamed from doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.notation)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.uml315
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.pdoc4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeMultilinePropertyEditPart.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypePropertiesEditPolicy.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/CustomEditPolicyProvider.java2
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch41
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java140
29 files changed, 531 insertions, 408 deletions
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.uml b/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.uml
deleted file mode 100644
index 51270edebf4..00000000000
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.uml
+++ /dev/null
@@ -1,340 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:CommentProfile="http:///schemas/CommentProfile/_za0HEBzqEeKLhMLY6huzvQ/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/CommentProfile/_za0HEBzqEeKLhMLY6huzvQ/1 profile/CommentProfile.profile.uml#_za0HERzqEeKLhMLY6huzvQ">
- <uml:Model xmi:id="_y6DcUBaoEeK2bPy_5yA69Q" name="AppliedStereotypeCommenttEditPart">
- <ownedComment xmi:id="_n7laQBbBEeK2bPy_5yA69Q">
- <body>Patrick Tessier (CEA LIST)&#xD;
-Version 0.2</body>
- </ownedComment>
- <packageImport xmi:id="_y6DcURaoEeK2bPy_5yA69Q">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Package" xmi:id="_43PMcBaoEeK2bPy_5yA69Q" name="UseCases">
- <ownedComment xmi:id="_Mets4BaqEeK2bPy_5yA69Q" annotatedElement="_TxfMYBapEeK2bPy_5yA69Q">
- <body>The comment symbol is created when a user decide to show at least one property value of a stereotype applied on a model element. &#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_bQA-ABaqEeK2bPy_5yA69Q" annotatedElement="_WR0bIBapEeK2bPy_5yA69Q">
- <body>• The comment symbol, and its link, used to display the stereotype values shall be deleted when the annotated model element is deleted.&#xD;
-• The comment symbol, and its link, used to display the stereotype values shall be deleted when the graphical representation of the annotated model element is deleted, that is to say when the annotated model element is hidden from the diagram.&#xD;
-• The comment symbol, and its link, used to display the stereotype values shall be deleted when the user hides all values of a stereotype.&#xD;
-• The comment symbol, and its link, used to display the stereotype values shall be deleted when the applied stereotype whose values are currently shown are unapplied.&#xD;
-• When the user delete or cut graphically the comment symbol, this latter is deleted, as well its link with the annotated model element and the stereotypes values that were shown in the deleted comment symbol are set to be no more shown in the notation file.&#xD;
-• When the profile that contains the stereotype is unapplied &#xD;
-• For the moment, this element cannot be deleted semantically or graphically.&#xD;
- Semantically = unapplication of stereotypes?&#xD;
- graphically = update information of the display of the property of stereotype in the property view (maybe later)</body>
- </ownedComment>
- <ownedComment xmi:id="_c1yB8BaqEeK2bPy_5yA69Q" annotatedElement="_ex_scBapEeK2bPy_5yA69Q">
- <body>• Create it when the element is stereotyped and when a property of the stereotype is displayed as &quot;comment shape&quot;&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_dNn6MBaqEeK2bPy_5yA69Q" annotatedElement="_gpgAoBapEeK2bPy_5yA69Q">
- <body>• When the semantic element is deleted&#xD;
-• when all properties of applied stereotypes are not displayed as &quot;comment shape&quot;&#xD;
-• when all properties of applied stereotypes that are displayed as &quot; comment shape&quot; are unapplied&#xD;
-• For the moment, this element cannot be deleted semantically or graphically, because it is only to be link the &quot;comment&quot;&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_dznjMBaqEeK2bPy_5yA69Q" annotatedElement="_mXxLABapEeK2bPy_5yA69Q">
- <body>• The comment symbol showing the stereotype values can be graphically moved everywhere in the diagram.&#xD;
-• The comment symbol showing the stereotype values cannot be copy/past.&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_pLGRIBzyEeK0rNOLRzw-aQ" annotatedElement="_TxfMYBapEeK2bPy_5yA69Q">
- <body> - Apply chosen profile and chosen stereotype on the element by using profile tab.&#xD;
-- Go to the property view (appearance tab).&#xD;
-- Select properties to stereotype to select and then choose the “display place” as Comment&#xD;
- &#xD;
-&#xD;
-Thank to this, a comment symbol appear. It contains the applied stereotype property that you want to see. The property of stereotype can be edited. This functionality can be use on links or nodes see Figure 5.&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_pd3cIBzyEeK0rNOLRzw-aQ" annotatedElement="_WR0bIBapEeK2bPy_5yA69Q">
- <body> • The comment symbol, and its link, used to display the stereotype values shall be deleted when the annotated model element is deleted.&#xD;
- &#xD;
-Figure 6: Deletion of the selected element&#xD;
-&#xD;
-• The comment symbol, and its link, used to display the stereotype values shall be deleted when the graphical representation of the annotated model element is deleted, that is to say when the annotated model element is hidden from the diagram.&#xD;
- &#xD;
-&#xD;
-• The comment symbol, and its link, used to display the stereotype values shall be deleted when the user hides all values of a stereotype.&#xD;
-To that, go the property view select each property of stereotype (1) and click on the small TV (2) Figure 8 . When the property is displayed the symbol is , when it is not displayed the symbol is .&#xD;
- &#xD;
-Figure 8: Remove the display of applied stereotype property&#xD;
-• The comment symbol, and its link, used to display the stereotype values shall be deleted when the applied stereotype whose values are currently shown are unapplied.&#xD;
- To do that , go the property view (Figure 9), select profile tab, and first select the stereotype to remove (1) and then the click on the red cross (2)&#xD;
- &#xD;
-&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_p_2H0BzyEeK0rNOLRzw-aQ" annotatedElement="_5X6AwBnuEeK2bPy_5yA69Q">
- <body> The presentation of the comment symbol can be customized by the user. You can change the background and the foreground color.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Component" xmi:id="_9YUK8BaoEeK2bPy_5yA69Q" name="Papyrus stereotype comment" useCase="_DMGHcBapEeK2bPy_5yA69Q _TxfMYBapEeK2bPy_5yA69Q _WR0bIBapEeK2bPy_5yA69Q _ex_scBapEeK2bPy_5yA69Q _gpgAoBapEeK2bPy_5yA69Q _mXxLABapEeK2bPy_5yA69Q _5X6AwBnuEeK2bPy_5yA69Q">
- <ownedComment xmi:id="_bgUbIBa7EeK2bPy_5yA69Q" annotatedElement="_DMGHcBapEeK2bPy_5yA69Q">
- <body>Within UML, there are three options to show the values of stereotype applications: (i) within a dedicated compartment (e.g., left side within Figure 2); within a string enclosed by braces and put just behind the string showing the stereotype application ((e.g., right side within Figure 2); (iii) using a comment symbol as denoted in the Figure 2. The purpose is here to support this latter option.</body>
- </ownedComment>
- <ownedUseCase xmi:id="_DMGHcBapEeK2bPy_5yA69Q" name="Papyrus shall enable to show stereotypes values in a comment symbol" subject="_9YUK8BaoEeK2bPy_5yA69Q">
- <include xmi:id="_dtdGQBapEeK2bPy_5yA69Q" addition="_TxfMYBapEeK2bPy_5yA69Q"/>
- <include xmi:id="_eQUiwBapEeK2bPy_5yA69Q" name="" addition="_WR0bIBapEeK2bPy_5yA69Q"/>
- <include xmi:id="_s1Qy4BapEeK2bPy_5yA69Q" addition="_mXxLABapEeK2bPy_5yA69Q"/>
- <include xmi:id="__FRMMBnuEeK2bPy_5yA69Q" addition="_5X6AwBnuEeK2bPy_5yA69Q"/>
- </ownedUseCase>
- <ownedUseCase xmi:id="_TxfMYBapEeK2bPy_5yA69Q" name="Creation of the comment symbol used to show stereotype values" subject="_9YUK8BaoEeK2bPy_5yA69Q">
- <include xmi:id="_lSVM8BapEeK2bPy_5yA69Q" addition="_ex_scBapEeK2bPy_5yA69Q"/>
- </ownedUseCase>
- <ownedUseCase xmi:id="_WR0bIBapEeK2bPy_5yA69Q" name="Deletion of the comment symbol used to show stereotype values" subject="_9YUK8BaoEeK2bPy_5yA69Q">
- <include xmi:id="_mBaggBapEeK2bPy_5yA69Q" addition="_gpgAoBapEeK2bPy_5yA69Q"/>
- </ownedUseCase>
- <ownedUseCase xmi:id="_ex_scBapEeK2bPy_5yA69Q" name="Creation of the Link" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
- <ownedUseCase xmi:id="_gpgAoBapEeK2bPy_5yA69Q" name="Deletion of the link" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
- <ownedUseCase xmi:id="_mXxLABapEeK2bPy_5yA69Q" name="Move the comment symbol showing the stereotypes values" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
- <ownedUseCase xmi:id="_5X6AwBnuEeK2bPy_5yA69Q" name="choose the color of the comment symbol by using the property view" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_ZT--oBwaEeKjG5zMFxAVTA" clientDependency="_jVXkABwaEeKjG5zMFxAVTA" name="TestUseCases">
- <ownedComment xmi:id="_RC8bEC_aEeKRCpw1GQ-68A" annotatedElement="_szg0cC_ZEeKRCpw1GQ-68A">
- <body> Display stereotype directly as comment shape by selecteing two propertie!&#xD;
-a bug was raised because several comment were created &#xD;
-393530: [Stereotypes] doublon of applied stereotype comment can be created</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Dependency" xmi:id="_jVXkABwaEeKjG5zMFxAVTA" name="Dependency1" client="_ZT--oBwaEeKjG5zMFxAVTA" supplier="_43PMcBaoEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_xA9xUBwaEeKjG5zMFxAVTA" name="Display stereotype application directly in comment"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_3JZIIBwaEeKjG5zMFxAVTA" name="Display from a display as compartment"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_6JvTsBwaEeKjG5zMFxAVTA" clientDependency="_O_vSMBwbEeKjG5zMFxAVTA _RyP2EBwbEeKjG5zMFxAVTA" name="Display applied stereotype of a &quot;link&quot; element">
- <extensionPoint xmi:id="_LfDZsBwbEeKjG5zMFxAVTA" name="point"/>
- <include xmi:id="_U0_OUBwbEeKjG5zMFxAVTA" addition="_xA9xUBwaEeKjG5zMFxAVTA"/>
- <include xmi:id="_VTPQkBwbEeKjG5zMFxAVTA" addition="_3JZIIBwaEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_-1reYBwaEeKjG5zMFxAVTA" clientDependency="_N8sg0BwbEeKjG5zMFxAVTA _P5_7ABwbEeKjG5zMFxAVTA" name="Display applied stereotype of a &quot;node&quot; element">
- <extensionPoint xmi:id="_KWyKEBwbEeKjG5zMFxAVTA" name="point"/>
- <include xmi:id="_Tz3vkBwbEeKjG5zMFxAVTA" addition="_xA9xUBwaEeKjG5zMFxAVTA"/>
- <include xmi:id="_URFQABwbEeKjG5zMFxAVTA" addition="_3JZIIBwaEeKjG5zMFxAVTA"/>
- <include xmi:id="_0oUNgC_ZEeKRCpw1GQ-68A" addition="_szg0cC_ZEeKRCpw1GQ-68A"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Usage" xmi:id="_N8sg0BwbEeKjG5zMFxAVTA" name="Usage1" client="_-1reYBwaEeKjG5zMFxAVTA" supplier="_ex_scBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_O_vSMBwbEeKjG5zMFxAVTA" name="Usage2" client="_6JvTsBwaEeKjG5zMFxAVTA" supplier="_ex_scBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_P5_7ABwbEeKjG5zMFxAVTA" name="Usage3" client="_-1reYBwaEeKjG5zMFxAVTA" supplier="_gpgAoBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_RyP2EBwbEeKjG5zMFxAVTA" name="Usage4" client="_6JvTsBwaEeKjG5zMFxAVTA" supplier="_gpgAoBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_LR4q8BwcEeKjG5zMFxAVTA" clientDependency="_jt1ccBwcEeKjG5zMFxAVTA" name="Display applied stereotype as compartment"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_OH9gMBwcEeKjG5zMFxAVTA" clientDependency="_kor7IBwcEeKjG5zMFxAVTA" name="Unapply stereotype"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_PxBIsBwcEeKjG5zMFxAVTA" clientDependency="_lLjXoBwcEeKjG5zMFxAVTA" name="unapply profile"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_RuoE4BwcEeKjG5zMFxAVTA" clientDependency="_mX09gBwcEeKjG5zMFxAVTA" name="unapply profile on the UML editor and reopen it with papyrus"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_WFuA8BwcEeKjG5zMFxAVTA" clientDependency="_lqPewBwcEeKjG5zMFxAVTA" name="unapply profile withe the diagram closed"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_jt1ccBwcEeKjG5zMFxAVTA" name="Usage5" client="_LR4q8BwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_kor7IBwcEeKjG5zMFxAVTA" name="Usage6" client="_OH9gMBwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_lLjXoBwcEeKjG5zMFxAVTA" name="Usage7" client="_PxBIsBwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_lqPewBwcEeKjG5zMFxAVTA" name="Usage8" client="_WFuA8BwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_mX09gBwcEeKjG5zMFxAVTA" name="Usage9" client="_RuoE4BwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_uV8qoBwcEeKjG5zMFxAVTA" clientDependency="_0P6usBwcEeKjG5zMFxAVTA" name="Change the container of the comment"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_wLWGABwcEeKjG5zMFxAVTA" clientDependency="_0tajABwcEeKjG5zMFxAVTA" name="move inside it own container"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_0P6usBwcEeKjG5zMFxAVTA" name="Usage10" client="_uV8qoBwcEeKjG5zMFxAVTA" supplier="_mXxLABapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_0tajABwcEeKjG5zMFxAVTA" name="Usage11" client="_wLWGABwcEeKjG5zMFxAVTA" supplier="_mXxLABapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_1TtG8BwcEeKjG5zMFxAVTA" clientDependency="_3zHIoBwcEeKjG5zMFxAVTA" name="move the stereotyped element"/>
- <packagedElement xmi:type="uml:Usage" xmi:id="_3zHIoBwcEeKjG5zMFxAVTA" name="Usage12" client="_1TtG8BwcEeKjG5zMFxAVTA" supplier="_mXxLABapEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:UseCase" xmi:id="_szg0cC_ZEeKRCpw1GQ-68A" name="Creation of a comment by selecting several properties of stereotype "/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_SOH00BasEeK2bPy_5yA69Q" clientDependency="_ivOxEBwaEeKjG5zMFxAVTA" name="SolutionProposition">
- <ownedComment xmi:id="_8kDFUBa8EeK2bPy_5yA69Q">
- <body>The applied stereotypes properties “comment” is represented by:&#xD;
-The editpart AppliedStereotypesCommentEditpart, the comment shape that will contains the editpart in charge of the edition of sterotype (AppliedStereotypeConpartmentEditPart, AppliedStereotypePropertyEditPart).&#xD;
-The editpart AppliedSterotypesCommentLinkEditPart, the link between the stereotyped element and the comment.&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_-XrJoBa9EeK2bPy_5yA69Q" annotatedElement="_0wUdkBasEeK2bPy_5yA69Q">
- <body>The Applied StereotypeCommentEdipart and the appliedStereotypeCommentLinkEditPart are connected to the semantic element. Thanks to this, if the semantic element is deleted the comment will be also deleted.&#xD;
-The Applied StereotypeCommentEdipart will be contains eannotation about stereotype application exactly as the editpart that represents the semantic element. In this manner, it is possible to reuse mechanism of stereotype edition.&#xD;
-To ensure the creation of the comment and the synchronization of eannotation information from the Semantic editpart an editpolicy will be added: the AppliedStereotypeCommentEditPolicy.&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_kk75cBa_EeK2bPy_5yA69Q">
- <body>Explaination of the example:&#xD;
-Two stereotypes are applied on the Class1. By default two ApplicationStereotypeCompartment are created (one references stapp1, and the second references stapp2). By default there are not visible. This is the normal behavior.&#xD;
-The user has decided to display a property if the applied stereotype stapp1.&#xD;
-An AppliedStereotypesCommentEditpart and AppliedStereotypeCommentLinkEditPart are created. (They references Class1). The AppliedStereotypesCommentEditpart reuse the standard mechanism of stereotype displaying:&#xD;
-Two ApplicationStereotypeCompartment are created (one references stapp1 with visibility=true, and the second references stapp2 with the visibility=false).&#xD;
-An appliedStereotypePropertyEditpart is created because we want to see a property of stapp1&#xD;
-</body>
- </ownedComment>
- <ownedComment xmi:id="_qU8lYB0DEeK0rNOLRzw-aQ" annotatedElement="_IC8gUBz5EeK0rNOLRzw-aQ">
- <body>• CommentShapeForAppliedStereotypeEditPolicy : this editpolicy attached to StereotypeCommentEdipart has in charge to prevent the remove form model and launch command of deletion if it detect that any properties of applied stereotype are displayed.</body>
- </ownedComment>
- <ownedComment xmi:id="_sLjhsB0DEeK0rNOLRzw-aQ" annotatedElement="_0OcbEBz4EeK0rNOLRzw-aQ">
- <body> • AppliedStereotypeCompartmentForCommentShapeEditPolicy is another editpolicy attached to StereotypeCommentEdipart. It does the same work as AppliedStereotypeCompartmentEditPolicy. Because the StereotypeCommentEdipart is not attached to a semantic element by the attribute element of the notation view. It specializes the method getUMLElement to find the semantic element </body>
- </ownedComment>
- <packagedElement xmi:type="uml:Class" xmi:id="_Yc3PABasEeK2bPy_5yA69Q" name="AppliedStereotypeConpartmentEditPart">
- <ownedAttribute xmi:id="_q_sRABasEeK2bPy_5yA69Q" name="children" type="_k00qMBasEeK2bPy_5yA69Q" association="_q_sRAxasEeK2bPy_5yA69Q">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_q_sRARasEeK2bPy_5yA69Q"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_q_sRAhasEeK2bPy_5yA69Q" value="*"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_k00qMBasEeK2bPy_5yA69Q" name="AppliedStereotypePropertyEditPart"/>
- <packagedElement xmi:type="uml:Association" xmi:id="_q_sRAxasEeK2bPy_5yA69Q" name="appliedStereotypeConpartmentEditPart_appliedStereotypePropertyEditPart_1" memberEnd="_q_sRBBasEeK2bPy_5yA69Q _q_sRABasEeK2bPy_5yA69Q">
- <ownedEnd xmi:id="_q_sRBBasEeK2bPy_5yA69Q" name="appliedStereotypeConpartmentEditPart" type="_Yc3PABasEeK2bPy_5yA69Q" association="_q_sRAxasEeK2bPy_5yA69Q">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_q_sRBRasEeK2bPy_5yA69Q" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_q_sRBhasEeK2bPy_5yA69Q" value="1"/>
- </ownedEnd>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_0wUdkBasEeK2bPy_5yA69Q" name="AppliedStereotypesCommentEditPart">
- <ownedAttribute xmi:id="_5BAPoBasEeK2bPy_5yA69Q" name="children" type="_Yc3PABasEeK2bPy_5yA69Q" association="_5BAPoxasEeK2bPy_5yA69Q">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_5BAPoRasEeK2bPy_5yA69Q"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_5BAPohasEeK2bPy_5yA69Q" value="*"/>
- </ownedAttribute>
- <ownedAttribute xmi:id="_Z6lQQBz5EeK0rNOLRzw-aQ" name="commentShapeForAppliedStereotypeEditPolicy" type="_IC8gUBz5EeK0rNOLRzw-aQ" association="_Z6lQQxz5EeK0rNOLRzw-aQ">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Z6lQQRz5EeK0rNOLRzw-aQ" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Z6lQQhz5EeK0rNOLRzw-aQ" value="1"/>
- </ownedAttribute>
- <ownedAttribute xmi:id="_as8hUBz5EeK0rNOLRzw-aQ" name="appliedStereotypeCompartmentForCommentShapeEditPolicy" type="_0OcbEBz4EeK0rNOLRzw-aQ" association="_as8hUxz5EeK0rNOLRzw-aQ">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_as8hURz5EeK0rNOLRzw-aQ" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_as8hUhz5EeK0rNOLRzw-aQ" value="1"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Association" xmi:id="_5BAPoxasEeK2bPy_5yA69Q" name="appliedStereotypesComment_appliedStereotypeConpartmentEditPart_1" memberEnd="_5BAPpBasEeK2bPy_5yA69Q _5BAPoBasEeK2bPy_5yA69Q">
- <ownedEnd xmi:id="_5BAPpBasEeK2bPy_5yA69Q" name="appliedStereotypesComment" type="_0wUdkBasEeK2bPy_5yA69Q" association="_5BAPoxasEeK2bPy_5yA69Q">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_5BAPpRasEeK2bPy_5yA69Q" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_5BAPphasEeK2bPy_5yA69Q" value="1"/>
- </ownedEnd>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_ELyGABatEeK2bPy_5yA69Q" name="AppliedStereotypesCommentLinkEditPart">
- <ownedComment xmi:id="_hQGJwBatEeK2bPy_5yA69Q" annotatedElement="_Veb5kBatEeK2bPy_5yA69Q">
- <body>To ensure the creation of the comment and the synchronization of eannotation information from the Semantic editpart an editpolicy will be added: the AppliedStereotypeCommentCreationEditPolicy.&#xD;
-This editpolicy has in charge to:&#xD;
-- Create by using the command CreateAppliedStereotypeCommentViewCommand&#xD;
-- Destroy the AppliedStereotypesCommentEditpart&#xD;
-- Adapt the information about stereotype display into AppliedstereotypeCommentEditPart by using eannotation existing mechanism&#xD;
-</body>
- </ownedComment>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_Veb5kBatEeK2bPy_5yA69Q" name="AppliedStereotypeCommentCreationEditPolicy">
- <ownedAttribute xmi:id="_jipzMBz4EeK0rNOLRzw-aQ" name="command" type="_RP5NgBz4EeK0rNOLRzw-aQ" association="_jipzMxz4EeK0rNOLRzw-aQ">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jipzMRz4EeK0rNOLRzw-aQ" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jipzMhz4EeK0rNOLRzw-aQ" value="1"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Dependency" xmi:id="_ivOxEBwaEeKjG5zMFxAVTA" name="Dependency1" client="_SOH00BasEeK2bPy_5yA69Q" supplier="_43PMcBaoEeK2bPy_5yA69Q"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_RP5NgBz4EeK0rNOLRzw-aQ" name="CreateAppliedStereotypeCommentViewCommand"/>
- <packagedElement xmi:type="uml:Association" xmi:id="_jipzMxz4EeK0rNOLRzw-aQ" name="appliedStereotypeCommentCreationEditPolicy_createAppliedStereotypeCommentViewCommand_1" memberEnd="_jipzNBz4EeK0rNOLRzw-aQ _jipzMBz4EeK0rNOLRzw-aQ">
- <ownedEnd xmi:id="_jipzNBz4EeK0rNOLRzw-aQ" name="appliedStereotypeCommentCreationEditPolicy" type="_Veb5kBatEeK2bPy_5yA69Q" association="_jipzMxz4EeK0rNOLRzw-aQ">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jipzNRz4EeK0rNOLRzw-aQ" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jipzNhz4EeK0rNOLRzw-aQ" value="1"/>
- </ownedEnd>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_0OcbEBz4EeK0rNOLRzw-aQ" name="AppliedStereotypeCompartmentForCommentShapeEditPolicy">
- <generalization xmi:id="_n2ZD0Bz5EeK0rNOLRzw-aQ" general="_kXn24Bz5EeK0rNOLRzw-aQ"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_IC8gUBz5EeK0rNOLRzw-aQ" name="CommentShapeForAppliedStereotypeEditPolicy"/>
- <packagedElement xmi:type="uml:Association" xmi:id="_Z6lQQxz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart_commentShapeForAppliedStereotypeEditPolicy_1" memberEnd="_Z6lQRBz5EeK0rNOLRzw-aQ _Z6lQQBz5EeK0rNOLRzw-aQ">
- <ownedEnd xmi:id="_Z6lQRBz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart" type="_0wUdkBasEeK2bPy_5yA69Q" association="_Z6lQQxz5EeK0rNOLRzw-aQ">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Z6lQRRz5EeK0rNOLRzw-aQ" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Z6lQRhz5EeK0rNOLRzw-aQ" value="1"/>
- </ownedEnd>
- </packagedElement>
- <packagedElement xmi:type="uml:Association" xmi:id="_as8hUxz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart_appliedStereotypeCompartmentForCommentShapeEditPolicy_1" memberEnd="_as8hVBz5EeK0rNOLRzw-aQ _as8hUBz5EeK0rNOLRzw-aQ">
- <ownedEnd xmi:id="_as8hVBz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart" type="_0wUdkBasEeK2bPy_5yA69Q" association="_as8hUxz5EeK0rNOLRzw-aQ">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_as8hVRz5EeK0rNOLRzw-aQ" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_as8hVhz5EeK0rNOLRzw-aQ" value="1"/>
- </ownedEnd>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_kXn24Bz5EeK0rNOLRzw-aQ" name="AppliedStereotypeCompartmentEditPolicy"/>
- <packagedElement xmi:type="uml:Association" xmi:id="_Y0TiwB68EeKLcoKnaGZ6oA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_4RTrEBwdEeKjG5zMFxAVTA" name="TestProposition">
- <packagedElement xmi:type="uml:Package" xmi:id="_1fZkIBwdEeKjG5zMFxAVTA" name="org.eclipse.papyrus.uml.appliedstereotypecommend.recipetest">
- <packagedElement xmi:type="uml:Package" xmi:id="_RFkSEBwiEeKjG5zMFxAVTA" clientDependency="_WDHKIBwiEeKjG5zMFxAVTA _Y33JsBwiEeKjG5zMFxAVTA" name="Creation">
- <packagedElement xmi:type="uml:Model" xmi:id="_PHYjkBwhEeKjG5zMFxAVTA" name="CreateDirectlyAcomment">
- <ownedComment xmi:id="_Cy8MAB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. The purpose is to display applied stereotype properties as comment</body>
- </ownedComment>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_HTIHoBwiEeKjG5zMFxAVTA" name="CreateFromComment">
- <ownedComment xmi:id="_GjS4MB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as compartment. The purpose is to display them as comment. The comment has to be created and compartments disappear.</body>
- </ownedComment>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_U-lAcBwhEeKjG5zMFxAVTA" name="ReOpenFile">
- <ownedComment xmi:id="_IvzzEB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that there are displayed as comment.</body>
- </ownedComment>
- </packagedElement>
- <packagedElement xmi:type="uml:Realization" xmi:id="_WDHKIBwiEeKjG5zMFxAVTA" name="Realization1" client="_RFkSEBwiEeKjG5zMFxAVTA" supplier="_-1reYBwaEeKjG5zMFxAVTA"/>
- <packagedElement xmi:type="uml:Realization" xmi:id="_Y33JsBwiEeKjG5zMFxAVTA" name="Realization2" client="_RFkSEBwiEeKjG5zMFxAVTA" supplier="_6JvTsBwaEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_yFAVUBwnEeKjG5zMFxAVTA" name="Deletion">
- <packagedElement xmi:type="uml:Model" xmi:id="_z9s8UBwnEeKjG5zMFxAVTA" clientDependency="_Yxw6ABwoEeKjG5zMFxAVTA" name="ChangeDisplay">
- <ownedComment xmi:id="_LzKPUB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and and to display as compartment. Comment has to disappear.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_Yxw6ABwoEeKjG5zMFxAVTA" name="Realization1" client="_z9s8UBwnEeKjG5zMFxAVTA" supplier="_-1reYBwaEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_22d5MBwnEeKjG5zMFxAVTA" clientDependency="_a33q4BwoEeKjG5zMFxAVTA" name="UnapplyProfile">
- <ownedComment xmi:id="_Qd6uQB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and to unapply profile. Comment has to disappear.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_a33q4BwoEeKjG5zMFxAVTA" name="Realization1" client="_22d5MBwnEeKjG5zMFxAVTA" supplier="_PxBIsBwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_4oAvUBwnEeKjG5zMFxAVTA" clientDependency="_aLd34BwoEeKjG5zMFxAVTA" name="UnapplyStereotype">
- <ownedComment xmi:id="_OMe3IB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and to unapply stereotype. Comment has to disappear.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_aLd34BwoEeKjG5zMFxAVTA" name="Realization1" client="_4oAvUBwnEeKjG5zMFxAVTA" supplier="_OH9gMBwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_8fzgQBwnEeKjG5zMFxAVTA" clientDependency="_cJhgABwoEeKjG5zMFxAVTA" name="BadUnapplyProfile">
- <ownedComment xmi:id="_TCkcUB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. But the profile has been unapplied with the UML editor.So the notation is not up to date.The purpose is to open the file with papyrus. Comment has to disappear.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_cJhgABwoEeKjG5zMFxAVTA" name="Realization1" client="_8fzgQBwnEeKjG5zMFxAVTA" supplier="_RuoE4BwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_4CqxIBwoEeKjG5zMFxAVTA" clientDependency="_8N0i8BwoEeKjG5zMFxAVTA" name="UnapplyProfileDiagramClosed">
- <ownedComment xmi:id="_VHorYB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. But the profile has been unapplied with diagram closed.The purpose is to open the diagram. Comment has to disappear.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_8N0i8BwoEeKjG5zMFxAVTA" name="Realization1" client="_4CqxIBwoEeKjG5zMFxAVTA" supplier="_WFuA8BwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_-nF84BwnEeKjG5zMFxAVTA" name="Move">
- <packagedElement xmi:type="uml:Model" xmi:id="_BHRaoBwoEeKjG5zMFxAVTA" clientDependency="_ei2u4BwoEeKjG5zMFxAVTA" name="MoveCommentWithPackage">
- <ownedComment xmi:id="_beITYB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that you can move comment into package without move stereotyped element.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Usage" xmi:id="_ei2u4BwoEeKjG5zMFxAVTA" name="Usage1" client="_BHRaoBwoEeKjG5zMFxAVTA" supplier="_uV8qoBwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_DxSw4BwoEeKjG5zMFxAVTA" clientDependency="_fhIVABwoEeKjG5zMFxAVTA" name="MoveSemanticWithPackage">
- <ownedComment xmi:id="_eDhoUB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that you can move semantic into package without move comment.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_fhIVABwoEeKjG5zMFxAVTA" name="Realization1" client="_DxSw4BwoEeKjG5zMFxAVTA" supplier="_1TtG8BwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Model" xmi:id="_JN0D8BwoEeKjG5zMFxAVTA" clientDependency="_duG4MBwoEeKjG5zMFxAVTA" name="MoveComment">
- <ownedComment xmi:id="_YqRrsB0JEeK0rNOLRzw-aQ">
- <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that you can move comment everywhere.</body>
- </ownedComment>
- <packagedElement xmi:type="uml:Realization" xmi:id="_duG4MBwoEeKjG5zMFxAVTA" name="Realization1" client="_JN0D8BwoEeKjG5zMFxAVTA" supplier="_wLWGABwcEeKjG5zMFxAVTA"/>
- </packagedElement>
- </packagedElement>
- </packagedElement>
- </packagedElement>
- <profileApplication xmi:id="_Iav6IBzqEeKLhMLY6huzvQ">
- <eAnnotations xmi:id="_IbfhABzqEeKLhMLY6huzvQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="profile/CommentProfile.profile.uml#_za0HERzqEeKLhMLY6huzvQ"/>
- </eAnnotations>
- <appliedProfile href="profile/CommentProfile.profile.uml#_EV0hkBzpEeKLhMLY6huzvQ"/>
- </profileApplication>
- </uml:Model>
- <CommentProfile:DevelopperGuide xmi:id="_NOFtUBzqEeKLhMLY6huzvQ" base_Element="_SOH00BasEeK2bPy_5yA69Q"/>
- <CommentProfile:TestGuide xmi:id="_PHp3ABzqEeKLhMLY6huzvQ" base_Element="_ZT--oBwaEeKjG5zMFxAVTA"/>
- <CommentProfile:TestGuide xmi:id="_QQqGcBzqEeKLhMLY6huzvQ" base_Element="_4RTrEBwdEeKjG5zMFxAVTA"/>
- <CommentProfile:InformationSource xmi:id="_Njv-0BzrEeKLhMLY6huzvQ" base_Package="_y6DcUBaoEeK2bPy_5yA69Q" author="Patrick Tessier" version="0.0.4" copyright="CEA LIST"/>
- <CommentProfile:UserGuide xmi:id="_loAk4BzyEeK0rNOLRzw-aQ" base_Element="_TxfMYBapEeK2bPy_5yA69Q"/>
- <CommentProfile:UserGuide xmi:id="_mi3DkBzyEeK0rNOLRzw-aQ" base_Element="_WR0bIBapEeK2bPy_5yA69Q"/>
- <CommentProfile:UserGuide xmi:id="_ne6cIBzyEeK0rNOLRzw-aQ" base_Element="_mXxLABapEeK2bPy_5yA69Q"/>
- <CommentProfile:UserGuide xmi:id="_oX-yIBzyEeK0rNOLRzw-aQ" base_Element="_5X6AwBnuEeK2bPy_5yA69Q"/>
- <CommentProfile:UserGuide xmi:id="_rqYXABzyEeK0rNOLRzw-aQ" base_Element="_pLGRIBzyEeK0rNOLRzw-aQ"/>
- <CommentProfile:UserGuide xmi:id="_sxUJ4BzyEeK0rNOLRzw-aQ" base_Element="_pd3cIBzyEeK0rNOLRzw-aQ"/>
- <CommentProfile:UserGuide xmi:id="_ubtPIBzyEeK0rNOLRzw-aQ" base_Element="_p_2H0BzyEeK0rNOLRzw-aQ"/>
- <CommentProfile:DevelopperGuide xmi:id="_SdTOEBzzEeK0rNOLRzw-aQ" base_Element="_Mets4BaqEeK2bPy_5yA69Q"/>
- <CommentProfile:DevelopperGuide xmi:id="_Tai5cBzzEeK0rNOLRzw-aQ" base_Element="_bQA-ABaqEeK2bPy_5yA69Q"/>
- <CommentProfile:DevelopperGuide xmi:id="_VVBpIBzzEeK0rNOLRzw-aQ" base_Element="_c1yB8BaqEeK2bPy_5yA69Q"/>
- <CommentProfile:DevelopperGuide xmi:id="_WTwiQBzzEeK0rNOLRzw-aQ" base_Element="_dNn6MBaqEeK2bPy_5yA69Q"/>
- <CommentProfile:DevelopperGuide xmi:id="_XGkfQBzzEeK0rNOLRzw-aQ" base_Element="_dznjMBaqEeK2bPy_5yA69Q"/>
- <CommentProfile:UserGuide xmi:id="_aiDusBzzEeK0rNOLRzw-aQ" base_Element="_dznjMBaqEeK2bPy_5yA69Q"/>
-</xmi:XMI>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java
index eeec5ecb6ae..064e23b08ab 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java
@@ -62,7 +62,9 @@ public abstract class ResizeableListCompartmentEditPart extends ListCompartmentE
if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
refreshBounds();
}
- super.handleNotificationEvent(notification);
+ if( resolveSemanticElement()!=null){
+ super.handleNotificationEvent(notification);
+ }
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/META-INF/MANIFEST.MF
index 452d0e580a8..d5ac1152931 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/META-INF/MANIFEST.MF
@@ -26,4 +26,5 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.stereotype.editio
n;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Description: The pupose of this plugin is add the fucntionality to display stereotype into compartment or into comment of applied stereotype. More details (models and file.doc) has been store in the docs directory.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/build.properties
index 653ec3c3daf..8013a222c4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/build.properties
@@ -5,4 +5,6 @@ bin.includes = META-INF/,\
plugin.xml,\
about.html,\
plugin.properties
-src.includes = about.html
+src.includes = about.html,\
+ docs/,\
+ plugin.pdoc
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/docs/StereotypePropertyCommentv2.docx b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/StereotypePropertyCommentv2.docx
index 73b8175a810..73b8175a810 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/docs/StereotypePropertyCommentv2.docx
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/StereotypePropertyCommentv2.docx
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/docs/UserGuide.docx b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/UserGuide.docx
index d516947c044..d516947c044 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/docs/UserGuide.docx
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/UserGuide.docx
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/ChangeAppearance.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/ChangeAppearance.PNG
index 7eb0628f83c..7eb0628f83c 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/ChangeAppearance.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/ChangeAppearance.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/Deletion.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/Deletion.PNG
index db44473b2cb..db44473b2cb 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/Deletion.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/Deletion.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/StereotypeDisplay1.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/StereotypeDisplay1.PNG
index 6f2f91bac1c..6f2f91bac1c 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/StereotypeDisplay1.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/StereotypeDisplay1.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/StereotypeDisplay2.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/StereotypeDisplay2.PNG
index 57e3cf00506..57e3cf00506 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/StereotypeDisplay2.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/StereotypeDisplay2.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/TechnicalProposition.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/TechnicalProposition.PNG
index 8e8996dd039..8e8996dd039 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/TechnicalProposition.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/TechnicalProposition.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/displayAsComment.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/displayAsComment.PNG
index 805c62fee92..805c62fee92 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/displayAsComment.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/displayAsComment.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/hide.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/hide.PNG
index 48b89b9d7fc..48b89b9d7fc 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/hide.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/hide.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/removeDisplayAppliedStereotypeProperty.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/removeDisplayAppliedStereotypeProperty.PNG
index b26bad85b08..b26bad85b08 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/removeDisplayAppliedStereotypeProperty.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/removeDisplayAppliedStereotypeProperty.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/removeStereotype.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/removeStereotype.PNG
index 222cefa1e0b..222cefa1e0b 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/removeStereotype.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/removeStereotype.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/resultDisplay.PNG b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/resultDisplay.PNG
index 461cc35c742..461cc35c742 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/Mes images/resultDisplay.PNG
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/img/resultDisplay.PNG
Binary files differ
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.di b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.di
index 98a52f529a7..0a41ead3893 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.di
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.di
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ASCII"?>
+<?xml version="1.0" encoding="UTF-8"?>
<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>
diff --git a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.notation b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.notation
index 06b255fd9b9..0385b197d9f 100644
--- a/doc/DevelopperDocuments/plugins/uml/diagram/AppliedStereotypesComment/model.notation
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.notation
@@ -1,5 +1,5 @@
<?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">
+<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/5.0.0/UML">
<notation:Diagram xmi:id="_y6p5QBaoEeK2bPy_5yA69Q" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_YdAY8BasEeK2bPy_5yA69Q" type="2008" fontHeight="8" gradient="13420443, 16777215, 0" lineColor="0">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YdAY8hasEeK2bPy_5yA69Q" source="ShadowFigure">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.uml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.uml
new file mode 100644
index 00000000000..f1288d384df
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/docs/model.uml
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_y6DcUBaoEeK2bPy_5yA69Q" name="AppliedStereotypeCommenttEditPart">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_n7laQBbBEeK2bPy_5yA69Q">
+ <body>Patrick Tessier (CEA LIST)&#xD;
+Version 0.2</body>
+ </ownedComment>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_y6DcURaoEeK2bPy_5yA69Q">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_43PMcBaoEeK2bPy_5yA69Q" name="UseCases">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_Mets4BaqEeK2bPy_5yA69Q" annotatedElement="_TxfMYBapEeK2bPy_5yA69Q">
+ <body>The comment symbol is created when a user decide to show at least one property value of a stereotype applied on a model element. &#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_bQA-ABaqEeK2bPy_5yA69Q" annotatedElement="_WR0bIBapEeK2bPy_5yA69Q">
+ <body>• The comment symbol, and its link, used to display the stereotype values shall be deleted when the annotated model element is deleted.&#xD;
+• The comment symbol, and its link, used to display the stereotype values shall be deleted when the graphical representation of the annotated model element is deleted, that is to say when the annotated model element is hidden from the diagram.&#xD;
+• The comment symbol, and its link, used to display the stereotype values shall be deleted when the user hides all values of a stereotype.&#xD;
+• The comment symbol, and its link, used to display the stereotype values shall be deleted when the applied stereotype whose values are currently shown are unapplied.&#xD;
+• When the user delete or cut graphically the comment symbol, this latter is deleted, as well its link with the annotated model element and the stereotypes values that were shown in the deleted comment symbol are set to be no more shown in the notation file.&#xD;
+• When the profile that contains the stereotype is unapplied &#xD;
+• For the moment, this element cannot be deleted semantically or graphically.&#xD;
+ Semantically = unapplication of stereotypes?&#xD;
+ graphically = update information of the display of the property of stereotype in the property view (maybe later)</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_c1yB8BaqEeK2bPy_5yA69Q" annotatedElement="_ex_scBapEeK2bPy_5yA69Q">
+ <body>• Create it when the element is stereotyped and when a property of the stereotype is displayed as &quot;comment shape&quot;&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_dNn6MBaqEeK2bPy_5yA69Q" annotatedElement="_gpgAoBapEeK2bPy_5yA69Q">
+ <body>• When the semantic element is deleted&#xD;
+• when all properties of applied stereotypes are not displayed as &quot;comment shape&quot;&#xD;
+• when all properties of applied stereotypes that are displayed as &quot; comment shape&quot; are unapplied&#xD;
+• For the moment, this element cannot be deleted semantically or graphically, because it is only to be link the &quot;comment&quot;&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_dznjMBaqEeK2bPy_5yA69Q" annotatedElement="_mXxLABapEeK2bPy_5yA69Q">
+ <body>• The comment symbol showing the stereotype values can be graphically moved everywhere in the diagram.&#xD;
+• The comment symbol showing the stereotype values cannot be copy/past.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_pLGRIBzyEeK0rNOLRzw-aQ" annotatedElement="_TxfMYBapEeK2bPy_5yA69Q">
+ <body> - Apply chosen profile and chosen stereotype on the element by using profile tab.&#xD;
+- Go to the property view (appearance tab).&#xD;
+- Select properties to stereotype to select and then choose the “display place” as Comment&#xD;
+ &#xD;
+&#xD;
+Thank to this, a comment symbol appear. It contains the applied stereotype property that you want to see. The property of stereotype can be edited. This functionality can be use on links or nodes see Figure 5.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_pd3cIBzyEeK0rNOLRzw-aQ" annotatedElement="_WR0bIBapEeK2bPy_5yA69Q">
+ <body> • The comment symbol, and its link, used to display the stereotype values shall be deleted when the annotated model element is deleted.&#xD;
+ &#xD;
+Figure 6: Deletion of the selected element&#xD;
+&#xD;
+• The comment symbol, and its link, used to display the stereotype values shall be deleted when the graphical representation of the annotated model element is deleted, that is to say when the annotated model element is hidden from the diagram.&#xD;
+ &#xD;
+&#xD;
+• The comment symbol, and its link, used to display the stereotype values shall be deleted when the user hides all values of a stereotype.&#xD;
+To that, go the property view select each property of stereotype (1) and click on the small TV (2) Figure 8 . When the property is displayed the symbol is , when it is not displayed the symbol is .&#xD;
+ &#xD;
+Figure 8: Remove the display of applied stereotype property&#xD;
+• The comment symbol, and its link, used to display the stereotype values shall be deleted when the applied stereotype whose values are currently shown are unapplied.&#xD;
+ To do that , go the property view (Figure 9), select profile tab, and first select the stereotype to remove (1) and then the click on the red cross (2)&#xD;
+ &#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_p_2H0BzyEeK0rNOLRzw-aQ" annotatedElement="_5X6AwBnuEeK2bPy_5yA69Q">
+ <body> The presentation of the comment symbol can be customized by the user. You can change the background and the foreground color.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Component" xmi:id="_9YUK8BaoEeK2bPy_5yA69Q" name="Papyrus stereotype comment" useCase="_DMGHcBapEeK2bPy_5yA69Q _TxfMYBapEeK2bPy_5yA69Q _WR0bIBapEeK2bPy_5yA69Q _ex_scBapEeK2bPy_5yA69Q _gpgAoBapEeK2bPy_5yA69Q _mXxLABapEeK2bPy_5yA69Q _5X6AwBnuEeK2bPy_5yA69Q">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_bgUbIBa7EeK2bPy_5yA69Q" annotatedElement="_DMGHcBapEeK2bPy_5yA69Q">
+ <body>Within UML, there are three options to show the values of stereotype applications: (i) within a dedicated compartment (e.g., left side within Figure 2); within a string enclosed by braces and put just behind the string showing the stereotype application ((e.g., right side within Figure 2); (iii) using a comment symbol as denoted in the Figure 2. The purpose is here to support this latter option.</body>
+ </ownedComment>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_DMGHcBapEeK2bPy_5yA69Q" name="Papyrus shall enable to show stereotypes values in a comment symbol" subject="_9YUK8BaoEeK2bPy_5yA69Q">
+ <include xmi:type="uml:Include" xmi:id="_dtdGQBapEeK2bPy_5yA69Q" addition="_TxfMYBapEeK2bPy_5yA69Q"/>
+ <include xmi:type="uml:Include" xmi:id="_eQUiwBapEeK2bPy_5yA69Q" name="" addition="_WR0bIBapEeK2bPy_5yA69Q"/>
+ <include xmi:type="uml:Include" xmi:id="_s1Qy4BapEeK2bPy_5yA69Q" addition="_mXxLABapEeK2bPy_5yA69Q"/>
+ <include xmi:type="uml:Include" xmi:id="__FRMMBnuEeK2bPy_5yA69Q" addition="_5X6AwBnuEeK2bPy_5yA69Q"/>
+ </ownedUseCase>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_TxfMYBapEeK2bPy_5yA69Q" name="Creation of the comment symbol used to show stereotype values" subject="_9YUK8BaoEeK2bPy_5yA69Q">
+ <include xmi:type="uml:Include" xmi:id="_lSVM8BapEeK2bPy_5yA69Q" addition="_ex_scBapEeK2bPy_5yA69Q"/>
+ </ownedUseCase>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_WR0bIBapEeK2bPy_5yA69Q" name="Deletion of the comment symbol used to show stereotype values" subject="_9YUK8BaoEeK2bPy_5yA69Q">
+ <include xmi:type="uml:Include" xmi:id="_mBaggBapEeK2bPy_5yA69Q" addition="_gpgAoBapEeK2bPy_5yA69Q"/>
+ </ownedUseCase>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_ex_scBapEeK2bPy_5yA69Q" name="Creation of the Link" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_gpgAoBapEeK2bPy_5yA69Q" name="Deletion of the link" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_mXxLABapEeK2bPy_5yA69Q" name="Move the comment symbol showing the stereotypes values" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_5X6AwBnuEeK2bPy_5yA69Q" name="choose the color of the comment symbol by using the property view" subject="_9YUK8BaoEeK2bPy_5yA69Q"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_ZT--oBwaEeKjG5zMFxAVTA" name="TestUseCases">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_RC8bEC_aEeKRCpw1GQ-68A" annotatedElement="_szg0cC_ZEeKRCpw1GQ-68A">
+ <body> Display stereotype directly as comment shape by selecteing two propertie!&#xD;
+a bug was raised because several comment were created &#xD;
+393530: [Stereotypes] doublon of applied stereotype comment can be created</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_jVXkABwaEeKjG5zMFxAVTA" name="Dependency1" client="_ZT--oBwaEeKjG5zMFxAVTA" supplier="_43PMcBaoEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_xA9xUBwaEeKjG5zMFxAVTA" name="Display stereotype application directly in comment"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_3JZIIBwaEeKjG5zMFxAVTA" name="Display from a display as compartment"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_6JvTsBwaEeKjG5zMFxAVTA" name="Display applied stereotype of a &quot;link&quot; element">
+ <extensionPoint xmi:type="uml:ExtensionPoint" xmi:id="_LfDZsBwbEeKjG5zMFxAVTA" name="point"/>
+ <include xmi:type="uml:Include" xmi:id="_U0_OUBwbEeKjG5zMFxAVTA" addition="_xA9xUBwaEeKjG5zMFxAVTA"/>
+ <include xmi:type="uml:Include" xmi:id="_VTPQkBwbEeKjG5zMFxAVTA" addition="_3JZIIBwaEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_-1reYBwaEeKjG5zMFxAVTA" name="Display applied stereotype of a &quot;node&quot; element">
+ <extensionPoint xmi:type="uml:ExtensionPoint" xmi:id="_KWyKEBwbEeKjG5zMFxAVTA" name="point"/>
+ <include xmi:type="uml:Include" xmi:id="_Tz3vkBwbEeKjG5zMFxAVTA" addition="_xA9xUBwaEeKjG5zMFxAVTA"/>
+ <include xmi:type="uml:Include" xmi:id="_URFQABwbEeKjG5zMFxAVTA" addition="_3JZIIBwaEeKjG5zMFxAVTA"/>
+ <include xmi:type="uml:Include" xmi:id="_0oUNgC_ZEeKRCpw1GQ-68A" addition="_szg0cC_ZEeKRCpw1GQ-68A"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_N8sg0BwbEeKjG5zMFxAVTA" name="Usage1" client="_-1reYBwaEeKjG5zMFxAVTA" supplier="_ex_scBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_O_vSMBwbEeKjG5zMFxAVTA" name="Usage2" client="_6JvTsBwaEeKjG5zMFxAVTA" supplier="_ex_scBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_P5_7ABwbEeKjG5zMFxAVTA" name="Usage3" client="_-1reYBwaEeKjG5zMFxAVTA" supplier="_gpgAoBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_RyP2EBwbEeKjG5zMFxAVTA" name="Usage4" client="_6JvTsBwaEeKjG5zMFxAVTA" supplier="_gpgAoBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_LR4q8BwcEeKjG5zMFxAVTA" name="Display applied stereotype as compartment"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_OH9gMBwcEeKjG5zMFxAVTA" name="Unapply stereotype"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_PxBIsBwcEeKjG5zMFxAVTA" name="unapply profile"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_RuoE4BwcEeKjG5zMFxAVTA" name="unapply profile on the UML editor and reopen it with papyrus"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_WFuA8BwcEeKjG5zMFxAVTA" name="unapply profile withe the diagram closed"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_jt1ccBwcEeKjG5zMFxAVTA" name="Usage5" client="_LR4q8BwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_kor7IBwcEeKjG5zMFxAVTA" name="Usage6" client="_OH9gMBwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lLjXoBwcEeKjG5zMFxAVTA" name="Usage7" client="_PxBIsBwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lqPewBwcEeKjG5zMFxAVTA" name="Usage8" client="_WFuA8BwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mX09gBwcEeKjG5zMFxAVTA" name="Usage9" client="_RuoE4BwcEeKjG5zMFxAVTA" supplier="_WR0bIBapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_uV8qoBwcEeKjG5zMFxAVTA" name="Change the container of the comment"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_wLWGABwcEeKjG5zMFxAVTA" name="move inside it own container"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_0P6usBwcEeKjG5zMFxAVTA" name="Usage10" client="_uV8qoBwcEeKjG5zMFxAVTA" supplier="_mXxLABapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_0tajABwcEeKjG5zMFxAVTA" name="Usage11" client="_wLWGABwcEeKjG5zMFxAVTA" supplier="_mXxLABapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_1TtG8BwcEeKjG5zMFxAVTA" name="move the stereotyped element"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_3zHIoBwcEeKjG5zMFxAVTA" name="Usage12" client="_1TtG8BwcEeKjG5zMFxAVTA" supplier="_mXxLABapEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_szg0cC_ZEeKRCpw1GQ-68A" name="Creation of a comment by selecting several properties of stereotype "/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_SOH00BasEeK2bPy_5yA69Q" name="SolutionProposition">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_8kDFUBa8EeK2bPy_5yA69Q">
+ <body>The applied stereotypes properties “comment” is represented by:&#xD;
+The editpart AppliedStereotypesCommentEditpart, the comment shape that will contains the editpart in charge of the edition of sterotype (AppliedStereotypeConpartmentEditPart, AppliedStereotypePropertyEditPart).&#xD;
+The editpart AppliedSterotypesCommentLinkEditPart, the link between the stereotyped element and the comment.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_-XrJoBa9EeK2bPy_5yA69Q" annotatedElement="_0wUdkBasEeK2bPy_5yA69Q">
+ <body>The Applied StereotypeCommentEdipart and the appliedStereotypeCommentLinkEditPart are connected to the semantic element. Thanks to this, if the semantic element is deleted the comment will be also deleted.&#xD;
+The Applied StereotypeCommentEdipart will be contains eannotation about stereotype application exactly as the editpart that represents the semantic element. In this manner, it is possible to reuse mechanism of stereotype edition.&#xD;
+To ensure the creation of the comment and the synchronization of eannotation information from the Semantic editpart an editpolicy will be added: the AppliedStereotypeCommentEditPolicy.&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_kk75cBa_EeK2bPy_5yA69Q">
+ <body>Explaination of the example:&#xD;
+Two stereotypes are applied on the Class1. By default two ApplicationStereotypeCompartment are created (one references stapp1, and the second references stapp2). By default there are not visible. This is the normal behavior.&#xD;
+The user has decided to display a property if the applied stereotype stapp1.&#xD;
+An AppliedStereotypesCommentEditpart and AppliedStereotypeCommentLinkEditPart are created. (They references Class1). The AppliedStereotypesCommentEditpart reuse the standard mechanism of stereotype displaying:&#xD;
+Two ApplicationStereotypeCompartment are created (one references stapp1 with visibility=true, and the second references stapp2 with the visibility=false).&#xD;
+An appliedStereotypePropertyEditpart is created because we want to see a property of stapp1&#xD;
+</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_qU8lYB0DEeK0rNOLRzw-aQ" annotatedElement="_IC8gUBz5EeK0rNOLRzw-aQ">
+ <body>• CommentShapeForAppliedStereotypeEditPolicy : this editpolicy attached to StereotypeCommentEdipart has in charge to prevent the remove form model and launch command of deletion if it detect that any properties of applied stereotype are displayed.</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_sLjhsB0DEeK0rNOLRzw-aQ" annotatedElement="_0OcbEBz4EeK0rNOLRzw-aQ">
+ <body> • AppliedStereotypeCompartmentForCommentShapeEditPolicy is another editpolicy attached to StereotypeCommentEdipart. It does the same work as AppliedStereotypeCompartmentEditPolicy. Because the StereotypeCommentEdipart is not attached to a semantic element by the attribute element of the notation view. It specializes the method getUMLElement to find the semantic element </body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Yc3PABasEeK2bPy_5yA69Q" name="AppliedStereotypeConpartmentEditPart">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_q_sRABasEeK2bPy_5yA69Q" name="children" type="_k00qMBasEeK2bPy_5yA69Q" association="_q_sRAxasEeK2bPy_5yA69Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_q_sRARasEeK2bPy_5yA69Q"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_q_sRAhasEeK2bPy_5yA69Q" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_k00qMBasEeK2bPy_5yA69Q" name="AppliedStereotypePropertyEditPart"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_q_sRAxasEeK2bPy_5yA69Q" name="appliedStereotypeConpartmentEditPart_appliedStereotypePropertyEditPart_1" memberEnd="_q_sRBBasEeK2bPy_5yA69Q _q_sRABasEeK2bPy_5yA69Q">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_q_sRBBasEeK2bPy_5yA69Q" name="appliedStereotypeConpartmentEditPart" type="_Yc3PABasEeK2bPy_5yA69Q" association="_q_sRAxasEeK2bPy_5yA69Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_q_sRBRasEeK2bPy_5yA69Q" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_q_sRBhasEeK2bPy_5yA69Q" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0wUdkBasEeK2bPy_5yA69Q" name="AppliedStereotypesCommentEditPart">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_5BAPoBasEeK2bPy_5yA69Q" name="children" type="_Yc3PABasEeK2bPy_5yA69Q" association="_5BAPoxasEeK2bPy_5yA69Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_5BAPoRasEeK2bPy_5yA69Q"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_5BAPohasEeK2bPy_5yA69Q" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Z6lQQBz5EeK0rNOLRzw-aQ" name="commentShapeForAppliedStereotypeEditPolicy" type="_IC8gUBz5EeK0rNOLRzw-aQ" association="_Z6lQQxz5EeK0rNOLRzw-aQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Z6lQQRz5EeK0rNOLRzw-aQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Z6lQQhz5EeK0rNOLRzw-aQ" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_as8hUBz5EeK0rNOLRzw-aQ" name="appliedStereotypeCompartmentForCommentShapeEditPolicy" type="_0OcbEBz4EeK0rNOLRzw-aQ" association="_as8hUxz5EeK0rNOLRzw-aQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_as8hURz5EeK0rNOLRzw-aQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_as8hUhz5EeK0rNOLRzw-aQ" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_5BAPoxasEeK2bPy_5yA69Q" name="appliedStereotypesComment_appliedStereotypeConpartmentEditPart_1" memberEnd="_5BAPpBasEeK2bPy_5yA69Q _5BAPoBasEeK2bPy_5yA69Q">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_5BAPpBasEeK2bPy_5yA69Q" name="appliedStereotypesComment" type="_0wUdkBasEeK2bPy_5yA69Q" association="_5BAPoxasEeK2bPy_5yA69Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_5BAPpRasEeK2bPy_5yA69Q" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_5BAPphasEeK2bPy_5yA69Q" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_ELyGABatEeK2bPy_5yA69Q" name="AppliedStereotypesCommentLinkEditPart">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_hQGJwBatEeK2bPy_5yA69Q" annotatedElement="_Veb5kBatEeK2bPy_5yA69Q">
+ <body>To ensure the creation of the comment and the synchronization of eannotation information from the Semantic editpart an editpolicy will be added: the AppliedStereotypeCommentCreationEditPolicy.&#xD;
+This editpolicy has in charge to:&#xD;
+- Create by using the command CreateAppliedStereotypeCommentViewCommand&#xD;
+- Destroy the AppliedStereotypesCommentEditpart&#xD;
+- Adapt the information about stereotype display into AppliedstereotypeCommentEditPart by using eannotation existing mechanism&#xD;
+</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Veb5kBatEeK2bPy_5yA69Q" name="AppliedStereotypeCommentCreationEditPolicy">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_jipzMBz4EeK0rNOLRzw-aQ" name="command" type="_RP5NgBz4EeK0rNOLRzw-aQ" association="_jipzMxz4EeK0rNOLRzw-aQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jipzMRz4EeK0rNOLRzw-aQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jipzMhz4EeK0rNOLRzw-aQ" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_ivOxEBwaEeKjG5zMFxAVTA" name="Dependency1" client="_SOH00BasEeK2bPy_5yA69Q" supplier="_43PMcBaoEeK2bPy_5yA69Q"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_RP5NgBz4EeK0rNOLRzw-aQ" name="CreateAppliedStereotypeCommentViewCommand"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_jipzMxz4EeK0rNOLRzw-aQ" name="appliedStereotypeCommentCreationEditPolicy_createAppliedStereotypeCommentViewCommand_1" memberEnd="_jipzNBz4EeK0rNOLRzw-aQ _jipzMBz4EeK0rNOLRzw-aQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_jipzNBz4EeK0rNOLRzw-aQ" name="appliedStereotypeCommentCreationEditPolicy" type="_Veb5kBatEeK2bPy_5yA69Q" association="_jipzMxz4EeK0rNOLRzw-aQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jipzNRz4EeK0rNOLRzw-aQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jipzNhz4EeK0rNOLRzw-aQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0OcbEBz4EeK0rNOLRzw-aQ" name="AppliedStereotypeCompartmentForCommentShapeEditPolicy">
+ <generalization xmi:type="uml:Generalization" xmi:id="_n2ZD0Bz5EeK0rNOLRzw-aQ" general="_kXn24Bz5EeK0rNOLRzw-aQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_IC8gUBz5EeK0rNOLRzw-aQ" name="CommentShapeForAppliedStereotypeEditPolicy"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_Z6lQQxz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart_commentShapeForAppliedStereotypeEditPolicy_1" memberEnd="_Z6lQRBz5EeK0rNOLRzw-aQ _Z6lQQBz5EeK0rNOLRzw-aQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_Z6lQRBz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart" type="_0wUdkBasEeK2bPy_5yA69Q" association="_Z6lQQxz5EeK0rNOLRzw-aQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Z6lQRRz5EeK0rNOLRzw-aQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Z6lQRhz5EeK0rNOLRzw-aQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_as8hUxz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart_appliedStereotypeCompartmentForCommentShapeEditPolicy_1" memberEnd="_as8hVBz5EeK0rNOLRzw-aQ _as8hUBz5EeK0rNOLRzw-aQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_as8hVBz5EeK0rNOLRzw-aQ" name="appliedStereotypesCommentEditPart" type="_0wUdkBasEeK2bPy_5yA69Q" association="_as8hUxz5EeK0rNOLRzw-aQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_as8hVRz5EeK0rNOLRzw-aQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_as8hVhz5EeK0rNOLRzw-aQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_kXn24Bz5EeK0rNOLRzw-aQ" name="AppliedStereotypeCompartmentEditPolicy"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_Y0TiwB68EeKLcoKnaGZ6oA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_4RTrEBwdEeKjG5zMFxAVTA" name="TestProposition">
+ <packagedElement xmi:type="uml:Package" xmi:id="_1fZkIBwdEeKjG5zMFxAVTA" name="org.eclipse.papyrus.uml.appliedstereotypecommend.recipetest">
+ <packagedElement xmi:type="uml:Package" xmi:id="_RFkSEBwiEeKjG5zMFxAVTA" name="Creation">
+ <packagedElement xmi:type="uml:Model" xmi:id="_PHYjkBwhEeKjG5zMFxAVTA" name="CreateDirectlyAcomment">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_Cy8MAB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. The purpose is to display applied stereotype properties as comment</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_HTIHoBwiEeKjG5zMFxAVTA" name="CreateFromComment">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_GjS4MB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as compartment. The purpose is to display them as comment. The comment has to be created and compartments disappear.</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_U-lAcBwhEeKjG5zMFxAVTA" name="ReOpenFile">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_IvzzEB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that there are displayed as comment.</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_WDHKIBwiEeKjG5zMFxAVTA" name="Realization1" client="_RFkSEBwiEeKjG5zMFxAVTA" supplier="_-1reYBwaEeKjG5zMFxAVTA"/>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_Y33JsBwiEeKjG5zMFxAVTA" name="Realization2" client="_RFkSEBwiEeKjG5zMFxAVTA" supplier="_6JvTsBwaEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_yFAVUBwnEeKjG5zMFxAVTA" name="Deletion">
+ <packagedElement xmi:type="uml:Model" xmi:id="_z9s8UBwnEeKjG5zMFxAVTA" name="ChangeDisplay">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_LzKPUB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and and to display as compartment. Comment has to disappear.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_Yxw6ABwoEeKjG5zMFxAVTA" name="Realization1" client="_z9s8UBwnEeKjG5zMFxAVTA" supplier="_-1reYBwaEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_22d5MBwnEeKjG5zMFxAVTA" name="UnapplyProfile">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_Qd6uQB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and to unapply profile. Comment has to disappear.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_a33q4BwoEeKjG5zMFxAVTA" name="Realization1" client="_22d5MBwnEeKjG5zMFxAVTA" supplier="_PxBIsBwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_4oAvUBwnEeKjG5zMFxAVTA" name="UnapplyStereotype">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OMe3IB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and to unapply stereotype. Comment has to disappear.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_aLd34BwoEeKjG5zMFxAVTA" name="Realization1" client="_4oAvUBwnEeKjG5zMFxAVTA" supplier="_OH9gMBwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_8fzgQBwnEeKjG5zMFxAVTA" name="BadUnapplyProfile">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_TCkcUB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. But the profile has been unapplied with the UML editor.So the notation is not up to date.The purpose is to open the file with papyrus. Comment has to disappear.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_cJhgABwoEeKjG5zMFxAVTA" name="Realization1" client="_8fzgQBwnEeKjG5zMFxAVTA" supplier="_RuoE4BwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_4CqxIBwoEeKjG5zMFxAVTA" name="UnapplyProfileDiagramClosed">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_VHorYB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. But the profile has been unapplied with diagram closed.The purpose is to open the diagram. Comment has to disappear.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_8N0i8BwoEeKjG5zMFxAVTA" name="Realization1" client="_4CqxIBwoEeKjG5zMFxAVTA" supplier="_WFuA8BwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_-nF84BwnEeKjG5zMFxAVTA" name="Move">
+ <packagedElement xmi:type="uml:Model" xmi:id="_BHRaoBwoEeKjG5zMFxAVTA" name="MoveCommentWithPackage">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_beITYB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that you can move comment into package without move stereotyped element.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ei2u4BwoEeKjG5zMFxAVTA" name="Usage1" client="_BHRaoBwoEeKjG5zMFxAVTA" supplier="_uV8qoBwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_DxSw4BwoEeKjG5zMFxAVTA" name="MoveSemanticWithPackage">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_eDhoUB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that you can move semantic into package without move comment.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_fhIVABwoEeKjG5zMFxAVTA" name="Realization1" client="_DxSw4BwoEeKjG5zMFxAVTA" supplier="_1TtG8BwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_JN0D8BwoEeKjG5zMFxAVTA" name="MoveComment">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_YqRrsB0JEeK0rNOLRzw-aQ">
+ <body>A node and a link are stereotyped. Applied stereotype properties are displayed as comment. The purpose is to open the file with papyrus and ensure that you can move comment everywhere.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_duG4MBwoEeKjG5zMFxAVTA" name="Realization1" client="_JN0D8BwoEeKjG5zMFxAVTA" supplier="_wLWGABwcEeKjG5zMFxAVTA"/>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.pdoc b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.pdoc
new file mode 100644
index 00000000000..fb1783dd8d0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.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="The pupose of this plugin is add the fucntionality to display stereotype into compartment or into comment of applied stereotype&#xD;&#xA;More details (models and file.doc) has been store in the docs directory.&#xD;&#xA;">
+ <referent firstName="Patrick" lastName="Tessier" eMail="patrick.tessier@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java
index 34556b027db..bfdc311036c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java
@@ -139,7 +139,11 @@ public class AppliedStereotypeConpartmentEditPart extends ResizeableListCompartm
if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
refreshBounds();
}
- super.handleNotificationEvent(notification);
+
+ // before to be suppressed by its owner, the associate EObject can be UNSET, so refresh is prevented
+ if(resolveSemanticElement()!=null){
+ super.handleNotificationEvent(notification);
+ }
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeMultilinePropertyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeMultilinePropertyEditPart.java
index 1dfdff97c4d..dc085fab9cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeMultilinePropertyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeMultilinePropertyEditPart.java
@@ -286,7 +286,7 @@ public class AppliedStereotypeMultilinePropertyEditPart extends CompartmentEditP
if(getParserElement() == null || getParser() == null) {
return ""; //$NON-NLS-1$
}
-
+
// return getParser().getEditString(new SemanticAdapter((EObject) this.getAdapter(AppliedStereotypeProperty.class), getNotationView()), getParserOptions().intValue());
return getParser().getEditString(new SemanticAdapter(resolveSemanticElement(), getNotationView()), getParserOptions().intValue());
}
@@ -389,7 +389,7 @@ public class AppliedStereotypeMultilinePropertyEditPart extends CompartmentEditP
*/
protected void performDirectEdit() {
BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
-
+
public void run() {
getManager().show();
}
@@ -446,7 +446,7 @@ public class AppliedStereotypeMultilinePropertyEditPart extends CompartmentEditP
Dialog dialog = null;
if (configuration instanceof ICustomDirectEditorConfiguration) {
setManager(((ICustomDirectEditorConfiguration) configuration)
- .createDirectEditManager(this));
+ .createDirectEditManager(this));
initializeDirectEditManager(theRequest);
return;
} else if(configuration instanceof IPopupEditorConfiguration) {
@@ -520,14 +520,14 @@ public class AppliedStereotypeMultilinePropertyEditPart extends CompartmentEditP
public void run() {
if (isActive() && isEditable()) {
if (request
- .getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ .getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request
- .getExtendedData()
- .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ .getExtendedData()
+ .get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
} else if ((request instanceof DirectEditRequest)
- && (getEditText().equals(getLabelText()))) {
+ && (getEditText().equals(getLabelText()))) {
DirectEditRequest editRequest = (DirectEditRequest) request;
performDirectEdit(editRequest.getLocation());
} else {
@@ -540,7 +540,7 @@ public class AppliedStereotypeMultilinePropertyEditPart extends CompartmentEditP
e.printStackTrace();
}
}
-
+
/**
*
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#refreshVisuals()
@@ -868,12 +868,15 @@ public class AppliedStereotypeMultilinePropertyEditPart extends CompartmentEditP
*/
@Override
public void activate() {
- super.activate();
- addOwnerElementListeners();
- stereotypeApplication = ((View)getNotationView().eContainer()).getElement();
- final Element umlElement = UMLUtil.getBaseElement(stereotypeApplication);
- getDiagramEventBroker().addNotificationListener(stereotypeApplication, this);
- getDiagramEventBroker().addNotificationListener(umlElement, this);
+ // before to be suppressed by its owner, the associate EObject can be UNSET, so refresh is prevented
+ if(((View)getNotationView().eContainer()!=null)&&((View)getNotationView().eContainer()).getElement()!=null){
+ super.activate();
+ addOwnerElementListeners();
+ stereotypeApplication = ((View)getNotationView().eContainer()).getElement();
+ final Element umlElement = UMLUtil.getBaseElement(stereotypeApplication);
+ getDiagramEventBroker().addNotificationListener(stereotypeApplication, this);
+ getDiagramEventBroker().addNotificationListener(umlElement, this);
+ }
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java
index 2914f240d7b..39d51b4fb27 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java
@@ -57,6 +57,9 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp
public final static String APPLIED_STEREOTYPE_COMMENT = "Applied_Stereotype_Comment";
+ /**
+ * This method has in charge to refresh the presence of the view that represent the comment
+ */
protected void updateAppliedStereotypeCommentShape() {
String stereotypeLocalizationToDisplay = AppliedStereotypeHelper.getAppliedStereotypesPropertiesLocalization((View)getHost().getModel());
String stereotypePropertiesToDisplay = AppliedStereotypeHelper.getAppliedStereotypesPropertiesToDisplay((View)getHost().getModel());
@@ -79,13 +82,20 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp
if(!stereotypeLocalizationToDisplay.equals(UMLVisualInformationPapyrusConstant.STEREOTYPE_COMMENT_LOCATION) || getvisisbleAppliedStereotypeCompartment(commentNode, getUMLElement()) == 0) {
final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(commentNode);
executeAppliedStereotypeCommentDeletion(domain, commentNode);
-
}
}
+
}
+ /**
+ * return the number of visible compartment that represent a stereotype
+ * @param view the container view
+ * @param eobject the eobject that represent the container
+ * @return the number of visible stereotype compartment
+ */
protected int getvisisbleAppliedStereotypeCompartment(View view, EObject eobject) {
int nbVisibleCompartment = 0;
+ @SuppressWarnings("unchecked")
Iterator<View> iteratorView = view.getChildren().iterator();
while(iteratorView.hasNext()) {
View subview = (View)iteratorView.next();
@@ -95,7 +105,9 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp
}
return nbVisibleCompartment;
}
-
+/**
+ * this method is use to copy all eAnnotation from the view to the comment in order to display properties of stereotype
+ */
protected void delegateEAnnotationInCommentShape() {
final Node appliedStereotypeComment = getAppliedStereotypeCommentNode();
@@ -119,7 +131,7 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp
}
};
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
//use to avoid to put it in the command stack
@@ -169,7 +181,7 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp
* the stereotype application
*/
protected void executeAppliedStereotypeCommentCreation(final EditPart editPart, final TransactionalEditingDomain domain, final EObject semanticElement) {
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
int x = 200;
@@ -208,9 +220,14 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp
});
}
+ /**
+ * method in oder to delete the comment
+ * @param domain the transactional editing domain
+ * @param commentNode the view that represent the comment of stereotype
+ */
protected void executeAppliedStereotypeCommentDeletion(final TransactionalEditingDomain domain, final View commentNode) {
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
//because it is asynchrone the comment node maybe become s null
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java
index 687b056b8a4..c53aa2a17fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java
@@ -73,7 +73,12 @@ public class AppliedStereotypeCompartmentEditPolicy extends AppliedStereotypeNod
}
}
-
+/**
+ * this method has in charge to calculate if a compartment must be displayed.
+ * To know that it computes if a property of stereotype is displayed into it.
+ * @param applicationOfStereotype the eobject that represent the stereotype application
+ * @return true if the compartment display a property of sterotype
+ */
protected boolean hasToDisplayCompartment(EObject applicationOfStereotype) {
String stereotypesPropertiesToDisplay = AppliedStereotypeHelper.getAppliedStereotypesPropertiesToDisplay((View)getHost().getModel());
String stereotypesLocalizationToDisplay = AppliedStereotypeHelper.getAppliedStereotypesPropertiesLocalization((View)getHost().getModel());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypePropertiesEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypePropertiesEditPolicy.java
index 2f4a9ee2b7f..36205f6bf59 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypePropertiesEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypePropertiesEditPolicy.java
@@ -93,7 +93,7 @@ public class AppliedStereotypePropertiesEditPolicy extends AppliedStereotypeNode
editPart.getEditingDomain().runExclusive(new Runnable() {
public void run() {
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
@@ -181,7 +181,7 @@ public class AppliedStereotypePropertiesEditPolicy extends AppliedStereotypeNode
editPart.getEditingDomain().runExclusive(new Runnable() {
public void run() {
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
editPart.getEditingDomain().getCommandStack().execute(command);
@@ -227,7 +227,7 @@ public class AppliedStereotypePropertiesEditPolicy extends AppliedStereotypeNode
editPart.getEditingDomain().runExclusive(new Runnable() {
public void run() {
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
DeleteCommand command = new DeleteCommand((View)getHost().getModel());
@@ -278,7 +278,7 @@ public class AppliedStereotypePropertiesEditPolicy extends AppliedStereotypeNode
editPart.getEditingDomain().runExclusive(new Runnable() {
public void run() {
- Display.getCurrent().asyncExec(new Runnable() {
+ Display.getCurrent().syncExec(new Runnable() {
public void run() {
if(currentNode.eContainer() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/CustomEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/CustomEditPolicyProvider.java
index 779f327c1ee..e2f694e86d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/CustomEditPolicyProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/CustomEditPolicyProvider.java
@@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvide
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ApplyStereotypeEditPolicy;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpolicies.AppliedStereotypeCommentCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpolicies.AppliedStereotypeCompartmentEditPolicy;
@@ -36,7 +37,6 @@ import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
*/
public class CustomEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
/**
*
* {@inheritDoc}
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
index 8d1ccf97e11..52651ab4549 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0"
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.appearance
Export-Package: org.eclipse.papyrus.diagram.stereotypeproperty
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch
new file mode 100644
index 00000000000..26ddda66cda
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.diagram.stereotypeproperty.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.diagram.stereotypeproperty.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4086m -XX:MaxPermSize=1024M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java
index 5189172d88e..0c3f999eef3 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java
@@ -18,22 +18,36 @@ import java.util.ArrayList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IShapeCompartmentEditPart;
+import org.eclipse.papyrus.uml.appearance.commands.AddAppliedStereotypePropertiesToDisplayCommand;
+import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper;
+import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.EditingFlowPage;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeConpartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Profile;
@@ -61,6 +75,23 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase {
*/
public void testToCreateANode(IElementType type) {
+ //VARIABLES
+ org.eclipse.uml2.uml.Class class1=null;
+ //stereotype that is applied on class1
+ Stereotype stereotypeTest=null;
+ //view of the class
+ View NotationClass1=null;
+ //editpart of class1
+ GraphicalEditPart classEditPart=null;
+ //compartment of stereotype
+ View appliedStereotypeCompartmentNotation = null;
+ //compartment Shape
+ View shapeCompartmentView=null;
+ //the view of the applied stereotype property
+ View stereotypePropertyView=null;
+ GraphicalEditPart stereotypeCompartmentEdipart=null;
+ GraphicalEditPart stereotypePropertyEdipart=null;
+
//CREATION
assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
@@ -69,45 +100,82 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase {
EList<Profile> list = ((Model)getRootSemanticModel()).getAllAppliedProfiles();
assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
- Element element = getRootSemanticModel().getOwnedElements().get(1);
- GraphicalEditPart classEditPart = (ClassEditPart)getDiagramEditPart().getChildren().get(0);
- assertTrue(CREATION + TEST_THE_EXECUTION, element.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null);
- ArrayList<Stereotype> stereotypeslist = new ArrayList<Stereotype>();
- stereotypeslist.add(element.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1));
-
- ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)classEditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain());
- diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand);
- //diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(new EMFtoGMFCommandWrapper(applyStereotypeCommand)));
- Element semanticElement = (Element)classEditPart.resolveSemanticElement();
- assertTrue(CREATION + TEST_THE_EXECUTION + "No applied stereotype found on the element ", semanticElement.getAppliedStereotypes().size() != 0);
-
- View appliedStereotypeMultilinePropertyView = null;
- for(int i = 0; i < classEditPart.getNotationView().getChildren().size(); i++) {
- View view = ((View)classEditPart.getNotationView().getChildren().get(i));
- if(view.getType().equals(AppliedStereotypeConpartmentEditPart.ID)) {
- appliedStereotypeMultilinePropertyView = view;
+ {//execution of the command
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ }
+
+ //get the created Class
+ class1 = (org.eclipse.uml2.uml.Class)((org.eclipse.uml2.uml.Package)getRootSemanticModel()).getPackagedElement("Class1");
+ assertNotNull("created class must be not null", class1 );
+ //look for the editpart that the class
+ classEditPart = (ClassEditPart)getDiagramEditPart().getChildren().get(0);
+ //test if stereotype can be applied
+ assertTrue("stereotype1 must be applicable on class1", class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null);
+
+ {// execution of the application of the stereotype
+ ArrayList<Stereotype> stereotypeslist = new ArrayList<Stereotype>();
+ stereotypeslist.add(class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1));
+ ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)classEditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain());
+ diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand);
+ assertTrue("No applied stereotype found on the element ", class1.getAppliedStereotypes().size() != 0);
+ }
+
+ //look for the applied stereotype compartment
+ NotationClass1=classEditPart.getNotationView();
+
+ for(int i = 0; i < NotationClass1.getTransientChildren().size(); i++) {
+ View view = (View) NotationClass1.getTransientChildren().get(i);
+ if(view.getType().equals(AppliedStereotypeConpartmentEditPart.ID)) {
+ appliedStereotypeCompartmentNotation = view;
}
+ if(view.getType().equals(IShapeCompartmentEditPart.VIEW_TYPE)) {
+ shapeCompartmentView= view;
+ }
+ }
+ // the mechanism of stereotype display is running.
+ //the thread is synchronous
+ assertTrue( "No stereotype Compartment found in the notation", appliedStereotypeCompartmentNotation != null);
+ assertTrue( "No stereotype shape Compartment found in the notation", shapeCompartmentView != null);
+
+ //now display stereotypes
+ stereotypeTest=class1.getAppliedStereotypes().get(0);
+
+ {//display stereotype1
+ RecordingCommand displayStereotypeCommand= AppliedStereotypeHelper.getAppliedStereotypeToDisplayCommand(diagramEditor.getEditingDomain(), NotationClass1,stereotypeTest.getQualifiedName() , UMLVisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION);
+
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayStereotypeCommand);
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate=(org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
+
+ //get the label
+ org.eclipse.draw2d.Label stereotypeLabel=((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
+ assertTrue( "stereotype label must be not null" ,stereotypeLabel!=null);
+ assertTrue( "text of stereotype label be equals to stereotype1 " ,stereotypeLabel.getText().equals("stereotype1"));
+ }
+
+ {//test display of property of stereotype in compartment
+ RecordingCommand displayPropertyStereotypeCommand= AppliedStereotypeHelper.getAddAppliedStereotypePropertiesCommand(diagramEditor.getEditingDomain(), NotationClass1,stereotypeTest.getQualifiedName()+".testInt");
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayPropertyStereotypeCommand);
+
+ //the compartment must be visible
+ assertTrue( "the compartment must be visible", appliedStereotypeCompartmentNotation.isVisible()==true);
+ //look for view that represents the property of the applied stereotype
+ stereotypePropertyView=(View)appliedStereotypeCompartmentNotation.getChildren().get(0);
+ assertNotNull( "the view of the applied stereotype property must be created", stereotypePropertyView);
+ //look for the editpart that represents the property of applied stereotype
+ stereotypeCompartmentEdipart=(GraphicalEditPart)classEditPart.getChildBySemanticHint(AppliedStereotypeConpartmentEditPart.ID);
+ stereotypePropertyEdipart=(GraphicalEditPart)stereotypeCompartmentEdipart.getChildBySemanticHint(AppliedStereotypeMultilinePropertyEditPart.ID);
+ assertNotNull( "the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart);
+ assertNotNull( "the editpart of the applied stereotype property must be created", stereotypePropertyEdipart);
+ EditingFlowPage textarea=(EditingFlowPage)stereotypePropertyEdipart.getFigure();
+ assertTrue( "text of stereotype label be equals to stereotype1 " ,((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0"));
}
- //the thread is asynchronous
- assertTrue(CREATION + TEST_THE_EXECUTION + "No stereotype Compartment found in the notation", appliedStereotypeMultilinePropertyView == null);
-
- // AppliedStereotypeMultilinePropertyEditPart appliedStereotypeMultilinePropertyEditPart=null;
- // for(int i=0; i<classEditPart.getChildren().size();i++){
- // GraphicalEditPart editPart= ((GraphicalEditPart)classEditPart.getChildren().get(i));
- // if (editPart.getNotationView().getType().equals(AppliedStereotypeMultilinePropertyEditPart.ID)){
- // appliedStereotypeMultilinePropertyEditPart=(AppliedStereotypeMultilinePropertyEditPart)editPart;
- //
- // }
- // }
- // assertTrue(CREATION+TEST_THE_EXECUTION,appliedStereotypeMultilinePropertyEditPart!=null);
}
@Before

Back to the top