Can't access to a reference in Sirius [message #1744693] |
Thu, 29 September 2016 10:11  |
Eclipse User |
|
|
|
Hello all,
I'm building a graphical editor to create different views of Petrinets, but I'm facing a problem with the creation of element related edges because I can't get certain properties of some elements in the model file. The problem is that I've defined in my metamodel the concept Arc from which OutputArc and InputArc extend, in each of this classes I've the concept source and destination; however, when I tried to do something like this (being on the concept Petrinet):
[self.elements->select(s | s.oclIsKindOf(petrinet::Arc))->collect(s | s.source)/]
I'm getting errors because source cannot be recognized, the strange part is that I've tried changing source with name and checking in Acceleo and it's working just fine, but when I try source, destination or even testing (a property I've defined to verify) Acceleo cannot recognized and therefore Sirius can't either.
I've attached an screenshot of the error and also from the definition of both types of arcs. Any assistance is highly appreciated!
|
|
|
|
|
|
|
|
|
|
|
|
Re: Can't access to a reference in Sirius [message #1744725 is a reply to message #1744724] |
Thu, 29 September 2016 13:07  |
Eclipse User |
|
|
|
I've downloaded Eclipse Neon and Sirius 4.0, re-did the entire process and I've managed to get the query that resolves it:
[self.elements->selectByType(petrinet::InputArc)->collect(s | s.to.eContainer())->reject(s | s = self)/]
It's working great, I just need to merge outputarc and I'll get what I was needing.
Thanks a lot Steve!
|
|
|
Powered by
FUDForum. Page generated in 0.02227 seconds