|
Multiple Selection Providers Within a Part
Be aware that the part's site accepts a single selection provider only, which should be registered within the createPartControl() method only:
getSite().setSelectionProvider(provider);
Replacing the selection provider during the lifetime of the part is not properly supported by the workbench. If a part contains multiple viewers providing selections, like the "Java Hierarchy" view does, a intermediate ISelectionProvider implementation has to be provided that allows dynamically delegating to the currently active viewer within the part. As a starting point you may look into SelectionProviderIntermediate.java provided with this article. |
|