Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Adding to file menu... arrrgh
Adding to file menu... arrrgh [message #166009] Thu, 04 December 2003 20:49 Go to next message
Maxime Poulin is currently offline Maxime PoulinFriend
Messages: 10
Registered: July 2009
Junior Member
Hi all. This might be very simple to you but seems like I am getting
dumber and dumber every day.

Here : I simply want to add a menu item to the File menu from the main
menubar. I can't find how to build the XML for my plugin ! The menu item
simple calls an action. I was able to add my items in the Editor's popup
menu but I simply want it in the File menu, just like Save, Save As,
Close, you know !

Could somebody just help me build the XML ! IMHO, I admit that the
documentation explains the principles pretty well, but there is nowhere to
find the list of proper extension points etc...

<extension point="????">
<??????
id="com.zerobase.someId"
targetID="???????">
<menu
id="com.zerobase.tools.eclipse.plugins.projectfindersubmenu "
label="Project Finder"
menubarPath="?????"
<separator name="zb_group"/>
</menu>
<action
id="com.zerobase.tools.eclipse.plugins.projectfinderaction"
label="Find Projects"

menubarPath=" com.zerobase.tools.eclipse.plugins.projectfindersubmenu/zb_g roup "
class="com.zerobase.tools.eclipse.plugins.ProjectFinder">
</action>
</viewerContribution>


Anyone ? How can it be so complicated ? Am I really getting dumb ?

Max.
Re: Adding to file menu... arrrgh [message #168780 is a reply to message #166009] Wed, 10 December 2003 18:03 Go to previous message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

The extension point to use is actionSets. You don't need to declare a
new "menu". You just need to declare an action, and specify the
"menubarPath" attribute to describe where the action should appear in
the menu. Each menu is divided into groups, and the last element on the
menubarPath is the group name. For example, to add an action to the
"import/export" group in the file menu, the menubarPath is
"file/import.ext". All of the standard menu paths and group names are
found in the class org.eclipse.ui.IWorkbenchActionConstants. See also
the article on contributing actions to the eclispe UI.
--

Max wrote:
> Hi all. This might be very simple to you but seems like I am getting
> dumber and dumber every day.
>
> Here : I simply want to add a menu item to the File menu from the main
> menubar. I can't find how to build the XML for my plugin ! The menu item
> simple calls an action. I was able to add my items in the Editor's popup
> menu but I simply want it in the File menu, just like Save, Save As,
> Close, you know !
>
> Could somebody just help me build the XML ! IMHO, I admit that the
> documentation explains the principles pretty well, but there is nowhere to
> find the list of proper extension points etc...
>
> <extension point="????">
> <??????
> id="com.zerobase.someId"
> targetID="???????">
> <menu
> id="com.zerobase.tools.eclipse.plugins.projectfindersubmenu "
> label="Project Finder"
> menubarPath="?????"
> <separator name="zb_group"/>
> </menu>
> <action
> id="com.zerobase.tools.eclipse.plugins.projectfinderaction"
> label="Find Projects"
>
> menubarPath=" com.zerobase.tools.eclipse.plugins.projectfindersubmenu/zb_g roup "
> class="com.zerobase.tools.eclipse.plugins.ProjectFinder">
> </action>
> </viewerContribution>
>
>
> Anyone ? How can it be so complicated ? Am I really getting dumb ?
>
> Max.
>
Previous Topic:unwanted (?) WAR-file inside a WAR-File (Newbie)
Next Topic:Need help Creating an ImageDescriptor
Goto Forum:
  


Current Time: Sat Jul 27 18:40:00 GMT 2024

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

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

Back to the top