Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 84497

Summary: [RCP] [ViewMgmt] Add ability to hide a View's context menu
Product: [Eclipse Project] Platform Reporter: scott <sdeboy>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: adam.antoniuk, pwebster, rolf.theunissen
Version: 3.0.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description scott CLA 2005-02-04 18:42:23 EST
FAQ 202 (http://www.eclipsefaq.org/chris/faq/html/faq202.html) says in part:

Each view has a drop-down menu in two locations:

    * under the icon on the view’s tab item. This menu contains layout and
view-manipulation actions. You don’t have any control over this menu; its
actions are all added by the platform.
....

I would like to be able to hide this menu in some cases - specifically, when a
view is added to a fixed perspective, or is added as a standalone view (with and
without a title), the view's context menu has no useful features - move is
available, but the sub menus under view are both disabled.

Note: this context menu is still available, even if the view doesn't have a
title bar displayed, but it's harder to right-click and get the context menu to
show.
Comment 1 Nick Edgar CLA 2006-03-15 11:24:26 EST
Reassigning bugs in component areas that are changing ownership.
Comment 2 Boris Bokowski CLA 2009-11-11 17:30:50 EST
Remy is now responsible for watching the [ViewMgmt] category.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:14:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 4 Adam Antoniuk CLA 2019-10-23 02:48:16 EDT
Still we could not find a way to hide context action menu on view tab item. We have problem with "Detach" context action still visible, even if "NoDetach" tag have been set on that Part. It would be nice to have a fairly easy way to manage this context menu or at least a tag which can turn those options on/off.
Comment 5 Rolf Theunissen CLA 2020-04-30 11:52:14 EDT
The NoDetach tag should be supported as of Bug 562663, together with NoClose tag on a part (and all it siblings) the menu should not appear.

In Eclipse 4: For general customization of the part menu, the the StackRenderer (specifically StackRenderer#populateTabMenu) can be overridden to customize the menu.

A custom WorkbenchRendererFactory can provide the customized renderer.