Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo SBH2016-03-14 17:22:00 +0000
committerEd Willink2016-03-23 17:56:36 +0000
commit06a6f015be39fa807095cf697f111fcb23b23df2 (patch)
tree9ca6ac792eda06350b718447fd38ee1fc811322a
parent45b15b1647ab337b2c3667b7b177de61af9e5a8f (diff)
downloadorg.eclipse.qvtd-06a6f015be39fa807095cf697f111fcb23b23df2.tar.gz
org.eclipse.qvtd-06a6f015be39fa807095cf697f111fcb23b23df2.tar.xz
org.eclipse.qvtd-06a6f015be39fa807095cf697f111fcb23b23df2.zip
[cs2as] - Generated artefacts (example1)
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/lookup/util/TargetLookupSolver.java3
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA1LookupVisitor.java31
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA2LookupVisitor.java31
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedBLookupVisitor.java45
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedCLookupVisitor.java45
5 files changed, 70 insertions, 85 deletions
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/lookup/util/TargetLookupSolver.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/lookup/util/TargetLookupSolver.java
index e246c58be..28ff75100 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/lookup/util/TargetLookupSolver.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/lookup/util/TargetLookupSolver.java
@@ -13,11 +13,12 @@ package example1.target.lookup.util;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.pivot.evaluation.Executor;
+
+import example1.target.util.TargetQualifiedLookupVisitor;
import example1.target.util.TargetUnqualifiedA1LookupVisitor;
import example1.target.util.TargetUnqualifiedA2LookupVisitor;
import example1.target.util.TargetUnqualifiedBLookupVisitor;
import example1.target.util.TargetUnqualifiedCLookupVisitor;
-import example1.target.util.TargetQualifiedLookupVisitor;
public class TargetLookupSolver {
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA1LookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA1LookupVisitor.java
index f547b988c..b85fc1fce 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA1LookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA1LookupVisitor.java
@@ -9,26 +9,17 @@
package example1.target.util;
-import example1.target.A;
-import example1.target.TRoot;
-import example1.target.TargetPackage;
-import example1.target.lookup.EnvironmentPackage;
-import example1.target.lookup.LookupEnvironment;
-import example1.target.util.AbstractTargetCommonLookupVisitor;
-import example1.target.util.Visitable;
-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.Class;
-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;
-import org.eclipse.ocl.pivot.ids.IdResolver;
-import org.eclipse.ocl.pivot.ids.NsURIPackageId;
-import org.eclipse.ocl.pivot.ids.RootPackageId;
import org.eclipse.ocl.pivot.ids.TypeId;
+import org.eclipse.ocl.pivot.values.InvalidValueException;
+
+import example1.target.A;
+import example1.target.TargetPackage;
+import example1.target.lookup.EnvironmentPackage;
+import example1.target.lookup.LookupEnvironment;
public class TargetUnqualifiedA1LookupVisitor
extends AbstractTargetCommonLookupVisitor
@@ -36,6 +27,7 @@ public class TargetUnqualifiedA1LookupVisitor
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_$metamodel$ = IdManager.getRootPackageId("$metamodel$");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example1/env/1.0", null, EnvironmentPackage.eINSTANCE);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_targetMM_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example1/targetMM/1.0", null, TargetPackage.eINSTANCE);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_java_c_s_s_example1_target_util = IdManager.getRootPackageId("java://example1.target.util");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_org_eclipse_ocl_pivot_evaluation = IdManager.getRootPackageId("org.eclipse.ocl.pivot.evaluation");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_org_eclipse_ocl_pivot_ids = IdManager.getRootPackageId("org.eclipse.ocl.pivot.ids");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_A = PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_targetMM_s_1_0.getClassId("A", 0);
@@ -44,6 +36,7 @@ public class TargetUnqualifiedA1LookupVisitor
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_LookupEnvironment = PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_env_s_1_0.getClassId("LookupEnvironment", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_OclElement = PACKid_$metamodel$.getClassId("OclElement", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_TRoot = PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_targetMM_s_1_0.getClassId("TRoot", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_TargetUnqualifiedA1LookupVisitor = PACKid_java_c_s_s_example1_target_util.getClassId("TargetUnqualifiedA1LookupVisitor", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_A = TypeId.ORDERED_SET.getSpecializedId(CLSSid_A);
protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
@@ -82,12 +75,14 @@ public class TargetUnqualifiedA1LookupVisitor
*/
@Override
public /*@NonInvalid*/ LookupEnvironment visitTRoot(final /*@NonInvalid*/ example1.target.@org.eclipse.jdt.annotation.NonNull TRoot element) {
- final /*@NonInvalid*/ org.eclipse.ocl.pivot.@org.eclipse.jdt.annotation.NonNull Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(CLSSid_LookupEnvironment, null);
- final /*@NonInvalid*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment env = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance();
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element);
+ if (parentEnv == null) {
+ throw new InvalidValueException("Null source for \'lookup::LookupEnvironment::addElements(NE)(Collection(addElements.NE)) : lookup::LookupEnvironment[1]\'");
+ }
@SuppressWarnings("null")
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<A> ownedA = element.getOwnedA();
@SuppressWarnings("null")
- final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = env.addElements(ownedA);
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = parentEnv.addElements(ownedA);
return addElements;
}
}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA2LookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA2LookupVisitor.java
index 33f68bbd6..ebbd2b179 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA2LookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedA2LookupVisitor.java
@@ -9,26 +9,17 @@
package example1.target.util;
-import example1.target.A;
-import example1.target.TRoot;
-import example1.target.TargetPackage;
-import example1.target.lookup.EnvironmentPackage;
-import example1.target.lookup.LookupEnvironment;
-import example1.target.util.AbstractTargetCommonLookupVisitor;
-import example1.target.util.Visitable;
-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.Class;
-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;
-import org.eclipse.ocl.pivot.ids.IdResolver;
-import org.eclipse.ocl.pivot.ids.NsURIPackageId;
-import org.eclipse.ocl.pivot.ids.RootPackageId;
import org.eclipse.ocl.pivot.ids.TypeId;
+import org.eclipse.ocl.pivot.values.InvalidValueException;
+
+import example1.target.A;
+import example1.target.TargetPackage;
+import example1.target.lookup.EnvironmentPackage;
+import example1.target.lookup.LookupEnvironment;
public class TargetUnqualifiedA2LookupVisitor
extends AbstractTargetCommonLookupVisitor
@@ -36,6 +27,7 @@ public class TargetUnqualifiedA2LookupVisitor
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_$metamodel$ = IdManager.getRootPackageId("$metamodel$");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example1/env/1.0", null, EnvironmentPackage.eINSTANCE);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_targetMM_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example1/targetMM/1.0", null, TargetPackage.eINSTANCE);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_java_c_s_s_example1_target_util = IdManager.getRootPackageId("java://example1.target.util");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_org_eclipse_ocl_pivot_evaluation = IdManager.getRootPackageId("org.eclipse.ocl.pivot.evaluation");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_org_eclipse_ocl_pivot_ids = IdManager.getRootPackageId("org.eclipse.ocl.pivot.ids");
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_A = PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_targetMM_s_1_0.getClassId("A", 0);
@@ -44,6 +36,7 @@ public class TargetUnqualifiedA2LookupVisitor
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_LookupEnvironment = PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_env_s_1_0.getClassId("LookupEnvironment", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_OclElement = PACKid_$metamodel$.getClassId("OclElement", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_TRoot = PACKid_http_c_s_s_cs2as_s_tests_s_example1_s_targetMM_s_1_0.getClassId("TRoot", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_TargetUnqualifiedA2LookupVisitor = PACKid_java_c_s_s_example1_target_util.getClassId("TargetUnqualifiedA2LookupVisitor", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_A = TypeId.ORDERED_SET.getSpecializedId(CLSSid_A);
protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
@@ -82,12 +75,14 @@ public class TargetUnqualifiedA2LookupVisitor
*/
@Override
public /*@NonInvalid*/ LookupEnvironment visitTRoot(final /*@NonInvalid*/ example1.target.@org.eclipse.jdt.annotation.NonNull TRoot element) {
- final /*@NonInvalid*/ org.eclipse.ocl.pivot.@org.eclipse.jdt.annotation.NonNull Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(CLSSid_LookupEnvironment, null);
- final /*@NonInvalid*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment env = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance();
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element);
+ if (parentEnv == null) {
+ throw new InvalidValueException("Null source for \'lookup::LookupEnvironment::addElements(NE)(Collection(addElements.NE)) : lookup::LookupEnvironment[1]\'");
+ }
@SuppressWarnings("null")
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<A> ownedA = element.getOwnedA();
@SuppressWarnings("null")
- final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = env.addElements(ownedA);
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = parentEnv.addElements(ownedA);
return addElements;
}
}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedBLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedBLookupVisitor.java
index 5793409b7..8d3a5a7ac 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedBLookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedBLookupVisitor.java
@@ -9,34 +9,25 @@
package example1.target.util;
-import example1.target.A1;
-import example1.target.B;
-import example1.target.TargetPackage;
-import example1.target.lookup.EnvironmentPackage;
-import example1.target.lookup.LookupEnvironment;
-import example1.target.util.AbstractTargetCommonLookupVisitor;
-import example1.target.util.Visitable;
import java.util.Iterator;
-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.CollectionTypeId;
import org.eclipse.ocl.pivot.ids.IdManager;
import org.eclipse.ocl.pivot.ids.IdResolver;
-import org.eclipse.ocl.pivot.ids.NsURIPackageId;
-import org.eclipse.ocl.pivot.ids.RootPackageId;
import org.eclipse.ocl.pivot.ids.TypeId;
import org.eclipse.ocl.pivot.library.collection.CollectionIncludesOperation;
import org.eclipse.ocl.pivot.library.collection.OrderedCollectionIndexOfOperation;
import org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanOperation;
import org.eclipse.ocl.pivot.utilities.ValueUtil;
-import org.eclipse.ocl.pivot.values.IntegerValue;
-import org.eclipse.ocl.pivot.values.InvalidValueException;
import org.eclipse.ocl.pivot.values.OrderedSetValue;
+import example1.target.B;
+import example1.target.TargetPackage;
+import example1.target.lookup.EnvironmentPackage;
+import example1.target.lookup.LookupEnvironment;
+
public class TargetUnqualifiedBLookupVisitor
extends AbstractTargetCommonLookupVisitor
{
@@ -93,14 +84,10 @@ public class TargetUnqualifiedBLookupVisitor
public /*@NonInvalid*/ LookupEnvironment visitA1(final /*@NonInvalid*/ example1.target.@org.eclipse.jdt.annotation.NonNull A1 element) {
@SuppressWarnings("null")
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<B> ownsB = element.getOwnsB();
- final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv_0 = this.parentEnv(element);
final /*@Thrown*/ org.eclipse.ocl.pivot.values.@org.eclipse.jdt.annotation.NonNull OrderedSetValue BOXED_ownsB = idResolver.createOrderedSetOfAll(ORD_CLSSid_B, ownsB);
final /*@Thrown*/ boolean includes = CollectionIncludesOperation.INSTANCE.evaluate(BOXED_ownsB, child).booleanValue();
- /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_0;
+ /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_1;
if (includes) {
- if (parentEnv_0 == null) {
- throw new InvalidValueException("Null source for \'lookup::LookupEnvironment::addElements(NE)(Collection(addElements.NE)) : lookup::LookupEnvironment[1]\'");
- }
/*@Thrown*/ OrderedSetValue.@org.eclipse.jdt.annotation.NonNull Accumulator accumulator = ValueUtil.createOrderedSetAccumulatorValue(ORD_CLSSid_B);
@Nullable Iterator<?> ITERATOR_x = BOXED_ownsB.iterator();
/*@Thrown*/ org.eclipse.ocl.pivot.values.@org.eclipse.jdt.annotation.NonNull OrderedSetValue select;
@@ -123,12 +110,22 @@ public class TargetUnqualifiedBLookupVisitor
}
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<B> ECORE_select = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(B.class, select);
@SuppressWarnings("null")
- final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = parentEnv_0.addElements(ECORE_select);
- symbol_0 = addElements;
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment inner = context.addElements(ECORE_select);
+ final /*@Thrown*/ boolean hasFinalResult = inner.hasFinalResult();
+ /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_0;
+ if (hasFinalResult) {
+ symbol_0 = inner;
+ }
+ else {
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element);
+ symbol_0 = parentEnv;
+ }
+ symbol_1 = symbol_0;
}
else {
- symbol_0 = parentEnv_0;
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv_0 = this.parentEnv(element);
+ symbol_1 = parentEnv_0;
}
- return symbol_0;
+ return symbol_1;
}
}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedCLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedCLookupVisitor.java
index f40b79edc..15a3d907e 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedCLookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example1/target/util/TargetUnqualifiedCLookupVisitor.java
@@ -9,34 +9,25 @@
package example1.target.util;
-import example1.target.A2;
-import example1.target.C;
-import example1.target.TargetPackage;
-import example1.target.lookup.EnvironmentPackage;
-import example1.target.lookup.LookupEnvironment;
-import example1.target.util.AbstractTargetCommonLookupVisitor;
-import example1.target.util.Visitable;
import java.util.Iterator;
-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.CollectionTypeId;
import org.eclipse.ocl.pivot.ids.IdManager;
import org.eclipse.ocl.pivot.ids.IdResolver;
-import org.eclipse.ocl.pivot.ids.NsURIPackageId;
-import org.eclipse.ocl.pivot.ids.RootPackageId;
import org.eclipse.ocl.pivot.ids.TypeId;
import org.eclipse.ocl.pivot.library.collection.CollectionIncludesOperation;
import org.eclipse.ocl.pivot.library.collection.OrderedCollectionIndexOfOperation;
import org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanOperation;
import org.eclipse.ocl.pivot.utilities.ValueUtil;
-import org.eclipse.ocl.pivot.values.IntegerValue;
-import org.eclipse.ocl.pivot.values.InvalidValueException;
import org.eclipse.ocl.pivot.values.OrderedSetValue;
+import example1.target.C;
+import example1.target.TargetPackage;
+import example1.target.lookup.EnvironmentPackage;
+import example1.target.lookup.LookupEnvironment;
+
public class TargetUnqualifiedCLookupVisitor
extends AbstractTargetCommonLookupVisitor
{
@@ -93,14 +84,10 @@ public class TargetUnqualifiedCLookupVisitor
public /*@NonInvalid*/ LookupEnvironment visitA2(final /*@NonInvalid*/ example1.target.@org.eclipse.jdt.annotation.NonNull A2 element) {
@SuppressWarnings("null")
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<C> ownsC = element.getOwnsC();
- final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv_0 = this.parentEnv(element);
final /*@Thrown*/ org.eclipse.ocl.pivot.values.@org.eclipse.jdt.annotation.NonNull OrderedSetValue BOXED_ownsC = idResolver.createOrderedSetOfAll(ORD_CLSSid_C, ownsC);
final /*@Thrown*/ boolean includes = CollectionIncludesOperation.INSTANCE.evaluate(BOXED_ownsC, child).booleanValue();
- /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_0;
+ /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_1;
if (includes) {
- if (parentEnv_0 == null) {
- throw new InvalidValueException("Null source for \'lookup::LookupEnvironment::addElements(NE)(Collection(addElements.NE)) : lookup::LookupEnvironment[1]\'");
- }
/*@Thrown*/ OrderedSetValue.@org.eclipse.jdt.annotation.NonNull Accumulator accumulator = ValueUtil.createOrderedSetAccumulatorValue(ORD_CLSSid_C);
@Nullable Iterator<?> ITERATOR_x = BOXED_ownsC.iterator();
/*@Thrown*/ org.eclipse.ocl.pivot.values.@org.eclipse.jdt.annotation.NonNull OrderedSetValue select;
@@ -123,12 +110,22 @@ public class TargetUnqualifiedCLookupVisitor
}
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<C> ECORE_select = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(C.class, select);
@SuppressWarnings("null")
- final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = parentEnv_0.addElements(ECORE_select);
- symbol_0 = addElements;
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment inner = context.addElements(ECORE_select);
+ final /*@Thrown*/ boolean hasFinalResult = inner.hasFinalResult();
+ /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_0;
+ if (hasFinalResult) {
+ symbol_0 = inner;
+ }
+ else {
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element);
+ symbol_0 = parentEnv;
+ }
+ symbol_1 = symbol_0;
}
else {
- symbol_0 = parentEnv_0;
+ final /*@Thrown*/ example1.target.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv_0 = this.parentEnv(element);
+ symbol_1 = parentEnv_0;
}
- return symbol_0;
+ return symbol_1;
}
}

Back to the top