org.gjt.sp.jedit

## Class JEditAbstractEditAction<E>

- java.lang.Object
- - org.gjt.sp.jedit.JEditAbstractEditAction<E>

- Direct Known Subclasses:
    EditAction, JEditBeanShellAction

      public abstract class JEditAbstractEditAction<E>
      extends java.lang.Object

  An action that can be bound to a menu item, tool bar button or keystroke.
  Since:
    4.3pre13
  See Also:
    `jEdit.getAction(String)`, `jEdit.getActionNames()`, `ActionSet`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.Object[]` | `args`
    `protected java.lang.String` | `name`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JEditAbstractEditAction(java.lang.String name)` Creates a new edit action with the specified name.
    `protected` | `JEditAbstractEditAction(java.lang.String name, java.lang.Object[] newArgs)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getName()` Returns the internal name of this action.
    `abstract void` | `invoke(E arg)` Invokes the action.
    `void` | `invoke(E arg, java.lang.Object[] newArgs)`
    `void` | `setName(java.lang.String newName)` Changes the name of an action
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### name

          protected java.lang.String name

    - #### args

          protected java.lang.Object[] args

  - ### Constructor Detail

    - #### JEditAbstractEditAction

          protected JEditAbstractEditAction(java.lang.String name)

      Creates a new edit action with the specified name.
      Parameters:
        `name` - The action name

    - #### JEditAbstractEditAction

          protected JEditAbstractEditAction(java.lang.String name,
                                            java.lang.Object[] newArgs)

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Returns the internal name of this action.
      Returns:
        the action name

    - #### setName

          public void setName(java.lang.String newName)

      Changes the name of an action
      Parameters:
        `newName` - the new name of the action
      Since:
        jEdit 4.3pre4

    - #### invoke

          public abstract void invoke(E arg)

      Invokes the action. This is an implementation of the Command pattern, and concrete actions should override this.
      Parameters:
        `arg` - the argument

    - #### invoke

          public final void invoke(E arg,
                                   java.lang.Object[] newArgs)

      Parameters:
        `arg` - the arguments of the action
        `newArgs` - new argument list

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`