geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r695222 - in /geronimo/gshell/trunk: gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ gshell-support...
Date Sun, 14 Sep 2008 14:04:56 GMT
Author: jdillon
Date: Sun Sep 14 07:04:56 2008
New Revision: 695222

URL: http://svn.apache.org/viewvc?rev=695222&view=rev
Log:
Using messages for all clp descriptions

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/EchoCommand.properties
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ExitCommand.properties
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/HelpCommand.properties
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SetCommand.properties
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SourceCommand.properties
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.properties
    geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Printer.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
Sun Sep 14 07:04:56 2008
@@ -24,8 +24,6 @@
 import org.apache.geronimo.gshell.command.CommandAction;
 import org.apache.geronimo.gshell.command.CommandContext;
 import org.apache.geronimo.gshell.io.IO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.io.PrintWriter;
 
@@ -37,8 +35,6 @@
 public class ClearCommand
     implements CommandAction
 {
-    private final Logger log = LoggerFactory.getLogger(getClass());
-    
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;
         

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
Sun Sep 14 07:04:56 2008
@@ -38,7 +38,7 @@
     @Option(name="-n")
     private boolean trailingNewline = true;
 
-    @Argument()
+    @Argument
     private List<String> args = null;
 
     public Object execute(final CommandContext context) throws Exception {

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
Sun Sep 14 07:04:56 2008
@@ -36,7 +36,7 @@
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Argument(description="System exit code")
+    @Argument
     private int exitCode = 0;
 
     public Object execute(final CommandContext context) throws Exception {

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
Sun Sep 14 07:04:56 2008
@@ -61,7 +61,7 @@
     @Autowired
     private LayoutManager layoutManager;
 
-    @Argument(metaVar="COMMAND", required=true, description="Display help for COMMAND")
+    @Argument(metaVar="COMMAND", required=true)
     private String command;
 
     private Renderer renderer = new Renderer();

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
Sun Sep 14 07:04:56 2008
@@ -48,12 +48,11 @@
         PROPERTY
     }
 
-    @Option(name="-m", aliases={"--mode"}, description="Set mode")
+    @Option(name="-m", aliases={"--mode"})
     private Mode mode = Mode.VARIABLE;
 
-    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
-    @Argument(description="Variable definition")
-    private List<String> args;
+    @Argument
+    private List<String> args = null;
 
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
Sun Sep 14 07:04:56 2008
@@ -51,7 +51,7 @@
     @Qualifier("default")
     private CommandLineExecutor executor;
 
-    @Argument(required=true, description="Source file")
+    @Argument(required=true)
     private String source;
 
     public Object execute(final CommandContext context) throws Exception {

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
Sun Sep 14 07:04:56 2008
@@ -45,12 +45,11 @@
         PROPERTY
     }
 
-    @Option(name="-m", aliases={"--mode"}, description="Unset mode")
+    @Option(name="-m", aliases={"--mode"})
     private Mode mode = Mode.VARIABLE;
 
-    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
-    @Argument(required=true, description="Variable name")
-    private List<String> args;
+    @Argument(required=true)
+    private List<String> args = null;
 
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/EchoCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/EchoCommand.properties?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/EchoCommand.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/EchoCommand.properties
Sun Sep 14 07:04:56 2008
@@ -25,8 +25,6 @@
 
 command.description=Print arguments to standard output.
 
-command.option.help=Display this help message
-
 command.option.trailingNewline=Do not print the trailing newline character
 
 command.argument.args=Arguments

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ExitCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ExitCommand.properties?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ExitCommand.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ExitCommand.properties
Sun Sep 14 07:04:56 2008
@@ -25,5 +25,7 @@
 
 command.description=Exit the current shell.
 
+command.argument.exitCode=System exit code
+
 command.manual=\
   TODO: exit manual
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/HelpCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/HelpCommand.properties?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/HelpCommand.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/HelpCommand.properties
Sun Sep 14 07:04:56 2008
@@ -25,5 +25,7 @@
 
 command.description=Display help for the current context.
 
+command.argument.command=Display help for COMMAND
+
 command.manual=\
   TODO: help manual
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SetCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SetCommand.properties?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SetCommand.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SetCommand.properties
Sun Sep 14 07:04:56 2008
@@ -25,5 +25,9 @@
 
 command.description=Set a variable or property.
 
+command.option.mode=Set mode
+
+command.argument.args=Variable definition
+
 command.manual=\
   TODO: set manual
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SourceCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SourceCommand.properties?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SourceCommand.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/SourceCommand.properties
Sun Sep 14 07:04:56 2008
@@ -23,7 +23,9 @@
 
 command.name=source
 
-command.description=Read and execute commands from a file/url in the current shell environment.
+command.description=Read and execute commands from a file/URL in the current shell environment.
+
+command.argument.source=Source file or URL
 
 command.manual=\
   TODO: source manual
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.properties?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.properties
Sun Sep 14 07:04:56 2008
@@ -25,5 +25,9 @@
 
 command.description=Unset a variable or property.
 
+command.option.mode=Unset mode
+
+command.argument.args=Variable name
+
 command.manual=\
   TODO: unset manual
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Printer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Printer.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Printer.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Printer.java
Sun Sep 14 07:04:56 2008
@@ -179,19 +179,24 @@
         // And then render the handler usage
         if (!argumentHandlers.isEmpty()) {
         	out.println("arguments:");
-        }
-        for (Handler handler : argumentHandlers) {
-            printHandler(out, handler, len);
+
+            for (Handler handler : argumentHandlers) {
+                printHandler(out, handler, len);
+            }
+
+            out.println();
         }
 
         if (!optionHandlers.isEmpty()) {
-        	out.println();
         	out.println("options:");
-        }
-        for (Handler handler : optionHandlers) {
-            printHandler(out, handler, len);
-        }
+            
+            for (Handler handler : optionHandlers) {
+                printHandler(out, handler, len);
+            }
 
+            out.println();
+        }
+        
         out.flush();
     }
 

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java?rev=695222&r1=695221&r2=695222&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandDocumenterImpl.java
Sun Sep 14 07:04:56 2008
@@ -106,8 +106,8 @@
         Printer printer = new Printer(clp);
         printer.setMessageSource(new PrefixingMessageSource(getContainer().getMessages(),
"command."));
         printer.printUsage(out, name);
-        
-        out.println();
+
+        out.flush();
     }
 
     public void renderManual(final CommandInfo info, final PrintWriter out) {



Mime
View raw message