Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Extend existent GMF editor with a new EMF model
Extend existent GMF editor with a new EMF model [message #210037] Thu, 30 October 2008 15:10 Go to next message
Yuri Strot is currently offline Yuri StrotFriend
Messages: 1
Registered: July 2009
Junior Member
Hello guys,

I've generated GMF editor based on my EMF model. I also need to extend
EMF model with some additional classes and I've created another plug-in
and EMF package for it. Now, I'd like to extend *existent* GMF editor
with a new pallete items, edit parts, etc. for my new model elements.
So, could you please answer to the following questions:
1. Is it possible to extend GMF editor without modification existent
code (in separate plug-in)?
2. Is it possible to use code-generation to create new edit parts,
policies, figures, etc. for new EMF model elements, which can be used in
the existent GMF editor?

I've tried to implement this through "elementTypes", "viewProviders",
"editpartProviders" extensions, but confronted with some difficulties
and didn't find any articles or examples how to do this.

--
Best regards,
Yuri Strot
Re: Extend existent GMF editor with a new EMF model [message #210158 is a reply to message #210037] Fri, 31 October 2008 11:36 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Yuri,

> 1. Is it possible to extend GMF editor without modification existent
> code (in separate plug-in)?
Yes, but generator does not support this mode now.

> 2. Is it possible to use code-generation to create new edit parts,
> policies, figures, etc. for new EMF model elements, which can be used
> in the existent GMF editor?
Not now. You can use code generation to generate new diagramming plugin,
but you should be ready to manually patch generated code to plug in generated
parts into existing diagram.
As a workaround I can propose you to copy original .gmfmap file, modify it
and re-generate one more diagram editor plugin with extended set of diagram
elements.

> I've tried to implement this through "elementTypes", "viewProviders",
> "editpartProviders" extensions, but confronted with some difficulties
> and didn't find any articles or examples how to do this.
This is a proper way - you have to use all these providers to plug in.

-----------------
Alex Shatalin
Previous Topic:DiagramLabel draw too far of the connection line
Next Topic:Run "Validate" on doSave
Goto Forum:
  


Current Time: Thu Apr 25 00:46:34 GMT 2024

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

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

Back to the top