Bug 9333 - [Contributions] updating: Confusion as to which selection provider viewerContributions use
Summary: [Contributions] updating: Confusion as to which selection provider viewerCont...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2002-02-08 17:19 EST by Nick Edgar CLA
Modified: 2016-11-10 11:51 EST (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 Nick Edgar CLA 2002-02-08 17:19:02 EST
Build 20020205

Darin S encountered some difficulties with viewerContributions to an editor's 
context menu.  It seemed like it was getting hooked on the selection provider 
of the editor's site, rather than the one provided to registerContextMenu.

The code in EditorPluginAction.editorChanged, which is called from the 
constructor, calls registerSelectionListener which registers on the part 
site's selection provider.  
This should not be done in the case of viewerContributions, which target a 
specific editor's context menu and aren't retargeted as with 
editorContributions.

It turns out the problem Darin saw was due to something else, but this should 
be investigated.
It seems like if the part site's selection provider is set before the 
viewerContribution's EditorPluginActions are created, and if the plugin is 
active, it will get hooked on this selection provider as well as the one 
passed to registerContextMenu.

Also, PartPluginAction.refreshSelection(IWorkbenchPart) doesn't seem to be 
called from anywhere.
Comment 1 Nick Edgar CLA 2003-02-13 11:05:20 EST
This is actually a contributions issue, unrelated to viewers 
(viewerContributions is a misnomer).
Comment 2 Simon Arsenault CLA 2003-03-12 10:09:06 EST
Defer until after 2.1
Comment 3 Michael Van Meekeren CLA 2006-04-21 13:56:40 EDT
Moving Dougs bugs
Comment 4 Paul Webster CLA 2007-04-05 19:01:14 EDT
Assigning to component owner
PW
Comment 5 Mickael Istria CLA 2016-11-10 11:51:08 EST
viewerContributions have been deprecated in favor of org.eclipse.ui.commands/org.eclipse.ui.menus. No new features or enhancement work will be planned.