How to get the selection event of source node during edge creation [message #1819649] |
Mon, 20 January 2020 10:44 |
Prajna VG Messages: 54 Registered: July 2018 |
Member |
|
|
Hi,
I want to execute a set of code when I select the source on edge creation. I am not able to find where I need to add the code.
I tried adding in
- "Connection start Precondition" which will execute when we mouse over on the source node not on the selection of source node. But I want on selection of source node!!.
Can anyone help where I need to add the expression which will execute on selection of source node, before connecting the target node.
[Updated on: Mon, 20 January 2020 10:46] Report message to a moderator
|
|
|
Re: How to get the selection event of source node during edge creation [message #1819697 is a reply to message #1819649] |
Tue, 21 January 2020 15:16 |
|
Hi,
There is no easy way in Sirius to provide a service that will be executed once the edge source has been selected.
You have different possibilities. You can provide your own EditPart and EditPolicy that will return a specific command for the connection start: org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getCommand(Request). That requires some GMF/GEF knowledges.
You can also provide a SelectionListener through this API : site.getWorkbenchWindow().getSelectionService().addSelection Listener(myListener);
Florian
|
|
|
Powered by
FUDForum. Page generated in 0.02778 seconds