Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » extended model, how to extend diagram editor?
extended model, how to extend diagram editor? [message #441469] Fri, 31 July 2009 10:54 Go to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Hi,
let's say I have a model and a diagram editor for this model. Then I create another (specialized) model that extends
elements in the first (base) model. Now, what is the most elegant way to extend the base diagram editor? In my case all
graphical elements stay the same, except that some nodes and links will have an additional label.

My approach so far is to
- I create a new gmfgraph that defines those nodes and links with additional labels
- Create a new gmfmap that is equal to the base gmfmap except that it references the new graphical elements from the new
gmfgraph and it defines the additional label mappings.

Is that the right way to go? The problem I see is that this creates a fair amount of redundant information that will
have to be maintained in case the base model evolves.

Thanks for helping

Joel
Re: extended model, how to extend diagram editor? [message #441774 is a reply to message #441469] Fri, 31 July 2009 11:22 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Joel,

For now this is the only way supported by code generation.
Another option is to write corresponding code manually.

-----------------
Alex Shatalin
Re: extended model, how to extend diagram editor? [message #442075 is a reply to message #441774] Fri, 31 July 2009 12:03 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Hello Alex,
what do you mean by "writing corresponding code manually"?
Do you mean to create another diagram editor plug-in, inheriting from the classes of the generated base diagram editor...?

Thanks

Joel

Alex Shatalin wrote:
> Hello Joel,
>
> For now this is the only way supported by code generation.
> Another option is to write corresponding code manually.
>
> -----------------
> Alex Shatalin
>
>
Re: extended model, how to extend diagram editor? [message #442459 is a reply to message #442075] Fri, 31 July 2009 12:59 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Joel,

> Do you mean to create another diagram editor plug-in, inheriting from
> the classes of the generated base diagram editor...?
yes. Or use runtime extension points to plug in your diagram element into
existing diagram editor. Again, hand-written code.

-----------------
Alex Shatalin
Previous Topic:Transition of element copy paste
Next Topic:How to implement a node figure with certain behavior?
Goto Forum:
  


Current Time: Mon Mar 08 10:16:06 GMT 2021

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

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

Back to the top