|Re: How to Highlight all references to an object in a Sirius Diagram [message #1794363 is a reply to message #1794072]
||Wed, 29 August 2018 15:04
| Steve Hickman
Registered: August 2017
Thanks for your rapid response. I am trying this out. I apparently did not properly communicate one key thing. |
The items that I select (data structures) do not have a visual representation in the diagram (which contains only nodes,
ports on those nodes, and edges between ports). What I'm trying to do is highlight the nodes, ports and edges that the
data structures flow through. I've written a service method that takes the selected data structures and finds the nodes,
ports, and edges (the semantic elements, not the DRepresentationElements). The challenge I'm facing is that the service method in
the 'Elements to Select' field isn't being called. The service method for the 'Candidates Expression' is being called, so I know
I've properly registered the service class.
In the 'Candidates Expression' field, the successful call looks like this:
In the 'Elements to Select' field, I've tried the following:
1) service:<static method call using class.method name>()
2) service:<instance method name where the first parameter is the same type as the one used in the 'Candidates Expression' service method call>()
3) [container.<instance method where the first parameter is the same type as the one used in the 'Candidates Expression' service method call>()/]
4) [element.<instance method>()/]
Note that I have defined methods that take as the first parameter an object of type:
EObject, Collection<EObject>, the type used in the successful 'Candidate Expression' call, as well as a static method that takes no parameters.
None of these methods get called.
None of these have worked. What's the correct call? What is the context this method will be called in? What am I doing wrong?
*) I'm using the standard GEMOC Studio distribution which includes Sirius 18.104.22.168801311428.
1) Users will select a single data structure but that multiple diagram elements will be highlighted as a result. Should the Selection Wizard mulitple box be checked or not in this case?
2) I'm looking at https://www.eclipse.org/forums/index.php/t/1000795/ to see if that will provide additional insight
I changed my method that supplies the 'Candidates Expression' field to return a list of edges (these semantic elements have a graphical representation). I then checked the 'Multiple' field so that element should contain a Collection<EObject> and set the 'Elements to Select' field to 'var:element'
That should mean that all the selected edges should be highlighted after the Selection Wizard is finished. That did not happen. The selection did not change.
More Follow Up:
The Sirius Tool Specification doc , in the 'Selection after tool execution' section, says: In any case, if the default list of elements is not empty, the list of elements returned is filtered with the default selected elements. In case of creation tool, the default list contains newly created elements so, the returned list can contain at most that elements. If I understand this correctly, this means that the list of items finally displayed as selected must be a subset of those selected in the Selection Wizard dialog. In other words, this means that I cannot use the Selection Wizard to select something other than what I want to appear as selected or a superset thereof. If that is true, then I cannot use the Selection Wizard for my original intended purpose because I cannot use the Selection Wizard to select something with no graphical representation, use that input to calculate what I want to appear as selected, and expect the selected elements to change after using the tool.
Is that correct?
[Updated on: Wed, 29 August 2018 20:15]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02822 seconds