Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-10-27 13:14:59 +0000
committerptessier2014-10-27 13:14:59 +0000
commit1843fc92771bf07bef9eb14871accb359a6e157f (patch)
tree2bf537264a37e70581ac74a4734c18391717a5f7 /extraplugins/req
parent89d70179b694f0a1b84233d68fbd770f2a8bb8f2 (diff)
downloadorg.eclipse.papyrus-1843fc92771bf07bef9eb14871accb359a6e157f.tar.gz
org.eclipse.papyrus-1843fc92771bf07bef9eb14871accb359a6e157f.tar.xz
org.eclipse.papyrus-1843fc92771bf07bef9eb14871accb359a6e157f.zip
447870: [Papyrus Req] Papyrus shall import or export reqIF file
https://bugs.eclipse.org/bugs/show_bug.cgi?id=447870 # WARNING: head commit changed in the meantime Merge branch 'master' of ssh://ptessier@git.eclipse.org:29418/papyrus/org.eclipse.papyrus Change-Id: I428487dd0900cce331f5cac317d709a4853e170c
Diffstat (limited to 'extraplugins/req')
-rw-r--r--extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/transformation/ReqIFImporter.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/transformation/ReqIFImporter.java b/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/transformation/ReqIFImporter.java
index 3d73031450a..be7ce476f7f 100644
--- a/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/transformation/ReqIFImporter.java
+++ b/extraplugins/req/org.eclipse.papyrus.req.reqif/src/org/eclipse/papyrus/req/reqif/transformation/ReqIFImporter.java
@@ -265,6 +265,7 @@ public abstract class ReqIFImporter extends ReqIFBaseTransformation {
reqifDatatTypeEnumeration= new HashMap<String, DatatypeDefinitionEnumeration>();
getAllDataTypeDefinitionEnumeration();
+ reqiFTypeMap= filterReqifAvailableType(reqiFTypeMap);
//ask to the User all specObjectTypes to import
if(interactive){
reqiFTypeMap=selectReqIFType(reqiFTypeMap.values());
@@ -329,6 +330,15 @@ public abstract class ReqIFImporter extends ReqIFBaseTransformation {
}
/**
+ * this method is used to reduce the set of all ReqIF types that you want to import bt UI or not
+ * @param reqiFTypeMap the given list of of REQIF type availbale
+ * @return the new hashmap of reqif available. <string, specObjectype> the string is th elong name of the SpecObjectType
+ */
+ public HashMap<String, SpecType> filterReqifAvailableType(
+ HashMap<String, SpecType> reqiFTypeMap) {
+ return reqiFTypeMap;
+ }
+ /**
* this action is used to add last action or transformation on the UML model after importing all things.
* @param UMLModel the obtained UML model after importing reqIF Model
*/
@@ -447,7 +457,7 @@ public abstract class ReqIFImporter extends ReqIFBaseTransformation {
Property property=null;
for (Property attribute : stereotype.getAllAttributes()) {
if( attribute.getName().equals(propertyName)){
- return property;
+ return attribute;
}
}
@@ -507,7 +517,7 @@ public abstract class ReqIFImporter extends ReqIFBaseTransformation {
umlElement.setValue(
reqStereotypesMap.get(specType.getLongName()),
attributeName,
- ((AttributeValueInteger)att).getTheValue().doubleValue());
+ ((AttributeValueInteger)att).getTheValue().intValue());
}
}
}
@@ -703,7 +713,7 @@ public abstract class ReqIFImporter extends ReqIFBaseTransformation {
}
}
if( attributeDef instanceof AttributeDefinitionInteger){
- attribute= stereotype.createOwnedAttribute(attributeName, umlPrimitiveTypes.getOwnedType("Real"));
+ attribute= stereotype.createOwnedAttribute(attributeName, umlPrimitiveTypes.getOwnedType("Integer"));
}
if( attributeDef instanceof AttributeDefinitionBoolean){
attribute= stereotype.createOwnedAttribute(attributeName, umlPrimitiveTypes.getOwnedType("Boolean"));

Back to the top