Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » View menu.
View menu. [message #572770] Mon, 12 August 2002 23:38
Erik is currently offline ErikFriend
Messages: 1
Registered: July 2009
Junior Member
I am trying to add menu's to the view.. The view consists of a tree
with different nodes. Each node has a popUp corresponding to it's
particular task. I would like to mimic this in the View's menu. How do
I get the menu to select what to display using the same/similar logic as
the popups <Filter> element that calls the testAttribute?

Erik


Example PopUp code.

<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="myGenericTreeObjectClass"
id="myID1">
<filter
name="ObjectType"
value="MyObjectType">
</filter>
<action
label="Label"
icon="icons/file_obj.gif"
class="myPopupClass"
menubarPath="additions"
enablesFor="1"
id="myID2">
</action>
</objectContribution>
</extension>


notice the objectClass is the same for every objectContribution or
popup.. The filter applied is based on a class attribute named
ObjectType that is set during the load of the tree. The
myGenericTreeObjectClass implements IActionFilter and overrides
testAttribute. TestAttribute checks "ObjectType" for "MyObjectType" and
returns true if they are equal.

I cannot figure out how to get the view's menu to have similar logic.
Previous Topic:[Stellation] Database and Win32 and the rest
Next Topic:Exception while running web sphere workbench 2.0
Goto Forum:
  


Current Time: Thu May 09 18:14:32 GMT 2024

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

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

Back to the top