Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing Generated Icons in GMF editor
Changing Generated Icons in GMF editor [message #206364] Tue, 23 September 2008 02:43 Go to next message
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
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 #206438 is a reply to message #206364] Tue, 23 September 2008 08:54 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
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 #213038 is a reply to message #206438] Tue, 09 December 2008 12:32 Go to previous messageGo to next message
Eclipse UserFriend
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 12:53 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
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
Previous Topic:editing properties which are of a complex type
Next Topic:model updating not reflected in editor
Goto Forum:
  


Current Time: Tue Apr 23 12:02:36 GMT 2024

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

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

Back to the top