Package org.eclipse.jface.viewers
Interface ISelectionProvider
- All Known Subinterfaces:
IContentOutlinePage
,IInputSelectionProvider
,IPostSelectionProvider
- All Known Implementing Classes:
AbstractListViewer
,AbstractTableViewer
,AbstractTextEditor.SelectionProvider
,AbstractTreeViewer
,AbstractViewer
,BinaryCompareViewer
,CheckboxTableViewer
,CheckboxTreeViewer
,ColumnViewer
,ComboViewer
,CommonViewer
,CompareContentViewerSwitchingPane
,CompareEditorSelectionProvider
,CompareOutlinePage
,CompareStructureViewerSwitchingPane
,CompareViewerPane
,CompareViewerSwitchingPane
,ContainerCheckedTreeViewer
,ContentMergeViewer
,ContentOutline
,ContentOutlinePage
,ContentViewer
,DiffTreeViewer
,ImageMergeViewer
,ListViewer
,MultiPageSelectionProvider
,NullViewer
,PageBookView.SelectionProvider
,ProjectionViewer
,SimpleTextViewer
,SourceViewer
,StructureDiffViewer
,StructuredViewer
,TableViewer
,TextConsoleViewer
,TextMergeViewer
,TextViewer
,TreeViewer
,Viewer
public interface ISelectionProvider
Interface common to all objects that provide a selection.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener for selection changes in this selection provider.Returns the current selection for this provider.void
Removes the given selection change listener from this selection provider.void
setSelection
(ISelection selection) Sets the current selection for this selection provider.
-
Method Details
-
addSelectionChangedListener
Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.- Parameters:
listener
- a selection changed listener
-
getSelection
ISelection getSelection()Returns the current selection for this provider.- Returns:
- the current selection
-
removeSelectionChangedListener
Removes the given selection change listener from this selection provider. Has no effect if an identical listener is not registered.- Parameters:
listener
- a selection changed listener
-
setSelection
Sets the current selection for this selection provider.- Parameters:
selection
- the new selection
-