Bug 580532: [ClassDiagram][Sirius][Synchronization] Change node declaration from Not Synchronized to Unsynchronized.
- done for CD_ClassLabelNode, CD_DataTypeLabelNode, CD_EnumerationLabelNode, CD_InterfaceLabelNode, CD_PrimitiveTypeLabelNode and CD_SignalLabelNode
- complete the field 'semantic candidates expression'
- set these nodes to Unsynchronizable
- clean field 'associated elements expression'
- add precondition expression 'aql:self.oclIsTypeof(uml::...)
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Change-Id: Ic0a08e26c1eb71270a286420d3c3e3f6b295127d
diff --git a/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz/description/papyrus_class.odesign b/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz/description/papyrus_class.odesign
index 23877bc..efda264 100755
--- a/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz/description/papyrus_class.odesign
+++ b/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz/description/papyrus_class.odesign
@@ -466,37 +466,37 @@
</style>
</containerMappings>
<containerMappings name="CD_NestedClassifier_FeatureOwner" semanticCandidatesExpression="aql:null" createElements="false" documentation="This mapping is a 'fake'mapping used to avoid validation errors. This node contains mapping requiring a parent providing the 'nestedClassifier' feature.
UML::Class and UML::Interface provide this feature but there is not a common superclass providing it, that's why we create this mapping.
" domainClass="uml::Class">
- <subNodeMappings name="CD_ClassLabelNode" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Class">
+ <subNodeMappings name="CD_ClassLabelNode" preconditionExpression="aql:self.oclIsTypeOf(uml::Class)" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsTypeOf(uml::Interface)) then self.nestedClassifier else null endif" domainClass="uml.Class">
<style xsi:type="style:SquareDescription" labelSize="9" labelExpression="service:buildSingleLineLabel(diagram)" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif" labelAlignment="LEFT" sizeComputationExpression="" resizeKind="NSEW" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <subNodeMappings name="CD_DataTypeLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Classifier)) then self.nestedClassifier else null endif" createElements="false" domainClass="uml.DataType">
+ <subNodeMappings name="CD_DataTypeLabelNode" preconditionExpression="aql:self.oclIsTypeOf(uml::DataType)" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsTypeOf(uml::Interface)) then self.nestedClassifier else null endif" domainClass="uml.DataType">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif" labelAlignment="LEFT" sizeComputationExpression="" labelPosition="node" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <subNodeMappings name="CD_EnumerationLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Classifier)) then self.nestedClassifier else null endif" createElements="false" domainClass="uml.Enumeration">
+ <subNodeMappings name="CD_EnumerationLabelNode" preconditionExpression="aql:self.oclIsTypeOf(uml::Enumeration)" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsTypeOf(uml::Interface)) then self.nestedClassifier else null endif" domainClass="uml.Enumeration">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif" labelAlignment="LEFT" sizeComputationExpression="" labelPosition="node" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <subNodeMappings name="CD_InterfaceLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Interface">
+ <subNodeMappings name="CD_InterfaceLabelNode" preconditionExpression="aql:self.oclIsTypeOf(uml::Interface)" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsTypeOf(uml::Interface)) then self.nestedClassifier else null endif" domainClass="uml.Interface">
<style xsi:type="style:SquareDescription" labelSize="9" labelExpression="service:computeUmlLabel" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif" labelAlignment="LEFT" sizeComputationExpression="" resizeKind="NSEW" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <subNodeMappings name="CD_PrimitiveTypeLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Classifier)) then self.nestedClassifier else null endif" createElements="false" domainClass="uml.PrimitiveType">
+ <subNodeMappings name="CD_PrimitiveTypeLabelNode" preconditionExpression="aql:self.oclIsTypeOf(uml::PrimitiveType)" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsTypeOf(uml::Interface)) then self.nestedClassifier else null endif" domainClass="uml.PrimitiveType">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif" labelAlignment="LEFT" sizeComputationExpression="" labelPosition="node" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <subNodeMappings name="CD_SignalLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface)) then self.nestedClassifier else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Signal">
+ <subNodeMappings name="CD_SignalLabelNode" preconditionExpression="aql:self.oclIsTypeOf(uml::Signal)" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsTypeOf(uml::Interface)) then self.nestedClassifier else null endif" domainClass="uml.Signal">
<style xsi:type="style:SquareDescription" labelSize="9" labelExpression="service:computeUmlLabel" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif" labelAlignment="LEFT" sizeComputationExpression="" resizeKind="NSEW" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
@@ -509,7 +509,7 @@
</style>
</containerMappings>
<containerMappings name="CD_OwnedAttribute_FeatureOwner" semanticCandidatesExpression="aql:null" createElements="false" documentation="This mapping is a 'fake'mapping used to avoid validation errors. This node contains mapping requiring a parent providing the 'ownedAttribute' feature.
UML::Class, UML::DataType, UML::Interface and UML::Signal provide this feature but there is not a common superclass providing it, that's why we create this mapping." domainClass="uml::Class">
- <subNodeMappings name="CD_PropertyLabelNode" preconditionExpression="service:isNotAssociation()" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Classifier) or self.oclIsKindOf(uml::Interface) self.oclIsKindOf(uml::DataType)) then self.ownedAttribute else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Property">
+ <subNodeMappings name="CD_PropertyLabelNode" preconditionExpression="service:isNotAssociation()" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::DataType) or self.oclIsKindOf(uml::Interface) or self.oclIsKindOf(uml::Signal)) then self.ownedAttribute else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Property">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:buildSingleLineLabel(diagram)" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" labelAlignment="LEFT" sizeComputationExpression="" labelPosition="node" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
@@ -522,7 +522,7 @@
</style>
</containerMappings>
<containerMappings name="CD_OwnedOperation_FeatureOwner" semanticCandidatesExpression="aql:null" createElements="false" documentation="This mapping is a 'fake'mapping used to avoid validation errors. This node contains mapping requiring a parent providing the 'ownedOperation' feature.
UML::Class, UML::DataType, and UML::Interface provide this feature but there is not a common superclass providing it, that's why we create this mapping." domainClass="uml::Class">
- <subNodeMappings name="CD_OperationLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Classifier) or self.oclIsKindOf(uml::Interface) self.oclIsKindOf(uml::DataType)) then self.ownedOperation else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Operation">
+ <subNodeMappings name="CD_OperationLabelNode" labelDirectEdit="//@ownedViewpoints[name='ClassDiagram']/@ownedRepresentations[name='ClassDiagram']/@defaultLayer/@toolSections.5/@ownedTools[name='NamedElement_name_EditionTool']" semanticCandidatesExpression="aql:if(self.oclIsKindOf(uml::Class) or self.oclIsKindOf(uml::Interface) or self.oclIsKindOf(uml::DataType)) then self.ownedOperation else null endif" createElements="false" semanticElements="service:getSemanticElements" domainClass="uml.Operation">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="9" labelExpression="service:computeUmlLabel" iconPath="/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif" labelAlignment="LEFT" sizeComputationExpression="" labelPosition="node" width="16" height="5" color="//@userColorsPalettes[name='CD_ColorPalette']/@entries[name='CustomBlue']">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz.tests/resources/creation/subNodes/componentSubNodes/componentSubNodes.aird b/tests/junit/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz.tests/resources/creation/subNodes/componentSubNodes/componentSubNodes.aird
index 5116543..47bcc1b 100755
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz.tests/resources/creation/subNodes/componentSubNodes/componentSubNodes.aird
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.sirius.uml.diagram.clazz.tests/resources/creation/subNodes/componentSubNodes/componentSubNodes.aird
@@ -37,7 +37,7 @@
</ownedRepresentationDescriptors>
</ownedViews>
</viewpoint:DAnalysis>
- <diagram:DSemanticDiagram uid="_btucsJhzEeybzpIf4rgS2A">
+ <diagram:DSemanticDiagram uid="_btucsJhzEeybzpIf4rgS2A" synchronized="false">
<eAnnotations xmi:type="description:DAnnotation" uid="_bzMLgJhzEeybzpIf4rgS2A" source="Papyrus-SiriusDiagram">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bzMLgZhzEeybzpIf4rgS2A" key="Papyrus-SiriusDiagram-ImplementationId" value="org.eclipse.papyrus.sirius.uml.diagram.class"/>
</eAnnotations>