Interface ESelectionService
-
public interface ESelectionServiceThis 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 voidaddPostSelectionListener(String partId, ISelectionListener listener)Adds theISelectionListeneras a post selection listener for the part with the given id.voidaddPostSelectionListener(ISelectionListener listener)Adds theISelectionListeneras a post selection listener for the service.voidaddSelectionListener(String partId, ISelectionListener listener)Adds theISelectionListenerto the service for the part with the given id.voidaddSelectionListener(ISelectionListener listener)Adds the givenISelectionListenerto the serviceObjectgetSelection()Returns the current selection from the active context ornullif the is nothing selected.ObjectgetSelection(String partId)Returns the current selection from the the part with the given id.voidremovePostSelectionListener(String partId, ISelectionListener listener)Removes theISelectionListeneras a post selection listener for the part with the given id.voidremovePostSelectionListener(ISelectionListener listener)Removes theISelectionListeneras a post selection listener for the service.voidremoveSelectionListener(String partId, ISelectionListener listener)Removes theISelectionListenerfrom the service for the given part id.voidremoveSelectionListener(ISelectionListener listener)Removes the givenISelectionListenerfrom the servicevoidsetPostSelection(Object selection)Sets the given selection as the post selection for the active contextvoidsetSelection(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 ornullif 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. Returnsnullif 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 givenISelectionListenerto the service- Parameters:
listener- the listener to register
-
removeSelectionListener
void removeSelectionListener(ISelectionListener listener)
Removes the givenISelectionListenerfrom the service- Parameters:
listener- the listener to unregister
-
addSelectionListener
void addSelectionListener(String partId, ISelectionListener listener)
Adds theISelectionListenerto 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 theISelectionListenerfrom 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 theISelectionListeneras a post selection listener for the service.- Parameters:
listener- the listener to register
-
removePostSelectionListener
void removePostSelectionListener(ISelectionListener listener)
Removes theISelectionListeneras a post selection listener for the service.- Parameters:
listener- the listener to unregister
-
addPostSelectionListener
void addPostSelectionListener(String partId, ISelectionListener listener)
Adds theISelectionListeneras 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 theISelectionListeneras 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
-
-