Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAdolfo SBH2016-03-19 16:51:41 +0000
committerEd Willink2016-03-23 17:57:38 +0000
commit7897888f55850d115f1df7a1357d7c6e9ba393d2 (patch)
tree5ae1c67b3e425e6f0c1de5dce799dffe06f39797 /tests
parent471ab48662ffa9cd19b1a09249d44f21afcc3123 (diff)
downloadorg.eclipse.qvtd-7897888f55850d115f1df7a1357d7c6e9ba393d2.tar.gz
org.eclipse.qvtd-7897888f55850d115f1df7a1357d7c6e9ba393d2.tar.xz
org.eclipse.qvtd-7897888f55850d115f1df7a1357d7c6e9ba393d2.zip
[cs2as] - Regenerating visitors after partitioning Exported and
Qualified named element lookups
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Lookup.ocl13
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/lookup/util/ClassesLookupSolver.java21
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedOperationLookupVisitor.java (renamed from tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedLookupVisitor.java)42
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedPropertyLookupVisitor.java (renamed from tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedLookupVisitor.java)4
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedClassLookupVisitor.java63
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedOperationLookupVisitor.java63
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPackageLookupVisitor.java62
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPropertyLookupVisitor.java63
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesUnqualifiedPackageLookupVisitor.java18
9 files changed, 294 insertions, 55 deletions
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Lookup.ocl b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Lookup.ocl
index fd2fc3590..c4a4b6669 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Lookup.ocl
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Lookup.ocl
@@ -34,14 +34,19 @@ def : parentEnv_Operation() : lookup::LookupEnvironment[1] =
def : parentEnv_Property() : lookup::LookupEnvironment[1] =
let parent = oclContainer() in if parent = null then lookup::LookupEnvironment { } else parent._unqualified_env_Property(self) endif
-def : _exported_env_Class(importer : OclElement) : lookup::LookupEnvironment[1] =
- lookup::LookupEnvironment { }
-def : _exported_env_Package(importer : OclElement) : lookup::LookupEnvironment[1] =
- lookup::LookupEnvironment { }
def : _exported_env_Operation(importer : OclElement) : lookup::LookupEnvironment[1] =
lookup::LookupEnvironment { }
def : _exported_env_Property(importer : OclElement) : lookup::LookupEnvironment[1] =
lookup::LookupEnvironment { }
+
+def : _qualified_env_Class(child : OclElement) : lookup::LookupEnvironment[1] =
+ lookup::LookupEnvironment { }
+def : _qualified_env_Package(child : OclElement) : lookup::LookupEnvironment[1] =
+ lookup::LookupEnvironment { }
+def : _qualified_env_Operation(child : OclElement) : lookup::LookupEnvironment[1] =
+ lookup::LookupEnvironment { }
+def : _qualified_env_Property(child : OclElement) : lookup::LookupEnvironment[1] =
+ lookup::LookupEnvironment { }
-- End of domain specific default functionality
endpackage
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/lookup/util/ClassesLookupSolver.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/lookup/util/ClassesLookupSolver.java
index 82d84135b..7e1566299 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/lookup/util/ClassesLookupSolver.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/lookup/util/ClassesLookupSolver.java
@@ -17,8 +17,13 @@ import example2.classes.util.ClassesUnqualifiedClassLookupVisitor;
import example2.classes.util.ClassesUnqualifiedOperationLookupVisitor;
import example2.classes.util.ClassesUnqualifiedPackageLookupVisitor;
import example2.classes.util.ClassesUnqualifiedPropertyLookupVisitor;
-import example2.classes.util.ClassesQualifiedLookupVisitor;
-import example2.classes.util.ClassesExportedLookupVisitor;
+import example2.classes.util.ClassesExportedPropertyLookupVisitor;
+import example2.classes.util.ClassesExportedOperationLookupVisitor;
+import example2.classes.util.ClassesQualifiedClassLookupVisitor;
+import example2.classes.util.ClassesQualifiedOperationLookupVisitor;
+import example2.classes.util.ClassesQualifiedPackageLookupVisitor;
+import example2.classes.util.ClassesQualifiedPropertyLookupVisitor;
+
public class ClassesLookupSolver {
@@ -32,7 +37,7 @@ public class ClassesLookupSolver {
public ClassesLookupResult<example2.classes.Operation> _lookupExportedOperation(example2.classes.Class context, java.lang.Object importer, java.lang.String oName, java.util.List<example2.classes.Argument> args) {
OperationFilter filter = new OperationFilter(executor, args);
ClassesSingleResultLookupEnvironment _lookupEnv = new ClassesSingleResultLookupEnvironment(executor, example2.classes.ClassesPackage.Literals.OPERATION,oName,filter);
- ClassesExportedLookupVisitor _lookupVisitor = new ClassesExportedLookupVisitor(_lookupEnv, importer);
+ ClassesExportedOperationLookupVisitor _lookupVisitor = new ClassesExportedOperationLookupVisitor(_lookupEnv, importer);
context.accept(_lookupVisitor);
return new ClassesLookupResultImpl<example2.classes.Operation>
(_lookupEnv.getNamedElementsByKind(example2.classes.Operation.class));
@@ -40,7 +45,7 @@ public class ClassesLookupSolver {
public ClassesLookupResult<example2.classes.Property> _lookupExportedProperty(example2.classes.Class context, java.lang.Object importer, java.lang.String pName) {
ClassesSingleResultLookupEnvironment _lookupEnv = new ClassesSingleResultLookupEnvironment(executor, example2.classes.ClassesPackage.Literals.PROPERTY,pName);
- ClassesExportedLookupVisitor _lookupVisitor = new ClassesExportedLookupVisitor(_lookupEnv, importer);
+ ClassesExportedPropertyLookupVisitor _lookupVisitor = new ClassesExportedPropertyLookupVisitor(_lookupEnv, importer);
context.accept(_lookupVisitor);
return new ClassesLookupResultImpl<example2.classes.Property>
(_lookupEnv.getNamedElementsByKind(example2.classes.Property.class));
@@ -49,7 +54,7 @@ public class ClassesLookupSolver {
public ClassesLookupResult<example2.classes.Operation> _lookupQualifiedOperation(example2.classes.Class context, java.lang.String oName, java.util.List<example2.classes.Argument> args) {
OperationFilter filter = new OperationFilter(executor, args);
ClassesSingleResultLookupEnvironment _lookupEnv = new ClassesSingleResultLookupEnvironment(executor, example2.classes.ClassesPackage.Literals.OPERATION,oName,filter);
- ClassesQualifiedLookupVisitor _lookupVisitor = new ClassesQualifiedLookupVisitor(_lookupEnv);
+ ClassesQualifiedOperationLookupVisitor _lookupVisitor = new ClassesQualifiedOperationLookupVisitor(_lookupEnv);
context.accept(_lookupVisitor);
return new ClassesLookupResultImpl<example2.classes.Operation>
(_lookupEnv.getNamedElementsByKind(example2.classes.Operation.class));
@@ -57,7 +62,7 @@ public class ClassesLookupSolver {
public ClassesLookupResult<example2.classes.Property> _lookupQualifiedProperty(example2.classes.Class context, java.lang.String pName) {
ClassesSingleResultLookupEnvironment _lookupEnv = new ClassesSingleResultLookupEnvironment(executor, example2.classes.ClassesPackage.Literals.PROPERTY,pName);
- ClassesQualifiedLookupVisitor _lookupVisitor = new ClassesQualifiedLookupVisitor(_lookupEnv);
+ ClassesQualifiedPropertyLookupVisitor _lookupVisitor = new ClassesQualifiedPropertyLookupVisitor(_lookupEnv);
context.accept(_lookupVisitor);
return new ClassesLookupResultImpl<example2.classes.Property>
(_lookupEnv.getNamedElementsByKind(example2.classes.Property.class));
@@ -65,7 +70,7 @@ public class ClassesLookupSolver {
public ClassesLookupResult<example2.classes.Class> _lookupQualifiedClass(example2.classes.Package context, java.lang.String cName) {
ClassesSingleResultLookupEnvironment _lookupEnv = new ClassesSingleResultLookupEnvironment(executor, example2.classes.ClassesPackage.Literals.CLASS,cName);
- ClassesQualifiedLookupVisitor _lookupVisitor = new ClassesQualifiedLookupVisitor(_lookupEnv);
+ ClassesQualifiedClassLookupVisitor _lookupVisitor = new ClassesQualifiedClassLookupVisitor(_lookupEnv);
context.accept(_lookupVisitor);
return new ClassesLookupResultImpl<example2.classes.Class>
(_lookupEnv.getNamedElementsByKind(example2.classes.Class.class));
@@ -73,7 +78,7 @@ public class ClassesLookupSolver {
public ClassesLookupResult<example2.classes.Package> _lookupQualifiedPackage(example2.classes.Package context, java.lang.String pName) {
ClassesSingleResultLookupEnvironment _lookupEnv = new ClassesSingleResultLookupEnvironment(executor, example2.classes.ClassesPackage.Literals.PACKAGE,pName);
- ClassesQualifiedLookupVisitor _lookupVisitor = new ClassesQualifiedLookupVisitor(_lookupEnv);
+ ClassesQualifiedPackageLookupVisitor _lookupVisitor = new ClassesQualifiedPackageLookupVisitor(_lookupEnv);
context.accept(_lookupVisitor);
return new ClassesLookupResultImpl<example2.classes.Package>
(_lookupEnv.getNamedElementsByKind(example2.classes.Package.class));
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedOperationLookupVisitor.java
index e1193706e..130a79277 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedLookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedOperationLookupVisitor.java
@@ -2,7 +2,7 @@
* «codeGenHelper.getCopyright(' * ')»
*
* This code is 100% auto-generated
- * using: org.eclipse.ocl.examples.autogen.lookup.LookupQualifiedCodeGenerator
+ * using: org.eclipse.ocl.examples.autogen.lookup.LookupExportedVisitorCodeGenerator
*
* Do not edit it.
********************************************************************************/
@@ -14,17 +14,15 @@ import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.pivot.ids.IdManager;
import org.eclipse.ocl.pivot.ids.TypeId;
-import example2.classes.Class;
import example2.classes.ClassesPackage;
import example2.classes.Operation;
-import example2.classes.Package;
-import example2.classes.Property;
import example2.classes.lookup.EnvironmentPackage;
import example2.classes.lookup.LookupEnvironment;
-public class ClassesQualifiedLookupVisitor
+public class ClassesExportedOperationLookupVisitor
extends AbstractClassesCommonLookupVisitor
{
+ 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_example2_s_classes_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/classes/1.0", null, ClassesPackage.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_example2_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/env/1.0", null, EnvironmentPackage.eINSTANCE);
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");
@@ -33,21 +31,19 @@ public class ClassesQualifiedLookupVisitor
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Executor = PACKid_org_eclipse_ocl_pivot_evaluation.getClassId("Executor", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_IdResolver = PACKid_org_eclipse_ocl_pivot_ids.getClassId("IdResolver", 0);
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_example2_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_Operation = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Operation", 0);
- public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Package = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Package", 0);
- public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Property = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Property", 0);
- public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Class = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Class);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Operation = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Operation);
- public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Package = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Package);
- public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Property = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Property);
protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
protected final /*@Thrown*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull IdResolver idResolver;
+ protected final /*@Thrown*/ java.lang.@org.eclipse.jdt.annotation.NonNull Object importer;
- public ClassesQualifiedLookupVisitor(@NonNull LookupEnvironment context) {
+ public ClassesExportedOperationLookupVisitor(@NonNull LookupEnvironment context, @NonNull Object importer) {
super(context);
this.executor = context.getExecutor();
this.idResolver = executor.getIdResolver();
+ this.importer = importer;
}
@Override
@@ -66,28 +62,6 @@ public class ClassesQualifiedLookupVisitor
final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Operation> ownedOperations = element.getOwnedOperations();
@SuppressWarnings("null")
final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = context.addElements(ownedOperations);
- @SuppressWarnings("null")
- final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Property> ownedProperties = element.getOwnedProperties();
- @SuppressWarnings("null")
- final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements_0 = addElements.addElements(ownedProperties);
- return addElements_0;
- }
-
- /**
- * visitPackage(element : classes::Package[1]) : lookup::LookupEnvironment[?]
- *
- * _'null' : lookup::LookupEnvironment[1]
- */
- @Override
- public /*@NonInvalid*/ LookupEnvironment visitPackage(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Package element_0) {
- @SuppressWarnings("null")
- final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Package> ownedPackages = element_0.getOwnedPackages();
- @SuppressWarnings("null")
- final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = context.addElements(ownedPackages);
- @SuppressWarnings("null")
- final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Class> ownedClasses = element_0.getOwnedClasses();
- @SuppressWarnings("null")
- final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements_0 = addElements.addElements(ownedClasses);
- return addElements_0;
+ return addElements;
}
}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedPropertyLookupVisitor.java
index 9c14a84a9..33c9e23ed 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedLookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesExportedPropertyLookupVisitor.java
@@ -19,7 +19,7 @@ import example2.classes.Property;
import example2.classes.lookup.EnvironmentPackage;
import example2.classes.lookup.LookupEnvironment;
-public class ClassesExportedLookupVisitor
+public class ClassesExportedPropertyLookupVisitor
extends AbstractClassesCommonLookupVisitor
{
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull RootPackageId PACKid_$metamodel$ = IdManager.getRootPackageId("$metamodel$");
@@ -39,7 +39,7 @@ public class ClassesExportedLookupVisitor
protected final /*@Thrown*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull IdResolver idResolver;
protected final /*@Thrown*/ java.lang.@org.eclipse.jdt.annotation.NonNull Object importer;
- public ClassesExportedLookupVisitor(@NonNull LookupEnvironment context, @NonNull Object importer) {
+ public ClassesExportedPropertyLookupVisitor(@NonNull LookupEnvironment context, @NonNull Object importer) {
super(context);
this.executor = context.getExecutor();
this.idResolver = executor.getIdResolver();
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedClassLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedClassLookupVisitor.java
new file mode 100644
index 000000000..618f523e7
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedClassLookupVisitor.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * «codeGenHelper.getCopyright(' * ')»
+ *
+ * This code is 100% auto-generated
+ * using: org.eclipse.ocl.examples.autogen.lookup.LookupQualifiedCodeGenerator
+ *
+ * Do not edit it.
+ ********************************************************************************/
+
+package example2.classes.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.pivot.ids.IdManager;
+import org.eclipse.ocl.pivot.ids.TypeId;
+
+import example2.classes.Class;
+import example2.classes.ClassesPackage;
+import example2.classes.lookup.EnvironmentPackage;
+import example2.classes.lookup.LookupEnvironment;
+
+public class ClassesQualifiedClassLookupVisitor
+ extends AbstractClassesCommonLookupVisitor
+{
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/classes/1.0", null, ClassesPackage.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_example2_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/env/1.0", null, EnvironmentPackage.eINSTANCE);
+ 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_Class = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Class", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Executor = PACKid_org_eclipse_ocl_pivot_evaluation.getClassId("Executor", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_IdResolver = PACKid_org_eclipse_ocl_pivot_ids.getClassId("IdResolver", 0);
+ 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_example2_s_env_s_1_0.getClassId("LookupEnvironment", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Package = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Package", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Class = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Class);
+
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull IdResolver idResolver;
+
+ public ClassesQualifiedClassLookupVisitor(@NonNull LookupEnvironment context) {
+ super(context);
+ this.executor = context.getExecutor();
+ this.idResolver = executor.getIdResolver();
+ }
+
+ @Override
+ protected @Nullable LookupEnvironment doVisiting(@NonNull Visitable visitable) {
+ return context;
+ }
+
+ /**
+ * visitPackage(element : classes::Package[1]) : lookup::LookupEnvironment[?]
+ *
+ * _'null' : lookup::LookupEnvironment[1]
+ */
+ @Override
+ public /*@NonInvalid*/ LookupEnvironment visitPackage(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Package element) {
+ @SuppressWarnings("null")
+ final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Class> ownedClasses = element.getOwnedClasses();
+ @SuppressWarnings("null")
+ final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = context.addElements(ownedClasses);
+ return addElements;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedOperationLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedOperationLookupVisitor.java
new file mode 100644
index 000000000..ec4b2a5ca
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedOperationLookupVisitor.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * «codeGenHelper.getCopyright(' * ')»
+ *
+ * This code is 100% auto-generated
+ * using: org.eclipse.ocl.examples.autogen.lookup.LookupQualifiedCodeGenerator
+ *
+ * Do not edit it.
+ ********************************************************************************/
+
+package example2.classes.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.pivot.ids.IdManager;
+import org.eclipse.ocl.pivot.ids.TypeId;
+
+import example2.classes.ClassesPackage;
+import example2.classes.Operation;
+import example2.classes.lookup.EnvironmentPackage;
+import example2.classes.lookup.LookupEnvironment;
+
+public class ClassesQualifiedOperationLookupVisitor
+ extends AbstractClassesCommonLookupVisitor
+{
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/classes/1.0", null, ClassesPackage.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_example2_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/env/1.0", null, EnvironmentPackage.eINSTANCE);
+ 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_Class = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Class", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Executor = PACKid_org_eclipse_ocl_pivot_evaluation.getClassId("Executor", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_IdResolver = PACKid_org_eclipse_ocl_pivot_ids.getClassId("IdResolver", 0);
+ 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_example2_s_env_s_1_0.getClassId("LookupEnvironment", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Operation = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Operation", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Operation = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Operation);
+
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull IdResolver idResolver;
+
+ public ClassesQualifiedOperationLookupVisitor(@NonNull LookupEnvironment context) {
+ super(context);
+ this.executor = context.getExecutor();
+ this.idResolver = executor.getIdResolver();
+ }
+
+ @Override
+ protected @Nullable LookupEnvironment doVisiting(@NonNull Visitable visitable) {
+ return context;
+ }
+
+ /**
+ * visitClass(element : classes::Class[1]) : lookup::LookupEnvironment[?]
+ *
+ * _'null' : lookup::LookupEnvironment[1]
+ */
+ @Override
+ public /*@NonInvalid*/ LookupEnvironment visitClass(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Class element) {
+ @SuppressWarnings("null")
+ final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Operation> ownedOperations = element.getOwnedOperations();
+ @SuppressWarnings("null")
+ final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = context.addElements(ownedOperations);
+ return addElements;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPackageLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPackageLookupVisitor.java
new file mode 100644
index 000000000..48d964f5b
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPackageLookupVisitor.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * «codeGenHelper.getCopyright(' * ')»
+ *
+ * This code is 100% auto-generated
+ * using: org.eclipse.ocl.examples.autogen.lookup.LookupQualifiedCodeGenerator
+ *
+ * Do not edit it.
+ ********************************************************************************/
+
+package example2.classes.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.pivot.ids.IdManager;
+import org.eclipse.ocl.pivot.ids.TypeId;
+
+import example2.classes.ClassesPackage;
+import example2.classes.Package;
+import example2.classes.lookup.EnvironmentPackage;
+import example2.classes.lookup.LookupEnvironment;
+
+public class ClassesQualifiedPackageLookupVisitor
+ extends AbstractClassesCommonLookupVisitor
+{
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/classes/1.0", null, ClassesPackage.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_example2_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/env/1.0", null, EnvironmentPackage.eINSTANCE);
+ 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_Executor = PACKid_org_eclipse_ocl_pivot_evaluation.getClassId("Executor", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_IdResolver = PACKid_org_eclipse_ocl_pivot_ids.getClassId("IdResolver", 0);
+ 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_example2_s_env_s_1_0.getClassId("LookupEnvironment", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Package = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Package", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Package = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Package);
+
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull IdResolver idResolver;
+
+ public ClassesQualifiedPackageLookupVisitor(@NonNull LookupEnvironment context) {
+ super(context);
+ this.executor = context.getExecutor();
+ this.idResolver = executor.getIdResolver();
+ }
+
+ @Override
+ protected @Nullable LookupEnvironment doVisiting(@NonNull Visitable visitable) {
+ return context;
+ }
+
+ /**
+ * visitPackage(element : classes::Package[1]) : lookup::LookupEnvironment[?]
+ *
+ * _'null' : lookup::LookupEnvironment[1]
+ */
+ @Override
+ public /*@NonInvalid*/ LookupEnvironment visitPackage(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Package element) {
+ @SuppressWarnings("null")
+ final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Package> ownedPackages = element.getOwnedPackages();
+ @SuppressWarnings("null")
+ final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = context.addElements(ownedPackages);
+ return addElements;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPropertyLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPropertyLookupVisitor.java
new file mode 100644
index 000000000..de2bfc5a7
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesQualifiedPropertyLookupVisitor.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * «codeGenHelper.getCopyright(' * ')»
+ *
+ * This code is 100% auto-generated
+ * using: org.eclipse.ocl.examples.autogen.lookup.LookupQualifiedCodeGenerator
+ *
+ * Do not edit it.
+ ********************************************************************************/
+
+package example2.classes.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.ocl.pivot.ids.IdManager;
+import org.eclipse.ocl.pivot.ids.TypeId;
+
+import example2.classes.ClassesPackage;
+import example2.classes.Property;
+import example2.classes.lookup.EnvironmentPackage;
+import example2.classes.lookup.LookupEnvironment;
+
+public class ClassesQualifiedPropertyLookupVisitor
+ extends AbstractClassesCommonLookupVisitor
+{
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/classes/1.0", null, ClassesPackage.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_example2_s_env_s_1_0 = IdManager.getNsURIPackageId("http://cs2as/tests/example2/env/1.0", null, EnvironmentPackage.eINSTANCE);
+ 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_Class = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Class", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Executor = PACKid_org_eclipse_ocl_pivot_evaluation.getClassId("Executor", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_IdResolver = PACKid_org_eclipse_ocl_pivot_ids.getClassId("IdResolver", 0);
+ 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_example2_s_env_s_1_0.getClassId("LookupEnvironment", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Property = PACKid_http_c_s_s_cs2as_s_tests_s_example2_s_classes_s_1_0.getClassId("Property", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Property = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Property);
+
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
+ protected final /*@Thrown*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull IdResolver idResolver;
+
+ public ClassesQualifiedPropertyLookupVisitor(@NonNull LookupEnvironment context) {
+ super(context);
+ this.executor = context.getExecutor();
+ this.idResolver = executor.getIdResolver();
+ }
+
+ @Override
+ protected @Nullable LookupEnvironment doVisiting(@NonNull Visitable visitable) {
+ return context;
+ }
+
+ /**
+ * visitClass(element : classes::Class[1]) : lookup::LookupEnvironment[?]
+ *
+ * _'null' : lookup::LookupEnvironment[1]
+ */
+ @Override
+ public /*@NonInvalid*/ LookupEnvironment visitClass(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Class element) {
+ @SuppressWarnings("null")
+ final /*@Thrown*/ java.util.@org.eclipse.jdt.annotation.NonNull List<Property> ownedProperties = element.getOwnedProperties();
+ @SuppressWarnings("null")
+ final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = context.addElements(ownedProperties);
+ return addElements;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesUnqualifiedPackageLookupVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesUnqualifiedPackageLookupVisitor.java
index 4a44f3828..72537314c 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesUnqualifiedPackageLookupVisitor.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/example2/classes/util/ClassesUnqualifiedPackageLookupVisitor.java
@@ -14,7 +14,6 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.pivot.ids.IdManager;
import org.eclipse.ocl.pivot.ids.TypeId;
-import org.eclipse.ocl.pivot.values.InvalidValueException;
import example2.classes.ClassesPackage;
import example2.classes.Package;
@@ -98,14 +97,19 @@ public class ClassesUnqualifiedPackageLookupVisitor
*/
@Override
public /*@NonInvalid*/ LookupEnvironment visitRoot(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Root element_0) {
- final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element_0);
- 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<Package> ownedPackages = element_0.getOwnedPackages();
@SuppressWarnings("null")
- final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = parentEnv.addElements(ownedPackages);
- return addElements;
+ final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment inner = context.addElements(ownedPackages);
+ final /*@Thrown*/ boolean hasFinalResult = inner.hasFinalResult();
+ /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_0;
+ if (hasFinalResult) {
+ symbol_0 = inner;
+ }
+ else {
+ final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element_0);
+ symbol_0 = parentEnv;
+ }
+ return symbol_0;
}
}

Back to the top