diff options
author | Adolfo SBH | 2015-07-10 16:03:13 +0000 |
---|---|---|
committer | Ed Willink | 2015-08-06 20:27:57 +0000 |
commit | 822471a39891d9cffb8c7274330a65cb256493d1 (patch) | |
tree | 91d46e1219efb60f1049bf8dad3c6011e7e0510f | |
parent | b9cfd9f9a4c4b7c50527c035d832a458b1e880ff (diff) | |
download | org.eclipse.qvtd-822471a39891d9cffb8c7274330a65cb256493d1.tar.gz org.eclipse.qvtd-822471a39891d9cffb8c7274330a65cb256493d1.tar.xz org.eclipse.qvtd-822471a39891d9cffb8c7274330a65cb256493d1.zip |
[ocl2qvti] - Fixing the unnecessary mapping creation for inner
ShadowExps
-rw-r--r-- | plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/etl/ocl2qvtp_v2.etl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/etl/ocl2qvtp_v2.etl b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/etl/ocl2qvtp_v2.etl index 067c9eaf9..3c81efa9b 100644 --- a/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/etl/ocl2qvtp_v2.etl +++ b/plugins/org.eclipse.qvtd.cs2as.compiler/src/org/eclipse/qvtd/cs2as/compiler/internal/etl/ocl2qvtp_v2.etl @@ -58,10 +58,13 @@ rule ShadowExp2CreationMapping to t : QVTi!Mapping { guard { + var containers = s.closure(x|x.eContainer()); + return not containers.exists(x | x.isKindOf(OCL!ShadowExp)) -- innerShadowExps dont produce creation mappings + and // FIXME this is hazardy. Rework // Ideally lazy transformation on the content of the OCL Model should avoid calling // this rule on undesired elemenets (imported from other ocl files) - return s.closure(x|x.eContainer()).contains(LEFTCS_PACKAGE); + containers.contains(LEFTCS_PACKAGE); } t.name = s.getCreationMappingName(); |