You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/10/08 14:28:53 UTC

svn commit: r702835 - /geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpAction.java

Author: jdillon
Date: Wed Oct  8 05:28:53 2008
New Revision: 702835

URL: http://svn.apache.org/viewvc?rev=702835&view=rev
Log:
Update API use

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpAction.java

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpAction.java?rev=702835&r1=702834&r2=702835&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpAction.java (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpAction.java Wed Oct  8 05:28:53 2008
@@ -53,12 +53,20 @@
     @Autowired
     private AliasRegistry aliasRegistry;
 
+    //
+    // TODO: Rename to path or name
+    //
+    
     @Argument
     private String commandName;
 
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;
 
+        //
+        // FIXME: Resolve commands first based on path, if there is one match, then display manual, else display brief listing
+        //
+        
         if (commandName != null) {
             return displayCommandManual(context);
         }
@@ -74,7 +82,7 @@
 
         try {
             assert commandResolver != null;
-            Command command = commandResolver.resolveCommand(context.getVariables(), commandName);
+            Command command = commandResolver.resolveCommand(commandName, context.getVariables());
 
             assert command != null;
             command.getDocumenter().renderManual(io.out);
@@ -114,8 +122,8 @@
         log.debug("Listing brief help for commands");
 
         assert commandResolver != null;
-        Collection<Command> commands = commandResolver.resolveCommands(context.getVariables(), null);
-
+        Collection<Command> commands = commandResolver.resolveCommands(null, context.getVariables());
+        
         // Determine the maximun name length
         int maxNameLen = 0;
         for (Command command : commands) {