|Creating external labels at runtime [message #199027]
||Fri, 25 July 2008 17:13
Originally posted by: name.surname.gmail.com|
I have a domain model with Place EClass which has many-containment
reference to Label EClass. Label has only only attribute 'text' which is
What I would like to achieve is a GMF editor which can visualize Places
as nodes and each Label should be displayed as external label to that
node. The user should be able to add and remove those external labels at
The reason that I would like to use external labels is that they are
displayed always next to the given label. They are also treated as a
part of the node, so when the node is moved all the external labels are
re-positioned as well.
So far I have created the GMF editor which maps Places as nodes, and I
have defined external label on this Place.
The problems that I have encountered are the following:
- How can I add external label programmatically. are there any
predefined commands that I could use? and consequently have undo-redo
- Normally labels are associated with the parent editPart domain model
element (in my case Place). How I can modify it to link it with a Label
element and consequently display 'text' attribute?
- How external labels are removed? I have noticed that when you press
delete on external label they are just made invisible.
Thank you for any advices/hints.
Powered by FUDForum
. Page generated in 0.02183 seconds