Community
Participate
Working Groups
The need consists in requesting an odesign model to retrieve all the contained line mappings. For that, you can use the Sirius (or Acceleo) Interpreter, to write this request: [self.eAllContents(LineMapping)/] and to apply it on the root object (Group). But this fails because LineMapping is unknown (same thing on a Viewpoint object). LineMapping is only known from a EditionTableDescription. So, applying this request: [self.eContainer(Group).eAllContents(LineMapping)/] on an EditionTableDescription, it works. Note that, with AQL, "aql:self.eContainer(Group).eAllContents(LineMapping)" does not work either because Group is unknown. Note that adding the related Sirius metamodel(s) on one of the RepresentationDescription has no effet (and it is not very intuitive from the end-user) Watched on Sirius 3.1.1.
"aql:self.eContainer(Group).eAllContents(LineMapping)" is not valid AQL as the types are missing their EPackage name. I would have expected: aql:self.eContainer(viewpoint::Group).eAllContents(table::LineMapping) But besides that, we would need to know more about what you where doing, are you evaluating the request on the .odesign editor ? or on a modeling project ? I assume it is using the .odesign editor, if that is the case, the issue probably lies on the fact that, as no "session" is available no metamodel besides the one of the current selected EObject is registered in the AQL context. This has been done as the only other option we foresaw was to browse the whole model just to retrieve the "EPackage which are used in the current editor" and that's something we'd like to avoid. That being said, I don't think we explored the option of going through the PackageRegistry of the resourceSet and registering all the EPackages which are resolved (and not PackageDescriptor). That would likely fix this issue.
New Gerrit change created: https://git.eclipse.org/r/63844
(In reply to Eclipse Genie from comment #2) > New Gerrit change created: https://git.eclipse.org/r/63844 This makes sure the EPackages will be registered even if the selection is not currently managed by Sirius. This is not enough for *this* actual bug though as it also revealed the fact that AQL might override type informations if two EPackages have the same name, which is often the case in Sirius, see Bug 485397
> I would have expected: > aql:self.eContainer(viewpoint::Group).eAllContents(table::LineMapping) Correction, this is actually : aql:self.eContainer(description::Group).eAllContents(description::LineMapping) (where both "description" are actually different EPackages
Gerrit change https://git.eclipse.org/r/63844 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b67fefd9e3b1da0a1d7e1fa61629f8110950349a
This is fixed on master with https://git.eclipse.org/r/#/c/63845/ being merged. For the record, this bugzilla led to the following changes to get a complete fix: - Make Sirius declare all the EPackages which are resolved when the requestor is used from a selection which is not "handled" by Sirius and as such as no session. - Make AQL consider the fact that several EPackages might have the same name yet not be identic and as such contains different EClassifiers. Also expose the corresponding API - Make Sirius use this improved API from AQL Thanks for your feedback !
Validated on Sirius 4.0.0.201605180923 (4.0.0 RC1) See also correction done for Bug 485397 and mentioned by Cédric in the previous commit: Gerrit change https://git.eclipse.org/r/63845 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=df40a4e3cb3c1cbd5835ef2d1494da9534db4424
Validated with AQL 5.0.0.201605040614
Available in Sirius 4.0.0.