Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336738 - [Contributions] Platform should provide an extension point or API for contributions to the application TaskItem menu
Summary: [Contributions] Platform should provide an extension point or API for contrib...
Status: CLOSED DUPLICATE of bug 304234
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Prakash Rangaraj CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-09 12:37 EST by Markus Keller CLA
Modified: 2011-02-10 09:12 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2011-02-09 12:37:44 EST
3.6

The RCPlatform should provide an extension point or API for contributions to the application TaskItem menu. That menu is a global resource that needs to be managed for plug-ins that make up an Eclipse applications. See bug 335011 and the snippet there to see the lifecycle problem.

The mechanism should make sure that task menu items go away when the contributing plug-in is not resolved any more. Depending on the solution for bug 335011, there might be an additional lifecycle problem when a contributing plug-in is deactivated and then Eclipse is shut down: Since the task items stay in the menu, selecting such an entry while the application is not running will invoke a wrong menu item (because the mapping is done via menu IDs, which are not necessarily constant across runs).

Mylyn currently calls TaskItem#setMenu(..) here (reflectively):
org.eclipse.mylyn.internal.commons.ui.TaskBarManager.TaskBarMenuManager.setMenuOnTaskItem(Widget, Menu). The TaskBarMenuManager should probably be moved to the platform.
Comment 1 Paul Webster CLA 2011-02-10 08:22:54 EST
If we were exposing this somehow, we basically have to supply the menu for one TaskItem per WorkbenchWindow shell?  Is that correct?

If that's the case, we can provide access through org.eclipse.ui.menus.  Maybe menu:org.eclipse.ui.main.taskbar (similar to menu:org.eclipse.ui.main.menu and menu:org.eclipse.ui.main.toolbar)

We could put it in its own namespace, taskbar:org.eclipse.ui.workbench.window, but that would limit contributions to only that namespace.  Greater control, but no reuse of any menu: contributions.

Then we can hook it up in each WorkbenchWindow, similar to how we provision the main MenuManager.

PW
Comment 2 Prakash Rangaraj CLA 2011-02-10 08:53:34 EST
See: Bug# 304234 & Bug# 317069
Comment 3 Markus Keller CLA 2011-02-10 09:12:46 EST
(In reply to comment #2)
Thanks, I didn't find bug 304234 when I filed this bug.

*** This bug has been marked as a duplicate of bug 304234 ***