Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Creating external labels at runtime
Creating external labels at runtime [message #199027] Fri, 25 July 2008 17:13
Eclipse UserFriend
Originally posted by: name.surname.gmail.com

Hi
I have a domain model with Place EClass which has many-containment
reference to Label EClass. Label has only only attribute 'text' which is
EString.

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
run-time.

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
enabled?

- 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.

Best Regards
Lukasz Z.
Previous Topic:Compartment resizement
Next Topic:Integrating EMF / GMF editors - diagram changes not saving
Goto Forum:
  


Current Time: Thu Apr 25 15:15:17 GMT 2024

Powered by FUDForum. Page generated in 0.03051 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top