Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-11-03 12:11:42 +0000
committerCamille Letavernier2014-11-03 12:11:42 +0000
commitdd6b044feec722afdfa349cc3b24d9e66aaee844 (patch)
treefc4f574117d6a6cc5b552ace3c3db6dffbd2fcae /plugins/customization
parent1ba808a2cd714cc5254121aa100d954fca222fff (diff)
downloadorg.eclipse.papyrus-dd6b044feec722afdfa349cc3b24d9e66aaee844.tar.gz
org.eclipse.papyrus-dd6b044feec722afdfa349cc3b24d9e66aaee844.tar.xz
org.eclipse.papyrus-dd6b044feec722afdfa349cc3b24d9e66aaee844.zip
335332: [Property View] Papyrus shall provide an extensible property
view runtime https://bugs.eclipse.org/bugs/show_bug.cgi?id=335332 - Initial support for less common Java types with the Ecore Properties generator
Diffstat (limited to 'plugins/customization')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java11
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto7
2 files changed, 16 insertions, 2 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java
index 1404c570371..7e9a5a42f40 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java
@@ -37,7 +37,14 @@ import org.eclipse.papyrus.views.properties.util.PropertiesUtil;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLPackage;
-
+/**
+ *
+ * @author Camille Letavernier
+ *
+ * @deprecated Papyrus doesn't use custom Datatype definition anymore. Use the StandardLayoutGenerator instead
+ *
+ */
+@Deprecated
public class ProfileWithDatatypes extends StandardLayoutGenerator {
protected IGenerator generator;
@@ -267,6 +274,6 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
@Override
public String getName() {
- return "UML Profile with DataTypes";
+ return "UML Profile with DataTypes (Deprecated, use Standard)";
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto
index f1d2381bf05..789ccb106f3 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto
@@ -144,7 +144,13 @@ query EDataType::toType() : Type {
switch {
case (self.instanceClassName = "java.lang.String") type := Type::String;
case (self.instanceClassName = "int") type := Type::Integer;
+ case (self.instanceClassName = "long") type := Type::Integer; /* FIXME: Integer is not a perfect match */
case (self.instanceClassName = "boolean") type := Type::Boolean;
+ case (self.instanceClassName = "float") type := Type::Double; /* FIXME: Double is not a perfect match */
+ case (self.instanceClassName = "double") type := Type::Double;
+ case (self.instanceClassName = "char") type := Type::Integer; /* FIXME: Integer is not a perfect match */
+ case (self.instanceClassName = "byte") type := Type::Integer; /* FIXME: Integer is not a perfect match */
+ /* FIXME: Add all Ecore/Java types? */
};
if type.oclIsUndefined() then {
log("Type : "+self.name);
@@ -153,3 +159,4 @@ query EDataType::toType() : Type {
}endif;
return type;
}
+

Back to the top