Package org.eclipse.ui.part
Class MultiPageSelectionProvider
java.lang.Object
org.eclipse.ui.part.MultiPageSelectionProvider
- All Implemented Interfaces:
IPostSelectionProvider
,ISelectionProvider
Manages the current selection in a multi-page editor by tracking the active
nested editor within the multi-page editor. When the selection changes,
notifications are sent to all registered listeners.
This class may be instantiated; it is not intended to be subclassed. The base
implementation of MultiPageEditor.init
creates an instance of
this class.
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionMultiPageSelectionProvider
(MultiPageEditorPart multiPageEditor) Creates a selection provider for the given multi-page editor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener for post selection changes in this multi page selection provider.void
Adds a listener for selection changes in this selection provider.void
Notifies all post selection changed listeners that the editor's selection has changed.void
Notifies all registered selection changed listeners that the editor's selection has changed.Returns the multi-page editor.Returns the current selection for this provider.void
Removes a listener for post selection changes in this multi page selection provider.void
Removes the given selection change listener from this selection provider.void
setSelection
(ISelection selection) Sets the current selection for this selection provider.
-
Constructor Details
-
MultiPageSelectionProvider
Creates a selection provider for the given multi-page editor.- Parameters:
multiPageEditor
- the multi-page editor
-
-
Method Details
-
addSelectionChangedListener
Description copied from interface:ISelectionProvider
Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.- Specified by:
addSelectionChangedListener
in interfaceISelectionProvider
- Parameters:
listener
- a selection changed listener
-
addPostSelectionChangedListener
Adds a listener for post selection changes in this multi page selection provider.- Specified by:
addPostSelectionChangedListener
in interfaceIPostSelectionProvider
- Parameters:
listener
- a selection changed listener- Since:
- 3.2
-
fireSelectionChanged
Notifies all registered selection changed listeners that the editor's selection has changed. Only listeners registered at the time this method is called are notified.- Parameters:
event
- the selection changed event
-
firePostSelectionChanged
Notifies all post selection changed listeners that the editor's selection has changed.- Parameters:
event
- the event to propogate.- Since:
- 3.2
-
getMultiPageEditor
Returns the multi-page editor.- Returns:
- the multi-page editor.
-
getSelection
Description copied from interface:ISelectionProvider
Returns the current selection for this provider.- Specified by:
getSelection
in interfaceISelectionProvider
- Returns:
- the current selection
-
removeSelectionChangedListener
Description copied from interface:ISelectionProvider
Removes the given selection change listener from this selection provider. Has no effect if an identical listener is not registered.- Specified by:
removeSelectionChangedListener
in interfaceISelectionProvider
- Parameters:
listener
- a selection changed listener
-
removePostSelectionChangedListener
Removes a listener for post selection changes in this multi page selection provider.- Specified by:
removePostSelectionChangedListener
in interfaceIPostSelectionProvider
- Parameters:
listener
- a selection changed listener- Since:
- 3.2
-
setSelection
Description copied from interface:ISelectionProvider
Sets the current selection for this selection provider.- Specified by:
setSelection
in interfaceISelectionProvider
- Parameters:
selection
- the new selection
-