Extend existent GMF editor with a new EMF model [message #210037] |
Thu, 30 October 2008 15:10 |
Yuri Strot 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 |
Alexander Shatalin 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
|
|
|
Powered by
FUDForum. Page generated in 0.03335 seconds