Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2015-06-01 16:42:09 +0000
committerEd Willink2015-06-01 16:50:32 +0000
commitfad4562d86d408485318f03e40a026d36208250f (patch)
treeac3dc90e72b182509eca369fed2d66d81fcd5430
parent4a4714bddb780d1c6b412df4318bae0b93428c0b (diff)
downloadorg.eclipse.qvtd-0.12.0RC3.tar.gz
org.eclipse.qvtd-0.12.0RC3.tar.xz
org.eclipse.qvtd-0.12.0RC3.zip
[468876] Track OCL refactor of VMEnvironmentFactory to delegate0.12.0RC3
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/core/QVTiEvaluationContext.java3
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/AbstractQVTiVMEvaluationVisitor.java26
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationEnvironment.java7
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationVisitor.java3
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEnvironmentFactory.java40
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluationVisitor.java10
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluator.java47
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationEnvironment.java26
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationVisitor.java6
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationEnvironment.java33
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationVisitor.java19
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiDebuggableRunnerFactory.java2
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiInternalDebuggableExecutor.java8
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PrePostStepper.java4
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PreStepper.java4
-rw-r--r--plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/vm/QVTiVMVirtualMachine.java2
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiPivotEvaluator.java4
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiTransformationAnalysis.java10
18 files changed, 130 insertions, 124 deletions
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/core/QVTiEvaluationContext.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/core/QVTiEvaluationContext.java
index aa55e1a85..7532820f9 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/core/QVTiEvaluationContext.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/core/QVTiEvaluationContext.java
@@ -20,6 +20,7 @@ import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.examples.debug.vm.core.EvaluationContext;
import org.eclipse.ocl.pivot.resource.BasicProjectManager;
import org.eclipse.qvtd.debug.evaluator.QVTiVMEnvironmentFactory;
+import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiEnvironmentFactory;
public class QVTiEvaluationContext extends EvaluationContext
{
@@ -28,7 +29,7 @@ public class QVTiEvaluationContext extends EvaluationContext
private @NonNull Map<String, URI> outputURIs = new HashMap<String, URI>();
public QVTiEvaluationContext(@NonNull URI transformationURI, @NonNull Map<String, URI> inputURIs, @NonNull Map<String, URI> outputURIs) {
- super(new QVTiVMEnvironmentFactory(BasicProjectManager.createDefaultProjectManager(), null));
+ super(new QVTiVMEnvironmentFactory(new QVTiEnvironmentFactory(BasicProjectManager.createDefaultProjectManager(), null)));
this.transformationURI = transformationURI;
this.inputURIs = inputURIs;
this.outputURIs = outputURIs;
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/AbstractQVTiVMEvaluationVisitor.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/AbstractQVTiVMEvaluationVisitor.java
index 780df5b6a..6e49d892a 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/AbstractQVTiVMEvaluationVisitor.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/AbstractQVTiVMEvaluationVisitor.java
@@ -46,7 +46,7 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
}
public @NonNull EvaluationVisitor getClonedEvaluator() {
- IQVTiVMEvaluationEnvironment oldEvaluationEnvironment = getEvaluationEnvironment();
+ IQVTiVMEvaluationEnvironment oldEvaluationEnvironment = getVMEvaluationEnvironment();
IQVTiVMEvaluationEnvironment clonedEvaluationEnvironment = oldEvaluationEnvironment.createClonedEvaluationEnvironment();
return new QVTiEvaluationVisitor(clonedEvaluationEnvironment);
}
@@ -66,7 +66,11 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
return (QVTiEnvironmentFactory) delegate.getEnvironmentFactory();
}
- public @NonNull IQVTiVMEvaluationEnvironment getEvaluationEnvironment() {
+ public @NonNull EvaluationEnvironment getEvaluationEnvironment() {
+ return delegate.getEvaluationEnvironment();
+ }
+
+ public @NonNull IQVTiVMEvaluationEnvironment getVMEvaluationEnvironment() {
return (IQVTiVMEvaluationEnvironment) delegate.getEvaluationEnvironment();
}
@@ -125,7 +129,7 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
throw (VMInterruptedExecutionException)e;
}
Element element = (Element)visitable;
- IVMEvaluationEnvironment<?> evalEnv = getEvaluationEnvironment();
+ IVMEvaluationEnvironment evalEnv = getVMEvaluationEnvironment();
Object result = badVisit(evalEnv, element, preState, e); // FIXME bad code exception here is confusing to user
if (VMVirtualMachine.POST_VISIT.isActive()) {
VMVirtualMachine.POST_VISIT.println("[" + Thread.currentThread().getName() + "] " + element.eClass().getName() + ": " + element.toString());
@@ -133,10 +137,10 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
return result;
}
- protected abstract @Nullable Object badVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element, Object preState, @NonNull Throwable e);
+ protected abstract @Nullable Object badVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element, Object preState, @NonNull Throwable e);
protected void superProcessDeferredTasks() {
- IVMEvaluationEnvironment<?> evalEnv = getEvaluationEnvironment();
+ IVMEvaluationEnvironment evalEnv = getVMEvaluationEnvironment();
evalEnv.processDeferredTasks();
}
@@ -147,12 +151,12 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
VMVirtualMachine.POST_VISIT.println("[" + Thread.currentThread().getName() + "] " + element.eClass().getName() + ": " + element.toString() + " => " + result);
}
// setCurrentEnvInstructionPointer(parentElement);
- IVMEvaluationEnvironment<?> evalEnv = getEvaluationEnvironment();
+ IVMEvaluationEnvironment evalEnv = getVMEvaluationEnvironment();
postVisit(evalEnv, element, result);
return result;
}
- protected abstract void postVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element, @Nullable Object result);
+ protected abstract void postVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element, @Nullable Object result);
@Override
protected @Nullable Element preVisit(@NonNull Visitable visitable) {
@@ -161,12 +165,12 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
VMVirtualMachine.PRE_VISIT.println("[" + Thread.currentThread().getName() + "] " + element.eClass().getName() + ": " + element.toString());
}
Element previousIP = setCurrentEnvInstructionPointer(null/*element*/);
- IVMEvaluationEnvironment<?> evalEnv = getEvaluationEnvironment();
+ IVMEvaluationEnvironment evalEnv = getVMEvaluationEnvironment();
preVisit(evalEnv, element);
return previousIP;
}
- protected abstract Object preVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element);
+ protected abstract Object preVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element);
// public void throwQVTException(VMInterruptedExecutionException qvtInterruptedExecutionException) {
// TODO Auto-generated method stub
@@ -174,7 +178,7 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
// }
protected Element setCurrentEnvInstructionPointer(Element element) {
- IVMEvaluationEnvironment<?> evalEnv = getEvaluationEnvironment();
+ IVMEvaluationEnvironment evalEnv = getVMEvaluationEnvironment();
if (element != null) {
return evalEnv.setCurrentIP(element);
}
@@ -206,7 +210,7 @@ public abstract class AbstractQVTiVMEvaluationVisitor extends AbstractWrappingQV
return delegate.evaluate(body);
}
- public static IVMEvaluationEnvironment<?> cloneEvaluationEnv(IVMEvaluationEnvironment<?> evaluationEnvironment) {
+ public static IVMEvaluationEnvironment cloneEvaluationEnv(IVMEvaluationEnvironment evaluationEnvironment) {
// TODO Auto-generated method stub
return null;
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationEnvironment.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationEnvironment.java
index 41e3662a7..5de2e9725 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationEnvironment.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationEnvironment.java
@@ -17,17 +17,16 @@ import org.eclipse.ocl.examples.debug.vm.UnitLocation;
import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEvaluationEnvironment;
import org.eclipse.ocl.examples.debug.vm.utils.VMRuntimeException;
import org.eclipse.ocl.pivot.Element;
-import org.eclipse.qvtd.pivot.qvtbase.Transformation;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.IQVTiEvaluationEnvironment;
-public interface IQVTiVMEvaluationEnvironment extends IQVTiEvaluationEnvironment, IVMEvaluationEnvironment<Transformation>
+public interface IQVTiVMEvaluationEnvironment extends IQVTiEvaluationEnvironment, IVMEvaluationEnvironment
{
@NonNull IQVTiVMEvaluationEnvironment createClonedEvaluationEnvironment();
@NonNull Element getCurrentIP();
@NonNull UnitLocation getCurrentLocation();
@NonNull QVTiVMModelManager getModelManager();
- @Nullable IQVTiVMEvaluationEnvironment getParentEvaluationEnvironment();
- @NonNull QVTiVMRootEvaluationEnvironment getRootEvaluationEnvironment();
+ @Nullable IQVTiVMEvaluationEnvironment getVMParentEvaluationEnvironment();
+ @NonNull QVTiVMRootEvaluationEnvironment getVMRootEvaluationEnvironment();
void processDeferredTasks();
@NonNull Element setCurrentIP(@NonNull Element element);
void throwVMException(@NonNull VMRuntimeException qvtInterruptedExecutionException);
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationVisitor.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationVisitor.java
index edab8cae9..c75260c1d 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationVisitor.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/IQVTiVMEvaluationVisitor.java
@@ -15,11 +15,10 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEvaluationVisitor;
import org.eclipse.ocl.pivot.util.Visitable;
-import org.eclipse.qvtd.pivot.qvtbase.Transformation;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.IQVTiEvaluationVisitor;
import org.eclipse.qvtd.pivot.qvtimperative.util.QVTimperativeVisitor;
-public interface IQVTiVMEvaluationVisitor extends IVMEvaluationVisitor<Transformation>, IQVTiEvaluationVisitor, QVTimperativeVisitor<Object>
+public interface IQVTiVMEvaluationVisitor extends IVMEvaluationVisitor, IQVTiEvaluationVisitor, QVTimperativeVisitor<Object>
{
@NonNull IQVTiVMEvaluationVisitor createNestedEvaluator();
void dispose();
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEnvironmentFactory.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEnvironmentFactory.java
index b8a3e5882..6a9db2f8d 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEnvironmentFactory.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEnvironmentFactory.java
@@ -11,54 +11,40 @@
*******************************************************************************/
package org.eclipse.qvtd.debug.evaluator;
-import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.ocl.examples.debug.vm.IVMDebuggerShell;
+import org.eclipse.ocl.examples.debug.vm.evaluator.AbstractVMEnvironmentFactory;
import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEnvironmentFactory;
import org.eclipse.ocl.pivot.NamedElement;
-import org.eclipse.ocl.pivot.evaluation.EvaluationEnvironment;
-import org.eclipse.ocl.pivot.resource.ProjectManager;
import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.qvtd.pivot.qvtbase.Transformation;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiEnvironmentFactory;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiModelManager;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiTransformationAnalysis;
-public class QVTiVMEnvironmentFactory extends QVTiEnvironmentFactory implements IVMEnvironmentFactory
+public class QVTiVMEnvironmentFactory extends AbstractVMEnvironmentFactory implements IVMEnvironmentFactory
{
- private @Nullable IVMDebuggerShell shell;
- private long envId = 0;
-
- public QVTiVMEnvironmentFactory(@NonNull ProjectManager projectMap, @Nullable ResourceSet externalResourceSet) {
- super(projectMap, externalResourceSet);
+ public QVTiVMEnvironmentFactory(@NonNull QVTiEnvironmentFactory environmentFactory) {
+ super(environmentFactory);
}
- public @NonNull IQVTiVMEvaluationEnvironment createEvaluationEnvironment(@NonNull Transformation transformation, @NonNull QVTiModelManager modelManager) {
- return new QVTiVMRootEvaluationEnvironment(this, transformation, modelManager, ++envId);
+ public @NonNull IQVTiVMEvaluationEnvironment createVMEvaluationEnvironment(@NonNull Transformation transformation, @NonNull QVTiModelManager modelManager) {
+ return new QVTiVMRootEvaluationEnvironment(this, transformation, modelManager, getNextEnvironmentId());
}
- @Override
- public @NonNull IQVTiVMEvaluationEnvironment createEvaluationEnvironment(@NonNull EvaluationEnvironment parent, @NonNull NamedElement operation) {
- return new QVTiVMNestedEvaluationEnvironment((IQVTiVMEvaluationEnvironment) parent, operation, ++envId);
+ public @NonNull IQVTiVMEvaluationEnvironment createVMEvaluationEnvironment(@NonNull IQVTiVMEvaluationEnvironment parent, @NonNull NamedElement operation) {
+ return new QVTiVMNestedEvaluationEnvironment(parent, operation, getNextEnvironmentId());
}
- @Override
- public @NonNull QVTiVMRootEvaluationVisitor createEvaluationVisitor(@NonNull EvaluationEnvironment evalEnv) {
- return new QVTiVMRootEvaluationVisitor((IQVTiVMEvaluationEnvironment) evalEnv, ClassUtil.nonNullState(shell));
+ public @NonNull QVTiVMRootEvaluationVisitor createVMEvaluationVisitor(@NonNull IQVTiVMEvaluationEnvironment evalEnv) {
+ return new QVTiVMRootEvaluationVisitor(evalEnv, ClassUtil.nonNullState(getShell()));
}
- @Override
- public @NonNull QVTiVMModelManager createModelManager(@NonNull QVTiTransformationAnalysis transformationAnalysis) {
+ public @NonNull QVTiVMModelManager createVMModelManager(@NonNull QVTiTransformationAnalysis transformationAnalysis) {
return new QVTiVMModelManager(transformationAnalysis);
}
@Override
- public boolean keepDebug() {
- return true;
- }
-
- public void setShell(@Nullable IVMDebuggerShell shell) {
- this.shell = shell;
+ public @NonNull QVTiEnvironmentFactory getEnvironmentFactory() {
+ return (QVTiEnvironmentFactory) super.getEnvironmentFactory();
}
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluationVisitor.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluationVisitor.java
index 424b2fecb..48dad22ba 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluationVisitor.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluationVisitor.java
@@ -17,7 +17,6 @@ import org.eclipse.ocl.pivot.NamedElement;
import org.eclipse.ocl.pivot.evaluation.EvaluationEnvironment;
import org.eclipse.ocl.pivot.evaluation.EvaluationVisitor;
import org.eclipse.qvtd.debug.QVTiDebugPlugin;
-import org.eclipse.qvtd.pivot.qvtbase.Transformation;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiEvaluationVisitor;
/**
@@ -40,7 +39,8 @@ public class QVTiVMEvaluationVisitor extends QVTiEvaluationVisitor implements IQ
@Override
public @NonNull IQVTiVMEvaluationVisitor createNestedEvaluator() {
- IQVTiVMEvaluationEnvironment nestedEvalEnv = getEnvironmentFactory().createEvaluationEnvironment(evaluationEnvironment, evaluationEnvironment.getExecutableObject());
+ IQVTiVMEvaluationEnvironment vmEvaluationEnvironment = (IQVTiVMEvaluationEnvironment)evaluationEnvironment;
+ IQVTiVMEvaluationEnvironment nestedEvalEnv = getVMEnvironmentFactory().createVMEvaluationEnvironment(vmEvaluationEnvironment, evaluationEnvironment.getExecutableObject());
QVTiVMEvaluationVisitor ne = new QVTiVMEvaluationVisitor(nestedEvalEnv);
return ne;
}
@@ -59,14 +59,14 @@ public class QVTiVMEvaluationVisitor extends QVTiEvaluationVisitor implements IQ
public void dispose() {}
@Override
- public @NonNull IVMEvaluationVisitor<Transformation> getClonedEvaluator() {
+ public @NonNull IVMEvaluationVisitor getClonedEvaluator() {
IQVTiVMEvaluationEnvironment oldEvaluationEnvironment = getEvaluationEnvironment();
IQVTiVMEvaluationEnvironment clonedEvaluationEnvironment = oldEvaluationEnvironment.createClonedEvaluationEnvironment();
return new QVTiVMEvaluationVisitor(clonedEvaluationEnvironment);
}
- @Override
- public @NonNull QVTiVMEnvironmentFactory getEnvironmentFactory() {
+// @Override
+ public @NonNull QVTiVMEnvironmentFactory getVMEnvironmentFactory() {
return (QVTiVMEnvironmentFactory) environmentFactory;
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluator.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluator.java
index 5f8a9742b..8145776c0 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluator.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMEvaluator.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEvaluator;
-import org.eclipse.ocl.examples.debug.vm.evaluator.IVMModelManager;
import org.eclipse.ocl.pivot.utilities.MetamodelManager;
import org.eclipse.ocl.pivot.utilities.NameUtil;
import org.eclipse.qvtd.pivot.qvtbase.Transformation;
@@ -61,22 +60,21 @@ public class QVTiVMEvaluator implements IVMEvaluator
protected final @NonNull MetamodelManager metamodelManager;
protected final @NonNull Transformation transformation;
- protected final @NonNull QVTiVMEnvironmentFactory environmentFactory;
- protected final @NonNull QVTiVMModelManager modelManager;
+ protected final @NonNull QVTiVMEnvironmentFactory vmEnvironmentFactory;
+ protected final @NonNull QVTiVMModelManager vmModelManager;
private boolean suspendOnStartup = false;
- private QVTiVMEvaluator(@NonNull QVTiVMEnvironmentFactory environmentFactory, @NonNull Transformation transformation) {
- this.environmentFactory = environmentFactory;
- this.metamodelManager = environmentFactory.getMetamodelManager();
+ private QVTiVMEvaluator(@NonNull QVTiVMEnvironmentFactory vmEnvironmentFactory, @NonNull Transformation transformation) {
+ this.vmEnvironmentFactory = vmEnvironmentFactory;
+ this.metamodelManager = vmEnvironmentFactory.getEnvironmentFactory().getMetamodelManager();
this.transformation = transformation;
- QVTiTransformationAnalysis transformationAnalysis = environmentFactory.createTransformationAnalysis();
+ QVTiTransformationAnalysis transformationAnalysis = vmEnvironmentFactory.getEnvironmentFactory().createTransformationAnalysis();
transformationAnalysis.analyzeTransformation(transformation);
- this.modelManager = environmentFactory.createModelManager(transformationAnalysis);
-// this.modelManager = envFactory.createModelManager(metamodelManager);
+ this.vmModelManager = vmEnvironmentFactory.createVMModelManager(transformationAnalysis);
}
- public QVTiVMEvaluator(@NonNull QVTiVMEnvironmentFactory envFactory, @NonNull URI transformationURI) throws IOException {
- this(envFactory, QVTiXtextEvaluator.loadTransformation(ImperativeModel.class, envFactory, transformationURI, envFactory.keepDebug()));
+ public QVTiVMEvaluator(@NonNull QVTiVMEnvironmentFactory vmEnvironmentFactory, @NonNull URI transformationURI) throws IOException {
+ this(vmEnvironmentFactory, QVTiXtextEvaluator.loadTransformation(ImperativeModel.class, vmEnvironmentFactory.getEnvironmentFactory(), transformationURI, vmEnvironmentFactory.keepDebug()));
}
public void createModel(@NonNull String name, @NonNull URI modelURI, String contentType) {
@@ -84,20 +82,20 @@ public class QVTiVMEvaluator implements IVMEvaluator
if (typedModel == null) {
throw new IllegalStateException("Unknown TypedModel '" + name + "'");
}
- Resource resource = environmentFactory.getResourceSet().createResource(modelURI, contentType);
+ Resource resource = vmEnvironmentFactory.getEnvironmentFactory().getResourceSet().createResource(modelURI, contentType);
if (resource != null) {
- modelManager.addModel(typedModel, resource);
+ vmModelManager.addModel(typedModel, resource);
}
}
public void dispose() {
- modelManager.dispose();
+ vmModelManager.dispose();
}
public Boolean execute() {
Transformation transformation = getTransformation();
- IQVTiVMEvaluationEnvironment evalEnv = environmentFactory.createEvaluationEnvironment(transformation, modelManager);
- QVTiVMRootEvaluationVisitor visitor = environmentFactory.createEvaluationVisitor(evalEnv);
+ IQVTiVMEvaluationEnvironment evalEnv = vmEnvironmentFactory.createVMEvaluationEnvironment(transformation, vmModelManager);
+ QVTiVMRootEvaluationVisitor visitor = vmEnvironmentFactory.createVMEvaluationVisitor(evalEnv);
visitor.start(suspendOnStartup);
return (Boolean) transformation.accept(visitor);
}
@@ -108,20 +106,21 @@ public class QVTiVMEvaluator implements IVMEvaluator
}
public final @NonNull QVTiVMEnvironmentFactory getEnvironmentFactory() {
- return environmentFactory;
+ return vmEnvironmentFactory;
}
public final @NonNull MetamodelManager getMetamodelManager() {
return metamodelManager;
}
- public final @NonNull IVMModelManager getModelManager() {
- return modelManager;
- }
-
public @NonNull Transformation getTransformation() {
return transformation;
}
+
+ public final @NonNull QVTiVMModelManager getVMModelManager() {
+ return vmModelManager;
+ }
+
public void loadModel(@NonNull String name, @NonNull URI modelURI, String contentType) {
TypedModel typedModel = NameUtil.getNameable(transformation.getModelParameter(), name);
if (typedModel == null) {
@@ -129,10 +128,10 @@ public class QVTiVMEvaluator implements IVMEvaluator
}
Resource resource;
if (contentType == null) {
- resource = environmentFactory.getResourceSet().getResource(modelURI, true);
+ resource = vmEnvironmentFactory.getEnvironmentFactory().getResourceSet().getResource(modelURI, true);
}
else {
- resource = environmentFactory.getResourceSet().createResource(modelURI, contentType);
+ resource = vmEnvironmentFactory.getEnvironmentFactory().getResourceSet().createResource(modelURI, contentType);
try {
resource.load(null);
} catch (IOException e) {
@@ -141,7 +140,7 @@ public class QVTiVMEvaluator implements IVMEvaluator
}
}
if (resource != null) {
- modelManager.addModel(typedModel, resource);
+ vmModelManager.addModel(typedModel, resource);
}
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationEnvironment.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationEnvironment.java
index 461ddfaf8..d8752056a 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationEnvironment.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationEnvironment.java
@@ -19,6 +19,7 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.examples.debug.vm.UnitLocation;
import org.eclipse.ocl.examples.debug.vm.core.VMDebugCore;
+import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEnvironmentFactory;
import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEvaluationEnvironment;
import org.eclipse.ocl.examples.debug.vm.utils.ASTBindingHelper;
import org.eclipse.ocl.examples.debug.vm.utils.VMRuntimeException;
@@ -31,6 +32,7 @@ import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiNestedEvaluationEnvir
public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvironment implements IQVTiVMEvaluationEnvironment
{
+ protected final @NonNull IVMEnvironmentFactory vmEnvironmentFactory;
private @NonNull Element myCurrentIP;
private @NonNull NamedElement myOperation; // Redundant if final
private final int myStackDepth;
@@ -39,6 +41,7 @@ public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvir
public QVTiVMNestedEvaluationEnvironment(@NonNull IQVTiVMEvaluationEnvironment evaluationEnvironment, @NonNull NamedElement executableObject, long id) {
super(evaluationEnvironment, executableObject);
+ this.vmEnvironmentFactory = evaluationEnvironment.getVMEnvironmentFactory();
myStackDepth = evaluationEnvironment.getDepth() + 1;
this.id = id;
this.myOperation = executableObject;
@@ -67,11 +70,11 @@ public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvir
}
public @NonNull VMDebugCore getDebugCore() {
- return getRootEvaluationEnvironment().getDebugCore();
+ return getVMRootEvaluationEnvironment().getDebugCore();
}
public @NonNull Transformation getDebuggableElement() {
- return getRootEvaluationEnvironment().getDebuggableElement();
+ return getVMRootEvaluationEnvironment().getDebuggableElement();
}
@Override
@@ -95,7 +98,7 @@ public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvir
}
public @NonNull Map<String, Resource> getModelParameterVariables() {
- return getRootEvaluationEnvironment().getModelParameterVariables();
+ return getVMRootEvaluationEnvironment().getModelParameterVariables();
}
@Override
@@ -105,16 +108,16 @@ public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvir
@Override
@NonNull public Variable getPCVariable() {
- return getRootEvaluationEnvironment().getPCVariable();
+ return getVMRootEvaluationEnvironment().getPCVariable();
}
@Override
- public @Nullable IQVTiVMEvaluationEnvironment getParentEvaluationEnvironment() {
+ public @Nullable IQVTiVMEvaluationEnvironment getVMParentEvaluationEnvironment() {
return (IQVTiVMEvaluationEnvironment) super.getParentEvaluationEnvironment();
}
@Override
- public @NonNull QVTiVMRootEvaluationEnvironment getRootEvaluationEnvironment() {
+ public @NonNull QVTiVMRootEvaluationEnvironment getVMRootEvaluationEnvironment() {
return (QVTiVMRootEvaluationEnvironment) rootEvaluationEnvironment;
}
@@ -123,12 +126,17 @@ public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvir
return stepperStack;
}
+ @Override
+ public @NonNull IVMEnvironmentFactory getVMEnvironmentFactory() {
+ return vmEnvironmentFactory;
+ }
+
public boolean isDeferredExecution() {
- return getRootEvaluationEnvironment().isDeferredExecution();
+ return getVMRootEvaluationEnvironment().isDeferredExecution();
}
public void processDeferredTasks() {
- getRootEvaluationEnvironment().processDeferredTasks();
+ getVMRootEvaluationEnvironment().processDeferredTasks();
}
public @NonNull Element setCurrentIP(@NonNull Element element) {
@@ -144,7 +152,7 @@ public class QVTiVMNestedEvaluationEnvironment extends QVTiNestedEvaluationEnvir
public void throwVMException(@NonNull VMRuntimeException exception) throws VMRuntimeException {
try {
- getRootEvaluationEnvironment().saveThrownException(exception);
+ getVMRootEvaluationEnvironment().saveThrownException(exception);
exception.setStackVMTrace(new VMStackTraceBuilder(this).buildStackTrace());
} catch (Exception e) {
getDebugCore().error("Failed to build QVT stack trace", e); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationVisitor.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationVisitor.java
index 22c49fcc2..94e23c192 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationVisitor.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMNestedEvaluationVisitor.java
@@ -31,7 +31,7 @@ public class QVTiVMNestedEvaluationVisitor extends AbstractQVTiVMEvaluationVisit
}
@Override
- protected @Nullable Object badVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv,
+ protected @Nullable Object badVisit(@NonNull IVMEvaluationEnvironment evalEnv,
@NonNull Element element, Object preState, @NonNull Throwable e) {
return root.badVisit(evalEnv, element, preState, e);
}
@@ -48,11 +48,11 @@ public class QVTiVMNestedEvaluationVisitor extends AbstractQVTiVMEvaluationVisit
return root;
}
- protected void postVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element, @Nullable Object result) {
+ protected void postVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element, @Nullable Object result) {
root.postVisit(evalEnv, element, result);
}
- protected @Nullable Element preVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element) {
+ protected @Nullable Element preVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element) {
return root.preVisit(evalEnv, element);
}
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationEnvironment.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationEnvironment.java
index fb354bbeb..a79e036de 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationEnvironment.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationEnvironment.java
@@ -21,7 +21,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.examples.debug.vm.UnitLocation;
-import org.eclipse.ocl.examples.debug.vm.evaluator.IVMRootEvaluationEnvironment;
+import org.eclipse.ocl.examples.debug.vm.evaluator.IVMEnvironmentFactory;
import org.eclipse.ocl.examples.debug.vm.utils.ASTBindingHelper;
import org.eclipse.ocl.examples.debug.vm.utils.VMRuntimeException;
import org.eclipse.ocl.examples.debug.vm.utils.VMStackTraceBuilder;
@@ -30,7 +30,6 @@ import org.eclipse.ocl.pivot.NamedElement;
import org.eclipse.ocl.pivot.PivotFactory;
import org.eclipse.ocl.pivot.PivotPackage;
import org.eclipse.ocl.pivot.Variable;
-import org.eclipse.ocl.pivot.internal.utilities.EnvironmentFactoryInternal;
import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.qvtd.debug.core.QVTiDebugCore;
import org.eclipse.qvtd.pivot.qvtbase.Transformation;
@@ -38,8 +37,9 @@ import org.eclipse.qvtd.pivot.qvtbase.TypedModel;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiModelManager;
import org.eclipse.qvtd.pivot.qvtimperative.evaluation.QVTiRootEvaluationEnvironment;
-public class QVTiVMRootEvaluationEnvironment extends QVTiRootEvaluationEnvironment implements IQVTiVMEvaluationEnvironment,IVMRootEvaluationEnvironment<Transformation>
+public class QVTiVMRootEvaluationEnvironment extends QVTiRootEvaluationEnvironment implements IQVTiVMEvaluationEnvironment
{
+ protected final @NonNull IVMEnvironmentFactory vmEnvironmentFactory;
// private IContext myContext;
private List<Runnable> myDeferredTasks;
// private EObjectEStructuralFeaturePair myLastAssignLvalue;
@@ -52,8 +52,9 @@ public class QVTiVMRootEvaluationEnvironment extends QVTiRootEvaluationEnvironme
private final @NonNull Variable pcVariable;
private final @NonNull Stack<StepperEntry> stepperStack = new Stack<StepperEntry>();
- public QVTiVMRootEvaluationEnvironment(@NonNull EnvironmentFactoryInternal environmentFactory, @NonNull Transformation executableObject, @NonNull QVTiModelManager modelManager, long id) {
- super(environmentFactory, executableObject, modelManager);
+ public QVTiVMRootEvaluationEnvironment(@NonNull IVMEnvironmentFactory vmEnvironmentFactory, @NonNull Transformation executableObject, @NonNull QVTiModelManager modelManager, long id) {
+ super(vmEnvironmentFactory.getEnvironmentFactory(), executableObject, modelManager);
+ this.vmEnvironmentFactory = vmEnvironmentFactory;
myCurrentIP = executableObject;
this.id = id;
pcVariable = ClassUtil.nonNullEMF(PivotFactory.eINSTANCE.createVariable());
@@ -149,17 +150,12 @@ public class QVTiVMRootEvaluationEnvironment extends QVTiRootEvaluationEnvironme
}
@Override
- public @Nullable QVTiVMRootEvaluationEnvironment getParentEvaluationEnvironment() {
- return (QVTiVMRootEvaluationEnvironment) super.getParentEvaluationEnvironment();
- }
-
- @Override
@NonNull public Variable getPCVariable() {
return pcVariable;
}
@Override
- public @NonNull QVTiVMRootEvaluationEnvironment getRootEvaluationEnvironment() {
+ public @NonNull QVTiRootEvaluationEnvironment getRootEvaluationEnvironment() {
return this;
}
@@ -168,6 +164,21 @@ public class QVTiVMRootEvaluationEnvironment extends QVTiRootEvaluationEnvironme
return stepperStack;
}
+ @Override
+ public @NonNull IVMEnvironmentFactory getVMEnvironmentFactory() {
+ return vmEnvironmentFactory;
+ }
+
+ @Override
+ public @Nullable QVTiVMRootEvaluationEnvironment getVMParentEvaluationEnvironment() {
+ return (QVTiVMRootEvaluationEnvironment) super.getParentEvaluationEnvironment();
+ }
+
+ @Override
+ public @NonNull QVTiVMRootEvaluationEnvironment getVMRootEvaluationEnvironment() {
+ return this;
+ }
+
@Override
public boolean isDeferredExecution() {
return myIsDeferedExecution;
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationVisitor.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationVisitor.java
index a17bb00b5..69fd55505 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationVisitor.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/evaluator/QVTiVMRootEvaluationVisitor.java
@@ -57,9 +57,8 @@ import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.qvtd.debug.core.QVTiDebugCore;
import org.eclipse.qvtd.debug.stepper.QVTiStepperVisitor;
import org.eclipse.qvtd.debug.vm.QVTiVMVirtualMachine;
-import org.eclipse.qvtd.pivot.qvtbase.Transformation;
-public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor implements IVMRootEvaluationVisitor<Transformation>
+public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor implements IVMRootEvaluationVisitor
{
private final @NonNull IVMDebuggerShell fDebugShell;
private final @NonNull VMBreakpointManager fBPM;
@@ -86,7 +85,7 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
}
@Override
- protected @Nullable Object badVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv,
+ protected @Nullable Object badVisit(@NonNull IVMEvaluationEnvironment evalEnv,
@NonNull Element element, Object preState, @NonNull Throwable e) {
Stack<IVMEvaluationEnvironment.StepperEntry> stepperStack = evalEnv.getStepperStack();
if (!stepperStack.isEmpty()) {
@@ -141,7 +140,7 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
public @NonNull UnitLocation getCurrentLocation() {
AbstractQVTiVMEvaluationVisitor currentVisitor = visitorStack.peek();
- IVMEvaluationEnvironment<?> evaluationEnvironment = currentVisitor.getEvaluationEnvironment();
+ IVMEvaluationEnvironment evaluationEnvironment = currentVisitor.getVMEvaluationEnvironment();
return evaluationEnvironment.getCurrentLocation();
// return fCurrentLocation;
}
@@ -157,8 +156,8 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
public @NonNull List<UnitLocation> getLocationStack() {
List<UnitLocation> fLocationStack = new ArrayList<UnitLocation>();
- IVMEvaluationEnvironment<?> leafEvaluationEnvironment = visitorStack.peek().getEvaluationEnvironment();
- for (IVMEvaluationEnvironment<?> evaluationEnvironment = leafEvaluationEnvironment; evaluationEnvironment != null; evaluationEnvironment = evaluationEnvironment.getParentEvaluationEnvironment()) {
+ IVMEvaluationEnvironment leafEvaluationEnvironment = visitorStack.peek().getVMEvaluationEnvironment();
+ for (IVMEvaluationEnvironment evaluationEnvironment = leafEvaluationEnvironment; evaluationEnvironment != null; evaluationEnvironment = evaluationEnvironment.getVMParentEvaluationEnvironment()) {
Element element = evaluationEnvironment.getCurrentIP();
IStepper stepper = getStepperVisitor().getStepper(element);
UnitLocation unitLocation = stepper.createUnitLocation(evaluationEnvironment, element);
@@ -302,7 +301,7 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
return location.getStackDepth() < fCurrentLocation.getStackDepth();
}
- private @NonNull UnitLocation newLocalLocation(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element node, int startPosition, int endPosition) {
+ private @NonNull UnitLocation newLocalLocation(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element node, int startPosition, int endPosition) {
return new UnitLocation(startPosition, endPosition, evalEnv, node);
}
@@ -320,7 +319,7 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
// }
}
- protected void postVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element, @Nullable Object result) {
+ protected void postVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element, @Nullable Object result) {
Stack<IVMEvaluationEnvironment.StepperEntry> stepperStack = evalEnv.getStepperStack();
if (stepperStack.isEmpty()) {
return;
@@ -366,7 +365,7 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
}
}
- protected @Nullable Element preVisit(@NonNull IVMEvaluationEnvironment<?> evalEnv, @NonNull Element element) {
+ protected @Nullable Element preVisit(@NonNull IVMEvaluationEnvironment evalEnv, @NonNull Element element) {
Stack<IVMEvaluationEnvironment.StepperEntry> stepperStack = evalEnv.getStepperStack();
IStepper stepper = getStepperVisitor().getStepper(element);
stepperStack.push(new IVMEvaluationEnvironment.StepperEntry(stepper, element));
@@ -502,7 +501,7 @@ public class QVTiVMRootEvaluationVisitor extends AbstractQVTiVMEvaluationVisitor
}
private void terminate() throws VMInterruptedExecutionException {
- IVMEvaluationEnvironment<?> evalEnv = getEvaluationEnvironment();
+ IVMEvaluationEnvironment evalEnv = getEvaluationEnvironment();
evalEnv.throwVMException(new VMInterruptedExecutionException("User termination request"));
}
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiDebuggableRunnerFactory.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiDebuggableRunnerFactory.java
index 138962f7a..ecf2ca8b0 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiDebuggableRunnerFactory.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiDebuggableRunnerFactory.java
@@ -64,7 +64,7 @@ public class QVTiDebuggableRunnerFactory extends DebuggableRunnerFactory
if(diagnostic.getSeverity() == Diagnostic.ERROR) {
throw new DiagnosticException(diagnostic);
} */
- IVMEnvironmentFactory environmentFactory = evaluationContext.getEnvironmentFactory();
+ IVMEnvironmentFactory environmentFactory = evaluationContext.getVMEnvironmentFactory();
QVTiInternalDebuggableExecutor executor = new QVTiInternalDebuggableExecutor(qvtiEvaluationContext, (QVTiVMEnvironmentFactory) environmentFactory);
DebuggableRunner runner = new DebuggableRunner(this, qvtiEvaluationContext.getTransformationURI(), executor);
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiInternalDebuggableExecutor.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiInternalDebuggableExecutor.java
index 6c2c487cc..2578e9859 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiInternalDebuggableExecutor.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/launching/QVTiInternalDebuggableExecutor.java
@@ -30,13 +30,13 @@ public class QVTiInternalDebuggableExecutor extends InternalDebuggableExecutor
{
protected final @NonNull QVTiEvaluationContext evaluationContext;
- public QVTiInternalDebuggableExecutor(@NonNull QVTiEvaluationContext evaluationContext, @NonNull QVTiVMEnvironmentFactory environmentFactory) {
- super(environmentFactory, evaluationContext.getTransformationURI());
+ public QVTiInternalDebuggableExecutor(@NonNull QVTiEvaluationContext evaluationContext, @NonNull QVTiVMEnvironmentFactory vmEnvironmentFactory) {
+ super(vmEnvironmentFactory, evaluationContext.getTransformationURI());
this.evaluationContext = evaluationContext;
}
- protected @NonNull QVTiVMEvaluator createEvaluator() throws IOException {
- QVTiVMEvaluator evaluator = new QVTiVMEvaluator((QVTiVMEnvironmentFactory) environmentFactory, evaluationContext.getTransformationURI());
+ protected @NonNull QVTiVMEvaluator createVMEvaluator() throws IOException {
+ QVTiVMEvaluator evaluator = new QVTiVMEvaluator((QVTiVMEnvironmentFactory) vmEnvironmentFactory, evaluationContext.getTransformationURI());
for (Map.Entry<String, URI> inEntry : evaluationContext.getInputURIs().entrySet()) {
@SuppressWarnings("null")@NonNull String inKey = inEntry.getKey();
@SuppressWarnings("null")@NonNull URI inURI = inEntry.getValue();
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PrePostStepper.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PrePostStepper.java
index 73dc7a352..b9b4c606f 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PrePostStepper.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PrePostStepper.java
@@ -21,12 +21,12 @@ public class PrePostStepper extends AbstractStepper
public static @NonNull PrePostStepper INSTANCE = new PrePostStepper();
@Override
- public @Nullable Element isPostStoppable(@NonNull IVMRootEvaluationVisitor<?> rootVMEvaluationVisitor, @NonNull Element childElement, @Nullable Object result) {
+ public @Nullable Element isPostStoppable(@NonNull IVMRootEvaluationVisitor rootVMEvaluationVisitor, @NonNull Element childElement, @Nullable Object result) {
return childElement;
}
@Override
- public boolean isPreStoppable(@NonNull IVMRootEvaluationVisitor<?> rootVMEvaluationVisitor, @NonNull Element element) {
+ public boolean isPreStoppable(@NonNull IVMRootEvaluationVisitor rootVMEvaluationVisitor, @NonNull Element element) {
return true;
}
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PreStepper.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PreStepper.java
index d2219c393..45f7ec707 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PreStepper.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/stepper/PreStepper.java
@@ -21,12 +21,12 @@ public class PreStepper extends AbstractStepper
public static @NonNull PreStepper INSTANCE = new PreStepper();
@Override
- public @Nullable Element isPostStoppable(@NonNull IVMRootEvaluationVisitor<?> rootVMEvaluationVisitor, @NonNull Element childElement, @Nullable Object result) {
+ public @Nullable Element isPostStoppable(@NonNull IVMRootEvaluationVisitor rootVMEvaluationVisitor, @NonNull Element childElement, @Nullable Object result) {
return null;
}
@Override
- public boolean isPreStoppable(@NonNull IVMRootEvaluationVisitor<?> rootVMEvaluationVisitor, @NonNull Element element) {
+ public boolean isPreStoppable(@NonNull IVMRootEvaluationVisitor rootVMEvaluationVisitor, @NonNull Element element) {
return true;
}
}
diff --git a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/vm/QVTiVMVirtualMachine.java b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/vm/QVTiVMVirtualMachine.java
index 2257b63e8..161a1a03b 100644
--- a/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/vm/QVTiVMVirtualMachine.java
+++ b/plugins/org.eclipse.qvtd.debug/src/org/eclipse/qvtd/debug/vm/QVTiVMVirtualMachine.java
@@ -139,7 +139,7 @@ public class QVTiVMVirtualMachine extends VMVirtualMachine
}
private static @NonNull VMStackFrameData createStackFrame(@NonNull UnitLocation location, boolean includeVars) {
- IVMEvaluationEnvironment<?> evalEnv = location.getEvalEnv();
+ IVMEvaluationEnvironment evalEnv = location.getEvalEnv();
NamedElement module = location.getModule();
String moduleName = (module != null) ? module.getName() : null;
if (moduleName == null) moduleName = "<null>"; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiPivotEvaluator.java b/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiPivotEvaluator.java
index e6bd023e6..a68016822 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiPivotEvaluator.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiPivotEvaluator.java
@@ -22,7 +22,7 @@ import org.eclipse.ocl.pivot.Variable;
import org.eclipse.ocl.pivot.evaluation.EvaluationEnvironment;
import org.eclipse.ocl.pivot.evaluation.EvaluationVisitor;
import org.eclipse.ocl.pivot.internal.complete.StandardLibraryInternal;
-import org.eclipse.ocl.pivot.internal.manager.PivotMetamodelManager;
+import org.eclipse.ocl.pivot.internal.manager.MetamodelManagerInternal;
import org.eclipse.ocl.pivot.utilities.NameUtil;
import org.eclipse.qvtd.pivot.qvtbase.Transformation;
import org.eclipse.qvtd.pivot.qvtbase.TypedModel;
@@ -114,7 +114,7 @@ public class QVTiPivotEvaluator implements EvaluationMonitor
return environmentFactory;
}
- public final @NonNull PivotMetamodelManager getMetamodelManager() {
+ public final @NonNull MetamodelManagerInternal getMetamodelManager() {
return environmentFactory.getMetamodelManager();
}
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiTransformationAnalysis.java b/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiTransformationAnalysis.java
index 83bb76465..4d9700b0f 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiTransformationAnalysis.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/src/org/eclipse/qvtd/pivot/qvtimperative/evaluation/QVTiTransformationAnalysis.java
@@ -31,7 +31,7 @@ import org.eclipse.ocl.pivot.Type;
import org.eclipse.ocl.pivot.ids.IdManager;
import org.eclipse.ocl.pivot.ids.OperationId;
import org.eclipse.ocl.pivot.ids.TypeId;
-import org.eclipse.ocl.pivot.internal.manager.PivotMetamodelManager;
+import org.eclipse.ocl.pivot.internal.manager.MetamodelManagerInternal;
import org.eclipse.ocl.pivot.internal.utilities.EnvironmentFactoryInternal;
import org.eclipse.qvtd.pivot.qvtbase.Transformation;
import org.eclipse.qvtd.pivot.qvtcorebase.PropertyAssignment;
@@ -87,7 +87,7 @@ public class QVTiTransformationAnalysis
* @deprecated Use EnvironmentFactoryInternal constructor
*/
@Deprecated
- public QVTiTransformationAnalysis(@NonNull PivotMetamodelManager metamodelManager) {
+ public QVTiTransformationAnalysis(@NonNull MetamodelManagerInternal metamodelManager) {
this(metamodelManager.getEnvironmentFactory());
}
@@ -99,7 +99,7 @@ public class QVTiTransformationAnalysis
protected @NonNull Integer allocateCacheIndex(@Nullable OCLExpression sourceExpression, @NonNull Property navigableProperty) {
Integer cacheIndex = property2cacheIndex.get(navigableProperty);
if (cacheIndex == null) {
- @SuppressWarnings("null")@NonNull Integer size = property2cacheIndex.size();
+ Integer size = property2cacheIndex.size();
property2cacheIndex.put(navigableProperty, size);
if (sourceExpression != null) {
DomainUsage sourceUsage = domainAnalysis.getUsage(sourceExpression);
@@ -217,7 +217,7 @@ public class QVTiTransformationAnalysis
*/
public @NonNull Map<org.eclipse.ocl.pivot.Class, List<org.eclipse.ocl.pivot.Class>> getInstancesClassAnalysis(@NonNull Iterable<org.eclipse.ocl.pivot.Class> instanceClasses) {
Map<org.eclipse.ocl.pivot.Class, List<org.eclipse.ocl.pivot.Class>> instancesClassAnalysis = new HashMap<org.eclipse.ocl.pivot.Class, List<org.eclipse.ocl.pivot.Class>>();
- PivotMetamodelManager metamodelManager = environmentFactory.getMetamodelManager();
+ MetamodelManagerInternal metamodelManager = environmentFactory.getMetamodelManager();
for (@SuppressWarnings("null")@NonNull org.eclipse.ocl.pivot.Class instanceClass : instanceClasses) {
CompleteClass completeInstanceClass = metamodelManager.getCompleteClass(instanceClass);
instancesClassAnalysis.put(completeInstanceClass.getPrimaryClass(), null);
@@ -237,7 +237,7 @@ public class QVTiTransformationAnalysis
return instancesClassAnalysis;
}
- public @NonNull PivotMetamodelManager getMetamodelManager() {
+ public @NonNull MetamodelManagerInternal getMetamodelManager() {
return environmentFactory.getMetamodelManager();
}

Back to the top