add a listener to a diagram element [message #1726631] |
Tue, 15 March 2016 09:26 |
Alx Hvx Messages: 40 Registered: March 2016 |
Member |
|
|
Hi everybody,
For my project I have to listen to an element of a diagram an do some actions when the user clic or modify something on it.
For exemple when a field of an element is changed I want to automaticly change the value of another field. Do you know how to do that ?
Another thing I need to do (more complicated I think) is to get the layout position of an element (x and y) on the diagram and store those values on a field of it. For exemple if I drag the element on the diagram from position x=50, y=50 to x=100, y=100 I need that field of this element to automaticly change to x=100 and y=100.
I tried to modify the .aird file but it makes the diagram crash.
Is this something possible to do with Sirius ?
Thank you !
Alex
[Updated on: Wed, 16 March 2016 08:58] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: add a listener to a diagram element [message #1727748 is a reply to message #1726790] |
Sat, 26 March 2016 16:47 |
Parsa Pourali Messages: 210 Registered: February 2014 |
Senior Member |
|
|
Hi Esteban,
Could you please elaborate more on registering the listeners as an extension?
- Should we add the extension in the EMF project plugin or to the Sirius (design) project plug-in ?
- What is the Editing Domain ? is it our EMF project ?
<extension point="org.eclipse.emf.transaction.listeners">
<listener class="org.eclipse.example.MyListener">
<editingDomain id="org.eclipse.example.MyEditingDomain"/>
</listener>
</extension>
Thanks,
Parsa
[Updated on: Sat, 26 March 2016 16:52] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04320 seconds