|Re: Questions about diagram(notation) extension [message #1692811 is a reply to message #1692773]
||Sun, 19 April 2015 14:51
| Marcin Trycz
Registered: August 2014
You're actually thinking about two different things: the emf model (label value) and the sirius representation (label representation). It's really useful to train oneself to consider these things as separate and cooperating.|
What you should probably do is to trigger an attribute update on the parent element when an attribute on a child elements changes. You can do this in your EMF code, with regular java (although you need to have some bases in EMF).
Then, on the representation, you'd want to have a conditional style on the parent element's label in the representation description.
This way your update will run if you change your elements with the Sirius editor, with the EMF editor, with java code, or some other as-of-now-unforseen interface. Adding semantic/model code to the view is a recipe for disaster, and you should make as little of it as possible, only as much as makes sense.
If any of this doesn't make sense to you, you should go back to the documentations of EMF and Sirius, it will save you time in the long run.
I'm just a user.
[Updated on: Sun, 19 April 2015 14:59]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02108 seconds