diff options
2 files changed, 11 insertions, 38 deletions
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/README.txt b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/README.txt deleted file mode 100644 index a32c56b30..000000000 --- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/README.txt +++ /dev/null @@ -1,20 +0,0 @@ -Some files descriptions. - -1. Run Configurations at (launchConfs/example2): -a) Classes CS2AS (QVTp 2 QVTs) -> First ETL transformation to create an initial QVTs model. -b) Classes CS2AS - Scheduling -> An EOL script to update the QVTs with the final scheduling. -c) Classes CS2AS (QVTs+p 2 QVTi) -> Second ETL transformation to create the final QVTi model from the QVTs+QVTp models. - -2. Relevant files: -a) ClassesCS2Classes.ocl -> Original CompleteOCL document describing the mapping between the CS & AS. -b) classescs2as.input.qvtp.qvti -> Manual qvtp file, which contains an equivalent description of the CompleteOCL document, written in QVTp. This one will be removed soon. -c) classescs2as.qvtp.qvti -> The same as the previous one but automatically generated from a). It's the real input to the Horacios transformations - This one is the one use by the Launch Configurations (1.a, 1.b and 1.c). -d) classescs2asSchedule.xmi -> The QVTs model. It's created in two different steps, 1.a) and 1.b) -e) classescs2.qvtias -> The final QVTi model generated by 1.c) - -Notes: -- Classescs2as_v2.input.qvt.qvti is another QVTp transformation corresponding to the Complete OCL document. In this case, the transformation relies on a cross-reference between -the CS and the AS so that a middle model doesn't need to be created. -- There is now a working "Classes Example - (OCL 2 QVTi)" launch conf, which automatically generates 2.c) from 2.a). -- 24/11 OCL2QVTiTestCases now launches all the transformation chain.
\ No newline at end of file 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 368abc84d..4a44f3828 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 @@ -9,26 +9,17 @@ package example2.classes.util; -import example2.classes.ClassesPackage; -import example2.classes.Package; -import example2.classes.Root; -import example2.classes.lookup.EnvironmentPackage; -import example2.classes.lookup.LookupEnvironment; -import example2.classes.util.AbstractClassesCommonLookupVisitor; -import example2.classes.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 example2.classes.ClassesPackage; +import example2.classes.Package; +import example2.classes.lookup.EnvironmentPackage; +import example2.classes.lookup.LookupEnvironment; public class ClassesUnqualifiedPackageLookupVisitor extends AbstractClassesCommonLookupVisitor @@ -107,12 +98,14 @@ public class ClassesUnqualifiedPackageLookupVisitor */ @Override public /*@NonInvalid*/ LookupEnvironment visitRoot(final /*@NonInvalid*/ example2.classes.@org.eclipse.jdt.annotation.NonNull Root element_0) { - 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*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment env = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance(); + 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 = env.addElements(ownedPackages); + final /*@Thrown*/ example2.classes.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment addElements = parentEnv.addElements(ownedPackages); return addElements; } } |