org.gjt.sp.jedit

## Class Macros.Handler

- java.lang.Object
- - org.gjt.sp.jedit.Macros.Handler

- Enclosing class:
    Macros

      public abstract static class Macros.Handler
      extends java.lang.Object

  Encapsulates creating and invoking macros in arbitrary scripting languages
  Since:
    jEdit 4.0pre6

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Handler(java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(java.lang.String path)`
    `abstract Macros.Macro` | `createMacro(java.lang.String macroName, java.lang.String path)`
    `java.lang.String` | `getLabel()`
    `java.lang.String` | `getName()`
    `abstract void` | `runMacro(View view, Macros.Macro macro)` Runs the specified macro.
    `void` | `runMacro(View view, Macros.Macro macro, boolean ownNamespace)` Runs the specified macro.

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

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

- - ### Constructor Detail

    - #### Handler

          protected Handler(java.lang.String name)

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

    - #### getLabel

          public java.lang.String getLabel()

    - #### accept

          public boolean accept(java.lang.String path)

    - #### createMacro

          public abstract Macros.Macro createMacro(java.lang.String macroName,
                                                   java.lang.String path)

    - #### runMacro

          public abstract void runMacro(View view,
                                        Macros.Macro macro)

      Runs the specified macro.
      Parameters:
        `view` - The view - may be null.
        `macro` - The macro.

    - #### runMacro

          public void runMacro(View view,
                               Macros.Macro macro,
                               boolean ownNamespace)

      Runs the specified macro. This method is optional; it is called if the specified macro is a startup script. The default behavior is to simply call `runMacro(View,Macros.Macro)`.
      Parameters:
        `view` - The view - may be null.
        `macro` - The macro.
        `ownNamespace` - A hint indicating whenever functions and variables defined in the script are to be self-contained, or made available to other scripts. The macro handler may ignore this parameter.
      Since:
        jEdit 4.1pre3