Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2008-12-29 07:41:33 -0500
committerashatalin2008-12-29 07:41:33 -0500
commit7f3bb1960b122d5d9c4edae8dc1c330032c9cf60 (patch)
tree51b1778aae0b0e8c22bdeedd9dbedbd091fcb829
parenta3d62cdd7bd1d667891920c2d527b44a959151b9 (diff)
downloadorg.eclipse.gmf-tooling-7f3bb1960b122d5d9c4edae8dc1c330032c9cf60.tar.gz
org.eclipse.gmf-tooling-7f3bb1960b122d5d9c4edae8dc1c330032c9cf60.tar.xz
org.eclipse.gmf-tooling-7f3bb1960b122d5d9c4edae8dc1c330032c9cf60.zip
QVTO-based xpand implementation was merged to HEAD
-rw-r--r--plugins/org.eclipse.gmf.common/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/codegen/XpandTextEmitter.java12
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/org.eclipse.gmf.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.common/META-INF/MANIFEST.MF
index 8c4b74b06..67d5dcf3a 100644
--- a/plugins/org.eclipse.gmf.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.gmf.common/META-INF/MANIFEST.MF
@@ -24,7 +24,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.3.0,4.0.0)",
org.eclipse.jface;bundle-version="[3.3.0,4.0.0)",
org.eclipse.jdt.ui;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.gmf.xpand;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.gmf.xpand;bundle-version="[2.0.0,3.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Activator: org.eclipse.gmf.internal.common.Activator
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/codegen/XpandTextEmitter.java b/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/codegen/XpandTextEmitter.java
index 16e41bc39..be9ec0d6d 100644
--- a/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/codegen/XpandTextEmitter.java
+++ b/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/codegen/XpandTextEmitter.java
@@ -18,13 +18,14 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.common.codegen.ImportAssistant;
import org.eclipse.gmf.internal.xpand.BufferOutput;
import org.eclipse.gmf.internal.xpand.ResourceManager;
import org.eclipse.gmf.internal.xpand.XpandFacade;
-import org.eclipse.gmf.internal.xpand.expression.EvaluationException;
-import org.eclipse.gmf.internal.xpand.expression.Variable;
-import org.eclipse.gmf.internal.xpand.model.XpandExecutionContext;
+import org.eclipse.gmf.internal.xpand.model.EvaluationException;
+import org.eclipse.gmf.internal.xpand.model.ExecutionContext;
+import org.eclipse.gmf.internal.xpand.model.Variable;
import org.eclipse.gmf.internal.xpand.util.ContextFactory;
/**
@@ -48,7 +49,8 @@ public class XpandTextEmitter implements TextEmitter {
if (globals != null && globals.size() > 0) {
myGlobals = new ArrayList<Variable>(globals.size());
for (Map.Entry<String, Object> e : globals.entrySet()) {
- myGlobals.add(new Variable(e.getKey(), e.getValue()));
+ assert e.getValue() instanceof EObject;
+ myGlobals.add(new Variable(e.getKey(), ((EObject) e.getValue()).eClass(), e.getValue()));
}
} else {
myGlobals = Collections.<Variable>emptyList();
@@ -86,7 +88,7 @@ public class XpandTextEmitter implements TextEmitter {
return res.toArray();
}
- private XpandExecutionContext createContext(StringBuilder result) {
+ private ExecutionContext createContext(StringBuilder result) {
final BufferOutput output = new BufferOutput(result);
return ContextFactory.createXpandContext(myResourceManager, output, myGlobals, myContext);
}

Back to the top