Bug 302388 - [EditorMgmt] Allow contributions to view/editor context menus
Summary: [EditorMgmt] Allow contributions to view/editor context menus
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-10 04:26 EST by Daniel Weber CLA
Modified: 2019-09-06 16:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Weber CLA 2010-02-10 04:26:06 EST
Build Identifier: M20090917-0800

I'd like to add an action to my editor's context menu (the one that's shown when right-clicking the editor's tab). The Eclipse FAQ says that 

   "...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..."

(This is actually about view context menus, but I guess it applies to editor context menus as well).

bug 103045 and bug 84497 are about hiding entries from this menu, I'd actually like to extend it. But this does not seem to be possible, although group markers are added to the menu programmatically:

            menuManager.add(move);
            menuManager.add(new GroupMarker("size")); //$NON-NLS-1$
            menuManager.add(new GroupMarker("state")); //$NON-NLS-1$
            menuManager.add(new UpdatingActionContributionItem(minimize));

(found in org.eclipse.ui.internal.presentations.util.StandardViewSystemMenu).

Why don't you extend the standard menu so that it allows for menu contributions? I can only guess that you feared too many contributions making this small system-like context menu a mess. Well, I can't make that risk go away :( If I could add a menuContribution, I'd limit it to my own editor type, so that other editors won't be bothered by an action that does not work there anyway.



Reproducible: Always
Comment 1 Paul Webster CLA 2010-02-10 08:11:39 EST
I'm not against this enhancement, but I'm not for it either.

The menu on the view and editor tabs is as we call it a "system menu" or framework menu.  It effects the workbench page/perspective (move, resize, min/max, close, detach, new editor, etc).

If it were to go forward it would be with a big warning "Menu contributions to the system menu are *not* to effect part content".  No one would look for content effecting actions in the system menu, only in the part's actual context menu.

PW
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:05:57 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.