Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2017-01-21 07:46:23 +0000
committerVincent Lorenzo2017-01-23 17:01:41 +0000
commitcb4a993aa4b923ffd0fa86bfb18949c0f2d964b2 (patch)
tree7172ba99e94f3caf4763ad7f586fd094441bcf2f /extraplugins
parenta7692b73f0a9b8c9de73c46bba54d5b3d8668abd (diff)
downloadorg.eclipse.papyrus-cb4a993aa4b923ffd0fa86bfb18949c0f2d964b2.tar.gz
org.eclipse.papyrus-cb4a993aa4b923ffd0fa86bfb18949c0f2d964b2.tar.xz
org.eclipse.papyrus-cb4a993aa4b923ffd0fa86bfb18949c0f2d964b2.zip
Bug 510860: [Importer][Rhapsody][SysML] Bad mapping from ValueType to UML DataType
Change-Id: I932e846aed3ed17d339a094d63d12d96cb499b7a Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto30
1 files changed, 18 insertions, 12 deletions
diff --git a/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto b/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto
index b095b57787c..24949da83ec 100644
--- a/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto
+++ b/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto
@@ -272,7 +272,7 @@ query umlrhapsody::IType::mapToBasicType(inout templateableElement:TemplateableE
}
-/*
+/**
* Return true if the object must be converted into a UML DataType
*
* For JUnit SysML test1:
@@ -281,35 +281,41 @@ query umlrhapsody::IType::mapToBasicType(inout templateableElement:TemplateableE
* MyArrayOfInt : kind = Typedef and stereotype DataType
* MyPrimitivesTypes : kind = Language and stereotype = DataType
* MySpeed : kind = kind = Typedef and ValueType
+* IType defined in Rhapsody Library (like PredefinedTypes) must be imported as DatType
*/
query umlrhapsody::IType::isUMLDataType(): Boolean {
- var res:=self.isRhapsodyDataType() or self.isRhapsodyLibraryType(); //we decided to import IType defined in Rhapsody library as DataType;
- if(res){
- res:= self.isKindLanguage() or self.isKindTypedef();
- }else{
- res:=(self.isKindTypedef() or self.isKindLanguage()) and self.isSysMLValueType();
- };
+ var res:=self.isSysMLValueType() and not self.isKindEnumeration();
+ if(not res){
+ res:=(self.isRhapsodyDataType() or self.isRhapsodyLibraryType()) and (self.isKindLanguage() or self.isKindTypedef());
+ };
return res;
}
-/*
-* Return true if the IType kind if Typedef
+/**
+* Return true if the IType is kind Typedef
*/
query umlrhapsody::IType::isKindTypedef(): Boolean{
return self.kind="Typedef";
}
-
+/**
+* Return true if the IType is kind Enumeration
+*/
query umlrhapsody::IType::isKindEnumeration(): Boolean{
return self.kind="Enumeration";
}
+/**
+* Return true if the IType is kind Enumeration
+*/
query umlrhapsody::IType::isKindStructure(): Boolean{
return self.kind="Structure";
}
-
+/**
+* Return true if the IType has kind Language
+*/
query umlrhapsody::IType::isKindLanguage(): Boolean {
return self.kind="Language";
}
@@ -366,8 +372,8 @@ mapping umlrhapsody::IAssociationEnd::toOwnedAssociationEnd(): uml::Property{
mapping umlrhapsody::IType::toUMLDatatype() : uml::DataType when {self.isUMLDataType()}{
name:= self.name.replaceAll("\"","");
+ ownedAttribute+=self.Attrs[IAttribute].map iVariableToUMLElement();
self.mapToBasicType(result.oclAsType(uml::TemplateableElement));
-
}
mapping umlrhapsody::IType::toUMLEnumeration() : uml::Enumeration when {self.isUMLEnumeration()}{

Back to the top