Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwpiers2009-09-07 15:54:41 +0000
committerwpiers2009-09-07 15:54:41 +0000
commitcb43ba3116cf0bee000cac675796dd609db5cfe1 (patch)
tree0c655d97d7c8d023591e1ea4623bf0c23f2ed40a /plugins/org.eclipse.m2m.atl.engine.emfvm/src
parent4cd2b643bc50c3e63247b3709777b81d03e8e65d (diff)
downloadorg.eclipse.atl-cb43ba3116cf0bee000cac675796dd609db5cfe1.tar.gz
org.eclipse.atl-cb43ba3116cf0bee000cac675796dd609db5cfe1.tar.xz
org.eclipse.atl-cb43ba3116cf0bee000cac675796dd609db5cfe1.zip
[255613] synchronize toString behaviors
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.engine.emfvm/src')
-rw-r--r--plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java b/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java
index 809bc285..d33442c5 100644
--- a/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java
+++ b/plugins/org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/ExecEnv.java
@@ -10,7 +10,7 @@
* Obeo - bag, weaving helper implementation
* Dennis Wagelaar (Vrije Universiteit Brussel)
*
- * $Id: ExecEnv.java,v 1.44 2009/08/27 10:03:28 wpiers Exp $
+ * $Id: ExecEnv.java,v 1.45 2009/09/07 15:54:41 wpiers Exp $
*******************************************************************************/
package org.eclipse.m2m.atl.engine.emfvm.lib;
@@ -1298,6 +1298,16 @@ public class ExecEnv {
return ((Tuple)localVars[0]).getMap();
}
});
+ // EnumLiteral
+ operationsByName = new HashMap<String, Operation>();
+ vmTypeOperations.put(EnumLiteral.class, operationsByName);
+ operationsByName.put("toString", new Operation(1) { //$NON-NLS-1$
+ @Override
+ public Object exec(AbstractStackFrame frame) {
+ Object[] localVars = frame.localVars;
+ return ((EnumLiteral)localVars[0]).toString();
+ }
+ });
// OclAny
operationsByName = new HashMap<String, Operation>();
vmTypeOperations.put(Object.class, operationsByName);

Back to the top