Macros.Macro (jEdit API Documentation)
Date: 2018-04-10

org.gjt.sp.jedit

## Class Macros.Macro

- java.lang.Object
- - org.gjt.sp.jedit.JEditAbstractEditAction<View>
  - - org.gjt.sp.jedit.EditAction
    - - org.gjt.sp.jedit.Macros.Macro

- Enclosing class:
    Macros

      public static class Macros.Macro
      extends EditAction

  Encapsulates the macro's label, name and path.
  Since:
    jEdit 2.2pre4

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gjt.sp.jedit.EditAction

      `EditAction.Wrapper`

  - ### Field Summary

    - ### Fields inherited from class org.gjt.sp.jedit.JEditAbstractEditAction

      `args, name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Macro(Macros.Handler handler, java.lang.String name, java.lang.String label, java.lang.String path)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCode()`
    `Macros.Handler` | `getHandler()`
    `java.lang.String` | `getPath()`
    `void` | `invoke(View view)` Invokes the action.
    `static java.lang.String` | `macroNameToLabel(java.lang.String macroName)`

    - ### Methods inherited from class org.gjt.sp.jedit.EditAction

      `getLabel, getMouseOverText, getToolTip, isSelected, isToggle, noRecord, noRememberLast, noRepeat`

    - ### Methods inherited from class org.gjt.sp.jedit.JEditAbstractEditAction

      `getName, invoke, setName, toString`

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

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

- - ### Constructor Detail

    - #### Macro

          public Macro(Macros.Handler handler,
                       java.lang.String name,
                       java.lang.String label,
                       java.lang.String path)

  - ### Method Detail

    - #### getHandler

          public Macros.Handler getHandler()

    - #### getPath

          public java.lang.String getPath()

    - #### invoke

          public void invoke(View view)

      Description copied from class: `EditAction`
      Invokes the action. This is an implementation of the Command pattern, and concrete actions should override this.
      Specified by:
        `invoke` in class `EditAction`
      Parameters:
        `view` - The view

    - #### getCode

          public java.lang.String getCode()

      Overrides:
        `getCode` in class `EditAction`
      Returns:
        the BeanShell code that will replay this action. BeanShellAction.getCode() returns something more interesting for Actions that were loaded from the actions.xml file. You do not need to override this method if your action name is unique, this EditAction was added to an ActionSet and that to an ActionContext of jEdit. concrete since jEdit 4.3pre7

    - #### macroNameToLabel

          public static java.lang.String macroNameToLabel(java.lang.String macroName)