Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to add a menu item at the top of a popup menu
How to add a menu item at the top of a popup menu [message #1823392] Thu, 26 March 2020 04:56 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 346
Registered: August 2013
Senior Member
Hi

Could ypu please tell me how to add a menu item at the beginning of a popup menu? Before a New menu item or any other menu items.

   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="popup:org.eclipse.ui.popup.any?before=">
         <menu
               label="BPMS">
         </menu>
      </menuContribution>
   </extension>


Is it possible to make the menu item independent of any other menu items? For example if I try to place it before some non-existent item popup:org.eclipse.ui.popup.any?before=new my menu item is not added at all. However I need it to be available always.
Re: How to add a menu item at the top of a popup menu [message #1823588 is a reply to message #1823392] Sun, 29 March 2020 19:00 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
I don't think it is possible to add an item to the beginning of every popup menu.

There is no common item to be used in the "before" query that exists in every menu. Also there is no query to add items at the top of every menu.

The only way to *hack* this into the framework is to add these items to the menu every time it is about to show. Not sure how to register proper menu listeners for that, maybe MenuManagerEventHelper might help you in that case. A better solution would be to provide proper patches to the platform code.

Previous Topic:Why did I have t o click "Reload" on the SpringToolSuite update site?
Next Topic:f key is not working while editing java source code in eclipse
Goto Forum:
  


Current Time: Thu Oct 10 15:18:51 GMT 2024

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

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

Back to the top