ActionHandler

public protocol ActionHandler

Implement ActionHandler in your plugin to handle action executions.

  • Executed before running the action.

    Returns false if the action should be stopped, else true.

    Declaration

    Swift

    func doBefore(action: Action, context: ActionContext) -> Bool
  • Executed when the action is complete.

    Note that some actions are asynchronous so doAfter may be called before the action completes.

    Declaration

    Swift

    func doAfter(action: Action, context: ActionContext)
  • wasInapplicable(action:context:) Default implementation

    Executed when the selected action was inapplicable to the current state.

    Default Implementation

    The default implementation does nothing.

    Declaration

    Swift

    func wasInapplicable(action: Action, context: ActionContext)