* A {@link ConsoleApplication} is an application that require the user to input @@ -63,7 +60,8 @@ import fr.bigeon.gclc.manager.SystemConsoleManager; * A typical use case is the following: * *
- * {@link ConsoleApplication} app = new {@link ConsoleApplication#ConsoleApplication(String, String, String) ConsoleApplication("exit", "welcome", "see you latter")}; + * {@link ConsoleManager} manager = new {@link fr.bigeon.gclc.manager.SystemConsoleManager#SystemConsoleManager()} + * {@link ConsoleApplication} app = new {@link ConsoleApplication#ConsoleApplication(ConsoleManager, String, String) ConsoleApplication(manager, "welcome", "see you latter")}; * app.{@link ConsoleApplication#add(ICommand) add}("my_command", new {@link ICommand MyCommand()}); * app.{@link ConsoleApplication#start start}(); *@@ -103,54 +101,11 @@ public class ConsoleApplication implements ICommandProvider { root = new SubedCommand(""); //$NON-NLS-1$ } - /** @param manager the manager - * @param exit the keyword for the exit command of this application - * @param welcome the header message to display on launch of this - * application - * @param goodbye the message to display on exit - * @throws InvalidCommandName if the exit command name is invalid - * @deprecated since 1.2.0, use the {@link #add(ICommand)} method to add the - * exit command */ - @Deprecated - public ConsoleApplication(ConsoleManager manager, String exit, - String welcome, String goodbye) throws InvalidCommandName { - this(manager, welcome, goodbye); - root.add(new ExitCommand(exit, this)); - } - - /** @param exit the keyword for the exit command of this application - * @param welcome the header message to display on launch of this - * application - * @param goodbye the message to display on exit - * @throws InvalidCommandName if the exit command name is invalid - * @deprecated since 1.2.0, use the {@link #add(ICommand)} method to add the - * command and create this console using the - * {@link #ConsoleApplication(ConsoleManager, String, String)} - * method with a {@link SystemConsoleManager} as argument */ - @Deprecated - public ConsoleApplication(String exit, String welcome, - String goodbye) throws InvalidCommandName { - this(new SystemConsoleManager(), welcome, goodbye); - root.add(new ExitCommand(exit, this)); - } - @Override public final boolean add(ICommand cmd) throws InvalidCommandName { return root.add(cmd); } - /** Adds help command on the given key - * - * @param cmd the handle for help - * @return if the help command was added - * @throws InvalidCommandName if the help command was not valid - * @deprecated since 1.2.0 use the {@link #add(ICommand)} with a - * {@link HelpExecutor} instead */ - @Deprecated - public final boolean addHelpCommand(String cmd) throws InvalidCommandName { - return root.add(new HelpExecutor(cmd, manager, root)); - } - /** Add a command request listener. *
* A listener can listen several times to the same application.