Package org.gjt.sp.jedit
Class JEditAbstractEditAction<E>
- java.lang.Object
-
- org.gjt.sp.jedit.JEditAbstractEditAction<E>
-
- Direct Known Subclasses:
EditAction
,JEditBeanShellAction
public abstract class JEditAbstractEditAction<E> extends java.lang.Object
An action that can be bound to a menu item, tool bar button or keystroke.- Since:
- 4.3pre13
- See Also:
jEdit.getAction(String)
,jEdit.getActionNames()
,ActionSet
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JEditAbstractEditAction(java.lang.String name)
Creates a new edit action with the specified name.protected
JEditAbstractEditAction(java.lang.String name, java.lang.Object[] newArgs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the internal name of this action.abstract void
invoke(E arg)
Invokes the action.void
invoke(E arg, java.lang.Object[] newArgs)
void
setName(java.lang.String newName)
Changes the name of an actionjava.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the internal name of this action.- Returns:
- the action name
-
setName
public void setName(java.lang.String newName)
Changes the name of an action- Parameters:
newName
- the new name of the action- Since:
- jEdit 4.3pre4
-
invoke
public abstract void invoke(E arg)
Invokes the action. This is an implementation of the Command pattern, and concrete actions should override this.- Parameters:
arg
- the argument
-
invoke
public final void invoke(E arg, java.lang.Object[] newArgs)
- Parameters:
arg
- the arguments of the actionnewArgs
- new argument list
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-