Class OutlinePopupHandler
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
org.eclipse.handly.ui.quickoutline.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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract OutlinePopup
Creates a new instance of the outline popup.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
Methods inherited from interface org.eclipse.core.commands.IHandler
getHandlerLabel
-
Constructor Details
-
OutlinePopupHandler
public OutlinePopupHandler()
-
-
Method Details
-
execute
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException - Throws:
org.eclipse.core.commands.ExecutionException
-
createOutlinePopup
Creates a new instance of the outline popup.- Returns:
- the created oultine popup (not
null
)
-
getOutlinePopupHost
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 (nevernull
)- 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 (nevernull
)- Returns:
- the invoking keystroke, or
null
if none
-