Class 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 Description
      protected Handler​(java.lang.String name)  
    • 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