Skip to content
Snippets Groups Projects
Commit 24c487e2 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Update on cli

parent 8181e656
No related branches found
No related tags found
No related merge requests found
......@@ -50,15 +50,16 @@ import java.util.*;
* @author Ludovic APVRILLE
*/
public class Action extends Command {
private final String[] SUB_COMMANDS = {"open"};
private List<Command> subcommands;
public Action() {
subcommands = new LinkedList<Command>();
}
public String[] getListOfSubCommands() {
return SUB_COMMANDS;
public List<Command> getListOfSubCommands() {
return subcommands;
}
public String getCommand() {
......
......@@ -51,7 +51,7 @@ import java.util.*;
*/
public abstract class Command {
public abstract String[] getListOfSubCommands();
public abstract List<Command> getListOfSubCommands();
public abstract String getCommand();
public abstract String getShortCommand();
public abstract boolean executeCommand(String command, InterpreterOutputInterface output);
......
......@@ -74,6 +74,8 @@ public class Interpreter {
private final static String OPEN = "open";
private final static String START = "start";
private final static String QUIT = "quit";
private final static String CHECKSYNTAX = "checksyntax";
// Errors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment