Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-08-23 14:49:49 +0000
committerChristian W. Damus2016-08-25 14:02:38 +0000
commit680d10686b7415998fadc7252aa38950efea4d87 (patch)
tree2fc94fed791614d44c18801d101caa61caffaec9 /extraplugins
parent44ac5d42736627190a32fd0f193571647c0e1299 (diff)
downloadorg.eclipse.papyrus-680d10686b7415998fadc7252aa38950efea4d87.tar.gz
org.eclipse.papyrus-680d10686b7415998fadc7252aa38950efea4d87.tar.xz
org.eclipse.papyrus-680d10686b7415998fadc7252aa38950efea4d87.zip
Bug 465656: [Model Import] Update the Model Import tool to produce Papyrus 1.1 diagrams (Currently 1.0)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=465656 Replace all occurrences of pre-Neon numeric visual IDs with Neon view types. This is simply a straight-forward automatic string replacement. There is plenty of opportunity for refactoring and reduction of code thanks to these new view types, which is not done herein. Change-Id: I76e26c31b9a669a63b4e681a4ecc8204bafcc83d (cherry picked from commit 39da8d9c66b27e55e749afbfbb3013975e1d792b)
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAActivityDiagram.qvto327
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAClassDiagram.qvto331
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAComponentDiagram.qvto103
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAProfileDiagram.qvto139
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSASequenceDiagram.qvto123
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStateMachineDiagram.qvto121
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto380
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAUsecaseDiagram.qvto135
8 files changed, 833 insertions, 826 deletions
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAActivityDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAActivityDiagram.qvto
index add6077e187..e48c87fecf6 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAActivityDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAActivityDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
@@ -32,13 +33,13 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
self.type = 'Activity'
}{
end {
- graphics.objectsOfType(Shape)->any(type = '2001').map fixFramePosition();
- graphics.objectsOfType(Shape)->any(type = '2001').map createHeaders();
+ graphics.objectsOfType(Shape)->any(type = 'Activity_Shape').map fixFramePosition();
+ graphics.objectsOfType(Shape)->any(type = 'Activity_Shape').map createHeaders();
- graphics.objectsOfType(Shape)->select(type='3080').map addCommentDecoration();
- graphics.objectsOfType(Shape)->select(type = '3112').map addConstraintDecoration();
+ graphics.objectsOfType(Shape)->select(type='Comment_Shape').map addCommentDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Constraint_Shape').map addConstraintDecoration();
- graphics.objectsOfType(Shape)->select(type = '3067').map fixPartitionsLayout();
+ graphics.objectsOfType(Shape)->select(type = 'ActivityPartition_Shape').map fixPartitionsLayout();
graphics.objectsOfType(Shape).map fixDefaultSize();
}
@@ -52,7 +53,7 @@ mapping inout Shape::fixDefaultSize() disjuncts Shape::fixJoinForkSize, Shape::f
}
mapping inout Shape::fixJoinForkSize() when {
- self.type = '3041' /* JoinNode */ or self.type = '3040' /* ForkNode */
+ self.type = 'JoinNode_Shape' or self.type = 'ForkNode_Shape'
} {
var layout : Bounds := self.layoutConstraint.oclAsType(Bounds);
@@ -61,7 +62,7 @@ mapping inout Shape::fixJoinForkSize() when {
}
mapping inout Shape::fixMergeDecisionSize() when {
- self.type = '3039' /* MergeNode */ or self.type = '3038' /* DecisionNode */
+ self.type = 'MergeNode_Shape' or self.type = 'DecisionNode_Shape'
} {
var layout : Bounds := self.layoutConstraint.oclAsType(Bounds);
@@ -82,8 +83,8 @@ mapping inout Node::fixPartitionsLayout() {
var parentBounds := parent.layoutConstraint.oclAsType(Bounds);
var parentHeight := parentBounds.height;
- var previousPosition : Integer := parentCompartment.children->select(type = '3067')->indexOf(self) - 1;
- var previousPartition : Node := parentCompartment.children->select(type = '3067')->at(previousPosition);
+ var previousPosition : Integer := parentCompartment.children->select(type = 'ActivityPartition_Shape')->indexOf(self) - 1;
+ var previousPartition : Node := parentCompartment.children->select(type = 'ActivityPartition_Shape')->at(previousPosition);
if previousPartition.oclIsUndefined() then { /* First partition */
bounds.x := partitionX;
@@ -99,21 +100,21 @@ mapping inout Node::fixPartitionsLayout() {
}
mapping inout Shape::addCommentDecoration() when {
- self.type = '3080' and self.diagram.type = self.getDiagramType()
+ self.type = 'Comment_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5138';
+ type := 'Comment_BodyLabel';
}
}
mapping inout Shape::addConstraintDecoration() when {
- self.type = '3112' and self.diagram.type = self.getDiagramType()
+ self.type = 'Constraint_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5190'; //Constraint specification
+ type := 'Constraint_BodyLabel'; //Constraint specification
}
}
@@ -132,9 +133,9 @@ mapping inout Shape::createHeaders() : param: DecorationNode, pre: DecorationNod
self.children += pre;
self.children += post;
- param.type := '7001';
- pre.type := '7002';
- post.type := '7003';
+ param.type := 'Activity_ParameterCompartment';
+ pre.type := 'Activity_PreconditionCompartment';
+ post.type := 'Activity_PostconditionCompartment';
}
mapping Node::toNode() : Node disjuncts
@@ -346,11 +347,11 @@ mapping uml::Activity::fillConstraint(node : BasicSemanticCompartment) : Sequenc
}
mapping Parameter::toParameterInActivity(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3001';
+ result.type := 'Parameter_ParameterLabel';
}
mapping Constraint::toConstraintInActivity(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3002';
+ result.type := 'Constraint_PreconditionLabel';
}
@@ -375,7 +376,7 @@ mapping UMLConnector::toCommentLink() : Connector inherits Connector::toCommentL
self.target.element.oclIsKindOf(Comment)
)
}{
- result.type :='4006';
+ result.type :='Comment_AnnotatedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -386,7 +387,7 @@ mapping UMLConnector::toConstraintLink() : Connector inherits Connector::toPapyr
self.target.element.oclIsKindOf(Constraint)
)
}{
- result.type :='4007';
+ result.type :='Constraint_ConstrainedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -403,20 +404,20 @@ query View::getNodeType(element : Element) : String {
if element.oclIsTypeOf(OutputPin) then {
type := switch {
- case (parent.oclIsTypeOf(OpaqueAction)) '3014';
- case (parent.oclIsTypeOf(CreateObjectAction)) '3087';
- case (parent.oclIsTypeOf(ReadStructuralFeatureAction)) '3090';
- case (parent.oclIsTypeOf(AcceptEventAction)) '3064';
- case (parent.oclIsTypeOf(ValueSpecificationAction)) '3077';
- case (parent.oclIsTypeOf(AddStructuralFeatureValueAction)) '3094';
- case (parent.oclIsTypeOf(CallOperationAction)) '3024';
- case (parent.oclIsTypeOf(CallBehaviorAction)) '3020';
- case (parent.oclIsTypeOf(ReadVariableAction)) '3098';
- case (parent.oclIsTypeOf(ReadSelfAction)) '3084';
+ case (parent.oclIsTypeOf(OpaqueAction)) 'OutputPin_OpaqueActionOutputShape';
+ case (parent.oclIsTypeOf(CreateObjectAction)) 'OutputPin_CreateObjectActionResultShape';
+ case (parent.oclIsTypeOf(ReadStructuralFeatureAction)) 'OutputPin_ReadStructuralFeatureActionResultShape';
+ case (parent.oclIsTypeOf(AcceptEventAction)) 'OutputPin_AcceptEventActionResultShape';
+ case (parent.oclIsTypeOf(ValueSpecificationAction)) 'OutputPin_ValueSpecificationActionResultShape';
+ case (parent.oclIsTypeOf(AddStructuralFeatureValueAction)) 'OutputPin_AddStructuralFeatureValueActionResultShape';
+ case (parent.oclIsTypeOf(CallOperationAction)) 'OutputPin_CallOperationActionResultShape';
+ case (parent.oclIsTypeOf(CallBehaviorAction)) 'OutputPin_CallBehaviorActionResultShape';
+ case (parent.oclIsTypeOf(ReadVariableAction)) 'OutputPin_ReadVariableActionResultShape';
+ case (parent.oclIsTypeOf(ReadSelfAction)) 'OutputPin_ReadSelfActionResultShape';
- case (parent.oclIsTypeOf(LoopNode) and parent.oclAsType(LoopNode).bodyOutput->includes(element.oclAsType(OutputPin))) '3109';
- case (parent.oclIsTypeOf(LoopNode) and parent.oclAsType(LoopNode)._result->includes(element.oclAsType(OutputPin))) '3111';
- case (parent.oclIsTypeOf(LoopNode) and parent.oclAsType(LoopNode).loopVariable->includes(element.oclAsType(OutputPin))) '3110';
+ case (parent.oclIsTypeOf(LoopNode) and parent.oclAsType(LoopNode).bodyOutput->includes(element.oclAsType(OutputPin))) 'OutputPin_LoopNodeBodyOutputShape';
+ case (parent.oclIsTypeOf(LoopNode) and parent.oclAsType(LoopNode)._result->includes(element.oclAsType(OutputPin))) 'OutputPin_LoopNodeResultShape';
+ case (parent.oclIsTypeOf(LoopNode) and parent.oclAsType(LoopNode).loopVariable->includes(element.oclAsType(OutputPin))) 'OutputPin_LoopNodeVariableShape';
else self.fail();
};
@@ -426,27 +427,27 @@ query View::getNodeType(element : Element) : String {
if element.oclIsTypeOf(InputPin) then {
type := switch {
- case (parent.oclIsTypeOf(LoopNode)) '3105';
- case (parent.oclIsTypeOf(ReadStructuralFeatureAction)) '3089';
- case (parent.oclIsTypeOf(BroadcastSignalAction)) '3103';
- case (parent.oclIsTypeOf(DestroyObjectAction)) '3096';
- case (parent.oclIsTypeOf(CallBehaviorAction)) '3019';
- case (parent.oclIsTypeOf(OpaqueAction)) '3013';
+ case (parent.oclIsTypeOf(LoopNode)) 'InputPin_LoopNodeVariableInputShape';
+ case (parent.oclIsTypeOf(ReadStructuralFeatureAction)) 'InputPin_ReadStructuralFeatureActionObjectShape';
+ case (parent.oclIsTypeOf(BroadcastSignalAction)) 'InputPin_BroadcastSignalActionArgumentShape';
+ case (parent.oclIsTypeOf(DestroyObjectAction)) 'InputPin_DestroyObjectActionTargetShape';
+ case (parent.oclIsTypeOf(CallBehaviorAction)) 'InputPin_CallBehaviorActionArgumentShape';
+ case (parent.oclIsTypeOf(OpaqueAction)) 'InputPin_OpaqueActionInputShape';
- case (parent.oclIsTypeOf(SendSignalAction) and parent.oclAsType(SendSignalAction).target->includes(element.oclAsType(InputPin))) '3062';
- case (parent.oclIsTypeOf(SendSignalAction)) '3055';
+ case (parent.oclIsTypeOf(SendSignalAction) and parent.oclAsType(SendSignalAction).target->includes(element.oclAsType(InputPin))) 'InputPin_SendSignalActionTargetShape';
+ case (parent.oclIsTypeOf(SendSignalAction)) 'InputPin_SendSignalActionArgumentShape';
- case (parent.oclIsTypeOf(AddStructuralFeatureValueAction) and parent.oclAsType(AddStructuralFeatureValueAction).value->includes(element.oclAsType(InputPin))) '3093';
- case (parent.oclIsTypeOf(AddStructuralFeatureValueAction) and parent.oclAsType(AddStructuralFeatureValueAction)._object->includes(element.oclAsType(InputPin))) '3092';
+ case (parent.oclIsTypeOf(AddStructuralFeatureValueAction) and parent.oclAsType(AddStructuralFeatureValueAction).value->includes(element.oclAsType(InputPin))) 'InputPin_AddStructuralFeatureValueActionValueShape';
+ case (parent.oclIsTypeOf(AddStructuralFeatureValueAction) and parent.oclAsType(AddStructuralFeatureValueAction)._object->includes(element.oclAsType(InputPin))) 'InputPin_AddStructuralFeatureValueActionObjectShape';
- case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).target->includes(element.oclAsType(InputPin))) '3051';
- case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).request->includes(element.oclAsType(InputPin))) '3048';
+ case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).target->includes(element.oclAsType(InputPin))) 'InputPin_SendObjectActionTargetShape';
+ case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).request->includes(element.oclAsType(InputPin))) 'InputPin_SendObjectActionRequestShape';
- case (parent.oclIsTypeOf(CallOperationAction) and parent.oclAsType(CallOperationAction).target->includes(element.oclAsType(InputPin))) '3027';
- case (parent.oclIsTypeOf(CallOperationAction)) '3023';
+ case (parent.oclIsTypeOf(CallOperationAction) and parent.oclAsType(CallOperationAction).target->includes(element.oclAsType(InputPin))) 'InputPin_CallOperationActionTargetShape';
+ case (parent.oclIsTypeOf(CallOperationAction)) 'InputPin_CallOperationActionArgumentShape';
- case (parent.oclIsTypeOf(AddVariableValueAction) and parent.oclAsType(AddVariableValueAction).insertAt->includes(element.oclAsType(InputPin))) '3100';
- case (parent.oclIsTypeOf(AddVariableValueAction) and parent.oclAsType(AddVariableValueAction).value->includes(element.oclAsType(InputPin))) '3101';
+ case (parent.oclIsTypeOf(AddVariableValueAction) and parent.oclAsType(AddVariableValueAction).insertAt->includes(element.oclAsType(InputPin))) 'InputPin_AddVariableValueActionInsertAtShape';
+ case (parent.oclIsTypeOf(AddVariableValueAction) and parent.oclAsType(AddVariableValueAction).value->includes(element.oclAsType(InputPin))) 'InputPin_AddVariableValueActionValueShape';
else self.fail();
};
@@ -456,17 +457,17 @@ query View::getNodeType(element : Element) : String {
//Specific cases for Action input pins
if element.oclIsTypeOf(ActionInputPin) then {
type := switch {
- case (parent.oclIsTypeOf(SendSignalAction) and parent.oclAsType(SendSignalAction).target->includes(element.oclAsType(InputPin))) '3061';
- case (parent.oclIsTypeOf(SendSignalAction)) '3053';
+ case (parent.oclIsTypeOf(SendSignalAction) and parent.oclAsType(SendSignalAction).target->includes(element.oclAsType(InputPin))) 'ActionInputPin_SendSignalActionTargetShape';
+ case (parent.oclIsTypeOf(SendSignalAction)) 'ActionInputPin_SendSignalActionArgumentShape';
- case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).target->includes(element.oclAsType(InputPin))) '3050';
- case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).request->includes(element.oclAsType(InputPin))) '3047';
+ case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).target->includes(element.oclAsType(InputPin))) 'ActionInputPin_SendObjectActionTargetShape';
+ case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).request->includes(element.oclAsType(InputPin))) 'ActionInputPin_SendObjectActionRequestShape';
- case (parent.oclIsTypeOf(CallOperationAction) and parent.oclAsType(CallOperationAction).target->includes(element.oclAsType(InputPin))) '3026';
- case (parent.oclIsTypeOf(CallOperationAction)) '3021';
+ case (parent.oclIsTypeOf(CallOperationAction) and parent.oclAsType(CallOperationAction).target->includes(element.oclAsType(InputPin))) 'ActionInputPin_CallOperationActionTargetShape';
+ case (parent.oclIsTypeOf(CallOperationAction)) 'ActionInputPin_CallOperationActionArgumentShape';
- case (parent.oclIsTypeOf(OpaqueAction)) '3016';
- case (parent.oclIsTypeOf(CallBehaviorAction)) '3018';
+ case (parent.oclIsTypeOf(OpaqueAction)) 'ActionInputPin_OpaqueActionInputShape';
+ case (parent.oclIsTypeOf(CallBehaviorAction)) 'ActionInputPin_CallBehaviorActionArgumentShape';
else self.fail();
};
@@ -477,17 +478,17 @@ query View::getNodeType(element : Element) : String {
if element.oclIsTypeOf(ValuePin) then {
type := switch {
- case (parent.oclIsTypeOf(CallBehaviorAction)) '3017';
- case (parent.oclIsTypeOf(OpaqueAction)) '3015';
+ case (parent.oclIsTypeOf(CallBehaviorAction)) 'ValuePin_CallBehaviorActionArgumentShape';
+ case (parent.oclIsTypeOf(OpaqueAction)) 'ValuePin_OpaqueActionInputShape';
- case (parent.oclIsTypeOf(SendSignalAction) and parent.oclAsType(SendSignalAction).target->includes(element.oclAsType(InputPin))) '3060';
- case (parent.oclIsTypeOf(SendSignalAction)) '3054';
+ case (parent.oclIsTypeOf(SendSignalAction) and parent.oclAsType(SendSignalAction).target->includes(element.oclAsType(InputPin))) 'ValuePin_SendSignalActionTargetShape';
+ case (parent.oclIsTypeOf(SendSignalAction)) 'ValuePin_SendSignalActionArgumentShape';
- case (parent.oclIsTypeOf(CallOperationAction) and parent.oclAsType(CallOperationAction).target->includes(element.oclAsType(InputPin))) '3025';
- case (parent.oclIsTypeOf(CallOperationAction)) '3022';
+ case (parent.oclIsTypeOf(CallOperationAction) and parent.oclAsType(CallOperationAction).target->includes(element.oclAsType(InputPin))) 'ValuePin_CallOperationActionTargetShape';
+ case (parent.oclIsTypeOf(CallOperationAction)) 'ValuePin_CallOperationActionArgumentShape';
- case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).request->includes(element.oclAsType(InputPin))) '3046';
- case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).target->includes(element.oclAsType(InputPin))) '3049';
+ case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).request->includes(element.oclAsType(InputPin))) 'ValuePin_SendObjectActionRequestShape';
+ case (parent.oclIsTypeOf(SendObjectAction) and parent.oclAsType(SendObjectAction).target->includes(element.oclAsType(InputPin))) 'ValuePin_SendObjectActionTargetShape';
else self.fail();
};
@@ -501,54 +502,54 @@ query View::getNodeType(element : Element) : String {
//Generated cases
return
- if element.oclIsTypeOf(Constraint) then '3112'
- elif element.oclIsTypeOf(Constraint) then '3002'
- elif element.oclIsTypeOf(Constraint) then '3003'
- elif element.oclIsTypeOf(Constraint) then '3011'
- elif element.oclIsTypeOf(Constraint) then '3012'
- elif element.oclIsTypeOf(IntervalConstraint) then '3033'
- elif element.oclIsTypeOf(IntervalConstraint) then '3032'
- elif element.oclIsTypeOf(DurationConstraint) then '3035'
- elif element.oclIsTypeOf(TimeConstraint) then '3036'
- elif element.oclIsTypeOf(TimeConstraint) then '3037'
- elif element.oclIsTypeOf(DurationConstraint) then '3034'
- elif element.oclIsTypeOf(FlowFinalNode) then '3006'
- elif element.oclIsTypeOf(ActivityPartition) then '3067'
- elif element.oclIsTypeOf(BroadcastSignalAction) then '3102'
- elif element.oclIsTypeOf(SequenceNode) then '3073'
- elif element.oclIsTypeOf(ReadSelfAction) then '3081'
- elif element.oclIsTypeOf(ActivityFinalNode) then '3005'
- elif element.oclIsTypeOf(SendSignalAction) then '3052'
- elif element.oclIsTypeOf(InitialNode) then '3004'
- elif element.oclIsTypeOf(AddStructuralFeatureValueAction) then '3091'
- elif element.oclIsTypeOf(LoopNode) then '3071'
- elif element.oclIsTypeOf(ForkNode) then '3040'
- elif element.oclIsTypeOf(ExpansionNode) then '3074'
- elif element.oclIsTypeOf(CallOperationAction) then '3010'
- elif element.oclIsTypeOf(AddVariableValueAction) then '3099'
- elif element.oclIsTypeOf(ExpansionNode) then '3075'
- elif element.oclIsTypeOf(Parameter) then '3001'
- elif element.oclIsTypeOf(ReadVariableAction) then '3097'
- elif element.oclIsTypeOf(OpaqueAction) then '3007'
- elif element.oclIsTypeOf(InterruptibleActivityRegion) then '3068'
- elif element.oclIsTypeOf(JoinNode) then '3041'
- elif element.oclIsTypeOf(StructuredActivityNode) then '3065'
- elif element.oclIsTypeOf(ConditionalNode) then '3069'
- elif element.oclIsTypeOf(DecisionNode) then '3038'
- elif element.oclIsTypeOf(ActivityParameterNode) then '3059'
- elif element.oclIsTypeOf(CentralBufferNode) then '3104'
- elif element.oclIsTypeOf(Comment) then '3080'
- elif element.oclIsTypeOf(DestroyObjectAction) then '3095'
- elif element.oclIsTypeOf(CreateObjectAction) then '3086'
- elif element.oclIsTypeOf(DataStoreNode) then '3078'
- elif element.oclIsTypeOf(CallBehaviorAction) then '3008'
- elif element.oclIsTypeOf(ExpansionRegion) then '3070'
- elif element.oclIsTypeOf(SendObjectAction) then '3042'
- elif element.oclIsTypeOf(MergeNode) then '3039'
- elif element.oclIsTypeOf(ValueSpecificationAction) then '3076'
- elif element.oclIsTypeOf(AcceptEventAction) then '3063'
- elif element.oclIsTypeOf(Activity) then '2001'
- elif element.oclIsTypeOf(ReadStructuralFeatureAction) then '3088'
+ if element.oclIsTypeOf(Constraint) then 'Constraint_Shape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_PreconditionLabel'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_PostconditionLabel'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_LocalPreconditionShape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_LocalPostconditionShape'
+ elif element.oclIsTypeOf(IntervalConstraint) then 'IntervalConstraint_LocalPostconditionShape'
+ elif element.oclIsTypeOf(IntervalConstraint) then 'IntervalConstraint_LocalPreconditionShape'
+ elif element.oclIsTypeOf(DurationConstraint) then 'DurationConstraint_LocalPostconditionShape'
+ elif element.oclIsTypeOf(TimeConstraint) then 'TimeConstraint_LocalPreconditionShape'
+ elif element.oclIsTypeOf(TimeConstraint) then 'TimeConstraint_LocalPostconditionShape'
+ elif element.oclIsTypeOf(DurationConstraint) then 'DurationConstraint_LocalPreconditionShape'
+ elif element.oclIsTypeOf(FlowFinalNode) then 'FlowFinalNode_Shape'
+ elif element.oclIsTypeOf(ActivityPartition) then 'ActivityPartition_Shape'
+ elif element.oclIsTypeOf(BroadcastSignalAction) then 'BroadcastSignalAction_Shape'
+ elif element.oclIsTypeOf(SequenceNode) then 'SequenceNode_Shape'
+ elif element.oclIsTypeOf(ReadSelfAction) then 'ReadSelfAction_Shape'
+ elif element.oclIsTypeOf(ActivityFinalNode) then 'ActivityFinalNode_Shape'
+ elif element.oclIsTypeOf(SendSignalAction) then 'SendSignalAction_Shape'
+ elif element.oclIsTypeOf(InitialNode) then 'InitialNode_Shape'
+ elif element.oclIsTypeOf(AddStructuralFeatureValueAction) then 'AddStructuralFeatureValueAction_Shape'
+ elif element.oclIsTypeOf(LoopNode) then 'LoopNode_Shape'
+ elif element.oclIsTypeOf(ForkNode) then 'ForkNode_Shape'
+ elif element.oclIsTypeOf(ExpansionNode) then 'ExpansionNode_InputShape'
+ elif element.oclIsTypeOf(CallOperationAction) then 'CallOperationAction_Shape'
+ elif element.oclIsTypeOf(AddVariableValueAction) then 'AddVariableValueAction_Shape'
+ elif element.oclIsTypeOf(ExpansionNode) then 'ExpansionNode_OutputShape'
+ elif element.oclIsTypeOf(Parameter) then 'Parameter_ParameterLabel'
+ elif element.oclIsTypeOf(ReadVariableAction) then 'ReadVariableAction_Shape'
+ elif element.oclIsTypeOf(OpaqueAction) then 'OpaqueAction_Shape'
+ elif element.oclIsTypeOf(InterruptibleActivityRegion) then 'InterruptibleActivityRegion_Shape'
+ elif element.oclIsTypeOf(JoinNode) then 'JoinNode_Shape'
+ elif element.oclIsTypeOf(StructuredActivityNode) then 'StructuredActivityNode_Shape'
+ elif element.oclIsTypeOf(ConditionalNode) then 'ConditionalNode_Shape'
+ elif element.oclIsTypeOf(DecisionNode) then 'DecisionNode_Shape'
+ elif element.oclIsTypeOf(ActivityParameterNode) then 'ActivityParameterNode_Shape'
+ elif element.oclIsTypeOf(CentralBufferNode) then 'CentralBufferNode_Shape'
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(DestroyObjectAction) then 'DestroyObjectAction_Shape'
+ elif element.oclIsTypeOf(CreateObjectAction) then 'CreateObjectAction_Shape'
+ elif element.oclIsTypeOf(DataStoreNode) then 'DataStoreNode_Shape'
+ elif element.oclIsTypeOf(CallBehaviorAction) then 'CallBehaviorAction_Shape'
+ elif element.oclIsTypeOf(ExpansionRegion) then 'ExpansionRegion_Shape'
+ elif element.oclIsTypeOf(SendObjectAction) then 'SendObjectAction_Shape'
+ elif element.oclIsTypeOf(MergeNode) then 'MergeNode_Shape'
+ elif element.oclIsTypeOf(ValueSpecificationAction) then 'ValueSpecificationAction_Shape'
+ elif element.oclIsTypeOf(AcceptEventAction) then 'AcceptEventAction_Shape'
+ elif element.oclIsTypeOf(Activity) then 'Activity_Shape'
+ elif element.oclIsTypeOf(ReadStructuralFeatureAction) then 'ReadStructuralFeatureAction_Shape'
else self.fail()
endif;
@@ -580,188 +581,188 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsTypeOf(ActivityPartition) then
return switch {
- case (self.type = 'PartitionName') '5118';
- case (self.type = 'PartitionCompartment') '7006';
+ case (self.type = 'PartitionName') 'ActivityPartition_NameLabel';
+ case (self.type = 'PartitionCompartment') 'ActivityPartition_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name') '5189';
+ case (self.type = 'Name') 'Constraint_NameLabel';
}
elif element.oclIsTypeOf(IntervalConstraint) then
return switch {
- case (self.type = 'Name') '5037';
+ case (self.type = 'Name') 'IntervalConstraint_LocalPostconditionNameLabel';
}
elif element.oclIsTypeOf(BroadcastSignalAction) then
return switch {
- case (self.type = 'Name') '5175';
+ case (self.type = 'Name') 'BroadcastSignalAction_NameLabel';
}
elif element.oclIsTypeOf(SequenceNode) then
return switch {
- case (self.type = 'StructureCompartment') '7012';
+ case (self.type = 'StructureCompartment') 'SequenceNode_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(ReadSelfAction) then
return switch {
- case (self.type = 'Name') '5139';
+ case (self.type = 'Name') 'ReadSelfAction_NameLabel';
}
elif element.oclIsTypeOf(SendSignalAction) then
return switch {
- case (self.type = 'Name') '5060';
+ case (self.type = 'Name') 'SendSignalAction_NameLabel';
}
elif element.oclIsTypeOf(AddStructuralFeatureValueAction) then
return switch {
- case (self.type = 'Name') '5160';
+ case (self.type = 'Name') 'AddStructuralFeatureValueAction_NameLabel';
}
elif element.oclIsTypeOf(DurationConstraint) then
return switch {
- case (self.type = 'Name') '5039';
+ case (self.type = 'Name') 'DurationConstraint_LocalPostconditionNameLabel';
}
elif element.oclIsTypeOf(LoopNode) then
return switch {
- case (self.type = 'StructureCompartment') '7010';
+ case (self.type = 'StructureCompartment') 'LoopNode_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(CallOperationAction) then
return switch {
- case (self.type = 'Name') '5006';
+ case (self.type = 'Name') 'CallOperationAction_NameLabel';
}
elif element.oclIsTypeOf(IntervalConstraint) then
return switch {
- case (self.type = 'Name') '5036';
+ case (self.type = 'Name') 'IntervalConstraint_LocalPreconditionNameLabel';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name') '5007';
+ case (self.type = 'Name') 'Constraint_LocalPreconditionNameLabel';
}
elif element.oclIsTypeOf(AddVariableValueAction) then
return switch {
- case (self.type = 'Name') '5171';
+ case (self.type = 'Name') 'AddVariableValueAction_NameLabel';
}
elif element.oclIsTypeOf(ReadVariableAction) then
return switch {
- case (self.type = 'Name') '5166';
+ case (self.type = 'Name') 'ReadVariableAction_NameLabel';
}
elif element.oclIsTypeOf(OpaqueAction) then
return switch {
- case (self.type = 'Name') '5003';
+ case (self.type = 'Name') 'OpaqueAction_NameLabel';
}
elif element.oclIsTypeOf(InterruptibleActivityRegion) then
return switch {
- case (self.type = 'StructureCompartment') '7007';
+ case (self.type = 'StructureCompartment') 'InterruptibleActivityRegion_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name') '5008';
+ case (self.type = 'Name') 'Constraint_LocalPostconditionNameLabel';
}
elif element.oclIsTypeOf(StructuredActivityNode) then
return switch {
- case (self.type = 'Name') '5117';
- case (self.type = 'StructuredActivityNodeCompartment') '7005';
+ case (self.type = 'Name') 'StructuredActivityNode_KeywordLabel';
+ case (self.type = 'StructuredActivityNodeCompartment') 'StructuredActivityNode_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(ConditionalNode) then
return switch {
- case (self.type = 'StructureCompartment') '7008';
+ case (self.type = 'StructureCompartment') 'ConditionalNode_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(TimeConstraint) then
return switch {
- case (self.type = 'Name') '5040';
+ case (self.type = 'Name') 'TimeConstraint_LocalPreconditionNameLabel';
}
elif element.oclIsTypeOf(ActivityParameterNode) then
return switch {
- case (self.type = 'ObjectNodeNameLabel') '5071';
+ case (self.type = 'ObjectNodeNameLabel') 'ActivityParameterNode_NameLabel';
}
elif element.oclIsTypeOf(DestroyObjectAction) then
return switch {
- case (self.type = 'Name') '5163';
+ case (self.type = 'Name') 'DestroyObjectAction_NameLabel';
}
elif element.oclIsTypeOf(CreateObjectAction) then
return switch {
- case (self.type = 'Name') '5148';
+ case (self.type = 'Name') 'CreateObjectAction_NameLabel';
}
elif element.oclIsTypeOf(CallBehaviorAction) then
return switch {
- case (self.type = 'Name') '5004';
+ case (self.type = 'Name') 'CallBehaviorAction_NameLabel';
}
elif element.oclIsTypeOf(ExpansionRegion) then
return switch {
- case (self.type = 'StructureCompartment') '7009';
+ case (self.type = 'StructureCompartment') 'ExpansionRegion_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(SendObjectAction) then
return switch {
- case (self.type = 'Name') '5059';
+ case (self.type = 'Name') 'SendObjectAction_NameLabel';
}
elif element.oclIsTypeOf(TimeConstraint) then
return switch {
- case (self.type = 'Name') '5041';
+ case (self.type = 'Name') 'TimeConstraint_LocalPostconditionNameLabel';
}
elif element.oclIsTypeOf(DurationConstraint) then
return switch {
- case (self.type = 'Name') '5038';
+ case (self.type = 'Name') 'DurationConstraint_LocalPreconditionNameLabel';
}
elif element.oclIsTypeOf(ValueSpecificationAction) then
return switch {
- case (self.type = 'Name') '5126';
+ case (self.type = 'Name') 'ValueSpecificationAction_NameLabel';
}
elif element.oclIsTypeOf(Activity) then
return switch {
- case (self.type = 'Name') '5001';
- case (self.type = 'ActivityCompartment') '7004';
+ case (self.type = 'Name') 'Activity_NameLabel';
+ case (self.type = 'ActivityCompartment') 'Activity_ActivityNodeCompartment';
}
elif element.oclIsTypeOf(ReadStructuralFeatureAction) then
return switch {
- case (self.type = 'Name') '5153';
+ case (self.type = 'Name') 'ReadStructuralFeatureAction_NameLabel';
}
elif element.oclIsTypeOf(AcceptEventAction) then
return switch {
- case (self.type = 'Name') '5078';
+ case (self.type = 'Name') 'AcceptEventAction_NameLabel';
}
elif element.oclIsTypeOf(InputPin) then
- '5009'
+ 'InputPin_OpaqueActionInputNameLabel'
elif element.oclIsTypeOf(ValuePin) then
- '5024'
+ 'ValuePin_OpaqueActionInputValueLabel'
elif element.oclIsTypeOf(OutputPin) then
- '5010'
+ 'OutputPin_OpaqueActionOutputNameLabel'
elif element.oclIsTypeOf(ActionInputPin) then
- '5012'
+ 'ActionInputPin_OpaqueActionInputNameLabel'
endif
} else {
return if element.oclIsTypeOf(ObjectFlow) then
return switch {
- case (self.type='Name') '6001';
- case (self.type = 'NameLabel') '6001';
- case (self.type = 'KindLabel') '6010';
+ case (self.type='Name') 'ObjectFlow_NameLabel';
+ case (self.type = 'NameLabel') 'ObjectFlow_NameLabel';
+ case (self.type = 'KindLabel') 'ObjectFlow_StereotypeLabel';
}
elif element.oclIsTypeOf(ControlFlow) then
return switch {
- case (self.type='Name') '6003';
- case (self.type = 'NameLabel') '6003';
- case (self.type = 'KindLabel') '6011';
+ case (self.type='Name') 'ControlFlow_NameLabel';
+ case (self.type = 'NameLabel') 'ControlFlow_NameLabel';
+ case (self.type = 'KindLabel') 'ControlFlow_StereotypeLabel';
}
endif
} endif;
@@ -771,9 +772,9 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return
if self.type = 'Reference' then '' /* Constraint/Comment links handled separately */
- elif element.oclIsTypeOf(ObjectFlow) then '4003'
- elif element.oclIsTypeOf(ControlFlow) then '4004'
- elif element.oclIsTypeOf(ExceptionHandler) then '4005'
+ elif element.oclIsTypeOf(ObjectFlow) then 'ObjectFlow_Edge'
+ elif element.oclIsTypeOf(ControlFlow) then 'ControlFlow_Edge'
+ elif element.oclIsTypeOf(ExceptionHandler) then 'ExceptionHandler_Edge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAClassDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAClassDiagram.qvto
index b508cfc3a0d..7754869bb1c 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAClassDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAClassDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
import org.eclipse.papyrus.m2m.qvto.Properties;
@@ -42,8 +43,8 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
/* Post action: Move AssociationClasses to the right parent (Dashed Edge + Node) */
/* Easier to do in post-treatment than during the transformation (The transformation can remain generic) */
result.map handleAssociationClasses();
- graphics.objectsOfType(Shape)->select(type = '2012').map addCommentDecoration();
- graphics.objectsOfType(Shape)->select(type = '2011').map addConstraintDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Comment_Shape').map addCommentDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Constraint_PackagedElementShape').map addConstraintDecoration();
if not result.element.oclIsKindOf(Package) then
result.map toInnerClassDiagram()
endif;
@@ -62,33 +63,33 @@ query getInnerClassDiagramView() : PapyrusDiagram {
}
mapping inout Shape::addCommentDecoration() when {
- self.type = '2012' and self.diagram.type = self.getDiagramType()
+ self.type = 'Comment_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5038'; //Comment body
+ type := 'Comment_BodyLabel'; //Comment body
}
}
mapping inout Shape::addConstraintDecoration() when {
- self.type = '2011' and self.diagram.type = self.getDiagramType()
+ self.type = 'Constraint_PackagedElementShape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5159'; //Constraint specification
+ type := 'Constraint_BodyLabel'; //Constraint specification
}
}
mapping inout Diagram::handleAssociationClasses() {
- graphics.objectsOfType(Shape)->select(type = '2013').map updateLocation();
+ graphics.objectsOfType(Shape)->select(type = 'AssociationClass_Shape').map updateLocation();
- self.children := self.children->union(graphics.objectsOfKind(Node)->select(diagram = self and type = '2013'));
+ self.children := self.children->union(graphics.objectsOfKind(Node)->select(diagram = self and type = 'AssociationClass_Shape'));
}
mapping inout Shape::updateLocation() {
- var dashedEdge := graphics.objectsOfType(Connector)->select(type = '4016' and source = self or target = self)->any(true);
+ var dashedEdge := graphics.objectsOfType(Connector)->select(type = 'AssociationClass_TetherEdge' and source = self or target = self)->any(true);
var association := dashedEdge.findConnector();
@@ -125,7 +126,7 @@ mapping UMLConnector::toAssociationClass() : Connector inherits Connector::toPap
}{
result.styles := self.map toFontStyle();
var dashedEdge := object Connector {
- type := '4016';
+ type := 'AssociationClass_TetherEdge';
target := self.children->selectByKind(UMLShape)->any(true).map toPapyrusShape();
source := result;
styles := object FontStyle{};
@@ -766,151 +767,151 @@ mapping uml::Interface::fillSignal(node : BasicSemanticCompartment) : Sequence(N
}
mapping Property::toPropertyInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3012';
+ result.type := 'Property_ClassAttributeLabel';
}
mapping Property::toPropertyInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3002';
+ result.type := 'Property_ComponentAttributeLabel';
}
mapping Property::toPropertyInSignal(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3005';
+ result.type := 'Property_SignalAttributeLabel';
}
mapping Property::toPropertyInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3006';
+ result.type := 'Property_InterfaceAttributeLabel';
}
mapping Property::toPropertyInPrimitiveType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3041';
+ result.type := 'Property_PrimitiveTypeAttributeLabel';
}
mapping Property::toPropertyInDataType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3018';
+ result.type := 'Property_DataTypeAttributeLabel';
}
mapping Class::toClassInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3014';
+ result.type := 'Class_ClassNestedClassifierLabel';
}
mapping Class::toClassInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3004';
+ result.type := 'Class_ComponentNestedClassifierLabel';
}
mapping Class::toClassInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3008';
+ result.type := 'Class_InterfaceNestedClassifierLabel';
}
mapping Operation::toOperationInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3013';
+ result.type := 'Operation_ClassOperationLabel';
}
mapping Operation::toOperationInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3003';
+ result.type := 'Operation_ComponentOperationLabel';
}
mapping Operation::toOperationInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3007';
+ result.type := 'Operation_InterfaceOperationLabel';
}
mapping Operation::toOperationInPrimitiveType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3042';
+ result.type := 'Operation_PrimitiveTypeOperationLabel';
}
mapping Operation::toOperationInDataType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3019';
+ result.type := 'Operation_DataTypeOperationLabel';
}
mapping ConnectableElementTemplateParameter::toConnectableElementTemplateParameterInRedefinableTemplateSignature(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3034';
+ result.type := 'ConnectableElementTemplateParameter_TemplateParameterLabel';
}
mapping OperationTemplateParameter::toOperationTemplateParameterInTemplateSignature(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3035';
+ result.type := 'OperationTemplateParameter_TemplateParameterLabel';
}
mapping ClassifierTemplateParameter::toClassifierTemplateParameterInRedefinableTemplateSignature(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3031';
+ result.type := 'ClassifierTemplateParameter_TemplateParameterLabel';
}
mapping TemplateParameter::toTemplateParameterInRedefinableTemplateSignature(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3016';
+ result.type := 'TemplateParameter_TemplateParameterLabel';
}
mapping EnumerationLiteral::toEnumerationLiteralInEnumeration(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3017';
+ result.type := 'EnumerationLiteral_LiteralLabel';
}
mapping Reception::toReceptionInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3011';
+ result.type := 'Reception_ReceptionLabel';
}
mapping Reception::toReceptionInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3039';
+ result.type := 'Reception_InterfaceReceptionLabel';
}
mapping Slot::toSlotInInstanceSpecification(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3030';
+ result.type := 'Slot_SlotLabel';
}
mapping Interface::toInterfaceInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3036';
+ result.type := 'Interface_ClassNestedClassifierLabel';
}
mapping Interface::toInterfaceInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3037';
+ result.type := 'Interface_ComponentNestedClassifierLabel';
}
mapping Interface::toInterfaceInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3038';
+ result.type := 'Interface_InterfaceNestedClassifierLabel';
}
mapping Enumeration::toEnumerationInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3052';
+ result.type := 'Enumeration_ClassNestedClassifierLabel';
}
mapping Enumeration::toEnumerationInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3053';
+ result.type := 'Enumeration_ComponentNestedClassifierLabel';
}
mapping Enumeration::toEnumerationInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3054';
+ result.type := 'Enumeration_InterfaceNestedClassifierLabel';
}
mapping PrimitiveType::toPrimitiveTypeInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3047';
+ result.type := 'PrimitiveType_ClassNestedClassifierLabel';
}
mapping PrimitiveType::toPrimitiveTypeInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3046';
+ result.type := 'PrimitiveType_ComponentNestedClassifierLabel';
}
mapping PrimitiveType::toPrimitiveTypeInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3048';
+ result.type := 'PrimitiveType_InterfaceNestedClassifierLabel';
}
mapping DataType::toDataTypeInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3044';
+ result.type := 'DataType_ClassNestedClassifierLabel';
}
mapping DataType::toDataTypeInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3045';
+ result.type := 'DataType_ComponentNestedClassifierLabel';
}
mapping DataType::toDataTypeInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3043';
+ result.type := 'DataType_InterfaceNestedClassifierLabel';
}
mapping Signal::toSignalInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3050';
+ result.type := 'Signal_ClassNestedClassifierLabel';
}
mapping Signal::toSignalInComponent(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3051';
+ result.type := 'Signal_ComponentNestedClassifierLabel';
}
mapping Signal::toSignalInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3049';
+ result.type := 'Signal_InterfaceNestedClassifierLabel';
}
@@ -948,7 +949,7 @@ mapping UMLConnector::toGeneralizationConnector() : Connector inherits Connector
self.type='' and self.element.oclIsTypeOf(Generalization)
}{
result.children->forEach(element){
- element.type:='6007'
+ element.type:='Generalization_StereotypeLabel'
};
result.styles := self.map toFontStyle();
result.sourceAnchor := object IdentityAnchor{};
@@ -962,7 +963,7 @@ mapping UMLConnector::toCommentLink() : Connector inherits Connector::toCommentL
self.target.element.oclIsKindOf(Comment)
)
}{
- result.type :='4013';
+ result.type :='Comment_AnnotatedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -973,7 +974,7 @@ mapping UMLConnector::toConstraintLink() : Connector inherits Connector::toPapyr
self.target.element.oclIsKindOf(Constraint)
)
}{
- result.type :='4014';
+ result.type :='Constraint_ConstrainedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -987,11 +988,11 @@ mapping UMLConnector::toContextLink() : Connector inherits Connector::toPapyrusC
self.target.element.oclIsKindOf(Constraint)
)
}{
- result.type :='8500';
+ result.type :='Constraint_ContextEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
result.children += object DecorationNode {
- type := '8501';
+ type := 'Constraint_KeywordLabel';
layoutConstraint := object Location {
y := 15;
}
@@ -1003,26 +1004,26 @@ mapping UMLConnector::toContextLink() : Connector inherits Connector::toPapyrusC
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(Dependency) then '2014'
- elif element.oclIsTypeOf(AssociationClass) then '2013'
- elif element.oclIsTypeOf(Association) then '2015'
- elif element.oclIsTypeOf(InstanceSpecification) then '2001'
- elif element.oclIsTypeOf(Component) then '2002'
- elif element.oclIsTypeOf(Signal) then '2003'
- elif element.oclIsTypeOf(Interface) then '2004'
- elif element.oclIsTypeOf(Model) then '2005'
- elif element.oclIsTypeOf(Enumeration) then '2006'
- elif element.oclIsTypeOf(Package) then '2007'
- elif element.oclIsTypeOf(InformationItem) then '2099'
- elif element.oclIsTypeOf(Class) then '2008'
- elif element.oclIsTypeOf(PrimitiveType) then '2009'
- elif element.oclIsTypeOf(DataType) then '2010'
- elif element.oclIsTypeOf(Constraint) then '2011'
- elif element.oclIsTypeOf(Comment) then '2012'
- elif element.oclIsTypeOf(Diagram) then '2016'
- elif element.oclIsTypeOf(DurationObservation) then '2095'
- elif element.oclIsTypeOf(TimeObservation) then '2096'
- elif element.oclIsKindOf(NamedElement) then '2097'
+ if element.oclIsTypeOf(Dependency) then 'Dependency_Shape'
+ elif element.oclIsTypeOf(AssociationClass) then 'AssociationClass_Shape'
+ elif element.oclIsTypeOf(Association) then 'Association_Shape'
+ elif element.oclIsTypeOf(InstanceSpecification) then 'InstanceSpecification_Shape'
+ elif element.oclIsTypeOf(Component) then 'Component_Shape'
+ elif element.oclIsTypeOf(Signal) then 'Signal_Shape'
+ elif element.oclIsTypeOf(Interface) then 'Interface_Shape'
+ elif element.oclIsTypeOf(Model) then 'Model_Shape'
+ elif element.oclIsTypeOf(Enumeration) then 'Enumeration_Shape'
+ elif element.oclIsTypeOf(Package) then 'Package_Shape'
+ elif element.oclIsTypeOf(InformationItem) then 'InformationItem_Shape'
+ elif element.oclIsTypeOf(Class) then 'Class_Shape'
+ elif element.oclIsTypeOf(PrimitiveType) then 'PrimitiveType_Shape'
+ elif element.oclIsTypeOf(DataType) then 'DataType_Shape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_PackagedElementShape'
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(Diagram) then 'Diagram_ShortcutShape'
+ elif element.oclIsTypeOf(DurationObservation) then 'DurationObservation_Shape'
+ elif element.oclIsTypeOf(TimeObservation) then 'TimeObservation_Shape'
+ elif element.oclIsKindOf(NamedElement) then 'NamedElement_DefaultShape'
else self.fail()
endif;
}
@@ -1049,209 +1050,209 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsKindOf(AssociationClass) then
return switch {
- case (self.type = 'Name') '5066';
- case (self.type = 'AttributeCompartment') '7034';
- case (self.type = 'OperationCompartment') '7036';
- case (self.type = 'SignalCompartment') '7037';
+ case (self.type = 'Name') 'AssociationClass_NameLabel';
+ case (self.type = 'AttributeCompartment') 'AssociationClass_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'AssociationClass_OperationCompartment';
+ case (self.type = 'SignalCompartment') 'AssociationClass_NestedClassifierCompartment';
}
elif element.oclIsKindOf(InstanceSpecification) then
return switch {
- case (self.type = 'Name') '5002';
- case (self.type = 'SlotCompartment') '7001';
+ case (self.type = 'Name') 'InstanceSpecification_NameLabel';
+ case (self.type = 'SlotCompartment') 'InstanceSpecification_SlotCompartment';
}
elif element.oclIsKindOf(Component) then
return switch {
- case (self.type = 'Name') '5005';
- case (self.type = 'AttributeCompartment') '7002';
- case (self.type = 'OperationCompartment') '7003';
- case (self.type = 'SignalCompartment') '7004';
+ case (self.type = 'Name') 'Component_NameLabel';
+ case (self.type = 'AttributeCompartment') 'Component_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'Component_OperationCompartment';
+ case (self.type = 'SignalCompartment') 'Component_NestedClassifierCompartment';
}
elif element.oclIsKindOf(Signal) then
return switch {
- case (self.type = 'Name') '5008';
- case (self.type = 'AttributeCompartment') '7005';
+ case (self.type = 'Name') 'Signal_NameLabel';
+ case (self.type = 'AttributeCompartment') 'Signal_AttributeCompartment';
}
elif element.oclIsKindOf(Interface) then
return switch {
- case (self.type = 'Name') '5011';
- case (self.type = 'AttributeCompartment') '7006';
- case (self.type = 'OperationCompartment') '7007';
- case (self.type = 'SignalCompartment') '7008';
+ case (self.type = 'Name') 'Interface_NameLabel';
+ case (self.type = 'AttributeCompartment') 'Interface_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'Interface_OperationCompartment';
+ case (self.type = 'SignalCompartment') 'Interface_NestedClassifierCompartment';
}
elif element.oclIsKindOf(Model) then
return switch {
- case (self.type = 'Name') '5020';
- case (self.type = 'PackageContents') '7009';
+ case (self.type = 'Name') 'Model_NameLabel';
+ case (self.type = 'PackageContents') 'Model_PackagedElementCompartment';
}
elif element.oclIsKindOf(Enumeration) then
return switch {
- case (self.type = 'Name') '5023';
- case (self.type = 'EnumerationCompartment') '7015';
+ case (self.type = 'Name') 'Enumeration_NameLabel';
+ case (self.type = 'EnumerationCompartment') 'Enumeration_LiteralCompartment';
}
elif element.oclIsKindOf(Package) then
return switch {
- case (self.type = 'Name') '5026';
- case (self.type = 'PackageContents') '7016';
+ case (self.type = 'Name') 'Package_NameLabel';
+ case (self.type = 'PackageContents') 'Package_PackagedElementCompartment';
}
elif element.oclIsKindOf(InformationItem) then
return switch {
- case (self.type = 'Name') '5161';
+ case (self.type = 'Name') 'InformationItem_NameLabel';
}
elif element.oclIsKindOf(Class) then
return switch {
- case (self.type = 'Name') '5029';
- case (self.type = 'AttributeCompartment') '7017';
- case (self.type = 'OperationCompartment') '7018';
- case (self.type = 'SignalCompartment') '7019';
+ case (self.type = 'Name') 'Class_NameLabel';
+ case (self.type = 'AttributeCompartment') 'Class_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'Class_OperationCompartment';
+ case (self.type = 'SignalCompartment') 'Class_NestedClassifierCompartment';
}
elif element.oclIsKindOf(PrimitiveType) then
return switch {
- case (self.type = 'Name') '5032';
- case (self.type = 'AttributeCompartment') '7039';
- case (self.type = 'OperationCompartment') '7040';
+ case (self.type = 'Name') 'PrimitiveType_NameLabel';
+ case (self.type = 'AttributeCompartment') 'PrimitiveType_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'PrimitiveType_OperationCompartment';
}
elif element.oclIsKindOf(DataType) then
return switch {
- case (self.type = 'Name') '5035';
- case (self.type = 'AttributeCompartment') '7020';
- case (self.type = 'OperationCompartment') '7021';
+ case (self.type = 'Name') 'DataType_NameLabel';
+ case (self.type = 'AttributeCompartment') 'DataType_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'DataType_OperationCompartment';
}
elif element.oclIsKindOf(Constraint) then
return switch {
- case (self.type = 'Name') '5037';
+ case (self.type = 'Name') 'Constraint_NameLabel';
}
elif element.oclIsKindOf(Diagram) then
return switch {
- case (self.type = 'Name') '0';
+ case (self.type = 'Name') 'Diagram_NameLabel';
}
elif element.oclIsKindOf(DurationObservation) then
return switch {
- case (self.type = 'Name') '5155';
+ case (self.type = 'Name') 'DurationObservation_FloatingNameLabel';
}
elif element.oclIsKindOf(TimeObservation) then
return switch {
- case (self.type = 'Name') '5153';
+ case (self.type = 'Name') 'TimeObservation_FloatingNameLabel';
}
elif element.oclIsKindOf(NamedElement) then
return switch {
- case (self.type = 'Name') '5157';
+ case (self.type = 'Name') 'NamedElement_NameLabel';
}
endif
} else {
return if element.oclIsKindOf(Association) then
return switch {
- case (self.type='Name') '6002';
- case (self.type = 'KindLabel') '6001';
- case (self.type = 'NameLabel') '6002';
+ case (self.type='Name') 'Association_NameLabel';
+ case (self.type = 'KindLabel') 'Association_StereotypeLabel';
+ case (self.type = 'NameLabel') 'Association_NameLabel';
}
elif element.oclIsKindOf(Property) then
return if element.oclAsType(Property).association.oclIsTypeOf(Association) then
return switch {
- case (self.type = 'ToRoleLabel') '6003';
+ case (self.type = 'ToRoleLabel') 'Association_TargetRoleLabel';
- case (self.type = 'FromRoleLabel') '6005';
+ case (self.type = 'FromRoleLabel') 'Association_SourceRoleLabel';
- case (self.type = 'FromMultiplicityLabel') '6033';
+ case (self.type = 'FromMultiplicityLabel') 'Association_SourceMultiplicityLabel';
- case (self.type = 'ToMultiplicityLabel') '6034';
+ case (self.type = 'ToMultiplicityLabel') 'Association_TargetMultiplicityLabel';
}
elif element.oclAsType(Property).association.oclIsTypeOf(AssociationClass) then
return switch {
- case (self.type = 'ToRoleLabel') '6032';
- case (self.type = 'FromRoleLabel') '6031';
+ case (self.type = 'ToRoleLabel') 'AssociationClass_TargetRoleLabel';
+ case (self.type = 'FromRoleLabel') 'AssociationClass_SourceRoleLabel';
}
endif
elif element.oclIsKindOf(Generalization) then
return switch {
- case (self.type = 'KindLabel') '6007';
+ case (self.type = 'KindLabel') 'Generalization_StereotypeLabel';
}
elif element.oclIsKindOf(InterfaceRealization) then
return switch {
- case (self.type='Name') '6009';
- case (self.type = 'KindLabel') '6008';
- case (self.type = 'NameLabel') '6009';
+ case (self.type='Name') 'InterfaceRealization_NameLabel';
+ case (self.type = 'KindLabel') 'InterfaceRealization_StereotypeLabel';
+ case (self.type = 'NameLabel') 'InterfaceRealization_NameLabel';
}
elif element.oclIsKindOf(Substitution) then
return switch {
- case (self.type='Name') '6011';
- case (self.type = 'KindLabel') '6010';
- case (self.type = 'NameLabel') '6011';
+ case (self.type='Name') 'Substitution_NameLabel';
+ case (self.type = 'KindLabel') 'Substitution_StereotypeLabel';
+ case (self.type = 'NameLabel') 'Substitution_NameLabel';
}
elif element.oclIsKindOf(Realization) then
return switch {
- case (self.type='Name') '6013';
- case (self.type = 'KindLabel') '6012';
- case (self.type = 'NameLabel') '6013';
+ case (self.type='Name') 'Realization_NameLabel';
+ case (self.type = 'KindLabel') 'Realization_StereotypeLabel';
+ case (self.type = 'NameLabel') 'Realization_NameLabel';
}
elif element.oclIsKindOf(Abstraction) then
return switch {
- case (self.type='Name') '6014';
- case (self.type = 'NameLabel') '6014';
- case (self.type = 'KindLabel') '6015';
+ case (self.type='Name') 'Abstraction_NameLabel';
+ case (self.type = 'NameLabel') 'Abstraction_NameLabel';
+ case (self.type = 'KindLabel') 'Abstraction_StereotypeLabel';
}
elif element.oclIsKindOf(Usage) then
return switch {
- case (self.type='Name') '6016';
- case (self.type = 'NameLabel') '6016';
- case (self.type = 'KindLabel') '6017';
+ case (self.type='Name') 'Usage_NameLabel';
+ case (self.type = 'NameLabel') 'Usage_NameLabel';
+ case (self.type = 'KindLabel') 'Usage_StereotypeLabel';
}
elif element.oclIsKindOf(Dependency) then
return switch {
- case (self.type='Name') '6026';
- case (self.type = 'NameLabel') '6026';
- case (self.type = 'KindLabel') '6027';
+ case (self.type='Name') 'Dependency_NameLabel';
+ case (self.type = 'NameLabel') 'Dependency_NameLabel';
+ case (self.type = 'KindLabel') 'Dependency_StereotypeLabel';
}
elif element.oclIsKindOf(ElementImport) then
return switch {
- case (self.type = 'KindLabel') '6021';
+ case (self.type = 'KindLabel') 'ElementImport_StereotypeLabel';
}
elif element.oclIsKindOf(PackageImport) then
return switch {
- case (self.type = 'KindLabel') '6022';
+ case (self.type = 'KindLabel') 'PackageImport_StereotypeLabel';
}
elif element.oclIsKindOf(PackageMerge) then
return switch {
- case (self.type = 'KindLabel') '6030';
+ case (self.type = 'KindLabel') 'PackageMerge_StereotypeLabel';
}
elif element.oclIsKindOf(TemplateBinding) then
return switch {
- case (self.type = 'KindLabel') '6036';
+ case (self.type = 'KindLabel') 'TemplateBinding_StereotypeLabel';
}
elif element.oclIsKindOf(GeneralizationSet) then
return switch {
- case (self.type = 'KindLabel') '6037';
+ case (self.type = 'KindLabel') 'GeneralizationSet_StereotypeLabel';
}
elif element.oclIsKindOf(InformationFlow) then
return switch {
- case (self.type = 'KindLabel') '6041';
+ case (self.type = 'KindLabel') 'InformationFlow_StereotypeLabel';
}
endif;
} endif;
@@ -1260,26 +1261,26 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return if self.type = 'Reference' then '' /* Context and Constraint Links handled separately */
- elif element.oclIsTypeOf(AssociationClass) then '4017'
- elif element.oclIsTypeOf(Association) then '4001'
- elif element.oclIsTypeOf(Association) then '4019'
- elif element.oclIsTypeOf(Generalization) then '4002'
- elif element.oclIsTypeOf(InterfaceRealization) then '4003'
- elif element.oclIsTypeOf(Substitution) then '4004'
- elif element.oclIsTypeOf(Realization) then '4005'
- elif element.oclIsTypeOf(Abstraction) then '4006'
- elif element.oclIsTypeOf(Usage) then '4007'
- elif element.oclIsTypeOf(Dependency) then '4008'
- elif element.oclIsTypeOf(Dependency) then '4018'
- elif element.oclIsTypeOf(ElementImport) then '4009'
- elif element.oclIsTypeOf(PackageImport) then '4010'
- elif element.oclIsTypeOf(PackageMerge) then '4011'
- elif element.oclIsTypeOf(ProfileApplication) then '4012'
- elif element.oclIsTypeOf(Comment) then'4013'
- elif element.oclIsTypeOf(TemplateBinding) then '4015'
- elif element.oclIsTypeOf(GeneralizationSet) then '4020'
- elif element.oclIsTypeOf(InstanceSpecification) then '4021'
- elif element.oclIsTypeOf(InformationFlow) then '4026'
+ elif element.oclIsTypeOf(AssociationClass) then 'AssociationClass_Edge'
+ elif element.oclIsTypeOf(Association) then 'Association_Edge'
+ elif element.oclIsTypeOf(Association) then 'Association_BranchEdge'
+ elif element.oclIsTypeOf(Generalization) then 'Generalization_Edge'
+ elif element.oclIsTypeOf(InterfaceRealization) then 'InterfaceRealization_Edge'
+ elif element.oclIsTypeOf(Substitution) then 'Substitution_Edge'
+ elif element.oclIsTypeOf(Realization) then 'Realization_Edge'
+ elif element.oclIsTypeOf(Abstraction) then 'Abstraction_Edge'
+ elif element.oclIsTypeOf(Usage) then 'Usage_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_BranchEdge'
+ elif element.oclIsTypeOf(ElementImport) then 'ElementImport_Edge'
+ elif element.oclIsTypeOf(PackageImport) then 'PackageImport_Edge'
+ elif element.oclIsTypeOf(PackageMerge) then 'PackageMerge_Edge'
+ elif element.oclIsTypeOf(ProfileApplication) then 'ProfileApplication_Edge'
+ elif element.oclIsTypeOf(Comment) then'Comment_AnnotatedElementEdge'
+ elif element.oclIsTypeOf(TemplateBinding) then 'TemplateBinding_Edge'
+ elif element.oclIsTypeOf(GeneralizationSet) then 'GeneralizationSet_Edge'
+ elif element.oclIsTypeOf(InstanceSpecification) then 'InstanceSpecification_Edge'
+ elif element.oclIsTypeOf(InformationFlow) then 'InformationFlow_Edge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAComponentDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAComponentDiagram.qvto
index d56d54f5bbb..a05d1ac64dc 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAComponentDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAComponentDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
@@ -149,15 +150,15 @@ mapping uml::Interface::fillReception(node : BasicSemanticCompartment) : Sequenc
}
mapping Property::toPropertyInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '1';
+ result.type := 'Property_InterfaceAttributeLabel';
}
mapping Operation::toOperationInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '5';
+ result.type := 'Operation_InterfaceOperationLabel';
}
mapping Reception::toReceptionInInterface(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '6';
+ result.type := 'Reception_InterfaceReceptionLabel';
}
@@ -186,17 +187,17 @@ mapping UMLConnector::toPapyrusConnector() : Connector inherits Connector::toPap
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(Component) then '2002'
- elif element.oclIsTypeOf(Dependency) then '3203'
- elif element.oclIsTypeOf(Package) then '3200'
- elif element.oclIsTypeOf(Port) then '3069'
- elif element.oclIsTypeOf(Comment) then '3201'
- elif element.oclIsTypeOf(Interface) then '3205'
- elif element.oclIsTypeOf(Model) then '3202'
- elif element.oclIsTypeOf(Property) then '1'
- elif element.oclIsTypeOf(Constraint) then '3199'
- elif element.oclIsTypeOf(Operation) then '5'
- elif element.oclIsTypeOf(Reception) then '6'
+ if element.oclIsTypeOf(Component) then 'Component_PackagedElementShape'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_Shape'
+ elif element.oclIsTypeOf(Package) then 'Package_Shape'
+ elif element.oclIsTypeOf(Port) then 'Port_Shape'
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(Interface) then 'Interface_ClassifierShape'
+ elif element.oclIsTypeOf(Model) then 'Model_Shape'
+ elif element.oclIsTypeOf(Property) then 'Property_InterfaceAttributeLabel'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_Shape'
+ elif element.oclIsTypeOf(Operation) then 'Operation_InterfaceOperationLabel'
+ elif element.oclIsTypeOf(Reception) then 'Reception_InterfaceReceptionLabel'
else self.fail()
endif;
}
@@ -211,33 +212,33 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsTypeOf(Component) then
return switch {
- case (self.type = 'Name') '5004';
- case (self.type = 'StructureCompartment') '7001';
+ case (self.type = 'Name') 'Component_NameLabel';
+ case (self.type = 'StructureCompartment') 'Component_StructureCompartment';
}
elif element.oclIsTypeOf(Package) then
return switch {
- case (self.type = 'Name') '5254';
- case (self.type = 'PackageContents') '7002';
+ case (self.type = 'Name') 'Package_NameLabel';
+ case (self.type = 'PackageContents') 'Package_PackagedElementCompartment';
}
elif element.oclIsTypeOf(Port) then
return switch {
- case (self.type = 'Name') '5006';
+ case (self.type = 'Name') 'Port_NameLabel';
}
elif element.oclIsTypeOf(Interface) then
return switch {
- case (self.type = 'Name') '5266';
- case (self.type = 'AttributeCompartment') '7008';
- case (self.type = 'ReceptionCompartment') '7009';
+ case (self.type = 'Name') 'Interface_ClassifierNameLabel';
+ case (self.type = 'AttributeCompartment') 'Interface_AttributeCompartment';
+ case (self.type = 'ReceptionCompartment') 'Interface_OperationCompartment';
}
elif element.oclIsTypeOf(Model) then
return switch {
- case (self.type = 'Name') '5262';
- case (self.type = 'StructureCompartment') '7006';
+ case (self.type = 'Name') 'Model_NameLabel';
+ case (self.type = 'StructureCompartment') 'Model_PackagedElementCompartment';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name') '5252';
+ case (self.type = 'Name') 'Constraint_NameLabel';
}
@@ -246,42 +247,42 @@ query View::doGetDecorationType(element : Element) : String{
return if element.oclIsTypeOf(Generalization) then
return switch {
- case (self.type = 'KindLabel') '2';
+ case (self.type = 'KindLabel') 'Generalization_StereotypeLabel';
}
elif element.oclIsTypeOf(Substitution) then
return switch {
- case (self.type='Name') '6006';
- case (self.type = 'NameLabel') '6006';
- case (self.type = 'KindLabel') '6020';
+ case (self.type='Name') 'Substitution_NameLabel';
+ case (self.type = 'NameLabel') 'Substitution_NameLabel';
+ case (self.type = 'KindLabel') 'Substitution_StereotypeLabel';
}
elif element.oclIsTypeOf(Manifestation) then
return switch {
- case (self.type='Name') '6008';
- case (self.type = 'NameLabel') '6008';
- case (self.type = 'KindLabel') '6022';
+ case (self.type='Name') 'Manifestation_NameLabel';
+ case (self.type = 'NameLabel') 'Manifestation_NameLabel';
+ case (self.type = 'KindLabel') 'Manifestation_StereotypeLabel';
}
elif element.oclIsTypeOf(ComponentRealization) then
return switch {
- case (self.type='Name') '3';
- case (self.type = 'NameLabel') '3';
- case (self.type = 'KindLabel') '4';
+ case (self.type='Name') 'ComponentRealization_NameLabel';
+ case (self.type = 'NameLabel') 'ComponentRealization_NameLabel';
+ case (self.type = 'KindLabel') 'ComponentRealization_StereotypeLabel';
}
elif element.oclIsTypeOf(Abstraction) then
return switch {
- case (self.type='Name') '6007';
- case (self.type = 'NameLabel') '6007';
- case (self.type = 'KindLabel') '6021';
+ case (self.type='Name') 'Abstraction_NameLabel';
+ case (self.type = 'NameLabel') 'Abstraction_NameLabel';
+ case (self.type = 'KindLabel') 'Abstraction_StereotypeLabel';
}
elif element.oclIsTypeOf(Dependency) then
return switch {
- case (self.type='Name') '6009';
- case (self.type = 'NameLabel') '6009';
- case (self.type = 'KindLabel') '6023';
+ case (self.type='Name') 'Dependency_NameLabel';
+ case (self.type = 'NameLabel') 'Dependency_NameLabel';
+ case (self.type = 'KindLabel') 'Dependency_StereotypeLabel';
}
endif
@@ -291,15 +292,15 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return
- if element.oclIsTypeOf(Usage) then '4001'
- elif element.oclIsTypeOf(InterfaceRealization) then '4006'
- elif element.oclIsTypeOf(Generalization) then '4003'
- elif element.oclIsTypeOf(Substitution) then '4012'
- elif element.oclIsTypeOf(Manifestation) then '4014'
- elif element.oclIsTypeOf(ComponentRealization) then '4007'
- elif element.oclIsTypeOf(Abstraction) then '4013'
- elif element.oclIsTypeOf(Dependency) then '4010'
- elif element.oclIsTypeOf(Dependency) then '4017'
+ if element.oclIsTypeOf(Usage) then 'Usage_Edge'
+ elif element.oclIsTypeOf(InterfaceRealization) then 'InterfaceRealization_Edge'
+ elif element.oclIsTypeOf(Generalization) then 'Generalization_Edge'
+ elif element.oclIsTypeOf(Substitution) then 'Substitution_Edge'
+ elif element.oclIsTypeOf(Manifestation) then 'Manifestation_Edge'
+ elif element.oclIsTypeOf(ComponentRealization) then 'ComponentRealization_Edge'
+ elif element.oclIsTypeOf(Abstraction) then 'Abstraction_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_BranchEdge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAProfileDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAProfileDiagram.qvto
index 6864dd95816..2b96a246166 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAProfileDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAProfileDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
@@ -35,27 +36,27 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
end {
//POST ACTION UPDATE meta class to import element
semantics.objectsOfType(UMLConnector)->map toContextLink();
- graphics.objectsOfType(Shape)->select(type = '1002').map addCommentDecoration();
- graphics.objectsOfType(Shape)->select(type = '1014').map addConstraintDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Comment_Shape').map addCommentDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Constraint_PackagedElementShape').map addConstraintDecoration();
}
}
mapping inout Shape::addCommentDecoration() when {
- self.type = '1002' and self.diagram.type = self.getDiagramType()
+ self.type = 'Comment_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '3'; //Comment body
+ type := 'Comment_BodyLabel'; //Comment body
}
}
mapping inout Shape::addConstraintDecoration() when {
- self.type = '1014' and self.diagram.type = self.getDiagramType()
+ self.type = 'Constraint_PackagedElementShape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5063'; //Constraint specification
+ type := 'Constraint_BodyLabel'; //Constraint specification
}
}
@@ -67,7 +68,7 @@ query View::getDiagramType() : String{
mapping UMLConnector::toContextLink() : notation::Connector inherits Connector::toPapyrusConnector when {
self.type = 'Reference' and self.source.element.oclIsKindOf(Constraint) and self.target.element.oclIsKindOf(Namespace)
}{
- result.type := '8500';
+ result.type := 'Constraint_ContextEdge';
self.diagram.map generateDiagram().edges += result;
}
@@ -292,35 +293,35 @@ mapping uml::Class::fillOperation(node : BasicSemanticCompartment) : Sequence(No
}
mapping Operation::toOperationInDataType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3019';
+ result.type := 'Operation_DataTypeOperationLabel';
}
mapping EnumerationLiteral::toEnumerationLiteralInEnumeration(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '1037';
+ result.type := 'EnumerationLiteral_LiteralLabel';
}
mapping Property::toPropertyInDataType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3018';
+ result.type := 'Property_DataTypeAttributeLabel';
}
mapping Property::toPropertyInStereotype(node : Node) : Shape inherits Element::toCompartmentEntry when{
not self.name.startsWith('base_')
}{
- result.type := '3002';
+ result.type := 'Property_ClassAttributeLabel';
}
mapping Operation::toOperationInStereotype(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3020';
+ result.type := 'Operation_ClassOperationLabel';
}
mapping Property::toPropertyInClass(node : Node) : Shape inherits Element::toCompartmentEntry when{
not self.name.startsWith('base_')
}{
- result.type := '3002';
+ result.type := 'Property_ClassAttributeLabel';
}
mapping Operation::toOperationInClass(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3020';
+ result.type := 'Operation_ClassOperationLabel';
}
@@ -349,20 +350,20 @@ mapping UMLConnector::toPapyrusConnector() : Connector inherits Connector::toPap
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(Dependency) then '2014'
- elif element.oclIsTypeOf(Association) then '2015'
- elif element.oclIsTypeOf(Stereotype) then '1026'
- elif element.oclIsTypeOf(Class) and not element.oclAsType(Class).isMetaclass() then '2008' //Class
- elif element.oclIsTypeOf(Class) and element.oclAsType(Class).isMetaclass() then '1031' //Metaclass
- elif element.oclIsTypeOf(Comment) then '1002'
- elif element.oclIsTypeOf(Constraint) then '1014'
- elif element.oclIsTypeOf(Model) then '2005'
- elif element.oclIsTypeOf(Profile) then '1030'
- elif element.oclIsTypeOf(Package) then '2007'
- elif element.oclIsTypeOf(Enumeration) then '2006'
- elif element.oclIsTypeOf(PrimitiveType) then '2009'
- elif element.oclIsTypeOf(DataType) then '2010'
- elif element.oclIsTypeOf(Diagram) then '2016'
+ if element.oclIsTypeOf(Dependency) then 'Dependency_Shape'
+ elif element.oclIsTypeOf(Association) then 'Association_Shape'
+ elif element.oclIsTypeOf(Stereotype) then 'Stereotype_Shape'
+ elif element.oclIsTypeOf(Class) and not element.oclAsType(Class).isMetaclass() then 'Class_Shape' //Class
+ elif element.oclIsTypeOf(Class) and element.oclAsType(Class).isMetaclass() then 'Class_MetaclassShape' //Metaclass
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_PackagedElementShape'
+ elif element.oclIsTypeOf(Model) then 'Model_Shape'
+ elif element.oclIsTypeOf(Profile) then 'Profile_Shape'
+ elif element.oclIsTypeOf(Package) then 'Package_Shape'
+ elif element.oclIsTypeOf(Enumeration) then 'Enumeration_Shape'
+ elif element.oclIsTypeOf(PrimitiveType) then 'PrimitiveType_Shape'
+ elif element.oclIsTypeOf(DataType) then 'DataType_Shape'
+ elif element.oclIsTypeOf(Diagram) then 'Diagram_ShortcutShape'
else self.fail()
endif;
}
@@ -390,95 +391,95 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsTypeOf(Stereotype) then
return switch {
- case (self.type = 'Name') '1034';
- case (self.type = 'AttributeCompartment') '1071';
- case (self.type = 'OperationCompartment') '1019';
+ case (self.type = 'Name') 'Stereotype_NameLabel';
+ case (self.type = 'AttributeCompartment') 'Stereotype_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'Stereotype_OperationCompartment';
}
elif element.oclIsTypeOf(Class) and not element.oclAsType(Class).isMetaclass() then //Class
return switch {
- case (self.type = 'Name') '5029';
- case (self.type = 'OperationCompartment') '7018';
- case (self.type = 'AttributeCompartment') '7017';
+ case (self.type = 'Name') 'Class_NameLabel';
+ case (self.type = 'OperationCompartment') 'Class_OperationCompartment';
+ case (self.type = 'AttributeCompartment') 'Class_AttributeCompartment';
}
elif element.oclIsTypeOf(Class) and element.oclAsType(Class).isMetaclass() then //Metaclass
return switch {
- case (self.type = 'Name') '1084';
+ case (self.type = 'Name') 'Class_MetaclassNameLabel';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name') '1015';
+ case (self.type = 'Name') 'Constraint_NameLabel';
}
elif element.oclIsTypeOf(Model) then
return switch {
- case (self.type = 'Name') '5020';
- case (self.type = 'StructureCompartment') '1057';
+ case (self.type = 'Name') 'Model_NameLabel';
+ case (self.type = 'StructureCompartment') 'Model_PackagedElementCompartment';
}
elif element.oclIsTypeOf(Profile) then
return switch {
- case (self.type = 'StructureCompartment') '1042';
+ case (self.type = 'StructureCompartment') 'Profile_PackagedElementCompartment';
}
elif element.oclIsTypeOf(Package) then
return switch {
- case (self.type = 'Name') '5026';
- case (self.type = 'PackageContents') '1005';
+ case (self.type = 'Name') 'Package_NameLabel';
+ case (self.type = 'PackageContents') 'Package_PackagedElementCompartment';
}
elif element.oclIsTypeOf(Enumeration) then
return switch {
- case (self.type = 'Name') '5023';
- case (self.type = 'EnumerationCompartment') '1063';
+ case (self.type = 'Name') 'Enumeration_NameLabel';
+ case (self.type = 'EnumerationCompartment') 'Enumeration_LiteralCompartment';
}
elif element.oclIsTypeOf(PrimitiveType) then
return switch {
- case (self.type = 'Name') '5032';
+ case (self.type = 'Name') 'PrimitiveType_NameLabel';
}
elif element.oclIsTypeOf(DataType) then
return switch {
- case (self.type = 'Name') '5035';
- case (self.type = 'AttributeCompartment') '1067';
- case (self.type = 'OperationCompartment') '1068'; //TODO: Disable?
+ case (self.type = 'Name') 'DataType_NameLabel';
+ case (self.type = 'AttributeCompartment') 'DataType_AttributeCompartment';
+ case (self.type = 'OperationCompartment') 'DataType_OperationCompartment'; //TODO: Disable?
}
elif element.oclIsTypeOf(Diagram) then
return switch {
- case (self.type = 'Name') '2';
+ case (self.type = 'Name') 'Diagram_NameLabel';
}
endif
} else {
return if element.oclIsTypeOf(Association) then
return switch {
- case (self.type='Name') '6002';
- case (self.type = 'KindLabel') '6001';
- case (self.type = 'NameLabel') '6002';
+ case (self.type='Name') 'Association_NameLabel';
+ case (self.type = 'KindLabel') 'Association_StereotypeLabel';
+ case (self.type = 'NameLabel') 'Association_NameLabel';
- case (self.type = 'FromMultiplicityLabel') '6033';
- case (self.type = 'ToMultiplicityLabel') '6034';
+ case (self.type = 'FromMultiplicityLabel') 'Association_SourceMultiplicityLabel';
+ case (self.type = 'ToMultiplicityLabel') 'Association_TargetMultiplicityLabel';
}
elif element.oclIsTypeOf(Generalization) then
return switch {
- case (self.type = 'KindLabel') '6007';
+ case (self.type = 'KindLabel') 'Generalization_StereotypeLabel';
}
elif element.oclIsTypeOf(Dependency) then
return switch {
- case (self.type='Name') '6026';
- case (self.type = 'NameLabel') '6026';
- case (self.type = 'KindLabel') '6027';
+ case (self.type='Name') 'Dependency_NameLabel';
+ case (self.type = 'NameLabel') 'Dependency_NameLabel';
+ case (self.type = 'KindLabel') 'Dependency_StereotypeLabel';
}
elif element.oclIsTypeOf(ElementImport) then
return switch {
- case (self.type = 'KindLabel') '6021';
+ case (self.type = 'KindLabel') 'ElementImport_StereotypeLabel';
}
elif element.oclIsTypeOf(PackageImport) then
return switch {
- case (self.type = 'KindLabel') '6022';
+ case (self.type = 'KindLabel') 'PackageImport_StereotypeLabel';
}
endif
} endif;
@@ -488,15 +489,15 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return
if self.type = 'Reference' then '' /* Context Links handled separately */
- elif element.oclIsTypeOf(Extension) then '1013'
- elif element.oclIsTypeOf(Association) then '4001'
- elif element.oclIsTypeOf(ProfileApplication) then '1045'
- elif element.oclIsTypeOf(Association) then '4019'
- elif element.oclIsTypeOf(Generalization) then '4002'
- elif element.oclIsTypeOf(Dependency) then '4008'
- elif element.oclIsTypeOf(Dependency) then '4018'
- elif element.oclIsTypeOf(ElementImport) then '1064'
- elif element.oclIsTypeOf(PackageImport) then '1065'
+ elif element.oclIsTypeOf(Extension) then 'Extension_Edge'
+ elif element.oclIsTypeOf(Association) then 'Association_Edge'
+ elif element.oclIsTypeOf(ProfileApplication) then 'ProfileApplication_Edge'
+ elif element.oclIsTypeOf(Association) then 'Association_BranchEdge'
+ elif element.oclIsTypeOf(Generalization) then 'Generalization_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_BranchEdge'
+ elif element.oclIsTypeOf(ElementImport) then 'ElementImport_Edge'
+ elif element.oclIsTypeOf(PackageImport) then 'PackageImport_Edge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSASequenceDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSASequenceDiagram.qvto
index 0efe76c7c06..1f5f112b47b 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSASequenceDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSASequenceDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
@@ -32,31 +33,31 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
self.type = 'Sequence'
}{
end {
- graphics.objectsOfType(Shape)->select(type = '3003').map fixExecutionSpecification();
- graphics.objectsOfType(Shape)->select(type = '3001').map fixLifelineHeight();
- graphics.objectsOfType(Shape)->select(type = '3017').map fixStateInvariant();
+ graphics.objectsOfType(Shape)->select(type = 'BehaviorExecutionSpecification_Shape').map fixExecutionSpecification();
+ graphics.objectsOfType(Shape)->select(type = 'Lifeline_Shape').map fixLifelineHeight();
+ graphics.objectsOfType(Shape)->select(type = 'StateInvariant_Shape').map fixStateInvariant();
- graphics.objectsOfType(Shape)->select(type = '3009').map addCommentDecoration();
- graphics.objectsOfType(Shape)->select(type = '3008').map addConstraintDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Comment_Shape').map addCommentDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Constraint_Shape').map addConstraintDecoration();
}
}
mapping inout Shape::addCommentDecoration() when {
- self.type = '3009' and self.diagram.type = self.getDiagramType()
+ self.type = 'Comment_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5006'; //Comment body
+ type := 'Comment_BodyLabel'; //Comment body
}
}
mapping inout Shape::addConstraintDecoration() when {
- self.type = '3008' and self.diagram.type = self.getDiagramType()
+ self.type = 'Constraint_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5012'; //Constraint specification
+ type := 'Constraint_BodyLabel'; //Constraint specification
}
}
@@ -224,25 +225,25 @@ mapping UMLConnector::toPapyrusConnector() : Connector inherits Connector::toPap
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(TimeObservation) then '3020'
- elif element.oclIsTypeOf(InteractionUse) then '3002'
- elif element.oclIsTypeOf(CombinedFragment) then '3004'
- elif element.oclIsTypeOf(CombinedFragment) then '3018'
- elif element.oclIsTypeOf(Comment) then '3009'
- elif element.oclIsTypeOf(Lifeline) then '3001'
- elif element.oclIsTypeOf(InteractionOperand) then '3005'
- elif element.oclIsTypeOf(TimeConstraint) then '3019'
- elif element.oclIsTypeOf(StateInvariant) then '3017'
- elif element.oclIsTypeOf(Continuation) then '3016'
- elif element.oclIsTypeOf(Interaction) then '2001'
- elif element.oclIsTypeOf(Constraint) then '3008'
- elif element.oclIsTypeOf(DurationConstraint) then '3021'
- elif element.oclIsTypeOf(DurationObservation) then '3024'
- elif element.oclIsTypeOf(ConsiderIgnoreFragment) then '3007'
- elif element.oclIsTypeOf(ActionExecutionSpecification) then '3006'
- elif element.oclIsTypeOf(DurationConstraint) then '3023'
- elif element.oclIsTypeOf(DestructionOccurrenceSpecification) then '3022'
- elif element.oclIsTypeOf(BehaviorExecutionSpecification) then '3003'
+ if element.oclIsTypeOf(TimeObservation) then 'TimeObservation_Shape'
+ elif element.oclIsTypeOf(InteractionUse) then 'InteractionUse_Shape'
+ elif element.oclIsTypeOf(CombinedFragment) then 'CombinedFragment_Shape'
+ elif element.oclIsTypeOf(CombinedFragment) then 'CombinedFragment_CoRegionShape'
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(Lifeline) then 'Lifeline_Shape'
+ elif element.oclIsTypeOf(InteractionOperand) then 'InteractionOperand_Shape'
+ elif element.oclIsTypeOf(TimeConstraint) then 'TimeConstraint_Shape'
+ elif element.oclIsTypeOf(StateInvariant) then 'StateInvariant_Shape'
+ elif element.oclIsTypeOf(Continuation) then 'Continuation_Shape'
+ elif element.oclIsTypeOf(Interaction) then 'Interaction_Shape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_Shape'
+ elif element.oclIsTypeOf(DurationConstraint) then 'DurationConstraint_Shape'
+ elif element.oclIsTypeOf(DurationObservation) then 'DurationObservation_Shape'
+ elif element.oclIsTypeOf(ConsiderIgnoreFragment) then 'ConsiderIgnoreFragment_Shape'
+ elif element.oclIsTypeOf(ActionExecutionSpecification) then 'ActionExecutionSpecification_Shape'
+ elif element.oclIsTypeOf(DurationConstraint) then 'DurationConstraint_Shape_CN'
+ elif element.oclIsTypeOf(DestructionOccurrenceSpecification) then 'DestructionOccurrenceSpecification_Shape'
+ elif element.oclIsTypeOf(BehaviorExecutionSpecification) then 'BehaviorExecutionSpecification_Shape'
else self.fail()
endif;
}
@@ -269,94 +270,94 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsTypeOf(InteractionUse) then
return switch {
- case (self.type = 'Name') '5003';
+ case (self.type = 'Name') 'InteractionUse_NameLabel';
}
elif element.oclIsTypeOf(Lifeline) then
return switch {
- case (self.type = 'Name') '5002';
+ case (self.type = 'Name') 'Lifeline_NameLabel';
}
elif element.oclIsTypeOf(StateInvariant) then
return switch {
- case (self.type = 'Name') '5008';
+ case (self.type = 'Name') 'StateInvariant_NameLabel';
}
elif element.oclIsTypeOf(InteractionOperand) then
return switch {
- case (self.type.oclIsUndefined() or self.type = '') '7004';
+ case (self.type.oclIsUndefined() or self.type = '') 'CombinedFragment_SubfragmentCompartment';
}
elif element.oclIsTypeOf(Continuation) then
return switch {
- case (self.type = 'Name') '5007';
+ case (self.type = 'Name') 'Continuation_NameLabel';
}
elif element.oclIsTypeOf(Interaction) then
return switch {
- case (self.type = 'Name') '5001';
- case (self.type = 'interaction_compartment') '7001';
+ case (self.type = 'Name') 'Interaction_NameLabel';
+ case (self.type = 'interaction_compartment') 'Interaction_SubfragmentCompartment';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name') '5005';
+ case (self.type = 'Name') 'Constraint_NameLabel';
}
endif
} else {
return if element.oclIsTypeOf(Message) and (element.oclIsKindOf(uml::InteractionFragment)) and (element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Lifeline)) then
return switch {
- case (self.type='Name') '6001';
- case (self.type = 'NameLabel') '6001';
- case (self.type = 'KindLabel') '6008';
+ case (self.type='Name') 'Message_SynchNameLabel';
+ case (self.type = 'NameLabel') 'Message_SynchNameLabel';
+ case (self.type = 'KindLabel') 'Message_SynchStereotypeLabel';
}
elif element.oclIsTypeOf(Message) and ((element.oclIsKindOf(uml::Lifeline) or element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Gate))) and true then
return switch {
- case (self.type = 'NameLabel') '6002';
- case (self.type = 'KindLabel') '6009';
+ case (self.type = 'NameLabel') 'Message_AsynchNameLabel';
+ case (self.type = 'KindLabel') 'Message_AsynchStereotypeLabel';
}
elif element.oclIsTypeOf(Message) and (element.oclIsKindOf(uml::InteractionFragment)) and ((element.oclIsKindOf(uml::Lifeline) or element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Gate))) then
return switch {
- case (self.type = 'NameLabel') '6003';
- case (self.type = 'KindLabel') '6010';
+ case (self.type = 'NameLabel') 'Message_ReplyNameLabel';
+ case (self.type = 'KindLabel') 'Message_ReplyStereotypeLabel';
}
elif element.oclIsTypeOf(Message) and (element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Lifeline)) and (element.oclIsKindOf(uml::Lifeline)) then
return switch {
- case (self.type = 'NameLabel') '6004';
- case (self.type = 'KindLabel') '6011';
+ case (self.type = 'NameLabel') 'Message_CreateNameLabel';
+ case (self.type = 'KindLabel') 'Message_CreateStereotypeLabel';
}
elif element.oclIsTypeOf(Message) and (element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Lifeline)) and (element.oclIsKindOf(uml::DestructionOccurrenceSpecification) or element.oclIsKindOf(uml::Lifeline)) then
return switch {
- case (self.type = 'NameLabel') '6005';
- case (self.type = 'KindLabel') '6012';
+ case (self.type = 'NameLabel') 'Message_DeleteNameLabel';
+ case (self.type = 'KindLabel') 'Message_DeleteStereotypeLabel';
}
elif element.oclIsTypeOf(Message) and ((element.oclIsKindOf(uml::Lifeline) or element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Gate))) and (element.oclIsKindOf(uml::Interaction)) then
return switch {
- case (self.type = 'NameLabel') '6006';
- case (self.type = 'KindLabel') '6013';
+ case (self.type = 'NameLabel') 'Message_LostNameLabel';
+ case (self.type = 'KindLabel') 'Message_LostStereotypeLabel';
}
elif element.oclIsTypeOf(Message) and (element.oclIsKindOf(uml::Interaction)) and ((element.oclIsKindOf(uml::Lifeline) or element.oclIsKindOf(uml::InteractionFragment) or element.oclIsKindOf(uml::Gate))) then
return switch {
- case (self.type = 'NameLabel') '6007';
- case (self.type = 'KindLabel') '6014';
+ case (self.type = 'NameLabel') 'Message_FoundNameLabel';
+ case (self.type = 'KindLabel') 'Message_FoundStereotypeLabel';
}
elif element.oclIsTypeOf(GeneralOrdering) then
return switch {
- case (self.type = 'KindLabel') '6015';
+ case (self.type = 'KindLabel') 'GeneralOrdering_StereotypeLabel';
}
endif
@@ -366,14 +367,14 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return
- if element.oclIsTypeOf(Message) then '4003'
- elif element.oclIsTypeOf(Message) then '4004'
- elif element.oclIsTypeOf(Message) then '4005'
- elif element.oclIsTypeOf(Message) then '4006'
- elif element.oclIsTypeOf(Message) then '4007'
- elif element.oclIsTypeOf(Message) then '4008'
- elif element.oclIsTypeOf(Message) then '4009'
- elif element.oclIsTypeOf(GeneralOrdering) then '4012'
+ if element.oclIsTypeOf(Message) then 'Message_SynchEdge'
+ elif element.oclIsTypeOf(Message) then 'Message_AsynchEdge'
+ elif element.oclIsTypeOf(Message) then 'Message_ReplyEdge'
+ elif element.oclIsTypeOf(Message) then 'Message_CreateEdge'
+ elif element.oclIsTypeOf(Message) then 'Message_DeleteEdge'
+ elif element.oclIsTypeOf(Message) then 'Message_LostEdge'
+ elif element.oclIsTypeOf(Message) then 'Message_FoundEdge'
+ elif element.oclIsTypeOf(GeneralOrdering) then 'GeneralOrdering_Edge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStateMachineDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStateMachineDiagram.qvto
index 355488bd9f4..17ffb854d44 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStateMachineDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStateMachineDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
@@ -32,24 +33,24 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
self.type = 'Statechart'
}{
end {
- graphics.objectsOfType(DecorationNode)->select(type = '3002').map addInRegion();
- graphics.objectsOfType(Shape)->select(type = '2000').map createIntermediateCompartment();
- graphics.objectsOfType(Shape)->select(type = '6000').map createStructureCompartment();
- graphics.objectsOfType(DecorationNode)->select(type = '2001').map addLayout();
- graphics.objectsOfType(DecorationNode)->select(type = '6001').map fixLayout();
+ graphics.objectsOfType(DecorationNode)->select(type = 'Region_SubvertexCompartment').map addInRegion();
+ graphics.objectsOfType(Shape)->select(type = 'StateMachine_Shape').map createIntermediateCompartment();
+ graphics.objectsOfType(Shape)->select(type = 'State_Shape').map createStructureCompartment();
+ graphics.objectsOfType(DecorationNode)->select(type = 'StateMachine_NameLabel').map addLayout();
+ graphics.objectsOfType(DecorationNode)->select(type = 'State_NameLabel').map fixLayout();
- graphics.objectsOfType(Shape)->select(type='666').map addCommentDecoration();
- graphics.objectsOfType(Shape)->select(type = '668').map addConstraintDecoration();
+ graphics.objectsOfType(Shape)->select(type='Comment_Shape').map addCommentDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Constraint_Shape').map addConstraintDecoration();
}
}
mapping inout Shape::createIntermediateCompartment() {
var compartment := object DecorationNode {
- type := '2002';
+ type := 'StateMachine_RegionCompartment';
layoutConstraint := object Bounds{}
};
- compartment.children := self.children->select(type = '3000');
+ compartment.children := self.children->select(type = 'Region_Shape');
children := children->insertAt(2, compartment); /* Required for layout: the Structure Compartment of the Region must be in 2nd position */
}
@@ -59,7 +60,7 @@ mapping inout DecorationNode::addInRegion() {
var currentBounds := self.layoutConstraint.oclAsType(Bounds);
var region := object Shape {
- type := '3000';
+ type := 'Region_Shape';
layoutConstraint := object Bounds{
x := currentBounds.x;
y := currentBounds.y;
@@ -82,15 +83,15 @@ mapping inout DecorationNode::addInRegion() {
}
mapping inout Shape::createStructureCompartment() when {
- not self.children->exists(type = '6002')
+ not self.children->exists(type = 'State_RegionCompartment')
}{
var compartment := object DecorationNode {
- type := '6002';
- visible := self.children->exists(type='3000');
+ type := 'State_RegionCompartment';
+ visible := self.children->exists(type='Region_Shape');
layoutConstraint := object Bounds{};
};
- compartment.children += children->select(type = '3000');
+ compartment.children += children->select(type = 'Region_Shape');
children := children->insertAt(2, compartment);
}
@@ -128,21 +129,21 @@ mapping UMLShapeCompartment::toStructureCompartment() : DecorationNode inherits
}
mapping inout Shape::addCommentDecoration() when {
- self.type = '666' and self.diagram.type = self.getDiagramType()
+ self.type = 'Comment_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '6666';
+ type := 'Comment_BodyLabel';
}
}
mapping inout Shape::addConstraintDecoration() when {
- self.type = '668' and self.diagram.type = self.getDiagramType()
+ self.type = 'Constraint_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '6669'; //Constraint specification
+ type := 'Constraint_BodyLabel'; //Constraint specification
}
}
@@ -205,11 +206,11 @@ mapping uml::State::fillBehavior(node : BasicSemanticCompartment) : Sequence(Nod
}
mapping Transition::toTransitionIn(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '680';
+ result.type := 'Transition_InternalTransitionLabel';
}
mapping Behavior::toBehaviorIn(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '690';
+ result.type := 'Behavior_EntryBehaviorLabel';
}
@@ -231,7 +232,7 @@ mapping UMLConnector::toPapyrusConnector() : Connector inherits Connector::toPap
mapping UMLConnector::toCommentLink() : Connector inherits Connector::toCommentLink when{
self.type='Reference'
}{
- result.type :='667';
+ result.type :='Comment_AnnotatedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -242,7 +243,7 @@ mapping UMLConnector::toConstraintLink() : Connector inherits Connector::toPapyr
self.target.element.oclIsKindOf(Constraint)
)
}{
- result.type :='670';
+ result.type :='Constraint_ConstrainedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -252,23 +253,23 @@ mapping UMLConnector::toConstraintLink() : Connector inherits Connector::toPapyr
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(Comment) then '666'
- elif element.oclIsTypeOf(FinalState) then '5000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::join then '9000'
- elif element.oclIsTypeOf(State) then '6000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::shallowHistory then '13000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::terminate then '15000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::choice then '11000'
- elif element.oclIsTypeOf(Constraint) then '668'
- elif element.oclIsTypeOf(StateMachine) then '2000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::fork then '10000'
- elif element.oclIsTypeOf(Region) then '3000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::junction then '12000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::deepHistory then '14000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::initial then '8000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::entryPoint then '16000'
- elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::exitPoint then '17000'
- elif element.oclIsTypeOf(ConnectionPointReference) then '18000'
+ if element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(FinalState) then 'FinalState_Shape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::join then 'Pseudostate_JoinShape'
+ elif element.oclIsTypeOf(State) then 'State_Shape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::shallowHistory then 'Pseudostate_ShallowHistoryShape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::terminate then 'Pseudostate_TerminateShape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::choice then 'Pseudostate_ChoiceShape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_Shape'
+ elif element.oclIsTypeOf(StateMachine) then 'StateMachine_Shape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::fork then 'Pseudostate_ForkShape'
+ elif element.oclIsTypeOf(Region) then 'Region_Shape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::junction then 'Pseudostate_JunctionShape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::deepHistory then 'Pseudostate_DeepHistoryShape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::initial then 'Pseudostate_InitialShape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::entryPoint then 'Pseudostate_EntryPointShape'
+ elif element.oclIsTypeOf(Pseudostate) and element.oclAsType(Pseudostate).kind = PseudostateKind::exitPoint then 'Pseudostate_ExitPointShape'
+ elif element.oclIsTypeOf(ConnectionPointReference) then 'ConnectionPointReference_Shape'
else self.fail()
endif;
}
@@ -296,84 +297,84 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '11001';
+ case (self.type = 'Name') 'Pseudostate_ChoiceFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '17001';
+ case (self.type = 'Name') 'Pseudostate_ExitPointFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '13001';
+ case (self.type = 'Name') 'Pseudostate_ShallowHistoryFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '9001';
+ case (self.type = 'Name') 'Pseudostate_JoinFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '8001';
+ case (self.type = 'Name') 'Pseudostate_InitialFloatingNameLabel';
}
elif element.oclIsTypeOf(Region) then
return switch {
- case (self.type = 'Region' or self.type = '') '3002';
+ case (self.type = 'Region' or self.type = '') 'Region_SubvertexCompartment';
}
elif element.oclIsTypeOf(ConnectionPointReference) then
return switch {
- case (self.type = 'Name') '18001';
+ case (self.type = 'Name') 'ConnectionPointReference_NameLabel';
}
elif element.oclIsTypeOf(State) then
return switch {
- case (self.type = 'Name') '6001';
+ case (self.type = 'Name') 'State_NameLabel';
}
elif element.oclIsTypeOf(FinalState) then
return switch {
- case (self.type = 'Name') '5001';
+ case (self.type = 'Name') 'FinalState_FloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '14001';
+ case (self.type = 'Name') 'Pseudostate_DeepHistoryFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '15001';
+ case (self.type = 'Name') 'Pseudostate_TerminateFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '10001';
+ case (self.type = 'Name') 'Pseudostate_ForkFloatingNameLabel';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '16001';
+ case (self.type = 'Name') 'Pseudostate_EntryPointFloatingNameLabel';
}
elif element.oclIsTypeOf(StateMachine) then
return switch {
- case (self.type = 'Name') '2001';
- case (self.type = 'StructureCompartment') '2002';
+ case (self.type = 'Name') 'StateMachine_NameLabel';
+ case (self.type = 'StructureCompartment') 'StateMachine_RegionCompartment';
}
elif element.oclIsTypeOf(Pseudostate) then
return switch {
- case (self.type = 'Name') '12001';
+ case (self.type = 'Name') 'Pseudostate_JunctionFloatingNameLabel';
}
endif
} else {
return if element.oclIsTypeOf(Transition) then
return switch {
- case (self.type='Name') '7001';
- case (self.type = 'NameLabel') '7001';
+ case (self.type='Name') 'Transition_NameLabel';
+ case (self.type = 'NameLabel') 'Transition_NameLabel';
}
@@ -385,8 +386,8 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return
if self.type = 'Reference' then '' /* Constraint/Comment links handled separately */
- elif element.oclIsTypeOf(Transition) then '7000'
- elif element.oclIsTypeOf(Generalization) then '19000'
+ elif element.oclIsTypeOf(Transition) then 'Transition_Edge'
+ elif element.oclIsTypeOf(Generalization) then 'Generalization_Edge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto
index 237b6147bc1..df9107b9148 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto
@@ -8,7 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus - bugs 461980, 497841, 498282
+ * Christian W. Damus - bugs 461980, 497841, 498282, 465656
*****************************************************************************/
import RSAToPapyrus;
@@ -36,28 +36,28 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
}
end {
- graphics.objectsOfType(Shape)->select(type = '2109').map addCommentDecoration();
- graphics.objectsOfType(Shape)->select(type = '2114').map addConstraintDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Comment_Shape').map addCommentDecoration();
+ graphics.objectsOfType(Shape)->select(type = 'Constraint_Shape').map addConstraintDecoration();
}
}
mapping inout Shape::addCommentDecoration() when {
- self.type = '2109' and self.diagram.type = self.getDiagramType()
+ self.type = 'Comment_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '5192'; //Comment body
+ type := 'Comment_BodyLabel'; //Comment body
}
}
mapping inout Shape::addConstraintDecoration() when {
- self.type = '2114' and self.diagram.type = self.getDiagramType()
+ self.type = 'Constraint_Shape' and self.diagram.type = self.getDiagramType()
} {
self.children += object DecorationNode{
- type := '6039'; //Constraint specification
+ type := 'Constraint_BodyLabel'; //Constraint specification
}
}
@@ -85,8 +85,8 @@ mapping UMLShapeCompartment::toStructureCompartment() : DecorationNode inherits
}
query Diagram::getDiagramFrame() : Node {
- // 2073 is the old style Class_Shape used as the structure frame
- return self.children->any(type = '2073').oclAsType(notation::Node);
+ // Class_Shape denotes the structure frame in this diagram
+ return self.children->any(type = 'Class_Shape').oclAsType(notation::Node);
}
mapping inout Node::defaultFrameSize() {
@@ -173,7 +173,7 @@ mapping UMLShape::toPapyrusShape() : Shape inherits Shape::toPapyrusShape when {
)
}{
- if (result.type = '3070') {
+ if (result.type = 'Property_Shape') {
// Handle default size of part shape
result.map defaultSize(160, 40);
}
@@ -187,14 +187,14 @@ mapping inout Node::adjustNode() disjuncts
;
mapping inout Node::adjustStructureCompartment() when {
- self.type = '7073'
+ self.type = 'Class_StructureCompartment'
} {
// All ports, even internal ports, are children of the frame
- self.children->select(type = '3069').map hoistPortNode();
+ self.children->select(type = 'Port_Shape').map hoistPortNode();
}
mapping inout Node::adjustPort() when {
- self.type = '3069'
+ self.type = 'Port_Shape'
and self.element.oclIsKindOf(Port)
and self.element.oclAsType(Port).isConjugated
} {
@@ -316,7 +316,7 @@ mapping UMLConnector::toCommentLink() : Connector inherits Connector::toCommentL
self.target.element.oclIsKindOf(Comment)
)
}{
- result.type :='4002';
+ result.type :='Comment_AnnotatedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -327,17 +327,17 @@ mapping UMLConnector::toConstraintLink() : Connector inherits Connector::toPapyr
self.target.element.oclIsKindOf(Constraint)
)
}{
- result.type :='4003';
+ result.type :='Constraint_ConstrainedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
mapping Property::toPropertyInDataType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3101';
+ result.type := 'Property_AttributeLabel';
}
mapping Operation::toOperationInDataType(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3102';
+ result.type := 'Operation_OperationLabel';
}
mapping Reception::toReceptionIn(node : Node) : Shape inherits Element::toCompartmentEntry {
@@ -345,7 +345,7 @@ mapping Reception::toReceptionIn(node : Node) : Shape inherits Element::toCompar
}
mapping EnumerationLiteral::toEnumerationLiteralInEnumeration(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3066';
+ result.type := 'EnumerationLiteral_LiteralLabel';
}
mapping Activity::toActivityIn(node : Node) : Shape inherits Element::toCompartmentEntry {
@@ -425,59 +425,59 @@ mapping UMLConnector::toPapyrusConnector() : notation::Connector inherits Connec
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(DurationInterval) then '2106'
- elif element.oclIsTypeOf(UseCase) then '2082'
- elif element.oclIsTypeOf(Port) then '3069'
- elif element.oclIsTypeOf(LiteralInteger) then '2096'
- elif element.oclIsTypeOf(Node) then '2072'
- elif element.oclIsTypeOf(Class) then '2073'
- elif element.oclIsTypeOf(Expression) then '2103'
- elif element.oclIsTypeOf(IntervalConstraint) then '2112'
- elif element.oclIsTypeOf(InteractionConstraint) then '2113'
- elif element.oclIsTypeOf(TimeConstraint) then '2111'
- elif element.oclIsTypeOf(OpaqueBehavior) then '2065'
- elif element.oclIsTypeOf(Duration) then '2104'
- elif element.oclIsTypeOf(Actor) then '2077'
- elif element.oclIsTypeOf(TimeEvent) then '2089'
- elif element.oclIsTypeOf(DurationConstraint) then '2110'
- //elif element.oclIsTypeOf(Interface) then '2076'
- elif element.oclIsTypeOf(SignalEvent) then '2083'
- elif element.oclIsTypeOf(TimeExpression) then '2102'
- elif element.oclIsTypeOf(Enumeration) then '2067'
- elif element.oclIsTypeOf(OpaqueExpression) then '2101'
- elif element.oclIsTypeOf(LiteralBoolean) then '2095'
- elif element.oclIsTypeOf(AnyReceiveEvent) then '2085'
- elif element.oclIsTypeOf(FunctionBehavior) then '2064'
- elif element.oclIsTypeOf(LiteralUnlimitedNatural) then '2099'
- elif element.oclIsTypeOf(Activity) then '2060'
- elif element.oclIsTypeOf(Signal) then '2081'
- elif element.oclIsTypeOf(Parameter) then '3088'
- elif element.oclIsTypeOf(StringExpression) then '2100'
- elif element.oclIsTypeOf(Interval) then '2107'
- elif element.oclIsTypeOf(PrimitiveType) then '2066'
- elif element.oclIsTypeOf(CollaborationUse) then '3071'
- elif element.oclIsTypeOf(TimeObservation) then '2094'
- elif element.oclIsTypeOf(DeploymentSpecification) then '2078'
- elif element.oclIsTypeOf(StateMachine) then '2063'
- elif element.oclIsTypeOf(Device) then '2070'
- elif element.oclIsTypeOf(Comment) then '2109'
- elif element.oclIsTypeOf(InformationItem) then '2080'
- elif element.oclIsTypeOf(Artifact) then '2079'
- elif element.oclIsTypeOf(Collaboration) then '2075'
- elif element.oclIsTypeOf(ProtocolStateMachine) then '2062'
- elif element.oclIsTypeOf(TimeInterval) then '2105'
- elif element.oclIsTypeOf(CallEvent) then '2084'
- elif element.oclIsTypeOf(InstanceValue) then '2108'
- elif element.oclIsTypeOf(DurationObservation) then '2093'
- elif element.oclIsTypeOf(Property) then '3070'
- elif element.oclIsTypeOf(Constraint) then '2114'
- elif element.oclIsTypeOf(ExecutionEnvironment) then '2071'
- elif element.oclIsTypeOf(LiteralString) then '2098'
- elif element.oclIsTypeOf(DataType) then '2068'
- elif element.oclIsTypeOf(ChangeEvent) then '2088'
- elif element.oclIsTypeOf(Component) then '2069'
- elif element.oclIsTypeOf(LiteralNull) then '2097'
- elif element.oclIsTypeOf(Interaction) then '2061'
+ if element.oclIsTypeOf(DurationInterval) then 'DurationInterval_Shape'
+ elif element.oclIsTypeOf(UseCase) then 'UseCase_Shape'
+ elif element.oclIsTypeOf(Port) then 'Port_Shape'
+ elif element.oclIsTypeOf(LiteralInteger) then 'LiteralInteger_Shape'
+ elif element.oclIsTypeOf(Node) then 'Node_Shape'
+ elif element.oclIsTypeOf(Class) then 'Class_Shape'
+ elif element.oclIsTypeOf(Expression) then 'Expression_Shape'
+ elif element.oclIsTypeOf(IntervalConstraint) then 'IntervalConstraint_Shape'
+ elif element.oclIsTypeOf(InteractionConstraint) then 'InteractionConstraint_Shape'
+ elif element.oclIsTypeOf(TimeConstraint) then 'TimeConstraint_Shape'
+ elif element.oclIsTypeOf(OpaqueBehavior) then 'OpaqueBehavior_Shape'
+ elif element.oclIsTypeOf(Duration) then 'Duration_Shape'
+ elif element.oclIsTypeOf(Actor) then 'Actor_Shape'
+ elif element.oclIsTypeOf(TimeEvent) then 'TimeEvent_Shape'
+ elif element.oclIsTypeOf(DurationConstraint) then 'DurationConstraint_Shape'
+ //elif element.oclIsTypeOf(Interface) then 'Interface_Shape'
+ elif element.oclIsTypeOf(SignalEvent) then 'SignalEvent_Shape'
+ elif element.oclIsTypeOf(TimeExpression) then 'TimeExpression_Shape'
+ elif element.oclIsTypeOf(Enumeration) then 'Enumeration_Shape'
+ elif element.oclIsTypeOf(OpaqueExpression) then 'OpaqueExpression_Shape'
+ elif element.oclIsTypeOf(LiteralBoolean) then 'LiteralBoolean_Shape'
+ elif element.oclIsTypeOf(AnyReceiveEvent) then 'AnyReceiveEvent_Shape'
+ elif element.oclIsTypeOf(FunctionBehavior) then 'FunctionBehavior_Shape'
+ elif element.oclIsTypeOf(LiteralUnlimitedNatural) then 'LiteralUnlimitedNatural_Shape'
+ elif element.oclIsTypeOf(Activity) then 'Activity_Shape'
+ elif element.oclIsTypeOf(Signal) then 'Signal_Shape'
+ elif element.oclIsTypeOf(Parameter) then 'Parameter_Shape'
+ elif element.oclIsTypeOf(StringExpression) then 'StringExpression_PackagedElementShape'
+ elif element.oclIsTypeOf(Interval) then 'Interval_Shape'
+ elif element.oclIsTypeOf(PrimitiveType) then 'PrimitiveType_Shape'
+ elif element.oclIsTypeOf(CollaborationUse) then 'CollaborationUse_Shape'
+ elif element.oclIsTypeOf(TimeObservation) then 'TimeObservation_Shape'
+ elif element.oclIsTypeOf(DeploymentSpecification) then 'DeploymentSpecification_Shape'
+ elif element.oclIsTypeOf(StateMachine) then 'StateMachine_Shape'
+ elif element.oclIsTypeOf(Device) then 'Device_Shape'
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(InformationItem) then 'InformationItem_Shape'
+ elif element.oclIsTypeOf(Artifact) then 'Artifact_Shape'
+ elif element.oclIsTypeOf(Collaboration) then 'Collaboration_Shape'
+ elif element.oclIsTypeOf(ProtocolStateMachine) then 'ProtocolStateMachine_Shape'
+ elif element.oclIsTypeOf(TimeInterval) then 'TimeInterval_Shape'
+ elif element.oclIsTypeOf(CallEvent) then 'CallEvent_Shape'
+ elif element.oclIsTypeOf(InstanceValue) then 'InstanceValue_Shape'
+ elif element.oclIsTypeOf(DurationObservation) then 'DurationObservation_Shape'
+ elif element.oclIsTypeOf(Property) then 'Property_Shape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_Shape'
+ elif element.oclIsTypeOf(ExecutionEnvironment) then 'ExecutionEnvironment_Shape'
+ elif element.oclIsTypeOf(LiteralString) then 'LiteralString_Shape'
+ elif element.oclIsTypeOf(DataType) then 'DataType_Shape'
+ elif element.oclIsTypeOf(ChangeEvent) then 'ChangeEvent_Shape'
+ elif element.oclIsTypeOf(Component) then 'Component_Shape'
+ elif element.oclIsTypeOf(LiteralNull) then 'LiteralNull_Shape'
+ elif element.oclIsTypeOf(Interaction) then 'Interaction_Shape'
else self.fail()
endif;
}
@@ -505,349 +505,349 @@ query View::doGetDecorationType(element : Element) : String{
return if self.container().oclIsKindOf(Node) then {
return if element.oclIsTypeOf(DurationInterval) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5189';
+ case (self.type = 'Name' or self.type = 'PartName') 'DurationInterval_NameLabel';
}
elif element.oclIsTypeOf(UseCase) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5165';
+ case (self.type = 'Name' or self.type = 'PartName') 'UseCase_NameLabel';
}
elif element.oclIsTypeOf(Port) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5125';
+ case (self.type = 'Name' or self.type = 'PartName') 'Port_NameLabel';
}
elif element.oclIsTypeOf(LiteralInteger) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5179';
+ case (self.type = 'Name' or self.type = 'PartName') 'LiteralInteger_NameLabel';
}
elif element.oclIsTypeOf(Node) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5124';
- case (self.type = 'StructureCompartment') '7072';
+ case (self.type = 'Name' or self.type = 'PartName') 'Node_NameLabel';
+ case (self.type = 'StructureCompartment') 'Node_StructureCompartment';
}
elif element.oclIsTypeOf(Class) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5156';
- case (self.type = 'StructureCompartment') '7073';
+ case (self.type = 'Name' or self.type = 'PartName') 'Class_NameLabel';
+ case (self.type = 'StructureCompartment') 'Class_StructureCompartment';
}
elif element.oclIsTypeOf(Expression) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5186';
+ case (self.type = 'Name' or self.type = 'PartName') 'Expression_NameLabel';
}
elif element.oclIsTypeOf(IntervalConstraint) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5195';
+ case (self.type = 'Name' or self.type = 'PartName') 'IntervalConstraint_NameLabel';
}
elif element.oclIsTypeOf(InteractionConstraint) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5196';
+ case (self.type = 'Name' or self.type = 'PartName') 'InteractionConstraint_NameLabel';
}
elif element.oclIsTypeOf(TimeConstraint) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5194';
+ case (self.type = 'Name' or self.type = 'PartName') 'TimeConstraint_NameLabel';
}
elif element.oclIsTypeOf(OpaqueBehavior) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5117';
- case (self.type = 'StructureCompartment') '7068';
+ case (self.type = 'Name' or self.type = 'PartName') 'OpaqueBehavior_NameLabel';
+ case (self.type = 'StructureCompartment') 'OpaqueBehavior_StructureCompartment';
}
elif element.oclIsTypeOf(Duration) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5187';
+ case (self.type = 'Name' or self.type = 'PartName') 'Duration_NameLabel';
}
elif element.oclIsTypeOf(Actor) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5160';
+ case (self.type = 'Name' or self.type = 'PartName') 'Actor_NameLabel';
}
elif element.oclIsTypeOf(TimeEvent) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5172';
+ case (self.type = 'Name' or self.type = 'PartName') 'TimeEvent_NameLabel';
}
elif element.oclIsTypeOf(DurationConstraint) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5193';
+ case (self.type = 'Name' or self.type = 'PartName') 'DurationConstraint_NameLabel';
}
elif element.oclIsTypeOf(Interface) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5159';
+ case (self.type = 'Name' or self.type = 'PartName') 'Interface_NameLabel';
}
elif element.oclIsTypeOf(SignalEvent) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5166';
+ case (self.type = 'Name' or self.type = 'PartName') 'SignalEvent_NameLabel';
}
elif element.oclIsTypeOf(TimeExpression) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5185';
+ case (self.type = 'Name' or self.type = 'PartName') 'TimeExpression_NameLabel';
}
elif element.oclIsTypeOf(Enumeration) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5119';
- case (self.type = 'EnumerationLiteralCompartment') '7048';
+ case (self.type = 'Name' or self.type = 'PartName') 'Enumeration_NameLabel';
+ case (self.type = 'EnumerationLiteralCompartment') 'Enumeration_LiteralCompartment';
}
elif element.oclIsTypeOf(OpaqueExpression) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5184';
+ case (self.type = 'Name' or self.type = 'PartName') 'OpaqueExpression_NameLabel';
}
elif element.oclIsTypeOf(LiteralBoolean) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5178';
+ case (self.type = 'Name' or self.type = 'PartName') 'LiteralBoolean_NameLabel';
}
elif element.oclIsTypeOf(AnyReceiveEvent) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5168';
+ case (self.type = 'Name' or self.type = 'PartName') 'AnyReceiveEvent_NameLabel';
}
elif element.oclIsTypeOf(FunctionBehavior) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5116';
- case (self.type = 'StructureCompartment') '7067';
+ case (self.type = 'Name' or self.type = 'PartName') 'FunctionBehavior_NameLabel';
+ case (self.type = 'StructureCompartment') 'FunctionBehavior_StructureCompartment';
}
elif element.oclIsTypeOf(LiteralUnlimitedNatural) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5182';
+ case (self.type = 'Name' or self.type = 'PartName') 'LiteralUnlimitedNatural_NameLabel';
}
elif element.oclIsTypeOf(Activity) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5112';
- case (self.type = 'StructureCompartment') '7063';
+ case (self.type = 'Name' or self.type = 'PartName') 'Activity_NameLabel';
+ case (self.type = 'StructureCompartment') 'Activity_StructureCompartment';
}
elif element.oclIsTypeOf(Signal) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5164';
+ case (self.type = 'Name' or self.type = 'PartName') 'Signal_NameLabel';
}
elif element.oclIsTypeOf(Parameter) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '6033';
+ case (self.type = 'Name' or self.type = 'PartName') 'Parameter_NameLabel';
}
elif element.oclIsTypeOf(StringExpression) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5183';
+ case (self.type = 'Name' or self.type = 'PartName') 'StringExpression_NameLabel';
}
elif element.oclIsTypeOf(Interval) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5190';
+ case (self.type = 'Name' or self.type = 'PartName') 'Interval_NameLabel';
}
elif element.oclIsTypeOf(PrimitiveType) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5118';
+ case (self.type = 'Name' or self.type = 'PartName') 'PrimitiveType_NameLabel';
}
elif element.oclIsTypeOf(CollaborationUse) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5127';
+ case (self.type = 'Name' or self.type = 'PartName') 'CollaborationUse_NameLabel';
}
elif element.oclIsTypeOf(TimeObservation) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5142';
+ case (self.type = 'Name' or self.type = 'PartName') 'TimeObservation_NameLabel';
}
elif element.oclIsTypeOf(DeploymentSpecification) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5161';
+ case (self.type = 'Name' or self.type = 'PartName') 'DeploymentSpecification_NameLabel';
}
elif element.oclIsTypeOf(StateMachine) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5115';
- case (self.type = 'StructureCompartment') '7066';
+ case (self.type = 'Name' or self.type = 'PartName') 'StateMachine_NameLabel';
+ case (self.type = 'StructureCompartment') 'StateMachine_StructureCompartment';
}
elif element.oclIsTypeOf(Device) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5122';
- case (self.type = 'StructureCompartment') '7070';
+ case (self.type = 'Name' or self.type = 'PartName') 'Device_NameLabel';
+ case (self.type = 'StructureCompartment') 'Device_StructureCompartment';
}
elif element.oclIsTypeOf(InformationItem) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5163';
+ case (self.type = 'Name' or self.type = 'PartName') 'InformationItem_NameLabel';
}
elif element.oclIsTypeOf(Artifact) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5162';
+ case (self.type = 'Name' or self.type = 'PartName') 'Artifact_NameLabel';
}
elif element.oclIsTypeOf(Collaboration) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5158';
- case (self.type = 'StructureCompartment') '7075';
+ case (self.type = 'Name' or self.type = 'PartName') 'Collaboration_NameLabel';
+ case (self.type = 'StructureCompartment') 'Collaboration_StructureCompartment';
}
elif element.oclIsTypeOf(ProtocolStateMachine) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5114';
- case (self.type = 'StructureCompartment') '7065';
+ case (self.type = 'Name' or self.type = 'PartName') 'ProtocolStateMachine_NameLabel';
+ case (self.type = 'StructureCompartment') 'ProtocolStateMachine_StructureCompartment';
}
elif element.oclIsTypeOf(TimeInterval) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5188';
+ case (self.type = 'Name' or self.type = 'PartName') 'TimeInterval_NameLabel';
}
elif element.oclIsTypeOf(CallEvent) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5167';
+ case (self.type = 'Name' or self.type = 'PartName') 'CallEvent_NameLabel';
}
elif element.oclIsTypeOf(InstanceValue) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5191';
+ case (self.type = 'Name' or self.type = 'PartName') 'InstanceValue_NameLabel';
}
elif element.oclIsTypeOf(DurationObservation) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5151';
+ case (self.type = 'Name' or self.type = 'PartName') 'DurationObservation_NameLabel';
}
elif element.oclIsTypeOf(Property) then
return switch {
- case (self.type = 'PartName' or self.type='PartTextCompartment') '5126';
- case (self.type = 'StructureCompartment') '7077';
+ case (self.type = 'PartName' or self.type='PartTextCompartment') 'Property_NameLabel';
+ case (self.type = 'StructureCompartment') 'Property_StructureCompartment';
}
elif element.oclIsTypeOf(Constraint) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5197';
+ case (self.type = 'Name' or self.type = 'PartName') 'Constraint_NameLabel';
}
elif element.oclIsTypeOf(ExecutionEnvironment) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5123';
- case (self.type = 'StructureCompartment') '7071';
+ case (self.type = 'Name' or self.type = 'PartName') 'ExecutionEnvironment_NameLabel';
+ case (self.type = 'StructureCompartment') 'ExecutionEnvironment_StructureCompartment';
}
elif element.oclIsTypeOf(LiteralString) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5181';
+ case (self.type = 'Name' or self.type = 'PartName') 'LiteralString_NameLabel';
}
elif element.oclIsTypeOf(DataType) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5120';
- case (self.type = 'Compartment') '7033';
- case (self.type = 'Compartment') '7034';
+ case (self.type = 'Name' or self.type = 'PartName') 'DataType_NameLabel';
+ case (self.type = 'Compartment') 'DataType_AttributeCompartment';
+ case (self.type = 'Compartment') 'DataType_OperationCompartment';
}
elif element.oclIsTypeOf(ChangeEvent) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5171';
+ case (self.type = 'Name' or self.type = 'PartName') 'ChangeEvent_NameLabel';
}
elif element.oclIsTypeOf(Component) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5121';
- case (self.type = 'StructureCompartment') '7069';
+ case (self.type = 'Name' or self.type = 'PartName') 'Component_NameLabel';
+ case (self.type = 'StructureCompartment') 'Component_StructureCompartment';
}
elif element.oclIsTypeOf(LiteralNull) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5180';
+ case (self.type = 'Name' or self.type = 'PartName') 'LiteralNull_NameLabel';
}
elif element.oclIsTypeOf(Interaction) then
return switch {
- case (self.type = 'Name' or self.type = 'PartName') '5113';
- case (self.type = 'StructureCompartment') '7064';
+ case (self.type = 'Name' or self.type = 'PartName') 'Interaction_NameLabel';
+ case (self.type = 'StructureCompartment') 'Interaction_StructureCompartment';
}
elif element.oclIsTypeOf(Comment) then
return switch {
- case (self.type = 'CommentBody') '5192';
+ case (self.type = 'CommentBody') 'Comment_BodyLabel';
}
endif
} else {
return if element.oclIsTypeOf(ComponentRealization) then
return switch {
- case (self.type='Name') '6001';
- case (self.type = 'NameLabel') '6001';
- case (self.type = 'KindLabel') '6015';
+ case (self.type='Name') 'ComponentRealization_NameLabel';
+ case (self.type = 'NameLabel') 'ComponentRealization_NameLabel';
+ case (self.type = 'KindLabel') 'ComponentRealization_StereotypeLabel';
}
elif element.oclIsTypeOf(InterfaceRealization) then
return switch {
- case (self.type='Name') '6002';
- case (self.type = 'NameLabel') '6002';
- case (self.type = 'KindLabel') '6016';
+ case (self.type='Name') 'InterfaceRealization_NameLabel';
+ case (self.type = 'NameLabel') 'InterfaceRealization_NameLabel';
+ case (self.type = 'KindLabel') 'InterfaceRealization_StereotypeLabel';
}
elif element.oclIsTypeOf(Substitution) then
return switch {
- case (self.type='Name') '6003';
- case (self.type = 'NameLabel') '6003';
- case (self.type = 'KindLabel') '6017';
+ case (self.type='Name') 'Substitution_NameLabel';
+ case (self.type = 'NameLabel') 'Substitution_NameLabel';
+ case (self.type = 'KindLabel') 'Substitution_StereotypeLabel';
}
elif element.oclIsTypeOf(Realization) then
return switch {
- case (self.type='Name') '6004';
- case (self.type = 'NameLabel') '6004';
- case (self.type = 'KindLabel') '6018';
+ case (self.type='Name') 'Realization_NameLabel';
+ case (self.type = 'NameLabel') 'Realization_NameLabel';
+ case (self.type = 'KindLabel') 'Realization_StereotypeLabel';
}
elif element.oclIsTypeOf(Manifestation) then
return switch {
- case (self.type='Name') '6005';
- case (self.type = 'NameLabel') '6005';
- case (self.type = 'KindLabel') '6019';
+ case (self.type='Name') 'Manifestation_NameLabel';
+ case (self.type = 'NameLabel') 'Manifestation_NameLabel';
+ case (self.type = 'KindLabel') 'Manifestation_StereotypeLabel';
}
elif element.oclIsTypeOf(Abstraction) then
return switch {
- case (self.type='Name') '6006';
- case (self.type = 'NameLabel') '6006';
- case (self.type = 'KindLabel') '6020';
+ case (self.type='Name') 'Abstraction_NameLabel';
+ case (self.type = 'NameLabel') 'Abstraction_NameLabel';
+ case (self.type = 'KindLabel') 'Abstraction_StereotypeLabel';
}
elif element.oclIsTypeOf(Usage) then
return switch {
- case (self.type='Name') '6007';
- case (self.type = 'NameLabel') '6007';
- case (self.type = 'KindLabel') '6021';
+ case (self.type='Name') 'Usage_NameLabel';
+ case (self.type = 'NameLabel') 'Usage_NameLabel';
+ case (self.type = 'KindLabel') 'Usage_StereotypeLabel';
}
elif element.oclIsTypeOf(Deployment) then
return switch {
- case (self.type='Name') '6008';
- case (self.type = 'NameLabel') '6008';
- case (self.type = 'KindLabel') '6022';
+ case (self.type='Name') 'Deployment_NameLabel';
+ case (self.type = 'NameLabel') 'Deployment_NameLabel';
+ case (self.type = 'KindLabel') 'Deployment_StereotypeLabel';
}
elif element.oclIsTypeOf(Dependency) then
return switch {
- case (self.type='Name') '6027';
- case (self.type = 'NameLabel') '6027';
- case (self.type = 'KindLabel') '6028';
+ case (self.type='Name') 'Dependency_RoleBindingNameLabel';
+ case (self.type = 'NameLabel') 'Dependency_RoleBindingNameLabel';
+ case (self.type = 'KindLabel') 'Dependency_RoleBindingStereotypeLabel';
}
elif element.oclIsTypeOf(Dependency) then
return switch {
- case (self.type='Name') '6009';
- case (self.type = 'NameLabel') '6009';
- case (self.type = 'KindLabel') '6023';
+ case (self.type='Name') 'Dependency_NameLabel';
+ case (self.type = 'NameLabel') 'Dependency_NameLabel';
+ case (self.type = 'KindLabel') 'Dependency_StereotypeLabel';
}
elif element.oclIsTypeOf(uml::Connector) then
return switch {
- case (self.type='Name') '6050';
- case (self.type = 'KindLabel') '6025';
- case (self.type = 'NameLabel') '6050';
- case (self.type = 'FromMultiplicityLabel') '6051';
- case (self.type = 'ToMultiplicityLabel') '6052';
+ case (self.type='Name') 'Connector_NameLabel';
+ case (self.type = 'KindLabel') 'Connector_StereotypeLabel';
+ case (self.type = 'NameLabel') 'Connector_NameLabel';
+ case (self.type = 'FromMultiplicityLabel') 'Connector_SourceMultiplicityLabel';
+ case (self.type = 'ToMultiplicityLabel') 'Connector_TargetMultiplicityLabel';
}
elif element.oclIsTypeOf(Generalization) then
return switch {
- case (self.type = 'KindLabel') '6024';
+ case (self.type = 'KindLabel') 'Generalization_StereotypeLabel';
}
elif element.oclIsTypeOf(InformationFlow) then
return switch {
- case (self.type = 'KindLabel') '6032';
+ case (self.type = 'KindLabel') 'InformationFlow_StereotypeLabel';
}
endif
} endif;
@@ -857,19 +857,19 @@ query View::doGetDecorationType(element : Element) : String{
query View::getEdgeType(element : Element) : String {
return
if self.type = 'Reference' then '' /* Comment/Constraint Links handled separately */
- elif element.oclIsTypeOf(ComponentRealization) then '4004'
- elif element.oclIsTypeOf(InterfaceRealization) then '4005'
- elif element.oclIsTypeOf(Substitution) then '4011'
- elif element.oclIsTypeOf(Realization) then '4006'
- elif element.oclIsTypeOf(Manifestation) then '4012'
- elif element.oclIsTypeOf(Abstraction) then '4007'
- elif element.oclIsTypeOf(Usage) then '4008'
- elif element.oclIsTypeOf(Deployment) then '4009'
- elif element.oclIsTypeOf(Dependency) then '4017'
- elif element.oclIsTypeOf(Dependency) then '4010'
- elif element.oclIsTypeOf(uml::Connector) then '4013'
- elif element.oclIsTypeOf(Generalization) then '4015'
- elif element.oclIsTypeOf(InformationFlow) then '4021'
+ elif element.oclIsTypeOf(ComponentRealization) then 'ComponentRealization_Edge'
+ elif element.oclIsTypeOf(InterfaceRealization) then 'InterfaceRealization_Edge'
+ elif element.oclIsTypeOf(Substitution) then 'Substitution_Edge'
+ elif element.oclIsTypeOf(Realization) then 'Realization_Edge'
+ elif element.oclIsTypeOf(Manifestation) then 'Manifestation_Edge'
+ elif element.oclIsTypeOf(Abstraction) then 'Abstraction_Edge'
+ elif element.oclIsTypeOf(Usage) then 'Usage_Edge'
+ elif element.oclIsTypeOf(Deployment) then 'Deployment_Edge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_RoleBindingEdge'
+ elif element.oclIsTypeOf(Dependency) then 'Dependency_Edge'
+ elif element.oclIsTypeOf(uml::Connector) then 'Connector_Edge'
+ elif element.oclIsTypeOf(Generalization) then 'Generalization_Edge'
+ elif element.oclIsTypeOf(InformationFlow) then 'InformationFlow_Edge'
else self.fail()
endif;
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAUsecaseDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAUsecaseDiagram.qvto
index 5d906028a1c..1d2e3f930e3 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAUsecaseDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAUsecaseDiagram.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
+ * Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 465656
*****************************************************************************/
import RSAToPapyrus;
import org.eclipse.papyrus.m2m.qvto.Properties;
@@ -36,15 +37,15 @@ mapping notation::Diagram::generateDiagram() : notation::Diagram inherits Diagra
}{
end {
//Remove Generalization#name since it is not supported in Papyrus
- result.edges->select(e | e.type = '4010').children->selectByType(DecorationNode)->select(type.oclIsUndefined()).map delete();
+ result.edges->select(e | e.type = 'Generalization_Edge').children->selectByType(DecorationNode)->select(type.oclIsUndefined()).map delete();
//Change the position of the Actor#name Label, since it is fixed in RSA and Floating in Papyrus
- graphics.objectsOfType(DecorationNode)->select(type = '5014').map fixActorLabelPosition();
+ graphics.objectsOfType(DecorationNode)->select(type = 'Actor_NameLabel').map fixActorLabelPosition();
}
}
mapping inout notation::DecorationNode::fixActorLabelPosition() when {
- self.type = '5014'
+ self.type = 'Actor_NameLabel'
} {
self.layoutConstraint := object Location {
x := 20;
@@ -121,7 +122,7 @@ mapping UMLConnector::toCommentLink() : Connector inherits Connector::toCommentL
self.target.element.oclIsKindOf(Comment)
)
}{
- result.type :='4014';
+ result.type :='Comment_AnnotatedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -132,7 +133,7 @@ mapping UMLConnector::toConstraintLink() : Connector inherits Connector::toPapyr
self.target.element.oclIsKindOf(Constraint)
)
}{
- result.type :='4012';
+ result.type :='Constraint_ConstrainedElementEdge';
result.bendpoints := self.bendpoints.map toBendpoint(self.diagram);
result.sourceAnchor := object IdentityAnchor{};
}
@@ -213,7 +214,7 @@ mapping uml::UseCase::fillExtensionPoint(node : ListCompartment) : Sequence(Node
//5. ChildLabelNode x TopNode visual ID
mapping ExtensionPoint::toExtensionPointInUseCase(node : Node) : Shape inherits Element::toCompartmentEntry {
- result.type := '3007';
+ result.type := 'ExtensionPoint_ExtensionPointLabel';
}
query View::getDecorationType(element : Element) : String{
@@ -235,29 +236,29 @@ query View::getDecorationType(element : Element) : String{
query View::getNodeType(element : Element) : String {
return
- if element.oclIsTypeOf(Actor) then '2011'
- elif element.oclIsTypeOf(UseCase) then '2013'
- elif element.oclIsTypeOf(Package) then '2016'
- elif element.oclIsTypeOf(Constraint) then '2017'
- elif element.oclIsTypeOf(Comment) then '2018'
- elif element.oclIsTypeOf(Diagram) then '2019'
- elif element.oclIsKindOf(Classifier) then '2015'
- elif element.oclIsKindOf(NamedElement) then '2022'
+ if element.oclIsTypeOf(Actor) then 'Actor_Shape'
+ elif element.oclIsTypeOf(UseCase) then 'UseCase_Shape'
+ elif element.oclIsTypeOf(Package) then 'Package_Shape'
+ elif element.oclIsTypeOf(Constraint) then 'Constraint_Shape'
+ elif element.oclIsTypeOf(Comment) then 'Comment_Shape'
+ elif element.oclIsTypeOf(Diagram) then 'Diagram_ShortcutShape'
+ elif element.oclIsKindOf(Classifier) then 'Classifier_SubjectShape'
+ elif element.oclIsKindOf(NamedElement) then 'NamedElement_DefaultShape'
else self.fail()
endif;
}
query View::getEdgeType(element : Element) : String {
return if self.type = 'Reference' then '' /* Context and Constraint Links handled separately */
- elif self.element.oclIsTypeOf(Include) then '4008'
- elif self.element.oclIsTypeOf(Extend) then '4009'
- elif self.element.oclIsTypeOf(Generalization) then '4010'
- elif self.element.oclIsTypeOf(Association) then '4011'
- elif self.element.oclIsTypeOf(Dependency) then '4013'
- elif self.element.oclIsTypeOf(Abstraction) then '4015'
- elif self.element.oclIsTypeOf(Usage) then '4016'
- elif self.element.oclIsTypeOf(Realization) then '4017'
- elif self.element.oclIsTypeOf(PackageMerge) then '4018'
- elif self.element.oclIsTypeOf(PackageImport) then '4019'
+ elif self.element.oclIsTypeOf(Include) then 'Include_Edge'
+ elif self.element.oclIsTypeOf(Extend) then 'Extend_Edge'
+ elif self.element.oclIsTypeOf(Generalization) then 'Generalization_Edge'
+ elif self.element.oclIsTypeOf(Association) then 'Association_Edge'
+ elif self.element.oclIsTypeOf(Dependency) then 'Dependency_Edge'
+ elif self.element.oclIsTypeOf(Abstraction) then 'Abstraction_Edge'
+ elif self.element.oclIsTypeOf(Usage) then 'Usage_Edge'
+ elif self.element.oclIsTypeOf(Realization) then 'Realization_Edge'
+ elif self.element.oclIsTypeOf(PackageMerge) then 'PackageMerge_Edge'
+ elif self.element.oclIsTypeOf(PackageImport) then 'PackageImport_Edge'
else self.fail()
endif;
}
@@ -270,126 +271,126 @@ query View::doGetDecorationType(element : Element) : String{
element.oclIsKindOf(Actor) then
return switch {
- case (self.type = 'Name') '5014';
- case (self.type = 'UNKNOWN') '6029';
- case (self.type = 'UNKNOWN') '6037';
- case (self.type = 'Name') '6048';
+ case (self.type = 'Name') 'Actor_NameLabel';
+ case (self.type = 'UNKNOWN') 'Actor_StereotypeLabel';
+ case (self.type = 'UNKNOWN') 'Actor_QualifiedNameLabel';
+ case (self.type = 'Name') 'Actor_FloatingNameLabel';
}
elif
element.oclIsKindOf(Actor) then
return switch {
- case (self.type = 'Name') '5015';
+ case (self.type = 'Name') 'Actor_ClassifierNameLabel';
}
elif
element.oclIsKindOf(UseCase) then
return switch {
- case (self.type = 'Name') '5016';
- case (self.type = 'Name') '6038';
- case (self.type = 'Extension_Points') '7009';
+ case (self.type = 'Name') 'UseCase_NameLabel';
+ case (self.type = 'Name') 'UseCase_FloatingNameLabel';
+ case (self.type = 'Extension_Points') 'UseCase_ExtensionPointCompartment';
}
elif
element.oclIsKindOf(UseCase) then
return switch {
- case (self.type = 'Name') '5017';
- case (self.type = 'Extension_Points') '7010';
+ case (self.type = 'Name') 'UseCase_ClassifierNameLabel';
+ case (self.type = 'Extension_Points') 'UseCase_ClassifierExtensionPointCompartment';
}
elif
element.oclIsKindOf(Classifier) then
return switch {
- case (self.type = 'Name') '5019';
- case (self.type = 'Name') '6047';
- case (self.type = 'UseCaseShapeCompartment') '7011';
+ case (self.type = 'Name') 'Classifier_NameLabel';
+ case (self.type = 'Name') 'Classifier_FloatingNameLabel';
+ case (self.type = 'UseCaseShapeCompartment') 'Classifier_UseCaseCompartment';
}
elif
element.oclIsKindOf(Package) then
return switch {
- case (self.type = 'Name') '5025';
- case (self.type = 'PackageContents') '7013';
+ case (self.type = 'Name') 'Package_NameLabel';
+ case (self.type = 'PackageContents') 'Package_PackagedElementCompartment';
}
elif
element.oclIsKindOf(Constraint) then
return switch {
- case (self.type = 'Name') '5026';
- case (self.type = 'ValueSpecification') '6042';
+ case (self.type = 'Name') 'Constraint_NameLabel';
+ case (self.type = 'ValueSpecification') 'Constraint_BodyLabel';
}
elif
element.oclIsKindOf(Comment) then
return switch {
- case (self.type = 'CommentBody') '5027';
+ case (self.type = 'CommentBody') 'Comment_BodyLabel';
}
elif
element.oclIsKindOf(NamedElement) then
return switch {
- case (self.type = 'Name') '6039';
+ case (self.type = 'Name') 'NamedElement_NameLabel';
}
elif
element.oclIsKindOf(Diagram) then
return switch {
- case (self.type = 'Name') '5032';
+ case (self.type = 'Name') 'Diagram_NameLabel';
}
endif
} else { /* Floating Edge Labels */
return if
element.oclIsKindOf(Include) then
return switch {
- case (self.type='KindLabel') '6006';
- case (self.type='Stereotype') '6030';
+ case (self.type='KindLabel') 'Include_KeywordLabel';
+ case (self.type='Stereotype') 'Include_StereotypeLabel';
}
elif
element.oclIsKindOf(Extend) then
return switch {
- case (self.type='KindLabel') '6007';
- case (self.type='Stereotype') '6031';
+ case (self.type='KindLabel') 'Extend_KeywordLabel';
+ case (self.type='Stereotype') 'Extend_StereotypeLabel';
}
elif
element.oclIsKindOf(Generalization) then
return switch {
- case (self.type='Stereotype') '6032';
+ case (self.type='Stereotype') 'Generalization_StereotypeLabel';
}
elif
element.oclIsKindOf(Association) then
return switch {
- case (self.type='Name') '6008';
- case (self.type='Stereotype') '6033';
- case (self.type='NameLabel') '6008';
+ case (self.type='Name') 'Association_NameLabel';
+ case (self.type='Stereotype') 'Association_StereotypeLabel';
+ case (self.type='NameLabel') 'Association_NameLabel';
}
elif
element.oclIsKindOf(Realization) then
return switch {
- case (self.type='Name') '6015';
- case (self.type='Stereotype') '6035';
- case (self.type='NameLabel') '6015';
+ case (self.type='Name') 'Realization_NameLabel';
+ case (self.type='Stereotype') 'Realization_StereotypeLabel';
+ case (self.type='NameLabel') 'Realization_NameLabel';
}
elif
element.oclIsKindOf(Abstraction) then
return switch {
- case (self.type='Name') '6011';
- case (self.type='Stereotype') '6014';
- case (self.type='NameLabel') '6011';
+ case (self.type='Name') 'Abstraction_NameLabel';
+ case (self.type='Stereotype') 'Abstraction_StereotypeLabel';
+ case (self.type='NameLabel') 'Abstraction_NameLabel';
}
elif
element.oclIsKindOf(Usage) then
return switch {
- case (self.type='Name') '6012';
- case (self.type='Stereotype') '6013';
- case (self.type='NameLabel') '6012';
+ case (self.type='Name') 'Usage_NameLabel';
+ case (self.type='Stereotype') 'Usage_StereotypeLabel';
+ case (self.type='NameLabel') 'Usage_NameLabel';
}
elif
element.oclIsKindOf(Dependency) then
return switch {
- case (self.type='Name') '6010';
- case (self.type='Stereotype') '6034';
- case (self.type='NameLabel') '6010';
+ case (self.type='Name') 'Dependency_NameLabel';
+ case (self.type='Stereotype') 'Dependency_StereotypeLabel';
+ case (self.type='NameLabel') 'Dependency_NameLabel';
}
elif
element.oclIsKindOf(PackageMerge) then
return switch {
- case (self.type='Stereotype') '0';
+ case (self.type='Stereotype') 'PackageMerge_StereotypeLabel';
}
elif
element.oclIsKindOf(PackageImport) then
return switch {
- case (self.type='Stereotype') '6036';
+ case (self.type='Stereotype') 'PackageImport_StereotypeLabel';
}
endif;
} endif;

Back to the top