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 #17145] Mon, 12 August 2002 23:38 Go to next message
Eclipse UserFriend
Originally posted by: escofield.BOOGERrcn.com

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.
Re: View menu. [message #17263 is a reply to message #17145] Tue, 13 August 2002 15:36 Go to previous message
Eclipse UserFriend
Originally posted by: david_whiteman.oti.com

Try the eclipse.tools newsgroup

"Erik" <escofield@BOOGERrcn.com> wrote in message
news:3D584712.8030403@BOOGERrcn.com...
>
>
> 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.
>
Re: View menu. [message #572935 is a reply to message #17145] Tue, 13 August 2002 15:36 Go to previous message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
Try the eclipse.tools newsgroup

"Erik" <escofield@BOOGERrcn.com> wrote in message
news:3D584712.8030403@BOOGERrcn.com...
>
>
> 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:Exception while running web sphere workbench 2.0
Next Topic:Welcome
Goto Forum:
  


Current Time: Fri Mar 29 14:00:40 GMT 2024

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

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

Back to the top