Class DebugCommandHandler

All Implemented Interfaces:
IHandler, IHandler2

public abstract class DebugCommandHandler extends AbstractHandler
Abstract base class for re-targeting command framework handlers, which delegate execution to IDebugCommandHandler handlers. The specific type of IDebugCommandHandler is determined by the abstract getCommandType() method.

Note: This class is not an implementation of the IDebugCommandHandler interface, which was somewhat unfortunately named. IDebugCommandHandler is an interface that used only by the debugger plug-ins. This class implements IHandler interface and is to be used with the platform commands framework.

Clients may subclass this class.

See Also:
  • Constructor Details

    • DebugCommandHandler

      public DebugCommandHandler()
      The constructor adds the handler as the
  • Method Details

    • setEnabled

      public void setEnabled(Object evaluationContext)
      Description copied from class: AbstractHandler
      Called by the framework to allow the handler to update its enabled state by extracting the same information available at execution time. Clients may override if they need to extract information from the application context.
      Specified by:
      setEnabled in interface IHandler2
      setEnabled in class AbstractHandler
      evaluationContext - the application context. May be null
      See Also:
    • 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
      isEnabled in class AbstractHandler
      See Also:
    • execute

      public Object execute(ExecutionEvent event) throws ExecutionException
      Description copied from interface: IHandler
      Executes with the map of parameter values by name.
      event - An event containing all the information about the current state of the application; must not be null.
      the result of the execution. Reserved for future use, must be null.
      ExecutionException - if an exception occurred during execution.
    • postExecute

      protected void postExecute(IRequest request, Object[] targets)
      This method is called after the completion of the execution of this command. Extending classes may override this method to perform additional operation after command execution.
      request - The completed request object which was given the the debug command handler.
      targets - Objects which were the targets of this action
    • getCommandType

      protected abstract Class<?> getCommandType()
      Returns the IDebugCommandHandler command handler that type this action executes.
      command class.
      See Also:
    • getInitialEnablement

      protected boolean getInitialEnablement()
      Returns whether this action should be enabled when initialized and there is no active debug context.
      false, by default
    • dispose

      public void dispose()
      Clean up when removing
      Specified by:
      dispose in interface IHandler
      dispose in class AbstractHandler