Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto25
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.migration.rhapsody.doc/src/site/mediawiki/rhapsodyMigrationUser.mediawiki4
2 files changed, 18 insertions, 11 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 24949da83ec..0ccf09b4dc7 100644..100755
--- a/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto
+++ b/extraplugins/migration/rhapsody/org.eclipse.papyrus.migration.rhapsody/transform/Rhapsody2PapyrusSemanticElements.qvto
@@ -30,6 +30,8 @@ transformation Rhapsody2PapyrusSemanticElements(in inModel:umlrhapsody, out outM
property events : Set(IEvent) = null;
+/**This variable is used to reference the types created outside of all contexts. (bug 510869)*/
+property userTypeDeclaration: Set(Type);
/**
* Maunch the semantic transformation
@@ -69,6 +71,13 @@ mapping umlrhapsody::IProject::iProjectToPapyrusModel() : uml::Model {
};
packageImport+=importedPackages;
+
+ if(userTypeDeclaration->notEmpty()){
+ packagedElement+= object Package{
+ name:="UserTypesDeclaration";
+ packagedElement+=userTypeDeclaration;
+ }
+ }
}
/**
@@ -205,19 +214,16 @@ mapping umlrhapsody::IClass::toUMLInterface() : uml::Interface when {self.oclIsT
/**
*
-* When we match any condition, we create a uml::Class.
-* If we are are, there is a bug!
+* When we match any condition, we create a uml::DataType.
+* We can be here in case of bug, when an existing type has not been resolved
+* or when the user use the C type declaration in Rhapsody (declaring a type with a string, see bug 510869)
*/
-mapping umlrhapsody::IType::iTypeToDefault():uml::Class{
+mapping umlrhapsody::IType::iTypeToDefault():uml::DataType{
if(self.name=null or self.name.oclIsInvalid()){
if(self.declaration<>null){
name:=self.declaration;
- log("We don't found the good type for an unamed element, with has this declaration: " + self.declaration);
- }else{
- log("We don't found the good type for an unamed element");
}
}else{
- log("We don't found the good type for " + self.name + " so we used the default type mapping for it");
name:=self.name.replaceAll("\"","");
};
}
@@ -1003,6 +1009,7 @@ mapping umlrhapsody::IArgument::iArgumentToUMLElement(): uml::Property when {sel
// should add the PtR Stereotpe if the type is a C++ Declaration : i,e: Class *;
if (self.typeOf.oclIsUndefined()){
type := self.myTypeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
+ userTypeDeclaration+=type;
}else{
type := self.typeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
};
@@ -1015,6 +1022,7 @@ mapping umlrhapsody::IAttribute::iAttributeToUMLElement(): uml::Property when {s
if (self.typeOf.oclIsUndefined()) {
type := self.myTypeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
+ userTypeDeclaration+=type;
}else{
type := self.typeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
};
@@ -1109,7 +1117,8 @@ mapping umlrhapsody::IArgument::toArguments(): uml::Parameter
// should add the PtR Stereotpe if the type is a C++ Declaration : i,e: Class *;
if (self.typeOf.oclIsUndefined())
{
- type := self.myTypeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
+ type := self.myTypeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
+ userTypeDeclaration+=type;
}else
{
type := self.typeOf [IType]->any(true).oclAsType(IType).map iTypeToUMLElement().oclAsType(Type);
diff --git a/plugins/doc/org.eclipse.papyrus.migration.rhapsody.doc/src/site/mediawiki/rhapsodyMigrationUser.mediawiki b/plugins/doc/org.eclipse.papyrus.migration.rhapsody.doc/src/site/mediawiki/rhapsodyMigrationUser.mediawiki
index ea4c913ba04..159e0af5617 100755
--- a/plugins/doc/org.eclipse.papyrus.migration.rhapsody.doc/src/site/mediawiki/rhapsodyMigrationUser.mediawiki
+++ b/plugins/doc/org.eclipse.papyrus.migration.rhapsody.doc/src/site/mediawiki/rhapsodyMigrationUser.mediawiki
@@ -140,9 +140,6 @@ Papyrus migration tools allows to import Rhapsody models as UML Model. Some Rhap
| IType
| Class
|-
-| IType
-| UML Predefined Types defined in Papyrus
-|-
| IVariable
| Designer
|}
@@ -181,6 +178,7 @@ The following stereotypes are supported (not complete list).
===Properties's Type Mapping===
* The Rhapsody Types Libraries (like PredefinedTypes, PredefinedTypesC and PredefinedTypesCpp) are imported, when required, as UML Package in the imported Model. By this way, the types of the user model are preserved by the transformation.
* To ease user experience, we always import the UML Predefined Types library, but we doesn't use the provided types in the imported model.
+* In some case, a Package called '''UserTypesDeclaration''' is created. The goal of this package is to group the type declared using the '''C++ declaration''' field text in Rhapsody. It is not a reference to an existing type, it is only a name given to the type.
===Diagram Mapping===
*Papyrus Rhapsody Migration Tools allows to import Rhapsody SysML Diagrams as Papyrus SysML 1.1 Diagrams. The supported diagrams are:

Back to the top