|
|
|
|
Re: Custom tool icons in popup menu [message #526559 is a reply to message #519239] |
Mon, 12 April 2010 09:55 |
Ralf 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.04104 seconds