Class SlaveSelectionService
- All Implemented Interfaces:
- ISelectionService,- IDisposable
- Since:
- 3.4
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPostSelectionListener(String partId, ISelectionListener listener) Adds a part-specific selection listener which is notified when selection changes in the part with the given id.voidaddPostSelectionListener(ISelectionListener listener) 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.voidaddSelectionListener(String partId, ISelectionListener listener) Adds a part-specific selection listener which is notified when selection changes in the part with the given id.voidaddSelectionListener(ISelectionListener listener) Adds the given selection listener.voiddispose()Disposes of this service.Returns the current selection in the active part.getSelection(String partId) Returns the current selection in the part with the given id.voidremovePostSelectionListener(String partId, ISelectionListener listener) Removes the given part-specific post selection listener.voidRemoves the given post selection listener.voidremoveSelectionListener(String partId, ISelectionListener listener) Removes the given part-specific selection listener.voidremoveSelectionListener(ISelectionListener listener) Removes the given selection listener.
- 
Constructor Details- 
SlaveSelectionService
 
- 
- 
Method Details- 
addPostSelectionListenerDescription copied from interface:ISelectionServiceAdds 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).Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed. Note: only update the UI when the UI is visible. See the SelectionListenerFactoryfor listeners that will only be called when the UI is visible to the user.- Specified by:
- addPostSelectionListenerin interface- ISelectionService
- Parameters:
- listener- a selection listener
- See Also:
 
- 
addPostSelectionListenerDescription copied from interface:ISelectionServiceAdds 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 nullselection, but only if the listener implementsINullSelectionListener.Note: this will not correctly track editor parts as each editor does not have a unique partId. Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed. Note: only update the UI when the UI is visible. See the SelectionListenerFactoryfor listeners that will only be called when the UI is visible to the user.- Specified by:
- addPostSelectionListenerin interface- ISelectionService
- Parameters:
- partId- the id of the part to track
- listener- a selection listener
- See Also:
 
- 
addSelectionListenerDescription copied from interface:ISelectionServiceAdds the given selection listener. Has no effect if an identical listener is already registered.Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed. Note: only update the UI when the UI is visible. See the SelectionListenerFactoryfor listeners that will only be called when the UI is visible to the user.- Specified by:
- addSelectionListenerin interface- ISelectionService
- Parameters:
- listener- a selection listener
- See Also:
 
- 
addSelectionListenerDescription copied from interface:ISelectionServiceAdds 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 nullselection, but only if the listener implementsINullSelectionListener.Note: this will not correctly track editor parts as each editor does not have a unique partId. Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed. Note: only update the UI when the UI is visible. See the SelectionListenerFactoryfor listeners that will only be called when the UI is visible to the user.- Specified by:
- addSelectionListenerin interface- ISelectionService
- Parameters:
- partId- the id of the part to track
- listener- a selection listener
- See Also:
 
- 
getSelectionDescription copied from interface:ISelectionServiceReturns 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 benull.- Specified by:
- getSelectionin interface- ISelectionService
- Returns:
- the current selection, or nullif undefined
 
- 
getSelectionDescription copied from interface:ISelectionServiceReturns 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 benull.- Specified by:
- getSelectionin interface- ISelectionService
- Parameters:
- partId- the id of the part
- Returns:
- the current selection, or nullif undefined
 
- 
removePostSelectionListenerDescription copied from interface:ISelectionServiceRemoves the given post selection listener. Has no effect if an identical listener is not registered.- Specified by:
- removePostSelectionListenerin interface- ISelectionService
- Parameters:
- listener- a selection listener
 
- 
removePostSelectionListenerDescription copied from interface:ISelectionServiceRemoves the given part-specific post selection listener. Has no effect if an identical listener is not registered for the given part id.- Specified by:
- removePostSelectionListenerin interface- ISelectionService
- Parameters:
- partId- the id of the part to track
- listener- a selection listener
 
- 
removeSelectionListenerDescription copied from interface:ISelectionServiceRemoves the given selection listener. Has no effect if an identical listener is not registered.- Specified by:
- removeSelectionListenerin interface- ISelectionService
- Parameters:
- listener- a selection listener
 
- 
removeSelectionListenerDescription copied from interface:ISelectionServiceRemoves the given part-specific selection listener. Has no effect if an identical listener is not registered for the given part id.- Specified by:
- removeSelectionListenerin interface- ISelectionService
- Parameters:
- partId- the id of the part to track
- listener- a selection listener
 
- 
disposepublic void dispose()Description copied from interface:IDisposableDisposes of this service. All resources must be freed. All listeners must be detached. Dispose will only be called once during the life cycle of a service.- Specified by:
- disposein interface- IDisposable
 
 
-