org.gjt.sp.jedit

## Class BeanShellAction

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

-     public class BeanShellAction
      extends EditAction

  An action that evaluates BeanShell code when invoked. BeanShell actions are usually loaded from `actions.xml` and `browser.actions.xml` files; see `ActionSet` for syntax information.
  See Also:
    `jEdit.getAction(String)`, `jEdit.getActionNames()`, `ActionSet`

- - ### 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
    `BeanShellAction(java.lang.String name, java.lang.String code, java.lang.String isSelected, boolean noRepeat, boolean noRecord, boolean noRememberLast)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCode()` Returns the BeanShell code that will replay this action.
    `void` | `invoke(View view)` Invokes the action.
    `boolean` | `isSelected(java.awt.Component comp)` If this edit action is a toggle, returns if it is selected or not.
    `boolean` | `noRecord()` Returns if this edit action should not be recorded.
    `boolean` | `noRememberLast()` Returns if this edit action should not be remembered as the most recently invoked action.
    `boolean` | `noRepeat()` Returns if this edit action should not be repeated.

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

      `getLabel, getMouseOverText, isToggle`

    - ### 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

    - #### BeanShellAction

          public BeanShellAction(java.lang.String name,
                         java.lang.String code,
                         java.lang.String isSelected,
                         boolean noRepeat,
                         boolean noRecord,
                         boolean noRememberLast)

  - ### Method Detail

    - #### 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

    - #### isSelected

          public boolean isSelected(java.awt.Component comp)

      Description copied from class: `EditAction`
      If this edit action is a toggle, returns if it is selected or not.
      Overrides:
        `isSelected` in class `EditAction`
      Parameters:
        `comp` - The component

    - #### noRepeat

          public boolean noRepeat()

      Description copied from class: `EditAction`
      Returns if this edit action should not be repeated. Returns false by default.
      Overrides:
        `noRepeat` in class `EditAction`

    - #### noRecord

          public boolean noRecord()

      Description copied from class: `EditAction`
      Returns if this edit action should not be recorded. Returns false by default.
      Overrides:
        `noRecord` in class `EditAction`

    - #### noRememberLast

          public boolean noRememberLast()

      Returns if this edit action should not be remembered as the most recently invoked action.
      Overrides:
        `noRememberLast` in class `EditAction`
      Since:
        jEdit 4.2pre1

    - #### getCode

          public java.lang.String getCode()

      Description copied from 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
      Overrides:
        `getCode` in class `EditAction`