Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom tool icons in popup menu
Custom tool icons in popup menu [message #519239] Mon, 08 March 2010 09:07 Go to next message
Ralf is currently offline RalfFriend
Messages: 25
Registered: March 2010
Junior Member
Moin, moin,

where can I define custom tool icons for the popup menu of my canvas. I was able to change the icons of the palette but these icon definitions are not used by the canvas menu. Can anyone give me a clue where these menu icons are defined ?

http://ictis.cs.uni-dortmund.de:8080/home/nagel/Web/screenshot.png
Re: Custom tool icons in popup menu [message #520383 is a reply to message #519239] Fri, 12 March 2010 08:23 Go to previous messageGo to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
How did you change the icons of the palette? Because when I change the
icons for the palette, the icons of the popup menu are changed too.

Le 08/03/2010 10:07, Ralf a écrit :
> Moin, moin,
>
> where can I define custom tool icons for the popup menu of my canvas. I
> was able to change the icons of the palette but these icon definitions
> are not used by the canvas menu. Can anyone give me a clue where these
> menu icons are defined ?
>
>
Re: Custom tool icons in popup menu [message #526372 is a reply to message #520383] Fri, 09 April 2010 22:01 Go to previous messageGo to next message
sosoriov  is currently offline sosoriov Friend
Messages: 1
Registered: April 2010
Junior Member
Ralf: how did you changes the icons, could you teach me? Very Happy
Re: Custom tool icons in popup menu [message #526409 is a reply to message #519239] Sat, 10 April 2010 15:36 Go to previous messageGo to next message
Derya is currently offline DeryaFriend
Messages: 4
Registered: April 2010
Junior Member
I have the same problem! Have you solved the problem?
Re: Custom tool icons in popup menu [message #526559 is a reply to message #519239] Mon, 12 April 2010 09:55 Go to previous messageGo to next message
Ralf is currently offline RalfFriend
Messages: 25
Registered: March 2010
Junior Member
Hi,

I'm using Eugenia (http://www.eclipse.org/gmt/epsilon/doc/eugenia/) together with Emfatic (http://wiki.eclipse.org/Emfatic). That way I describe my EMF/GMF model in a textual notation. E.g. a GMF Node looks like this:

@gmf.node(label = "name")
class File {
    attr String name;
}


With additional annotations custom icons and other items can be set ( http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-gmf- tutorial/):

gmf.node
=======
Applies to an EClass and denotes that it should appear on the diagram as a node. Accepts the following details

    * label : the name(s) of the EAttribute(s) of the EClass, the value(s) of which will be displayed as the label of the node
    * label.pattern (optional): If more than one attributes are specified in the label, the format detail is necessary to show how their values will be rendered in the label. The format follows the Java Message Format style (e.g. {0} : {1})
    * label.icon (optional): If set to true (default) a small icon appears on the left of the label.
    * label.placement (optional) : Defines the placement of the label in relation to the node. Can be set to internal or external. (The default distance of an external label in GMF is 20pt which is a bit too far away for my taste. Read more about fixing this without changing the generated code every time).
    * label.readOnly (optional) : A value of true denotes that the label cannot be changed in the generated diagram editor.
    * figure (optional) : The figure that will represent the node. Can be set to rectangle, ellipse, rounded (default), or the fully qualified name of a Java class that implements Figure
    * color (optional) : an RGB color that will be set as the node's background color (e.g. 255,0,0)
    * border.color (optional) : an RGB color that will be set as the node's border color
    * border.width (optional) : an integer that specifies the width of the node's border
    * border.style (optional) : the style of the node's border. Can be set to solid (default), dash or dot
    * phantom (optional) : Defines if the node is phantom (true/false). Phantom nodes are particularly useful in order to visualize containment references using links instead of spatial containment (read more...)
    * size (optional) : a GMF dimension that will be used as the node's preferred size (e.g. 10,5). Width is specified before height.
    * tool.name (optional) : the name of the creation tool
    * tool.description (optional) : the description of the creation tool
    * tool.small.path (optional) : The path of the small icon of the creation tool
    * tool.small.bundle (optional) : The bundle of the small icon of the creation tool
    * tool.large.path (optional) : The path of the large icon of the creation tool
    * tool.large.bundle (optional) : The bundle of the large icon of the creation tool


Read the tutorial which is easy to understand: http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-gmf- tutorial/

For Emfatic you find a reference here: http://www.eclipse.org/gmt/epsilon/doc/articles/emfatic/
Re: Custom tool icons in popup menu [message #542315 is a reply to message #519239] Thu, 24 June 2010 14:09 Go to previous message
Iman is currently offline ImanFriend
Messages: 2
Registered: June 2010
Junior Member
I am sorry, I wanted to ask, do I need to use these tools or add-ons: Eugenia and Emfatic to draw my own icons?

And if this is the case, how to draw icons like circle inside circle or lines in rectangle? I mean is there an easy tutorial for that?

Thanks in advance
Previous Topic:How to initialize the arrangement of elements in the opening of a diagram?
Next Topic:Google Collection problem
Goto Forum:
  


Current Time: Wed Apr 24 14:59:15 GMT 2024

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

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

Back to the top