| Summary: | [RCP] [WorkbenchParts] Allow app to hide actions in editor and view system menus | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nick Edgar <n.a.edgar> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | douglas.pollock, j.king, pwebster |
| Version: | 3.2 | Keywords: | api, helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
|
Description
Nick Edgar
Doug, can you think of a better way of allowing this kind of flexibility, e.g. using the new commands stuff? Other examples include: - hiding the "Show View as a fast view" action from the fast view bar - hiding the Open Perspective action from the perspective bar - disallowing detached and/or fast views (this probably needs a more explicit flag than just hiding the actions, e.g. to disallow DND) Nick: I would approach it as follows (will work soon, but not right now). Go into SBar, add a TYPE_TAB_MENU and all the parsing code (MenuPersistence) to go along with it. Change the tab so that it is drawn by the menu renderer, and make all the contributions command-based. Alternatives: make it a real context menu and register it with the site (available now), or do the same of above but use an existing type (again you would have to wait for a bit). If we switch it to use commands, how would the overriding work? As it stands right now:
IMenuService service =
(IMenuService) serviceLocator.getService(IMenuService.class);
SItem item = service.getItem("org.eclipse.ui.NewEditor");
item.undefine();
Finer-grained control could be done with combinations or define(...) and undefine(). Control of this from XML will not be possible for 3.2. Overriding the behaviour would be as simple as providing another handler -- perhaps specific to a particular type of editor.
It sounds like this is a preferable way to go then introducing random preferences for each action. I can work with you to redefine the system menus along these lines. Do you want to do this for M5, or post-M5? Not for 3.2. Reassigning bugs in component areas that are changing ownership. Prakash is now responsible for watching bugs in the [RCP] component area. This should now be modelled in Luna PW 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. If the bug is still relevant, please remove the stalebug whiteboard tag. |