From befa5f12c5b1f09266ff43f44a065c5c8d2eaab4 Mon Sep 17 00:00:00 2001 From: Jarred Li Date: Thu, 31 May 2012 13:17:44 +0800 Subject: [PATCH] fix history issue --- .../org/springframework/shell/JLineShell.java | 22 +++++++++++-------- .../shell/JLineShellComponent.java | 15 ------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/springframework/shell/JLineShell.java b/src/main/java/org/springframework/shell/JLineShell.java index 491851b0..cfedb305 100644 --- a/src/main/java/org/springframework/shell/JLineShell.java +++ b/src/main/java/org/springframework/shell/JLineShell.java @@ -558,9 +558,7 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker, * * @return history file name */ - protected String getHistoryFileName() { - return Constant.HISTORY_FILE_NAME; - } + abstract protected String getHistoryFileName(); /** * get prompt text from provider. The provider has highest order @@ -568,14 +566,20 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker, * * @return prompt text */ - protected String getPromptText() { - return Constant.COMMAND_LINE_PROMPT; - } + abstract protected String getPromptText(); - protected String getProductName() { - return Constant.PRODUCT_NAME; - } + /** + * get product name + * + * @return Product Name + */ + abstract protected String getProductName(); + /** + * get version information + * + * @return Version + */ protected String getVersion() { return VersionUtils.versionInfo(); } diff --git a/src/main/java/org/springframework/shell/JLineShellComponent.java b/src/main/java/org/springframework/shell/JLineShellComponent.java index 54f058c1..e9f828f2 100644 --- a/src/main/java/org/springframework/shell/JLineShellComponent.java +++ b/src/main/java/org/springframework/shell/JLineShellComponent.java @@ -43,7 +43,6 @@ public class JLineShellComponent extends JLineShell implements Lifecycle { private String version; private String welcomeMessage; - private int historySize; // Fields private ExecutionStrategy executionStrategy = new SimpleExecutionStrategy(); //ProcessManagerHostedExecutionStrategy is not what i think we need outside of Roo. @@ -206,20 +205,6 @@ public class JLineShellComponent extends JLineShell implements Lifecycle { public void setPrintBanner(boolean printBanner) { this.printBanner = printBanner; } - - /** - * @return the historySize - */ - public int getHistorySize() { - return historySize; - } - - /** - * @param historySize the historySize to set - */ - public void setHistorySize(int historySize) { - this.historySize = historySize; - } protected String getProductName() { return productName;