Changing Generated Icons in GMF editor [message #206364] |
Mon, 22 September 2008 22:43  |
Eclipse User |
|
|
|
Hi,
I am trying to change the default generated icons for my diagram editor.
After following the GMF tutorial part 3 I managed to get the icons
changing, but only after replacing the generated
'icons/full/obj16/Page.gif' -- specifying a different image bundle in
the .gmftool only changed the icon used in the palette.
Is this expected behaviour, or is there another way to achieve this? I
am using Eclipse 3.3/GMF 2.0.1.
Thanks,
Jevon
|
|
|
|
Re: Changing Generated Icons in GMF editor [message #213038 is a reply to message #206438] |
Tue, 09 December 2008 07:32   |
Eclipse User |
|
|
|
Originally posted by: martin-klinke.nospam.com
Are you serious about that? Please, don't get this wrong, but why is
this the expected behaviour?
When I can specify icons in .gmftool, I'd expect these to be used for
the elements in my diagram as well.
I guess, the problem here is that the icons that are currently used for
display in the diagram are those from the generated .edit plug-in from
the .genmodel.
It would be great to have a way to specify the icons for domain elements
prior to generating the .edit plug-in.
Alternatively, why not just use the tool icons for the diagram elements
as well?
What do you think?
Dimitrios Kolovos schrieb:
> This is the expected behaviour indeed.
>
> Cheers,
> Dimitrios
>
> Jevon Wright wrote:
>> Hi,
>>
>> I am trying to change the default generated icons for my diagram
>> editor. After following the GMF tutorial part 3 I managed to get the
>> icons changing, but only after replacing the generated
>> 'icons/full/obj16/Page.gif' -- specifying a different image bundle in
>> the .gmftool only changed the icon used in the palette.
>>
>> Is this expected behaviour, or is there another way to achieve this? I
>> am using Eclipse 3.3/GMF 2.0.1.
>>
>> Thanks,
>>
>> Jevon
|
|
|
Re: Changing Generated Icons in GMF editor [message #213051 is a reply to message #213038] |
Tue, 09 December 2008 07:53  |
Eclipse User |
|
|
|
Hello Martin,
> When I can specify icons in .gmftool, I'd expect these to be used for
> the elements in my diagram as well.
Well, these icons are used to palette tools only.
> I guess, the problem here is that the icons that are currently used
> for display in the diagram are those from the generated .edit plug-in
> from the .genmodel.
Right. This is default behaviour. To customize used icons for now you have
to fill imageRegistry created in generated ???ElementTypes class with your
own ImageDescriptors. For example – inside ??? ElementTypes.getImageRegistry()
method by customizing generated code.
> It would be great to have a way to specify the icons for domain
> elements prior to generating the .edit plug-in.
This is a EMF-related question since EMF is responsible for generating .edit
plugins. In GMF you still have a choice to override EMF icons.
> Alternatively, why not just use the tool icons for the diagram
> elements as well?
Well, this will not cover all the use cases. We have a plan to modify ???ElementTypes
in a future to allow specifying different icons for different diagram elements
(even with the same meta-classes), but it looks like it will be necessary
to modify generated code to modify actual icons.
Another option for you is to modify .gmfgraph model and create+attach to
the diagram element appropriate icon there. For now GMf supports only SVG
figures in .gmfgraph model the rest of the images can be plugged into .gmfgraph
as a CustomFigures.
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.09781 seconds