Package org.eclipse.ui.internal
Class AbstractEnabledHandler
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
org.eclipse.ui.internal.AbstractEnabledHandler
- Direct Known Subclasses:
AbstractEvaluationHandler
Abstract base class that provides the enabled state, where changing the state
fires the HandlerEvent.
- Since:
- 3.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether this handler is capable of executing at this time.protected void
setEnabled
(boolean isEnabled) Sets the enabled state.Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, 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
execute, getHandlerLabel
-
Constructor Details
-
AbstractEnabledHandler
public AbstractEnabledHandler()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Description copied from class:AbstractHandler
Whether this handler is capable of executing at this time. Subclasses may override this method. If clients override this method they should also consider overridingAbstractHandler.setEnabled(Object)
so they can be notified about framework execution contexts.- Specified by:
isEnabled
in interfaceIHandler
- Overrides:
isEnabled
in classAbstractHandler
- Returns:
true
- See Also:
-
setEnabled
protected void setEnabled(boolean isEnabled) Sets the enabled state. Changing the state fires the HandlerEvent.- Parameters:
isEnabled
- true to enable the handler, false to disable.
-