Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo SBH2016-09-03 16:25:09 +0000
committerEd Willink2016-10-05 04:13:20 +0000
commitcd92f07a33fed67d0dfc76d7e33ed39837cf51a4 (patch)
tree91941909759a7531a28c8f21970b4d92a70992b0 /plugins
parent5662fece07dce89a4b78b025fda66825fc3b9ebd (diff)
downloadorg.eclipse.qvtd-cd92f07a33fed67d0dfc76d7e33ed39837cf51a4.tar.gz
org.eclipse.qvtd-cd92f07a33fed67d0dfc76d7e33ed39837cf51a4.tar.xz
org.eclipse.qvtd-cd92f07a33fed67d0dfc76d7e33ed39837cf51a4.zip
[cs2as] Use CGed OCL lookup operations rather than Visitors-based Lookup
Infrastructure
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java32
1 files changed, 0 insertions, 32 deletions
diff --git a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java
index 0cf072542..9c6831d5a 100644
--- a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java
+++ b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/CS2ASJavaCompilerImpl.java
@@ -37,9 +37,6 @@ import org.eclipse.ocl.examples.codegen.java.CG2JavaPreVisitor;
import org.eclipse.ocl.examples.codegen.java.JavaConstants;
import org.eclipse.ocl.examples.codegen.java.types.UnboxedDescriptor;
import org.eclipse.ocl.examples.codegen.utilities.CGModelResourceFactory;
-import org.eclipse.ocl.pivot.OCLExpression;
-import org.eclipse.ocl.pivot.Operation;
-import org.eclipse.ocl.pivot.OperationCallExp;
import org.eclipse.ocl.pivot.Parameter;
import org.eclipse.ocl.pivot.ids.ElementId;
import org.eclipse.ocl.pivot.ids.TypeId;
@@ -62,7 +59,6 @@ import org.eclipse.qvtd.codegen.utilities.QVTiCGUtil;
import org.eclipse.qvtd.cs2as.compiler.CS2ASJavaCompiler;
import org.eclipse.qvtd.cs2as.compiler.CS2ASJavaCompilerParameters;
import org.eclipse.qvtd.cs2as.compiler.cgmodel.CGLookupCallExp;
-import org.eclipse.qvtd.cs2as.compiler.cgmodel.CS2ASCGFactory;
import org.eclipse.qvtd.cs2as.compiler.cgmodel.util.CS2ASCGModelVisitor;
import org.eclipse.qvtd.cs2as.compiler.internal.utilities.CS2ASCGModelResourceFactory;
import org.eclipse.qvtd.pivot.qvtbase.Transformation;
@@ -315,34 +311,6 @@ public class CS2ASJavaCompilerImpl implements CS2ASJavaCompiler {
public CS2ASAS2CGVisitor(@NonNull QVTiAnalyzer analyzer, @NonNull QVTiGlobalContext globalContext) {
super(analyzer, globalContext);
}
-
- @Override
- protected @NonNull CGValuedElement generateOperationCallExp(@Nullable CGValuedElement cgSource, @NonNull OperationCallExp asOperationCallExp) {
-
- Operation asOperation = asOperationCallExp.getReferredOperation();
- if (isLookupOp(asOperation)) {
- CGLookupCallExp cgLookupCallExp = CS2ASCGFactory.eINSTANCE.createCGLookupCallExp();
- setAst(cgLookupCallExp, asOperationCallExp);
- cgLookupCallExp.setName(asOperation.getName());
- cgLookupCallExp.setSource(cgSource);
- for (OCLExpression arg : asOperationCallExp.getOwnedArguments()) {
- CGValuedElement cgArg = doVisit(CGValuedElement.class, arg);
- cgLookupCallExp.getArguments().add(cgArg);
- }
- cgLookupCallExp.setReferredOperation(asOperation);
- return cgLookupCallExp;
- }
- return super.generateOperationCallExp(cgSource, asOperationCallExp);
- }
-
- protected boolean isLookupOp(Operation op) {
-
- String opName = op.getName();
- if (opName != null && opName.startsWith("_lookup")) {// FIXME
- return true;
- }
- return false;
- }
}
protected static class CS2ASAnalysisVisitor extends QVTiAnalysisVisitor

Back to the top