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 Detail

      • SELECTION

        @Deprecated
        static final java.lang.String SELECTION
        Deprecated.
        Due to the possibly misleading nature of this field's name, it has been replaced with IServiceConstants.ACTIVE_SELECTION. All clients of this API should change their references to IServiceConstants.ACTIVE_SELECTION.
        See Also:
        Constant Field Values
    • Method Detail

      • setSelection

        void setSelection​(java.lang.Object selection)
        Sets the given selection in the active context
        Parameters:
        selection - the new selection
      • setPostSelection

        void setPostSelection​(java.lang.Object selection)
        Sets the given selection as the post selection for the active context
        Parameters:
        selection - the new selection
      • getSelection

        java.lang.Object getSelection()
        Returns the current selection from the active context or null if the is nothing selected.
        Returns:
        the current selection or null
      • getSelection

        java.lang.Object getSelection​(java.lang.String partId)
        Returns the current selection from the the part with the given id. Returns null 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
      • removeSelectionListener

        void removeSelectionListener​(ISelectionListener listener)
        Removes the given ISelectionListener from the service
        Parameters:
        listener - the listener to unregister
      • addSelectionListener

        void addSelectionListener​(java.lang.String partId,
                                  ISelectionListener listener)
        Adds the ISelectionListener to the service for the part with the given id.
        Parameters:
        partId - the id of the part to add the listener for
        listener - the listener to register
      • removeSelectionListener

        void removeSelectionListener​(java.lang.String partId,
                                     ISelectionListener listener)
        Removes the ISelectionListener from the service for the given part id.
        Parameters:
        partId - the id of the part to remove the listener for
        listener - the listener to unregister
      • addPostSelectionListener

        void addPostSelectionListener​(ISelectionListener listener)
        Adds the ISelectionListener as a post selection listener for the service.
        Parameters:
        listener - the listener to register
      • removePostSelectionListener

        void removePostSelectionListener​(ISelectionListener listener)
        Removes the ISelectionListener as a post selection listener for the service.
        Parameters:
        listener - the listener to unregister
      • addPostSelectionListener

        void addPostSelectionListener​(java.lang.String partId,
                                      ISelectionListener listener)
        Adds the ISelectionListener as a post selection listener for the part with the given id.
        Parameters:
        partId - the id of the part to add the listener for
        listener - the listener to register
      • removePostSelectionListener

        void removePostSelectionListener​(java.lang.String partId,
                                         ISelectionListener listener)
        Removes the ISelectionListener as a post selection listener for the part with the given id.
        Parameters:
        partId - the id of the part to remove the listener for
        listener - the listener to unregister