|
Re: Adding to file menu... arrrgh [message #168780 is a reply to message #166009] |
Wed, 10 December 2003 18:03 |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03284 seconds