Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo SBH2016-09-27 18:09:12 +0000
committerEd Willink2016-10-22 14:16:13 +0000
commit991ae3d767779d41099ba524b2f3438350220535 (patch)
treea6c057d88f55ea7056c99fee6a4e771be89f9af7
parent1aa1d8e5d46780bc1ea9fcbca81233c20e98660f (diff)
downloadorg.eclipse.qvtd-991ae3d767779d41099ba524b2f3438350220535.tar.gz
org.eclipse.qvtd-991ae3d767779d41099ba524b2f3438350220535.tar.xz
org.eclipse.qvtd-991ae3d767779d41099ba524b2f3438350220535.zip
[cs2as] - Adjusting the .ocl files to the last AS meta-model
modifications
-rw-r--r--doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2AS.ocl13
-rw-r--r--doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2ASLookup.ocl2
2 files changed, 7 insertions, 8 deletions
diff --git a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2AS.ocl b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2AS.ocl
index e36f5fa49..3fa1491da 100644
--- a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2AS.ocl
+++ b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2AS.ocl
@@ -16,7 +16,7 @@ context PackageCS
def : ast() : as::Package[1] =
as::Package {
name = name.toString(), -- FIXME bug 494252
- ownedClasses = classifiers.ast()->asOrderedSet(), -- FIXME remove asOrderedSet()
+ ownedClasses = classes.ast()->asOrderedSet(), -- FIXME remove asOrderedSet()
ownedPackages = packages.ast()->asOrderedSet() -- FIXME remove asOrderedSet()
}
@@ -25,16 +25,13 @@ def : ast() : as::Class[1] =
as::Class {
name = name.toString(),
ownedOperations = operations.ast()->asOrderedSet(), -- FIXME remove asOrderedSet()
- ownedProperties = properties.ast()->asOrderedSet(), -- FIXME remove asOrderedSet()
+ ownedProperties = properties.ast()->asOrderedSet() -- FIXME remove asOrderedSet()
--ownedInvariants = ConstraintCS::allInstances()->select(x | x.ast().ownedSpecification.ownedSelfVar.type = ast()),
-- ownedInvariants = self->closure(oclContainer())->selectByKind(RootCS)
-- .contraints.invariants->select(x | x.ast().ownedSpecification.ownedSelfVar.type = ast())
-- .ast()->asOrderedSet(), -- FIXME remove asOrderedSet()
- superClass = if _extends = null then null else ast().lookupClass(_extends) endif
+-- superClasses = if _extends = OrderedSet {} then null else OrderedSet {ast().lookupClass(_extends)} endif
}
-context ClassifierCS
-def : ast () : as::Class[1] =
- null -- to be overriden
--context InvariantCS
--def : ast() : as::Constraint[1] =
@@ -60,8 +57,10 @@ def : ast() : as::Operation[1] =
type = ast().lookupClass(resultRef),
ownedParameters = params.ast()->asOrderedSet(), -- FIXME remove asOrderedSet()
ownedBodyExpression = as::ExpressionInOCL {
+ language = 'OCL',
ownedBody = self._body.ast(),
- ownedSelfVar = as::Variable{name='self', type= self.ast().owningClass}
+ ownedSelfVar = as::Variable{name='self', type= self.ast().owningClass},
+ type = self._body.ast().type
}
}
diff --git a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2ASLookup.ocl b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2ASLookup.ocl
index 1e77e1eb4..30a41ac80 100644
--- a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2ASLookup.ocl
+++ b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLCS2ASLookup.ocl
@@ -461,7 +461,7 @@ def : _unqualified_env_Variable(child : ocl::OclElement) : lookup::LookupEnviron
context ExpressionInOCL
def : _unqualified_env_Variable(child : ocl::OclElement) : lookup::LookupEnvironment =
parentEnv_Variable().nestedEnv()
- .addElement(ownedSelfVar)
+ .addElements(ownedSelfVar)
endpackage

Back to the top