When developing Eclipse RCP application, on the view part, right click on the tab, you can see a context menu with "detached, restore, move, size, minimize, maximize" actions. I was wondering how to add a new action to that tab context menu? What's the correct keyword for this?
Most of results I found is about the general context menu, which is the one you get when right click anywhere in the viewpart. Where what I am looking for is the context menu from the tab.
Or what I should do is set some properties which make the context menu only showing when right click on the tab area.
What I am trying to do is add an option "Duplicate Tab" to context menu.
Related
I have a custom view in my eclipse RCP and want to hide some of the actions from org.eclipse.ui.navigator.resources.ResourceMgmtActions when a user right clicks on a IProject resource. I just want to display "refresh" action and hide Close, Open, Close Unrelated projects, Build option from the context menu. Is there a way to do this declaratively via plugin.xml or pro grammatically without copying the code from ResourceMgmtActionProvider.java?
I am working on a tool (which is built over Eclipse). In that there is a popup menu called "Edit Properties" if a object is right clicked. I need to hide this menu command. Provided that it should not be gets hided from the standard menu, should only be hide from the popup.
How to do this? Can anyone suggest me?
On the Eclipse setup I am about to work with there is no Window element in the top menu, therefore I cannot change the menu visibility (under the Customize perspective submenu).
Which Eclipse config file stores this information?
If you have the Quick Access search bar at the top of the workbench window you can type Customize Perspective there to access the settings. Otherwise you can pop up the Quick Search by pressing Ctrl+3.
I defined several commands in my Application Model, say like openCommand, saveCommand. And I can add them to the menu bar or tool bar easily. Now I want them to also appear in the context menu of the edit part, how can this be done?
To be short, I want a menu item in main menu, a tool bar item in tool bar and another menu item in context menu. All these three items have the same function and thus should be mapped to the same command. I can do the first two but have no idea about the third.
Any help would be appreciated! Thanks a lot!
You define the context menu for a Part in the Menu section of the Part Descriptor in the application model. Add a 'Popup Menu' and give it a unique id. Add menu items to the popup menu in the normal way.
Tell Eclipse the menu is the context menu for a control using the EMenuService:
#Inject
private EMenuService menuService;
...
menuService.registerContextMenu(control, "menu id");
What menu is called by Alt+Shift+S combination in Eclipse? How to call it from main menu? It is mostly resembles Source menu but has some differences.
Source menu
Source menu looks same but not exactly:
It is Source menu. If you do a right click in java editor you can see key combination for it and if you hover over Source you can see it is the same.
About the visual difference: If it is invoked from the main menu, disabled menu items stay visible (but grayed), because you would be very confused if the vertical position of the same menu item changed all the time (depending on how many other menu items above are disabled).
Context menus on the other hand are invoked at arbitrary places of your screen, so you don't notice a certain menu item offset "jumping" relative to the complete context menu. That's why many menu items are not just disabled in the context menu, but set to invisible.
That's the Source menu, Alt + Uppercase S