| org.eclipse.ui.ISelectionService
All known Subclasses: org.eclipse.ui.internal.AbstractSelectionService,
ISelectionService | public interface ISelectionService (Code) | | A selection service tracks the selection within an object.
A listener that wants to be notified when the selection becomes
null must implement the INullSelectionListener
interface.
This interface is not intended to be implemented by clients.
See Also: org.eclipse.ui.ISelectionListener See Also: org.eclipse.ui.INullSelectionListener |
addPostSelectionListener | public void addPostSelectionListener(ISelectionListener listener)(Code) | | Adds the given post selection listener.It is equivalent to selection
changed if the selection was triggered by the mouse but it has a
delay if the selection is triggered by the keyboard arrows.
Has no effect if an identical listener is already registered.
Note: Works only for StructuredViewer(s).
Parameters: listener - a selection listener |
addPostSelectionListener | public void addPostSelectionListener(String partId, ISelectionListener listener)(Code) | | Adds a part-specific selection listener which is notified when selection changes
in the part with the given id. This is independent of part activation - the part
need not be active for notification to be sent.
When the part is created, the listener is passed the part's initial selection.
When the part is disposed, the listener is passed a null selection,
but only if the listener implements INullSelectionListener .
Note: This will not correctly track editor parts as each editor does
not have a unique partId.
Parameters: partId - the id of the part to track Parameters: listener - a selection listener since: 2.0 |
addSelectionListener | public void addSelectionListener(ISelectionListener listener)(Code) | | Adds the given selection listener.
Has no effect if an identical listener is already registered.
Parameters: listener - a selection listener |
addSelectionListener | public void addSelectionListener(String partId, ISelectionListener listener)(Code) | | Adds a part-specific selection listener which is notified when selection changes
in the part with the given id. This is independent of part activation - the part
need not be active for notification to be sent.
When the part is created, the listener is passed the part's initial selection.
When the part is disposed, the listener is passed a null selection,
but only if the listener implements INullSelectionListener .
Note: This will not correctly track editor parts as each editor does
not have a unique partId.
Parameters: partId - the id of the part to track Parameters: listener - a selection listener since: 2.0 |
getSelection | public ISelection getSelection()(Code) | | Returns the current selection in the active part. If the selection in the
active part is undefined (the active part has no selection provider)
the result will be null .
the current selection, or null if undefined |
getSelection | public ISelection getSelection(String partId)(Code) | | Returns the current selection in the part with the given id. If the part is not open,
or if the selection in the active part is undefined (the active part has no selection provider)
the result will be null .
Parameters: partId - the id of the part the current selection, or null if undefined since: 2.0 |
removePostSelectionListener | public void removePostSelectionListener(ISelectionListener listener)(Code) | | Removes the given post selection listener.
Has no effect if an identical listener is not registered.
Parameters: listener - a selection listener |
removePostSelectionListener | public void removePostSelectionListener(String partId, ISelectionListener listener)(Code) | | Removes the given part-specific post selection listener.
Has no effect if an identical listener is not registered for the given part id.
Parameters: partId - the id of the part to track Parameters: listener - a selection listener since: 2.0 |
removeSelectionListener | public void removeSelectionListener(ISelectionListener listener)(Code) | | Removes the given selection listener.
Has no effect if an identical listener is not registered.
Parameters: listener - a selection listener |
removeSelectionListener | public void removeSelectionListener(String partId, ISelectionListener listener)(Code) | | Removes the given part-specific selection listener.
Has no effect if an identical listener is not registered for the given part id.
Parameters: partId - the id of the part to track Parameters: listener - a selection listener since: 2.0 |
|
|