java.lang.Object
org.gjt.sp.jedit.JEditAbstractEditAction<View>
org.gjt.sp.jedit.EditAction
org.gjt.sp.jedit.BeanShellAction
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.- Version:
- $Id: BeanShellAction.java 25106 2020-03-31 22:35:31Z kpouer $
- Author:
- Slava Pestov
- See Also:
-
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
ConstructorsConstructorDescriptionBeanShellAction(String name, String code, String isSelected, boolean noRepeat, boolean noRecord, boolean noRememberLast) -
Method Summary
Modifier and TypeMethodDescriptiongetCode()voidInvokes the action.booleanisSelected(Component comp) booleannoRecord()booleanReturns if this edit action should not be remembered as the most recently invoked action.booleannoRepeat()Methods inherited from class org.gjt.sp.jedit.EditAction
getLabel, getMouseOverText, getToolTip, isToggleMethods inherited from class org.gjt.sp.jedit.JEditAbstractEditAction
getName, invoke, setName, toString
-
Constructor Details
-
BeanShellAction
-
-
Method Details
-
invoke
Description copied from class:EditActionInvokes the action. This is an implementation of the Command pattern, and concrete actions should override this.- Specified by:
invokein classEditAction- Parameters:
view- The view
-
isSelected
- Overrides:
isSelectedin classEditAction- Parameters:
comp- The component- Returns:
- If this edit action is a toggle, returns if it is selected or not.
-
noRepeat
public boolean noRepeat()- Overrides:
noRepeatin classEditAction- Returns:
- if this edit action should not be repeated. Returns false by default.
-
noRecord
public boolean noRecord()- Overrides:
noRecordin classEditAction- Returns:
- if this edit action should not be recorded. Returns false by default.
-
noRememberLast
public boolean noRememberLast()Returns if this edit action should not be remembered as the most recently invoked action.- Overrides:
noRememberLastin classEditAction- Returns:
- if this edit action should not be remembered as the most recently invoked action.
- Since:
- jEdit 4.2pre1
-
getCode
- Overrides:
getCodein classEditAction- 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
-