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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this handler is capable of executing at this time.protected voidsetEnabled(boolean isEnabled) Sets the enabled state.Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isHandled, removeHandlerListener, setBaseEnabled, setEnabledMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:AbstractHandlerWhether 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:
isEnabledin interfaceIHandler- Overrides:
isEnabledin 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.
-