Package 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 Description protected
Handler(java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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.
-
-
-
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 callrunMacro(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
-
-