|
|
|
|
Re: Can't access to a reference in Sirius [message #1744706 is a reply to message #1744702] |
Thu, 29 September 2016 14:58 |
|
Oh right I read it to fast and did not see the "select". I think you should use the "filter" service instead of "select" which would give the following expression:
[self.elements->filter(petrinet::Arc).source/]
If I am not wrong, the result of your select effectively trimmed the "elements" to only have Arc element, but it did not cast it as a Collection of Arc, you need the filter service for that.
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Can't access to a reference in Sirius [message #1744709 is a reply to message #1744708] |
Thu, 29 September 2016 15:12 |
|
Ok I was confused with your first screenshot with the interpreter view where the expression was on an OutputArc.
The reference source, is not defined on an Arc but only on the subtypes InputArc or OutputArc therefore it is normal that source is not reconized. You either need to filter using InputArc and OutputArc -> [self.elements->filter(petrinet::InputArc).source/]
If you have to keep filtering on Arc, you can also change your metamodel to have source and destination references on arc, but it will have to point Node, which means you will have to customized the source and destination setter methods in InputArc and OutputArc to only accept transition or place elements. This is less elegant than the first solution in my opinion.
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03726 seconds