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
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPostSelectionListener(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 serviceReturns the current selection from the active context ornullif the is nothing selected.getSelection(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.voidRemoves 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 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 ornullif the is nothing selected.- Returns:
- the current selection or
null
-
getSelection
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
Adds the givenISelectionListenerto the service- Parameters:
listener- the listener to register
-
removeSelectionListener
Removes the givenISelectionListenerfrom the service- Parameters:
listener- the listener to unregister
-
addSelectionListener
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
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
Adds theISelectionListeneras a post selection listener for the service.- Parameters:
listener- the listener to register
-
removePostSelectionListener
Removes theISelectionListeneras a post selection listener for the service.- Parameters:
listener- the listener to unregister
-
addPostSelectionListener
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
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
-