null input stream
+ */
+ private InputStream openScript(final File script) {
+ try {
+ return new BufferedInputStream(new FileInputStream(script));
+ } catch (final FileNotFoundException fnfe) {
+ // Try to find the script via the classloader
+ final Collectionnull if the search can't be performed
- * @since 1.2.0
- */
- protected abstract Collectionnull input stream
- */
- private InputStream openScript(final File script) {
- try {
- return new BufferedInputStream(new FileInputStream(script));
- } catch (final FileNotFoundException fnfe) {
- // Try to find the script via the classloader
- final Collection
* This method can be overridden by sub-classes to pre-process script lines.
*/
- protected boolean executeScriptLine(final String line) {
+ public boolean executeScriptLine(final String line) {
return executeCommand(line).isSuccess();
}
@@ -304,8 +217,6 @@ public abstract class AbstractShell extends AbstractShellStatusPublisher impleme
return exitShellRequest;
}
-
-
@CliCommand(value = { "/*" }, help = "Start of block comment")
public void blockCommentBegin() {
Assert.isTrue(!inBlockComment, "Cannot open a new block comment when one already active");
@@ -318,31 +229,6 @@ public abstract class AbstractShell extends AbstractShellStatusPublisher impleme
inBlockComment = false;
}
- //@CliCommand(value = { "flash test" }, help = "Tests message flashing")
- public void flashCustom() throws Exception {
- flash(Level.FINE, "Hello world", "a");
- Thread.sleep(150);
- flash(Level.FINE, "Short world", "a");
- Thread.sleep(150);
- flash(Level.FINE, "Small", "a");
- Thread.sleep(150);
- flash(Level.FINE, "Downloading xyz", "b");
- Thread.sleep(150);
- flash(Level.FINE, "", "a");
- Thread.sleep(150);
- flash(Level.FINE, "Downloaded xyz", "b");
- Thread.sleep(150);
- flash(Level.FINE, "System online", "c");
- Thread.sleep(150);
- flash(Level.FINE, "System ready", "c");
- Thread.sleep(150);
- flash(Level.FINE, "System farewell", "c");
- Thread.sleep(150);
- flash(Level.FINE, "", "c");
- Thread.sleep(150);
- flash(Level.FINE, "", "b");
- }
-
public String versionInfo(){
return VersionUtils.versionInfo();
}
diff --git a/src/main/java/org/springframework/shell/core/JLineShell.java b/src/main/java/org/springframework/shell/core/JLineShell.java
index e0ac9974..709f914d 100644
--- a/src/main/java/org/springframework/shell/core/JLineShell.java
+++ b/src/main/java/org/springframework/shell/core/JLineShell.java
@@ -68,7 +68,7 @@ import org.springframework.util.StringUtils;
* @author Jarred Li
* @since 1.0
*/
-public abstract class JLineShell extends AbstractShell implements CommandMarker, Shell, Runnable {
+public abstract class JLineShell extends AbstractShell implements Shell, Runnable {
// Constants
private static final String ANSI_CONSOLE_CLASSNAME = "org.fusesource.jansi.AnsiConsole";
diff --git a/src/main/java/org/springframework/shell/core/JLineShellComponent.java b/src/main/java/org/springframework/shell/core/JLineShellComponent.java
index 7296a720..d2e5a544 100644
--- a/src/main/java/org/springframework/shell/core/JLineShellComponent.java
+++ b/src/main/java/org/springframework/shell/core/JLineShellComponent.java
@@ -15,15 +15,10 @@
*/
package org.springframework.shell.core;
-import java.io.IOException;
-import java.net.URL;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactoryUtils;
@@ -31,16 +26,13 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
-import org.springframework.context.Lifecycle;
import org.springframework.context.SmartLifecycle;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
-import org.springframework.core.io.Resource;
import org.springframework.shell.CommandLine;
import org.springframework.shell.plugin.BannerProvider;
import org.springframework.shell.plugin.HistoryFileNameProvider;
import org.springframework.shell.plugin.NamedProvider;
import org.springframework.shell.plugin.PromptProvider;
-import org.springframework.shell.support.logging.HandlerUtils;
/**
* Launcher for {@link JLineShell}.
@@ -138,22 +130,6 @@ public class JLineShellComponent extends JLineShell implements SmartLifecycle, A
}
}
- @Override
- protected Collection