Interface ESelectionService
public interface ESelectionService
This interface describes the workbench selection service
- Since:
- 1.0
- Restriction:
- This interface is not intended to be implemented by clients.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPostSelectionListener
(String partId, ISelectionListener listener) Adds theISelectionListener
as a post selection listener for the part with the given id.void
addPostSelectionListener
(ISelectionListener listener) Adds theISelectionListener
as a post selection listener for the service.void
addSelectionListener
(String partId, ISelectionListener listener) Adds theISelectionListener
to the service for the part with the given id.void
addSelectionListener
(ISelectionListener listener) Adds the givenISelectionListener
to the serviceReturns the current selection from the active context ornull
if the is nothing selected.getSelection
(String partId) Returns the current selection from the the part with the given id.void
removePostSelectionListener
(String partId, ISelectionListener listener) Removes theISelectionListener
as a post selection listener for the part with the given id.void
Removes theISelectionListener
as a post selection listener for the service.void
removeSelectionListener
(String partId, ISelectionListener listener) Removes theISelectionListener
from the service for the given part id.void
removeSelectionListener
(ISelectionListener listener) Removes the givenISelectionListener
from the servicevoid
setPostSelection
(Object selection) Sets the given selection as the post selection for the active contextvoid
setSelection
(Object selection) Sets the given selection in the active context
-
Field Details
-
SELECTION
Deprecated.Due to the possibly misleading nature of this field's name, it has been replaced withIServiceConstants.ACTIVE_SELECTION
. All clients of this API should change their references toIServiceConstants.ACTIVE_SELECTION
.- See Also:
-
-
Method Details
-
setSelection
Sets the given selection in the active context- Parameters:
selection
- the new selection
-
setPostSelection
Sets the given selection as the post selection for the active context- Parameters:
selection
- the new selection
-
getSelection
Object getSelection()Returns the current selection from the active context ornull
if the is nothing selected.- Returns:
- the current selection or
null
-
getSelection
Returns the current selection from the the part with the given id. Returnsnull
if there is no selection or the part does not exist.- Parameters:
partId
- the id of the part to get the selection from- Returns:
- the current selection in the part or
null
-
addSelectionListener
Adds the givenISelectionListener
to the service- Parameters:
listener
- the listener to register
-
removeSelectionListener
Removes the givenISelectionListener
from the service- Parameters:
listener
- the listener to unregister
-
addSelectionListener
Adds theISelectionListener
to the service for the part with the given id.- Parameters:
partId
- the id of the part to add the listener forlistener
- the listener to register
-
removeSelectionListener
Removes theISelectionListener
from the service for the given part id.- Parameters:
partId
- the id of the part to remove the listener forlistener
- the listener to unregister
-
addPostSelectionListener
Adds theISelectionListener
as a post selection listener for the service.- Parameters:
listener
- the listener to register
-
removePostSelectionListener
Removes theISelectionListener
as a post selection listener for the service.- Parameters:
listener
- the listener to unregister
-
addPostSelectionListener
Adds theISelectionListener
as a post selection listener for the part with the given id.- Parameters:
partId
- the id of the part to add the listener forlistener
- the listener to register
-
removePostSelectionListener
Removes theISelectionListener
as a post selection listener for the part with the given id.- Parameters:
partId
- the id of the part to remove the listener forlistener
- the listener to unregister
-