[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Change Popup Strings and Icons in Mindmap example
|
Hi,
Does anybody know how to change the icon and string that gets displayed in
hover/popup menus?
In part 2 of the mindmap example,
http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_2, there are 3 types of
relationships (depends, includes, and extends). These relationships are
created by 3 seperate tools and distinguished by an enumeration as explained
in the tutorial. There is a problem with this approach however. Since
there is a single class for all 3 types (depends, includes, and extends), I
cannot assign these 3 types unique icons and strings. So if I create a
relationship without using the pallet, (by dragging an arrow from one node
to another node), the popup menu will ask me to "Create a Relationship"
three times and simply displays the generic Relationship icon for all 3
options. Instead, I would like this popup menu to say something like
"Create a DependsRelationship", "Create an ExtendsRelationship", "Create an
Includes Reltionship" and display custom icons for each action. This
problem does not exist in the pallet, because the pallet extracts names and
icons from the tools. The popup menus, however, appear to extract names and
icons from the edit and model code. How can I customize the icons and
strings in the popup menus depending on an attribute value?
Thanks,
Joe