Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo SBH2016-04-23 09:18:09 -0400
committerAdolfo SBH2016-05-23 14:33:56 -0400
commitcfa7be9a6495b3fa5534f52d1e0240a8cc23bcab (patch)
tree53710dc810715d21feffc55fcb2b098ff7a65b9e
parent6cac9a9f840b1ce34328de2acdce015fa106c762 (diff)
downloadorg.eclipse.qvtd-cfa7be9a6495b3fa5534f52d1e0240a8cc23bcab.tar.gz
org.eclipse.qvtd-cfa7be9a6495b3fa5534f52d1e0240a8cc23bcab.tar.xz
org.eclipse.qvtd-cfa7be9a6495b3fa5534f52d1e0240a8cc23bcab.zip
[cs2as] - Making Example2V2 disambiguation need to access AS domain
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl2
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl14
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl
index 561002fec..4f325938c 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl
@@ -47,7 +47,7 @@ def : ast() : as::CallExp =
then as::OperationCallExp {
ownedCallExp = ownedNameExp?.ast(),
ownedArguments = roundedBrackets.args.ast(),
- referredOperation = if oclContainer().oclIsKindOf(NameExpCS) then ast().lookupOperationFrom(ast().owningSource.type, name, ast().oclAsType(as::OperationCallExp).ownedArguments) else ast().lookupOperation(name, ast().oclAsType(as::OperationCallExp).ownedArguments) endif,
+ referredOperation = lookupOperation(),
type = ast().oclAsType(as::OperationCallExp).referredOperation?.type
}
else
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl
index fa07f72c7..94bbdaba4 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl
@@ -4,9 +4,23 @@ import 'classescs2asV2Helpers.ocl'
import 'classescs2asV2Lookup.ocl'
package cs
+-- FIXME manually added
+context ElementCS
+def : ast() : as::Element =
+ ast.oclAsType(as::Element)
+
+context NameExpCS
+def : lookupOperation() : as::Operation =
+ if oclContainer().oclIsKindOf(NameExpCS)
+ then ast().lookupOperationFrom(ast().oclAsType(as::OperationCallExp).owningSource.type, self.name, ast().oclAsType(as::OperationCallExp).ownedArguments)
+ else ast().lookupOperation(name, ast().oclAsType(as::OperationCallExp).ownedArguments)
+ endif
+-- END OF manual addition
+
context NameExpCS
def : isOpCallExp() : Boolean =
roundedBrackets <> null
def : isPropCallExp() : Boolean =
roundedBrackets = null
+
endpackage

Back to the top