Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Defining position of menu item in Project Explorer context menu
Defining position of menu item in Project Explorer context menu [message #1744703] Thu, 29 September 2016 14:51 Go to next message
Alexander Fichtinger is currently offline Alexander FichtingerFriend
Messages: 66
Registered: January 2013
Member
Hey guys,

we are adding a menu item to the context menu item of the Project Explorer.

OVERVIEW

======================================================

This works fine, with the following code in the plugin.xml:

<extension point="org.eclipse.ui.menus">
    <menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=export">
         <command
        	   commandId="com.ourMenuEntry"
               mnemonic="P" 
               label="%doSomething" >
         </command>
      </menuContribution>
  </extension>


With this code our menu entry appears after the menu entry "Export...".
We checked the ID of the "Export"-menu entry with the Plugin Spy, and we used "export", because it's the active contribution item identifier.

===============================================

OUR PROBLEM

NOW.....
we want that our menu entry is the first one in the Project Explorer context menu.
But the first menu entry is "New" (which has sub-menu entries) and we do not know which ID we should use, in the "after"-property...

Is there a way to find this out? Or is there another way to define the place of the menu entry, like an index or something?

Thanks for your help + kind regards! =)









Re: Defining position of menu item in Project Explorer context menu [message #1841396 is a reply to message #1744703] Fri, 14 May 2021 11:35 Go to previous message
Peddaiah Golla is currently offline Peddaiah GollaFriend
Messages: 2
Registered: February 2021
Junior Member
Try this "locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?startof=group.new">" its worked form me
Previous Topic:Define a "Run As" submenus on method level
Next Topic:Eclipse IDE 2021-03 Toolbar Icons Too Small
Goto Forum:
  


Current Time: Sat Dec 07 05:45:49 GMT 2024

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

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

Back to the top