# Class AbstractEnabledHandler

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
org.eclipse.ui.internal.AbstractEnabledHandler

All Implemented Interfaces:
  `IHandler, IHandler2`

Direct Known Subclasses:
  `AbstractEvaluationHandler`

public abstract class AbstractEnabledHandler extends AbstractHandler
Abstract base class that provides the enabled state, where changing the state fires the HandlerEvent.

Since:
  3.3

## Constructor Summary

Constructors
Constructor
Description
`AbstractEnabledHandler()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isEnabled()`
Whether this handler is capable of executing at this time.
`protected void`
`setEnabled(boolean isEnabled)`
Sets the enabled state.

### Methods inherited from class AbstractHandler

`addHandlerListener, dispose, fireHandlerChanged, hasListeners, isHandled, removeHandlerListener, setBaseEnabled, setEnabled`

### Methods inherited from class EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface 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 overriding `AbstractHandler.setEnabled(Object)` so they can be notified about framework execution contexts.

Specified by:
  `isEnabled` in interface `IHandler`
Overrides:
  `isEnabled` in class `AbstractHandler`
Returns:
  `true`
See Also:
  - `AbstractHandler.setEnabled(Object)`
  - `AbstractHandler.setBaseEnabled(boolean)`

### 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.