Ddding extended figures to GMF generated diagram and palette from other plugins [message #106628] |
Sat, 24 February 2007 13:18  |
Eclipse User |
|
|
|
Hello,
im an average eclipse and GEF user which is now seeking to learn GMF. I
think this project is really awesome, although i have a question about how
to perform what i need.
My goal is to create an abstract figure/editpart that can be extended to
create a large quantity of figures that share the same look while still
contributing some UI variations. For example, i could create a base figure
called BaseFigure (in the ECore model), and from there create figures A
and B that would extend this figure and be visible in the palette as Tool
A and Tool B.
My question is: how can i make it so that other plugins could contribute
their own extended figures (i.e. figure C in another plugin, adding the
tool 'Create C' to the palette) to the diagram and make them dynamically
added to the palette? from what i see, the GMF generated diagram code
seems to hardcode the palette content from the models. But in my case, the
number of tools and figures that derive from this abstract figure is
unknown and added at runtime (application start).
I also took a look at the elementTypes extension point, but it does not
seem to be taken into account by the diagram code generated from the GMF.
Am i missing something?
I greatly thank you for the help!! This GMF project is truly amazing!
|
|
|
|
Re: Ddding extended figures to GMF generated diagram and palette from other plug [message #106881 is a reply to message #106807] |
Mon, 26 February 2007 10:28   |
Eclipse User |
|
|
|
Hi Alex, thanks for your reply.
I did some more investigations during the last days and i can now refine
my question. I managed to add tools to the palette via the PaletteProvider
extension point. I may be getting something wrong, but it seams that i can
only contribute to the palette via this extension point, is that true?
and if so, how can i add tools to the palette from other plugins, since
from what i have seen, i can not extend this extension point from multiple
plugins? (if i do, the extension form the contributing plugin seems to
override the contribution of the diagram plugin)
as for the elementTypes, i had it all wrong, i initially thought the
palette loaded the tools from there, but i now know it is not the case.
Lots of things to master to understand EMF/GEF/GMF ;)
thanks for your help!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08814 seconds