Interface EditorAction
- All Known Subinterfaces:
Editor<T>
- All Known Implementing Classes:
BooleanAction
,EnumAction
,ListEditor
,NumberAction
,ValueEditor
public interface EditorAction
An action of the editor
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection
<String> complete
(EditorActor actor, String[] args) Get the completion suggestions, given the argumentsGet the description of the actionboolean
execute
(EditorActor actor, String[] args) Execute the actiondefault boolean
Check if the action requires argumentsdefault String
usage()
Get the usage of the action
-
Method Details
-
execute
Execute the action- Parameters:
actor
- the actorargs
- the arguments- Returns:
- true if the action is executed successfully
-
description
String description()Get the description of the action- Returns:
- the description
-
complete
Get the completion suggestions, given the arguments- Parameters:
actor
- the actionargs
- the argument- Returns:
- the suggestions
-
usage
Get the usage of the action- Returns:
- the usage
-
requiresArgs
default boolean requiresArgs()Check if the action requires arguments- Returns:
- true if it does
-