diff options
author | rschnekenbu | 2013-10-30 16:07:48 +0000 |
---|---|---|
committer | Camille Letavernier | 2013-11-06 11:48:51 +0000 |
commit | 876c2b25dfc80530298cd52ff533b8b0395c3e7b (patch) | |
tree | a8174d32df844509a8c7c79b70f25e277ea313ce /sandbox | |
parent | 6e04b6ecc16fb4a0f3f9191533ab6d9980b33423 (diff) | |
download | org.eclipse.papyrus-876c2b25dfc80530298cd52ff533b8b0395c3e7b.tar.gz org.eclipse.papyrus-876c2b25dfc80530298cd52ff533b8b0395c3e7b.tar.xz org.eclipse.papyrus-876c2b25dfc80530298cd52ff533b8b0395c3e7b.zip |
First support of the profile resource loading in case of control mode
Diffstat (limited to 'sandbox')
15 files changed, 257 insertions, 23 deletions
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile new file mode 100644 index 00000000000..b1369bf20a9 --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile @@ -0,0 +1,4 @@ +<?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:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"> + <ExternalResourcesTestProfile:ClassStereotype xmi:id="_sAW6IBYQEeOXvea8CstROg" base_Class="_qSrQUBYQEeOXvea8CstROg"/> +</xmi:XMI> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di new file mode 100644 index 00000000000..9bddb6f752a --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ASCII"?> +<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi"> + <pageList/> + <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> + <windows> + <children xsi:type="di:TabFolder"/> + </windows> + </sashModel> +</di:SashWindowsMngr> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml new file mode 100644 index 00000000000..bb18f81d46f --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml @@ -0,0 +1,4 @@ +<?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:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"> + <uml:Class xmi:id="_qSrQUBYQEeOXvea8CstROg" name="Class3"/> +</xmi:XMI> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile new file mode 100644 index 00000000000..bead286fa11 --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile @@ -0,0 +1,4 @@ +<?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:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"> + <ExternalResourcesTestProfile:ClassStereotype xmi:id="_3b7lkBYQEeOXvea8CstROg" base_Class="_uLswUBYQEeOXvea8CstROg"/> +</xmi:XMI> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di new file mode 100644 index 00000000000..9bddb6f752a --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ASCII"?> +<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi"> + <pageList/> + <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> + <windows> + <children xsi:type="di:TabFolder"/> + </windows> + </sashModel> +</di:SashWindowsMngr> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml new file mode 100644 index 00000000000..b9c7ed2f8bc --- /dev/null +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Package xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_tKnGwBYQEeOXvea8CstROg" name="Package1"> + <eAnnotations xmi:id="_WzTEgBYmEeOXvea8CstROg" source="http://www.eclipse.org/papyrus/uml/profile/externalresource"> + <details xmi:id="_WzTEgRYmEeOXvea8CstROg" key="locationStrategy" value="ResourcePerProfileStrategy"/> + </eAnnotations> + <packagedElement xmi:type="uml:Class" xmi:id="_uLswUBYQEeOXvea8CstROg" name="Package1_Class1"/> + <profileApplication xmi:id="_3W-NEBYQEeOXvea8CstROg"> + <eAnnotations xmi:id="_3XmfMBYQEeOXvea8CstROg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/> + </eAnnotations> + <eAnnotations xmi:id="_3cMEQBYQEeOXvea8CstROg" source="duplicatedProfile"/> + <appliedProfile href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/> + </profileApplication> + <profileApplication xmi:id="_3cMrUBYQEeOXvea8CstROg"> + <eAnnotations xmi:id="_3ciCgBYQEeOXvea8CstROg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/> + </eAnnotations> + <eAnnotations xmi:id="_3ciCgRYQEeOXvea8CstROg" source="duplicatedProfile"/> + <appliedProfile href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/> + </profileApplication> +</uml:Package> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation index aa1c4f793d3..0374acfd58a 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation @@ -92,6 +92,117 @@ <element xmi:type="uml:Class" href="oneProfileApplied.uml#_kyl8EPXIEeKjvqrMhLLWTg"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k19ZIfXIEeKjvqrMhLLWTg" x="575" y="30" width="336" height="331"/> </children> + <children xmi:type="notation:Shape" xmi:id="_qVOOABYQEeOXvea8CstROg" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sA1bQBYQEeOXvea8CstROg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA2pYBYQEeOXvea8CstROg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA33gBYQEeOXvea8CstROg" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA4ekBYQEeOXvea8CstROg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA4ekRYQEeOXvea8CstROg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA4ekhYQEeOXvea8CstROg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_qVR4YBYQEeOXvea8CstROg" type="5029"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_qVTGgBYQEeOXvea8CstROg" type="7017"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVU7sBYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVU7sRYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_qVTGgRYQEeOXvea8CstROg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_qVTGghYQEeOXvea8CstROg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_qVTGgxYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVTGhBYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_qVTGhRYQEeOXvea8CstROg" type="7018"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVViwBYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVViwRYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_qVTGhhYQEeOXvea8CstROg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_qVTGhxYQEeOXvea8CstROg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_qVTGiBYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVTGiRYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_qVTGihYQEeOXvea8CstROg" type="7019"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVWJ0BYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVWJ0RYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_qVTGixYQEeOXvea8CstROg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_qVTGjBYQEeOXvea8CstROg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_qVTGjRYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVTGjhYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_qVy1wBYQEeOXvea8CstROg" visible="false" type="compartment_shape_display"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVzc0BYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVzc0RYQEeOXvea8CstROg" key="mutable" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_qVy1wRYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVy1whYQEeOXvea8CstROg"/> + </children> + <element xmi:type="uml:Class" href="Class3.uml#_qSrQUBYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVOOARYQEeOXvea8CstROg" x="1005" y="35" width="296" height="331"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_tKwQsBYQEeOXvea8CstROg" type="2007"> + <children xmi:type="notation:DecorationNode" xmi:id="_tKwQshYQEeOXvea8CstROg" type="5026"/> + <children xmi:type="notation:DecorationNode" xmi:id="_tKwQsxYQEeOXvea8CstROg" type="7016"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tK724BYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tK724RYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <children xmi:type="notation:Shape" xmi:id="_uLwasBYQEeOXvea8CstROg" type="3010"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yRh9QBYQEeOXvea8CstROg" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRh9QRYQEeOXvea8CstROg" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikUBYQEeOXvea8CstROg" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikURYQEeOXvea8CstROg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikUhYQEeOXvea8CstROg" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikUxYQEeOXvea8CstROg" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_uLxBwRYQEeOXvea8CstROg" type="5014"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_uLxBwhYQEeOXvea8CstROg" type="7011"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uL1TMBYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uL1TMRYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_uLxBwxYQEeOXvea8CstROg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_uLxBxBYQEeOXvea8CstROg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_uLxBxRYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxBxhYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_uLxo0BYQEeOXvea8CstROg" type="7012"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uL16QBYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uL16QRYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_uLxo0RYQEeOXvea8CstROg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_uLxo0hYQEeOXvea8CstROg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_uLxo0xYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxo1BYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_uLxo1RYQEeOXvea8CstROg" type="7013"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uL2hUBYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uL2hURYQEeOXvea8CstROg" key="showTitle" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_uLxo1hYQEeOXvea8CstROg"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_uLxo1xYQEeOXvea8CstROg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_uLxo2BYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxo2RYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_uMT0UBYQEeOXvea8CstROg" visible="false" type="compartment_shape_display"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uMUbYBYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uMUbYRYQEeOXvea8CstROg" key="mutable" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_uMT0URYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uMT0UhYQEeOXvea8CstROg"/> + </children> + <element xmi:type="uml:Class" href="Package1.uml#_uLswUBYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxBwBYQEeOXvea8CstROg" x="85" y="2" width="226" height="151"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_tKwQtBYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKwQtRYQEeOXvea8CstROg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_tLnzYBYQEeOXvea8CstROg" visible="false" type="compartment_shape_display"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tLnzYxYQEeOXvea8CstROg" source="PapyrusCSSForceValue"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tLnzZBYQEeOXvea8CstROg" key="mutable" value="true"/> + </eAnnotations> + <styles xmi:type="notation:TitleStyle" xmi:id="_tLnzYRYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tLnzYhYQEeOXvea8CstROg"/> + </children> + <element xmi:type="uml:Package" href="Package1.uml#_tKnGwBYQEeOXvea8CstROg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKwQsRYQEeOXvea8CstROg" x="325" y="430" width="701" height="211"/> + </children> <styles xmi:type="notation:DiagramStyle" xmi:id="_LLO-QfVCEeKaxaN6QZe_iw"/> <element xmi:type="uml:Model" href="oneProfileApplied.uml#_LK5nEPVCEeKaxaN6QZe_iw"/> </notation:Diagram> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml index 697bc938578..70fe0ea0022 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml @@ -8,6 +8,8 @@ </packageImport> <packagedElement xmi:type="uml:Class" xmi:id="_6e1LAPVEEeKWG-T5DC87Xw" name="Class1"/> <packagedElement xmi:type="uml:Class" xmi:id="_kyl8EPXIEeKjvqrMhLLWTg" name="Class2"/> + <packagedElement xmi:type="uml:Class" href="Class3.uml#_qSrQUBYQEeOXvea8CstROg"/> + <packagedElement xmi:type="uml:Package" href="Package1.uml#_tKnGwBYQEeOXvea8CstROg"/> <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JIjYPVEEeKWG-T5DC87Xw"> <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5JehoPVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML"> <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/> diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java index 7bd253c5200..5214313bb6b 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java @@ -33,6 +33,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; import org.eclipse.emf.workspace.EMFCommandOperation; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor; @@ -45,6 +46,7 @@ import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServiceMultiException; import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException; +import org.eclipse.papyrus.infra.core.services.ServiceStartKind; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; @@ -145,7 +147,13 @@ public abstract class AbstractExternalResourcesTest { public final static String EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE = ONE_PROFILE_MODEL_FILENAME + "." + EXTERNAL_RESOURCES_TEST_PROFILE + "Profile"; public final static String PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE = PACKAGE1_MODEL_FILENAME + "." + EXTERNAL_RESOURCES_TEST_PROFILE + "Profile"; + + public final static String CLASS3_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE = CLASS3_MODEL_FILENAME + "." + EXTERNAL_RESOURCES_TEST_PROFILE + "Profile"; + public final static String PACKAGE1_ALL_PROFILES_FILE = PACKAGE1_MODEL_FILENAME + "." + OneResourceOnlyStrategy.PROFILE_DEFAULT_EXTENSION; + + public final static String CLASS3_ALL_PROFILES_FILE = CLASS3_MODEL_FILENAME + "." + OneResourceOnlyStrategy.PROFILE_DEFAULT_EXTENSION; + public static final String STANDARD_STRATEGY_FOLDER = "StandardResource"; public static final String ONE_RESOURCE_FOR_ALL_PROFILES_FOLDER = "OneResourceForAllProfiles"; @@ -235,7 +243,7 @@ public abstract class AbstractExternalResourcesTest { } @Test - public void testApplyStereotypeOnClassInControlledPackage() { + public void testApplyStereotypeOnClassInControlledResource() { UmlModel umlModel = null; // get The model. try to see applied stereotypes try { @@ -255,13 +263,8 @@ public abstract class AbstractExternalResourcesTest { } // try to apply a stereotype and checks where it is located - TransactionalEditingDomain editingDomain = null; - try { - editingDomain = ServiceUtilsForEObject.getInstance().getTransactionalEditingDomain(class3_); - } catch (ServiceException e) { - fail(e.getMessage()); - } - Stereotype stereotype = class3_.getApplicableStereotype(CLASS_STEREOTYPE_QN); + TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(class3_); + Stereotype stereotype = class3_.getApplicableStereotype(ELEMENT_STEREOTYPE_QN); Assert.assertNotNull("Stereotype to apply should not be null", stereotype); ApplyStereotypeCommand command = new ApplyStereotypeCommand(class3_, stereotype, editingDomain); Assert.assertNotNull("Command should not be null", command); @@ -276,31 +279,64 @@ public abstract class AbstractExternalResourcesTest { // check stereotype has been applied EObject stereotypeApplication = class3_.getStereotypeApplication(stereotype); - Assert.assertNotNull("Stereotype "+ CLASS_STEREOTYPE_QN+" is not applied on "+MODEL_CLASS3, stereotypeApplication); - Assert.assertEquals("Stereortype is not located in good resource", getApplyStereotypeOnClassInControlledPackageResourceURI(), stereotypeApplication.eResource().getURI()); + Assert.assertNotNull("Stereotype "+ ELEMENT_STEREOTYPE_QN+" is not applied on "+MODEL_CLASS3, stereotypeApplication); + Assert.assertEquals("Stereotype is not located in good resource", getApplyStereotypeOnClassInControlledResourceURI(), stereotypeApplication.eResource().getURI()); } - /** - * @return - */ - protected abstract URI getApplyStereotypeOnClassInControlledPackageResourceURI(); - + @Test - public void testApplyStereotypeOnControlledClass() { + public void testApplyStereotypeOnClassInControlledPackage() { UmlModel umlModel = null; // get The model. try to see applied stereotypes try { - umlModel = (UmlModel)modelSet.getModelChecked(UmlModel.MODEL_ID); + umlModel = (UmlModel)getModelSet(getURI()).getModelChecked(UmlModel.MODEL_ID); } catch (NotFoundException e) { fail(e.getMessage()); } Model rootModel = (Model)umlModel.getResource().getContents().get(0); Assert.assertNotNull("Root model impossible to find", rootModel); // test applied profiles - checkModel(rootModel); + + + // apply stereotype on Model::Class3. Do not check eveythong, as loading tests should already have fixed that + Package package1 = (Package)rootModel.getNestedPackage(MODEL_PACKAGE1, true, UMLPackage.eINSTANCE.getPackage(), false); + Assert.assertNotNull("Impossible to find "+MODEL_PACKAGE1, package1); + + Class package1_class1 = (Class)package1.getPackagedElement(MODEL_PACKAGE1_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false); + Assert.assertNotNull("Impossible to find "+MODEL_PACKAGE1_CLASS1, package1_class1); + + // try to apply a stereotype and checks where it is located + TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(package1_class1); + Stereotype stereotype = package1_class1.getApplicableStereotype(ELEMENT_STEREOTYPE_QN); + Assert.assertNotNull("Stereotype to apply should not be null", stereotype); + ApplyStereotypeCommand command = new ApplyStereotypeCommand(package1_class1, stereotype, editingDomain); + Assert.assertNotNull("Command should not be null", command); + Assert.assertTrue("Command should be executable", command.canExecute()); + + // execute command + try { + OperationHistoryFactory.getOperationHistory().execute(new EMFCommandOperation(editingDomain, command), new NullProgressMonitor(), null); + } catch (ExecutionException e) { + fail(e.getMessage()); + } + + // check stereotype has been applied + EObject stereotypeApplication = package1_class1.getStereotypeApplication(stereotype); + Assert.assertNotNull("Stereotype "+ ELEMENT_STEREOTYPE_QN+" is not applied on "+MODEL_PACKAGE1_CLASS1, stereotypeApplication); + Assert.assertEquals("Stereotype is not located in good resource", getApplyStereotypeOnClassInControlledPackageResourceURI(), stereotypeApplication.eResource().getURI()); } /** + * @return + */ + protected abstract URI getApplyStereotypeOnClassInControlledPackageResourceURI(); + + /** + * @return + */ + protected abstract URI getApplyStereotypeOnClassInControlledResourceURI(); + + /** * @param rootModel */ protected void checkModel(Model rootModel) { @@ -402,8 +438,8 @@ public abstract class AbstractExternalResourcesTest { getServicesRegistry().add(ServiceUtilsForResourceInitializerService.class, 10, new ServiceUtilsForResourceInitializerService()); getServicesRegistry().startServicesByClassKeys(ModelSet.class, ServiceUtilsForResourceInitializerService.class); TransactionalEditingDomain domain = TransactionalEditingDomainManager.createTransactionalEditingDomain(modelSet); - getServicesRegistry().add(TransactionalEditingDomain.class, 10, domain); - getServicesRegistry().add(EditingDomain.class, 10, domain); + getServicesRegistry().add(TransactionalEditingDomain.class, 10, domain, ServiceStartKind.STARTUP); + getServicesRegistry().add(EditingDomain.class, 10, domain, ServiceStartKind.STARTUP); } catch (ModelMultiException modelMultiException) { Activator.log.error(modelMultiException); } catch (ServiceMultiException e1) { diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java index 8130d2dae4a..a7475756c15 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java @@ -45,7 +45,15 @@ public class OneResourceForAllProfilesTests extends AbstractChangeStrategyTests */ @Override protected URI getApplyStereotypeOnClassInControlledPackageResourceURI() { - return getResultFolderURI().appendSegment(PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE); + return URI.createPlatformResourceURI(getTestProjectName()+ "/"+ PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE, true); + } + + /** + * {@inheritDoc} + */ + @Override + protected URI getApplyStereotypeOnClassInControlledResourceURI() { + return URI.createPlatformResourceURI(getTestProjectName()+ "/"+ CLASS3_ALL_PROFILES_FILE, true); } diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java index be5d88104e4..6701c6a2f6a 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java @@ -36,7 +36,10 @@ public class ResourcePerProfileTests extends AbstractChangeStrategyTests { */ @Override protected List<String> getModelFileNames() { - return Arrays.asList(DI_FILE, NOTATION_FILE, UML_FILE, EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE); + return Arrays.asList(DI_FILE, NOTATION_FILE, UML_FILE, EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE, + /* PACKAGE1*/ PACKAGE1_MODEL_DI_FILE, PACKAGE1_MODEL_NOTATION_FILE, PACKAGE1_MODEL_UML_FILE, PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE, + /* CLASS3*/ CLASS3_MODEL_DI_FILE, CLASS3_MODEL_NOTATION_FILE, CLASS3_MODEL_UML_FILE, CLASS3_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE + ); } /** @@ -46,6 +49,15 @@ public class ResourcePerProfileTests extends AbstractChangeStrategyTests { protected URI getApplyStereotypeOnClassInControlledPackageResourceURI() { return getResultFolderURI().appendSegment(EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE); } + + /** + * {@inheritDoc} + */ + @Override + protected URI getApplyStereotypeOnClassInControlledResourceURI() { + // TODO Auto-generated method stub + return null; + } } diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java index 87041459109..5773a75ce99 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java @@ -49,7 +49,15 @@ public class StandardStrategyTests extends AbstractChangeStrategyTests { */ @Override protected URI getApplyStereotypeOnClassInControlledPackageResourceURI() { - return getResultFolderURI().appendSegment(PACKAGE1_MODEL_UML_FILE); + return URI.createPlatformResourceURI(getTestProjectName() + "/" + PACKAGE1_MODEL_UML_FILE, true); + } + + /** + * {@inheritDoc} + */ + @Override + protected URI getApplyStereotypeOnClassInControlledResourceURI() { + return URI.createPlatformResourceURI(getTestProjectName() + "/" + CLASS3_MODEL_UML_FILE, true); } } diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java index ccd39aff4cd..dff5b807a7d 100644 --- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java +++ b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java @@ -125,6 +125,8 @@ public class StereotypeApplicationExternalResourceModel extends AbstractModel im List<Resource> resources = new ArrayList<Resource>(); // get all profile applications resource to load from the strategy. do not care of the URI ? UmlModel umlModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID); + + // should retrieve ALL uml files that contains elements that are owned directly or indirectly by the main model try { if(umlModel != null && umlModel.lookupRoot() != null) { EObject root = umlModel.lookupRoot(); |