I'm trying to get my custom IOConsole
fire a selectionChanged()
event, but as it is not a ViewPart
or EditorPart
, the registered SelectionListeners
catch nothing, even when notified programatically.
Is this possible at all? Or is there another way to (programatically) notify a view of a change in my IOConsole
so it can refresh one of its widgets? Oh, this should work for loosely coupled components as well, as none of the components really know of each other.
If your console inherits from
org.eclipse.ui.console.IOConsole
, theIOConsole
registers the text area (aSourceViewer
) as a selection provider at the part site.If you are certain that you want to override this behavior, you need to register your own
ISelectionProvider
at the part site. You can overridecreatePage
and change the selection provider after the page was created:Note that overriding the IOConsole's selection provider this may result in an unintuitive behavior or interfere with assumptions that the
IOConsole
implementation makes.