Class OutlinePopupHandler

  • All Implemented Interfaces:
    org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
    Direct Known Subclasses:
    HandlyXtextOutlinePopupHandler

    public abstract class OutlinePopupHandler
    extends org.eclipse.core.commands.AbstractHandler
    An abstract implementation of a handler that opens an outline popup.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract OutlinePopup createOutlinePopup()
      Creates a new instance of the outline popup.
      java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)  
      protected org.eclipse.jface.bindings.keys.KeyStroke getInvokingKeyStroke​(org.eclipse.core.commands.ExecutionEvent event)
      Returns the invoking keystroke for the given execution event.
      protected IOutlinePopupHost getOutlinePopupHost​(org.eclipse.core.commands.ExecutionEvent event)
      Returns the outline popup host for the given execution event.
      • Methods inherited from class org.eclipse.core.commands.AbstractHandler

        addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OutlinePopupHandler

        public OutlinePopupHandler()
    • Method Detail

      • execute

        public java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)
                                 throws org.eclipse.core.commands.ExecutionException
        Throws:
        org.eclipse.core.commands.ExecutionException
      • createOutlinePopup

        protected abstract OutlinePopup createOutlinePopup()
        Creates a new instance of the outline popup.
        Returns:
        the created oultine popup (not null)
      • getOutlinePopupHost

        protected IOutlinePopupHost getOutlinePopupHost​(org.eclipse.core.commands.ExecutionEvent event)
        Returns the outline popup host for the given execution event.

        This implementation returns a host based on the active editor, or null if no editor is currently active.

        Parameters:
        event - the execution event (never null)
        Returns:
        the outline popup host, or null if none
      • getInvokingKeyStroke

        protected org.eclipse.jface.bindings.keys.KeyStroke getInvokingKeyStroke​(org.eclipse.core.commands.ExecutionEvent event)
        Returns the invoking keystroke for the given execution event.

        This implementation returns the first keystroke bound to the event's command.

        Parameters:
        event - the execution event (never null)
        Returns:
        the invoking keystroke, or null if none