From fd8dde32f110a1adba00b394fc76f60dba832890 Mon Sep 17 00:00:00 2001 From: Emmanuel Bigeon Date: Sat, 19 Nov 2016 19:50:36 -0500 Subject: [PATCH] Removed deprecated code Signed-off-by: Emmanuel Bigeon --- gclc-socket/pom.xml | 2 +- gclc-swt/pom.xml | 2 +- gclc.system/pom.xml | 2 +- .../fr/bigeon/gclc/ConsoleApplication.java | 49 +------------------ 4 files changed, 5 insertions(+), 50 deletions(-) diff --git a/gclc-socket/pom.xml b/gclc-socket/pom.xml index 9c41a10..44dd90f 100644 --- a/gclc-socket/pom.xml +++ b/gclc-socket/pom.xml @@ -87,7 +87,7 @@ of Emmanuel Bigeon. --> fr.bigeon gclc - 1.2.5 + 1.2.6 fr.bigeon diff --git a/gclc-swt/pom.xml b/gclc-swt/pom.xml index 27197cb..24cb2bc 100644 --- a/gclc-swt/pom.xml +++ b/gclc-swt/pom.xml @@ -53,7 +53,7 @@ fr.bigeon gclc - 1.2.3 + 1.2.6 fr.bigeon diff --git a/gclc.system/pom.xml b/gclc.system/pom.xml index 146249c..6f9c583 100644 --- a/gclc.system/pom.xml +++ b/gclc.system/pom.xml @@ -23,7 +23,7 @@ fr.bigeon gclc - 1.2.5 + 1.2.6 GCLC system command diff --git a/gclc/src/main/java/fr/bigeon/gclc/ConsoleApplication.java b/gclc/src/main/java/fr/bigeon/gclc/ConsoleApplication.java index b109dfd..78473b7 100644 --- a/gclc/src/main/java/fr/bigeon/gclc/ConsoleApplication.java +++ b/gclc/src/main/java/fr/bigeon/gclc/ConsoleApplication.java @@ -43,8 +43,6 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import fr.bigeon.gclc.command.ExitCommand; -import fr.bigeon.gclc.command.HelpExecutor; import fr.bigeon.gclc.command.ICommand; import fr.bigeon.gclc.command.ICommandProvider; import fr.bigeon.gclc.command.SubedCommand; @@ -54,7 +52,6 @@ import fr.bigeon.gclc.exception.CommandRunExceptionType; import fr.bigeon.gclc.exception.InvalidCommandName; import fr.bigeon.gclc.i18n.Messages; import fr.bigeon.gclc.manager.ConsoleManager; -import fr.bigeon.gclc.manager.SystemConsoleManager; /**

* 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.