org.gjt.sp.jedit
Class Macros.Macro

java.lang.Object
  |
  +--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 inherited from class org.gjt.sp.jedit.EditAction
EditAction.Wrapper
 
Constructor Summary
Macros.Macro(Macros.Handler handler, java.lang.String name, java.lang.String label, java.lang.String path)
           
 
Method Summary
 java.lang.String getCode()
          Returns the BeanShell code that will replay this action.
 Macros.Handler getHandler()
           
 java.lang.String getLabel()
          Returns the action's label.
 java.lang.String getMouseOverText()
          Returns the text that should be shown when the mouse is placed over this action's menu item or tool bar button.
 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
getName, getView, isSelected, isToggle, noRecord, noRepeat, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Macros.Macro

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

getHandler

public Macros.Handler getHandler()

getLabel

public java.lang.String getLabel()
Description copied from class: EditAction
Returns the action's label. The default implementation returns the value of the property named by EditAction.getName() suffixed with .label.

Overrides:
getLabel in class EditAction

getMouseOverText

public java.lang.String getMouseOverText()
Description copied from class: EditAction
Returns the text that should be shown when the mouse is placed over this action's menu item or tool bar button. Currently only used by the macro system.

Overrides:
getMouseOverText in class EditAction

getPath

public java.lang.String getPath()

invoke

public void invoke(View view)
Description copied from class: EditAction
Invokes the action.

Specified by:
invoke in class EditAction
Parameters:
view - The view

getCode

public java.lang.String getCode()
Description copied from class: EditAction
Returns the BeanShell code that will replay this action.

Specified by:
getCode in class EditAction

macroNameToLabel

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