Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordwagelaar2014-03-17 12:26:05 -0400
committerdwagelaar2014-03-17 12:26:05 -0400
commit49348a702bc31616205ab9bc87357faee40bd50f (patch)
tree1eb109edad008b4f2a60ae7c8f2b722b7fc68015 /plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse
parentc2654c3656d29c42a4a2325bd1a30b273bf2683b (diff)
downloadorg.eclipse.atl-49348a702bc31616205ab9bc87357faee40bd50f.tar.gz
org.eclipse.atl-49348a702bc31616205ab9bc87357faee40bd50f.tar.xz
org.eclipse.atl-49348a702bc31616205ab9bc87357faee40bd50f.zip
Test + fix.
ASSIGNED - bug 430096: toString() does not work with oclUndefined https://bugs.eclipse.org/bugs/show_bug.cgi?id=430096
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/OCLOperations.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/OCLOperations.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/OCLOperations.java
index 73e4aa55..085644ce 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/OCLOperations.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/OCLOperations.java
@@ -273,6 +273,15 @@ public final class OCLOperations {
return object;
}
});
+ createOperation(false, "toString", Types.OCL_ANY_TYPE, Types.STRING_TYPE,
+ new String[][][]{},
+ new NativeCodeBlock() {
+ @Override
+ public Object execute(final StackFrame frame) {
+ final Object object = frame.getLocal(0, 0);
+ return EMFTVMUtil.toPrettyString(object, frame.getEnv());
+ }
+ });
createOperation(false, "oclAsType", Types.OCL_ANY_TYPE, Types.OCL_ANY_TYPE,
new String[][][]{{{"type"}, Types.CLASSIFIER_TYPE}},
new NativeCodeBlock() {

Back to the top