Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-10-06 11:47:23 +0000
committerEd Willink2016-10-29 18:15:41 +0000
commitea326f93fe56037684241dbac254c0d9a62aa2f2 (patch)
tree84ea604c6e3e999711c94647af79beaf7346a60f /plugins
parent4a4f124c6fb0c9708a8be47bd3d7c4456c503270 (diff)
downloadorg.eclipse.qvtd-ea326f93fe56037684241dbac254c0d9a62aa2f2.tar.gz
org.eclipse.qvtd-ea326f93fe56037684241dbac254c0d9a62aa2f2.tar.xz
org.eclipse.qvtd-ea326f93fe56037684241dbac254c0d9a62aa2f2.zip
[500962] Use TransformationExecutor for transformations
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java4
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformationExecutor.java13
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformer.java9
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/cs2as/AbstractCS2ASTransformer.java4
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java6
5 files changed, 17 insertions, 19 deletions
diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java
index f06bfe1f0..fd86172c8 100644
--- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java
+++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java
@@ -59,7 +59,6 @@ import org.eclipse.ocl.pivot.Property;
import org.eclipse.ocl.pivot.SetType;
import org.eclipse.ocl.pivot.ShadowPart;
import org.eclipse.ocl.pivot.VariableDeclaration;
-import org.eclipse.ocl.pivot.evaluation.Executor;
import org.eclipse.ocl.pivot.ids.ClassId;
import org.eclipse.ocl.pivot.ids.CollectionTypeId;
import org.eclipse.ocl.pivot.ids.ElementId;
@@ -113,6 +112,7 @@ import org.eclipse.qvtd.runtime.evaluation.AbstractTransformer;
import org.eclipse.qvtd.runtime.evaluation.AbstractValueOccurrence;
import org.eclipse.qvtd.runtime.evaluation.InvocationManager;
import org.eclipse.qvtd.runtime.evaluation.ObjectManager;
+import org.eclipse.qvtd.runtime.evaluation.TransformationExecutor;
import org.eclipse.qvtd.runtime.evaluation.Transformer;
import org.eclipse.qvtd.runtime.internal.evaluation.AbstractComputationConstructor;
import org.eclipse.qvtd.runtime.internal.evaluation.AbstractInvocationConstructor;
@@ -370,7 +370,7 @@ public class QVTiCG2JavaVisitor extends CG2JavaVisitor<@NonNull QVTiCodeGenerato
js.append("public " + className + "(final ");
js.appendIsRequired(true);
js.append(" ");
- js.appendClassReference(Executor.class);
+ js.appendClassReference(TransformationExecutor.class);
js.append(" " + evaluatorName + ") {\n");
js.pushIndentation(null);
js.append("super(" + evaluatorName + ", new ");
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformationExecutor.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformationExecutor.java
index 5df1e5d8a..1110bc9a1 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformationExecutor.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformationExecutor.java
@@ -13,7 +13,6 @@ package org.eclipse.qvtd.runtime.evaluation;
import java.lang.reflect.Constructor;
import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.ocl.pivot.evaluation.Executor;
import org.eclipse.ocl.pivot.evaluation.ModelManager;
import org.eclipse.ocl.pivot.ids.IdResolver;
import org.eclipse.ocl.pivot.internal.library.executor.ExecutorManager;
@@ -27,17 +26,17 @@ public abstract class AbstractTransformationExecutor extends ExecutorManager imp
{
protected final @NonNull EnvironmentFactory environmentFactory;
protected final @NonNull Transformer transformer;
-
- private AbstractTransformationExecutor(@NonNull EnvironmentFactory environmentFactory, @NonNull Constructor<? extends Transformer> txConstructor)
+
+ private AbstractTransformationExecutor(@NonNull EnvironmentFactory environmentFactory, @NonNull Constructor<? extends Transformer> txConstructor)
throws ReflectiveOperationException {
super(environmentFactory.getCompleteEnvironment());
this.environmentFactory = environmentFactory;
transformer = ClassUtil.nonNullState(txConstructor.newInstance(this));
}
-
- protected AbstractTransformationExecutor(@NonNull EnvironmentFactory environmentFactory, @NonNull Class<? extends Transformer> txClass)
+
+ protected AbstractTransformationExecutor(@NonNull EnvironmentFactory environmentFactory, @NonNull Class<? extends Transformer> txClass)
throws ReflectiveOperationException {
- this(environmentFactory, ClassUtil.nonNullState(txClass.getConstructor(Executor.class)));
+ this(environmentFactory, ClassUtil.nonNullState(txClass.getConstructor(TransformationExecutor.class)));
}
@Override
@@ -49,7 +48,7 @@ public abstract class AbstractTransformationExecutor extends ExecutorManager imp
public @NonNull ModelManager getModelManager() {
return transformer;
}
-
+
@Override
public @NonNull Transformer getTransformer() {
return transformer;
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformer.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformer.java
index 28ed8c316..1359361b9 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformer.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/AbstractTransformer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* E.D.Willink - Initial API and implementation
*******************************************************************************/
@@ -13,7 +13,6 @@ package org.eclipse.qvtd.runtime.evaluation;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.ocl.pivot.evaluation.Executor;
import org.eclipse.ocl.pivot.ids.ClassId;
import org.eclipse.ocl.pivot.ids.PropertyId;
import org.eclipse.ocl.pivot.util.PivotPlugin;
@@ -23,15 +22,15 @@ import org.eclipse.qvtd.runtime.internal.evaluation.AbstractTransformerInternal;
/**
* The abstract implementation of an auto-generated transformation provides the mandatory shared functionality for maintaining
* models and deferring invocation of not-ready mapping invocations.
- *
+ *
* @since 1.1
*/
public abstract class AbstractTransformer extends AbstractTransformerInternal
-{
+{
public static final @NonNull TracingOption EXCEPTIONS = new TracingOption(PivotPlugin.PLUGIN_ID, "tx/exceptions");
public static final @NonNull TracingOption INVOCATIONS = new TracingOption(PivotPlugin.PLUGIN_ID, "tx/invocations");
- protected AbstractTransformer(@NonNull Executor executor, @NonNull String @NonNull [] modelNames,
+ protected AbstractTransformer(@NonNull TransformationExecutor executor, @NonNull String @NonNull [] modelNames,
@NonNull PropertyId @Nullable [] propertyIndex2propertyId, @NonNull ClassId @Nullable [] classIndex2classId, int @Nullable [] @NonNull [] classIndex2allClassIndexes) {
super(executor, modelNames, propertyIndex2propertyId, classIndex2classId, classIndex2allClassIndexes) ;
}
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/cs2as/AbstractCS2ASTransformer.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/cs2as/AbstractCS2ASTransformer.java
index b350a9c07..a959be206 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/cs2as/AbstractCS2ASTransformer.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/cs2as/AbstractCS2ASTransformer.java
@@ -16,10 +16,10 @@ import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.ocl.pivot.evaluation.Executor;
import org.eclipse.ocl.pivot.ids.ClassId;
import org.eclipse.ocl.pivot.ids.PropertyId;
import org.eclipse.qvtd.runtime.evaluation.AbstractTransformer;
+import org.eclipse.qvtd.runtime.evaluation.TransformationExecutor;
public abstract class AbstractCS2ASTransformer extends AbstractTransformer
@@ -28,7 +28,7 @@ implements CS2ASTransformer
private final List<CS2ASDiagnostic> txErrors = new ArrayList<CS2ASDiagnostic>();
- protected AbstractCS2ASTransformer(@NonNull Executor executor, @NonNull String @NonNull [] modelNames,
+ protected AbstractCS2ASTransformer(@NonNull TransformationExecutor executor, @NonNull String @NonNull [] modelNames,
@NonNull PropertyId @Nullable [] propertyIndex2propertyId, @NonNull ClassId @Nullable [] classIndex2classId, int @Nullable [] @NonNull [] classIndex2allClassIndexes) {
super(executor, modelNames, propertyIndex2propertyId, classIndex2classId, classIndex2allClassIndexes);
}
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java
index 96ad6e8f5..1d98ddbd8 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java
@@ -31,7 +31,6 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.pivot.evaluation.AbstractModelManager;
import org.eclipse.ocl.pivot.evaluation.Evaluator;
-import org.eclipse.ocl.pivot.evaluation.Executor;
import org.eclipse.ocl.pivot.ids.ClassId;
import org.eclipse.ocl.pivot.ids.CollectionTypeId;
import org.eclipse.ocl.pivot.ids.IdManager;
@@ -52,6 +51,7 @@ import org.eclipse.qvtd.runtime.evaluation.Invocation;
import org.eclipse.qvtd.runtime.evaluation.InvocationFailedException;
import org.eclipse.qvtd.runtime.evaluation.InvocationManager;
import org.eclipse.qvtd.runtime.evaluation.ObjectManager;
+import org.eclipse.qvtd.runtime.evaluation.TransformationExecutor;
import org.eclipse.qvtd.runtime.evaluation.Transformer;
/**
@@ -395,7 +395,7 @@ public abstract class AbstractTransformerInternal extends AbstractModelManager i
}
}
- protected final @NonNull Executor executor;
+ protected final @NonNull TransformationExecutor executor;
/** deprecated use executor */
@Deprecated
protected final @NonNull Evaluator evaluator;
@@ -453,7 +453,7 @@ public abstract class AbstractTransformerInternal extends AbstractModelManager i
*/
protected final @NonNull EvaluationCache evaluationCache;
- protected AbstractTransformerInternal(@NonNull Executor executor, @NonNull String @NonNull [] modelNames,
+ protected AbstractTransformerInternal(@NonNull TransformationExecutor executor, @NonNull String @NonNull [] modelNames,
@NonNull PropertyId @Nullable [] propertyIndex2propertyId, @NonNull ClassId @Nullable [] classIndex2classId, int @Nullable [] @NonNull [] classIndex2allClassIndexes) {
this.executor = executor;
this.evaluator = executor;

Back to the top