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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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 serviceObject
getSelection()
Returns the current selection from the active context ornull
if the is nothing selected.Object
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
removePostSelectionListener(ISelectionListener listener)
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 Detail
-
SELECTION
@Deprecated static final String 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:
- Constant Field Values
-
-
Method Detail
-
setSelection
void setSelection(Object selection)
Sets the given selection in the active context- Parameters:
selection
- the new selection
-
setPostSelection
void setPostSelection(Object selection)
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
Object getSelection(String partId)
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
void addSelectionListener(ISelectionListener listener)
Adds the givenISelectionListener
to the service- Parameters:
listener
- the listener to register
-
removeSelectionListener
void removeSelectionListener(ISelectionListener listener)
Removes the givenISelectionListener
from the service- Parameters:
listener
- the listener to unregister
-
addSelectionListener
void addSelectionListener(String partId, ISelectionListener listener)
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
void removeSelectionListener(String partId, ISelectionListener listener)
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
void addPostSelectionListener(ISelectionListener listener)
Adds theISelectionListener
as a post selection listener for the service.- Parameters:
listener
- the listener to register
-
removePostSelectionListener
void removePostSelectionListener(ISelectionListener listener)
Removes theISelectionListener
as a post selection listener for the service.- Parameters:
listener
- the listener to unregister
-
addPostSelectionListener
void addPostSelectionListener(String partId, ISelectionListener listener)
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
void removePostSelectionListener(String partId, ISelectionListener listener)
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
-
-