Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo SBH2016-03-19 13:28:18 -0400
committerEd Willink2016-03-23 13:57:53 -0400
commit2324e9520771a6872eecaf21552bafed448f4d08 (patch)
tree8c95e0f9eff53e082dee812694e40e478e2858ba /tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as
parent7897888f55850d115f1df7a1357d7c6e9ba393d2 (diff)
downloadorg.eclipse.qvtd-2324e9520771a6872eecaf21552bafed448f4d08.tar.gz
org.eclipse.qvtd-2324e9520771a6872eecaf21552bafed448f4d08.tar.xz
org.eclipse.qvtd-2324e9520771a6872eecaf21552bafed448f4d08.zip
[cs2as] - Partitioning qualified lookups in Example1
Diffstat (limited to 'tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as')
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2TargetLookup.ocl16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2TargetLookup.ocl b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2TargetLookup.ocl
index 874fee4c4..e0850a4da 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2TargetLookup.ocl
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2TargetLookup.ocl
@@ -36,6 +36,13 @@ def : parentEnv_B() : lookup::LookupEnvironment[1] =
let parent = oclContainer() in if parent = null then lookup::LookupEnvironment { } else parent._unqualified_env_B(self) endif
def : parentEnv_C() : lookup::LookupEnvironment[1] =
let parent = oclContainer() in if parent = null then lookup::LookupEnvironment { } else parent._unqualified_env_C(self) endif
+
+def : _qualified_env_B(child : OclElement) : lookup::LookupEnvironment[1] =
+ lookup::LookupEnvironment {}
+
+def : _qualified_env_C(child : OclElement) : lookup::LookupEnvironment[1] =
+ lookup::LookupEnvironment {}
+
-- End of domain specific default functionality
endpackage
@@ -62,16 +69,15 @@ def : _unqualified_env_A2(child : ocl::OclElement) : lookup::LookupEnvironment =
context A1
def : _lookupQualifiedB(bName : String) : B[?] =
- let foundB = _lookupB(_qualified_env(), bName)
+ let foundB = _lookupB(_qualified_env_B(), bName)
in if foundB->isEmpty()
then null
else foundB->first()
endif
def : lookupQualifiedB(aPathElementCS : _source::PathElementCS) : B[?] =
_lookupQualifiedB(aPathElementCS.name)
-
-def : _qualified_env() : lookup::LookupEnvironment =
+def : _qualified_env_B() : lookup::LookupEnvironment =
let env = lookup::LookupEnvironment{}
in env
.addElements(ownsB)
@@ -86,7 +92,7 @@ def : _unqualified_env_B(child : ocl::OclElement) : lookup::LookupEnvironment =
context A2
def : _lookupQualifiedC(cName : String) : C[?] =
- let foundC = _lookupC(_qualified_env(), cName)
+ let foundC = _lookupC(_qualified_env_C(), cName)
in if foundC->isEmpty()
then null
else foundC->first()
@@ -95,7 +101,7 @@ def : lookupQualifiedC(aPathElementCS : _source::PathElementCS) : C[?] =
_lookupQualifiedC(aPathElementCS.name)
-def : _qualified_env() : lookup::LookupEnvironment =
+def : _qualified_env_C() : lookup::LookupEnvironment =
let env = lookup::LookupEnvironment{}
in env
.addElements(ownsC)

Back to the top