Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2017-01-25 03:56:27 -0500
committervincent lorenzo2017-01-25 07:14:06 -0500
commit7206b557e5453454f6564a6c9b2bff4572035732 (patch)
treedb4b8d8f5f4808fdf487d23b444613c2e9801195
parentacb4504aa345035a674fbd60f35f75589574aadd (diff)
downloadorg.eclipse.papyrus-7206b557e5453454f6564a6c9b2bff4572035732.tar.gz
org.eclipse.papyrus-7206b557e5453454f6564a6c9b2bff4572035732.tar.xz
org.eclipse.papyrus-7206b557e5453454f6564a6c9b2bff4572035732.zip
Bug 510960: [Importer][Rhapsody] Unit for value type stereotype is not always defined
Change-Id: Ic49ad948fe85968f2e6ebeb281a3267334248ebe Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
-rw-r--r--extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/SysML11Profile.qvto13
1 files changed, 6 insertions, 7 deletions
diff --git a/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/SysML11Profile.qvto b/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/SysML11Profile.qvto
index 2eab4fe4c17..3d449fd57d8 100644
--- a/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/SysML11Profile.qvto
+++ b/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/SysML11Profile.qvto
@@ -300,14 +300,13 @@ mapping uml::Property::applySysML11FlowProperty(rpyElement:EObject, stereotypeNa
//we have model with 2 kind of declaration for the same thing...
//the first way!
- var dir:String:=rpyElement.oclAsType(IAttribute).Tags->select(t | (t.name="direction" and t.typeOf.oclAsType(IType).name="FlowDirection"))
- ->any(true).ValueSpecifications->any(true).oclAsType(ILiteralSpecification).value;
-
- //the 2nd way when required
- if(dir=null){
- dir:=rpyElement.oclAsType(IAttribute).Tags->select(t | (t.name="direction" and t.typeOf.oclAsType(IType).name="RhpString")) //probably due to an error in the model
- ->any(true).ValueSpecifications->any(true).oclAsType(ILiteralSpecification).value;
+ var dir:String:=rpyElement.oclAsType(IAttribute).Tags->any(name="direction" and typeOf.oclAsType(IType).name="FlowDirection").ValueSpecifications->any(true).oclAsType(ILiteralSpecification).value;
+ //the 2nd way is required
+ if(dir.oclIsUndefined()){
+ //probably due to an error in the model, but in soem case we met RhpString
+ dir:=rpyElement.oclAsType(IAttribute).Tags->any(name="direction" and typeOf.oclAsType(IType).name="RhpString").ValueSpecifications->any(true).oclAsType(ILiteralSpecification).value;
};
+
direction:=getSysML11FlowDirection(dir);
};
result:=stereotypeApplication.oclAsType(EObject);

Back to the top