diff options
author | Ed Willink | 2019-06-28 08:48:36 +0000 |
---|---|---|
committer | Ed Willink | 2019-06-28 08:51:51 +0000 |
commit | 032c8126f44cf0c0772cc3f654d78444cb91d335 (patch) | |
tree | 7cbc9f774c080285e0ded5e9f47c24c96c05adb5 | |
parent | 76f4d708e70b09e5b9b0b13c315787f3cd027e79 (diff) | |
download | org.eclipse.qvtd-ewillink/529207.tar.gz org.eclipse.qvtd-ewillink/529207.tar.xz org.eclipse.qvtd-ewillink/529207.zip |
[548536] Use mapOrphanage to manage singleton Packageewillink/529207
-rw-r--r-- | tests/org.eclipse.qvtd.xtext.qvtrelation.tests/models/ecore2pivot/Ecore2Pivot.qvtr | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/models/ecore2pivot/Ecore2Pivot.qvtr b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/models/ecore2pivot/Ecore2Pivot.qvtr index 348280274..2710300d3 100644 --- a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/models/ecore2pivot/Ecore2Pivot.qvtr +++ b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/models/ecore2pivot/Ecore2Pivot.qvtr @@ -184,8 +184,12 @@ package org::eclipse::ocl::pivot2::ecore2pivot { top relation mapEResource { enforce domain ecore eExtent : extentMM::qvtruntimelibrary::Extent; enforce domain as asModel : pivotMM::Model { - extent = asExtent : extentMM::qvtruntimelibrary::Extent + extent = asExtent : extentMM::qvtruntimelibrary::Extent, + ownedPackages = asOrphanage : Package }; + -- where { + -- mapOrphanage(asOrphanage); + -- } } /** @@ -240,15 +244,18 @@ package org::eclipse::ocl::pivot2::ecore2pivot { actual = asType : Type, formal = pivotMM::Bag::T } - } + }, + owningPackage = asOrphanage : Package }; when { not isOrdered; not isUnique; mapEClassifier(eType, asType); + mapOrphanage(asOrphanage); } } relation mapEClassifier_OrderedSet overrides mapEClassifier_Collection { + enforce domain ecore eType : EClassifier, isOrdered : Boolean, isUnique : Boolean; enforce domain as asCollection: OrderedSetType { ownedBindings = asBinding : TemplateBinding { @@ -256,12 +263,14 @@ package org::eclipse::ocl::pivot2::ecore2pivot { actual = asType : Type, formal = pivotMM::OrderedSet::T } - } + }, + owningPackage = asOrphanage : Package }; when { isOrdered; isUnique; mapEClassifier(eType, asType); + mapOrphanage(asOrphanage); } } relation mapEClassifier_Sequence overrides mapEClassifier_Collection { @@ -272,12 +281,14 @@ package org::eclipse::ocl::pivot2::ecore2pivot { actual = asType : Type, formal = pivotMM::Sequence::T } - } + }, + owningPackage = asOrphanage : Package }; when { isOrdered; not isUnique; mapEClassifier(eType, asType); + mapOrphanage(asOrphanage); } } relation mapEClassifier_Set overrides mapEClassifier_Collection { @@ -288,12 +299,14 @@ package org::eclipse::ocl::pivot2::ecore2pivot { actual = asType : Type, formal = pivotMM::Set::T } - } + }, + owningPackage = asOrphanage : Package }; when { not isOrdered; isUnique; mapEClassifier(eType, asType); + mapOrphanage(asOrphanage); } } /* relation map2SetType { @@ -311,5 +324,16 @@ package org::eclipse::ocl::pivot2::ecore2pivot { mapEClassifier(eType, asType); } } */ + + /** + * signleton <=> pivot::Package for the local Orphanage + */ + relation mapOrphanage { + enforce domain as asPackage : Package { + name = '$$', + nsPrefix = 'orphanage', + URI = 'http://www.eclipse.org/ocl/2015/Orphanage' + }; + } } } |