summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-05-02 18:46:28 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-05-02 18:46:28 +0200
commit3d5a702a1a830314847ad3f13b121e7160bccbc9 (patch)
treeda674ec78eb53d4d709fd92e98b8711e35d7390c
parentcd1e712c055deb6260e70a38bb4a9a8c032c7ea4 (diff)
downloadTwitterDataAnalytics-3d5a702a1a830314847ad3f13b121e7160bccbc9.tar.gz
Adjust target command help message, print available targets
-rw-r--r--src/main/TweetShell.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/main/TweetShell.java b/src/main/TweetShell.java
index a7738d5..1f99999 100644
--- a/src/main/TweetShell.java
+++ b/src/main/TweetShell.java
@@ -172,10 +172,10 @@ public class TweetShell implements TwitterApi.PinSupplier {
close("Close the stream"),
exit("Returns to shell"),
help("Get help"),
- target("Show output target (no args) or set output target: one or more "
- + "of {file, shell}. With a '-' or '+' prefix, that target "
- + "is removed/added from the list of targets. Without prefix, "
- + "all other targets get disabled.");
+ target("Show available and enabled targets (if no args are given). "
+ + "If one or more args are given, change the output targets. "
+ + "A '-' or '+' prefix only enables/disables that target. "
+ + "With no prefix, all other targets get disabled.");
private final String description;
private final int paramCount;
@@ -298,10 +298,13 @@ public class TweetShell implements TwitterApi.PinSupplier {
} else {
ClassEnabledTracker<ResultListener> targets;
targets = getPossibleTargets();
- // print the names of all targets that are enabled
- System.out.print("Enabled targets:");
- for (String name : targets.getEnabled()) {
+ Set<String> enabledTargets = targets.getEnabled();
+ System.out.println("Possible targets (* = enabled):");
+ for (String name : targets.getNames()) {
System.out.print(" " + name);
+ if (enabledTargets.contains(name)) {
+ System.out.print("*");
+ }
}
System.out.println();
}