Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Build menu contributions dynamically
Build menu contributions dynamically [message #291897] Mon, 26 September 2005 12:24 Go to next message
Eclipse UserFriend
I want to build menu action contributions dynamically (when the menu is
about to show) for the Navigator window's context menu.

I want to add something like the "Team" menu options where there is a
top-level item with child menu actions which in my case need to be built
dynamically. I can get the top level menu contributed using an extension
like the following:

<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IFile"
adaptable="true"
id="com.mycompany.MyMenu">
<menu
label="MyTopLevelMenu"
path="additions"
id="com.mycompany.MyMenu.Main">
<separator
name="group1">
</separator>
</menu>
</extension>

Now I need to figure out how to add actions (in code) to this menu when it
is about to appear. I know this is probably pretty simple to answer but I
can't find an example that does something similar.

Can someone help me find a solution?
Re: Build menu contributions dynamically [message #291961 is a reply to message #291897] Tue, 27 September 2005 14:48 Go to previous message
Eclipse UserFriend
Originally posted by: douglas.pollock.magma.ca

Noname wrote:
> Can someone help me find a solution?

You are looking for actions that have defined style="pulldown". My
recommendation is generally to look at org.eclipse.debug.ui and
org.eclipse.jdt.debug.ui for examples.



cheers,
d.
Previous Topic:if statement in the plugin.xml
Next Topic:Eclipse cannot find my main plugin class. Why?
Goto Forum:
  


Current Time: Wed Oct 29 02:54:25 EDT 2025

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

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

Back to the top