geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r571628 - in /geronimo/sandbox/gshell/trunk: gshell-api/ gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/ gshell-builtins/src/main/resources/org/apache/geronimo/...
Date Fri, 31 Aug 2007 22:33:30 GMT
Author: jdillon
Date: Fri Aug 31 15:33:26 2007
New Revision: 571628

URL: http://svn.apache.org/viewvc?rev=571628&view=rev
Log:
Drop the older message source muck, drop the messages files too for now, will revisit i18n
after major refactor completed

Removed:
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/MessageSource.java
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/builtins/ExitCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/builtins/HelpCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/builtins/SetCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/builtins/SourceCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/builtins/UnsetCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-scripting-commands/src/main/resources/org/apache/geronimo/gshell/commands/scripting/ScriptCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/resources/org/apache/geronimo/gshell/commands/standard/CatCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/resources/org/apache/geronimo/gshell/commands/standard/EchoCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/resources/org/apache/geronimo/gshell/commands/standard/ExecuteCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/resources/org/apache/geronimo/gshell/commands/standard/JavaCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/resources/org/apache/geronimo/gshell/commands/standard/SleepCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/resources/org/apache/geronimo/gshell/commands/standard/WaitCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs-commands/src/main/resources/org/apache/geronimo/gshell/commands/vfs/CopyCommandMessages.properties
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/MessageSourceImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/MessageSourceImplTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/resources/log4j.properties
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/command/
Modified:
    geronimo/sandbox/gshell/trunk/gshell-api/pom.xml
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SetCommand.java
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SourceCommand.java
    geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/UnsetCommand.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-scripting-commands/src/main/java/org/apache/geronimo/gshell/commands/scripting/ScriptCommand.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/CatCommand.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/EchoCommand.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/SleepCommand.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/WaitCommand.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs-commands/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/CompletionHandlerImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/MockShell.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserVisitorTest.java

Modified: geronimo/sandbox/gshell/trunk/gshell-api/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/pom.xml?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/pom.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/pom.xml Fri Aug 31 15:33:26 2007
@@ -46,6 +46,12 @@
 
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
+            <artifactId>gshell-i18n</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-clp</artifactId>
             <version>${pom.version}</version>
         </dependency>
@@ -55,7 +61,7 @@
             <artifactId>gshell-prefs</artifactId>
             <version>${pom.version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
Fri Aug 31 15:33:26 2007
@@ -31,6 +31,4 @@
     IO getIO();
     
     Variables getVariables();
-
-    MessageSource getMessageSource();
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
Fri Aug 31 15:33:26 2007
@@ -195,11 +195,7 @@
     protected IO getIO() {
         return getCommandContext().getIO();
     }
-
-    protected MessageSource getMessageSource() {
-        return getCommandContext().getMessageSource();
-    }
-
+    
     //
     // Execute Helpers
     //
@@ -289,22 +285,14 @@
     protected void displayHelp(final CommandLineProcessor clp) {
         assert clp != null;
 
-        MessageSource messages = getMessageSource();
         IO io = getIO();
 
         io.out.print(getName());
         io.out.print(" -- ");
-        io.out.println(messages.getMessage("cli.usage.description"));
         io.out.println();
 
         Printer printer = new Printer(clp);
         printer.printUsage(io.out);
         io.out.println();
-
-        String footer = messages.getMessage("cli.usage.footer");
-        if (footer.trim().length() != 0) {
-            io.out.println(footer);
-            io.out.println();
-        }
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java
Fri Aug 31 15:33:26 2007
@@ -20,7 +20,6 @@
 package org.apache.geronimo.gshell.builtins;
 
 import org.apache.geronimo.gshell.clp.Argument;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandDefinition;
 import org.apache.geronimo.gshell.command.CommandManager;
 import org.apache.geronimo.gshell.command.CommandSupport;
@@ -100,6 +99,6 @@
             io.err.println();
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SetCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SetCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SetCommand.java
Fri Aug 31 15:33:26 2007
@@ -25,7 +25,6 @@
 
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.command.VariablesImpl;
@@ -98,7 +97,7 @@
                 }
             }
 
-            return Command.SUCCESS;
+            return SUCCESS;
         }
 
         //
@@ -123,7 +122,7 @@
             }
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 
     class NameValue

Modified: geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SourceCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SourceCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SourceCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/SourceCommand.java
Fri Aug 31 15:33:26 2007
@@ -29,7 +29,6 @@
 
 import org.apache.geronimo.gshell.Shell;
 import org.apache.geronimo.gshell.clp.Argument;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 
 /**
@@ -66,7 +65,7 @@
             shell.execute(line);
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 
     private BufferedReader openReader(final Object source) throws IOException {

Modified: geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/UnsetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/UnsetCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/UnsetCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-builtins/src/main/java/org/apache/geronimo/gshell/builtins/UnsetCommand.java
Fri Aug 31 15:33:26 2007
@@ -23,7 +23,6 @@
 
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.command.VariablesImpl;
@@ -71,7 +70,7 @@
             }
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 
     private void ensureIsIdentifier(final String name) {

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-scripting-commands/src/main/java/org/apache/geronimo/gshell/commands/scripting/ScriptCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-scripting-commands/src/main/java/org/apache/geronimo/gshell/commands/scripting/ScriptCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-scripting-commands/src/main/java/org/apache/geronimo/gshell/commands/scripting/ScriptCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-scripting-commands/src/main/java/org/apache/geronimo/gshell/commands/scripting/ScriptCommand.java
Fri Aug 31 15:33:26 2007
@@ -22,7 +22,6 @@
 import org.apache.bsf.BSFEngine;
 import org.apache.bsf.BSFManager;
 import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 import org.apache.geronimo.gshell.console.JLineConsole;
 
@@ -80,6 +79,6 @@
             interp.run();
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/CatCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/CatCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/CatCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/CatCommand.java
Fri Aug 31 15:33:26 2007
@@ -22,16 +22,14 @@
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
-import java.io.InputStreamReader;
-import java.io.Reader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
 
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 import org.apache.geronimo.gshell.console.IO;
 import org.codehaus.plexus.util.StringUtils;
@@ -92,7 +90,7 @@
             }
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 
     private void cat(final BufferedReader reader, final IO io) throws IOException {

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/EchoCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/EchoCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/EchoCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/EchoCommand.java
Fri Aug 31 15:33:26 2007
@@ -23,7 +23,6 @@
 
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 import org.apache.geronimo.gshell.console.IO;
 
@@ -63,6 +62,6 @@
             io.out.println();
         }
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/SleepCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/SleepCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/SleepCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/SleepCommand.java
Fri Aug 31 15:33:26 2007
@@ -20,7 +20,6 @@
 package org.apache.geronimo.gshell.commands.standard;
 
 import org.apache.geronimo.gshell.clp.Argument;
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 
 /**
@@ -54,6 +53,6 @@
 
         log.info("Awake now");
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/WaitCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/WaitCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/WaitCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/WaitCommand.java
Fri Aug 31 15:33:26 2007
@@ -19,7 +19,6 @@
 
 package org.apache.geronimo.gshell.commands.standard;
 
-import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
 
 //
@@ -46,6 +45,6 @@
             wait();
         }
         
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs-commands/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs-commands/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs-commands/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs-commands/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java
Fri Aug 31 15:33:26 2007
@@ -23,7 +23,6 @@
 import org.apache.commons.vfs.FileSystemManager;
 import org.apache.commons.vfs.FileUtil;
 import org.apache.geronimo.gshell.clp.Argument;
-import org.apache.geronimo.gshell.command.Command;
 
 /**
  * Copy files.
@@ -56,6 +55,6 @@
 
         FileUtil.copyContent(source, target);
 
-        return Command.SUCCESS;
+        return SUCCESS;
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/CompletionHandlerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/CompletionHandlerImpl.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/CompletionHandlerImpl.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/CompletionHandlerImpl.java
Fri Aug 31 15:33:26 2007
@@ -29,8 +29,8 @@
 import jline.CompletionHandler;
 import jline.ConsoleReader;
 import jline.CursorBuffer;
-import org.apache.geronimo.gshell.command.MessageSource;
-import org.apache.geronimo.gshell.command.MessageSourceImpl;
+import org.apache.geronimo.gshell.i18n.MessageSource;
+import org.apache.geronimo.gshell.i18n.ResourceBundleMessageSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -53,7 +53,7 @@
 {
     private static final Logger log = LoggerFactory.getLogger(CompletionHandlerImpl.class);
 
-    private static MessageSource messages = new MessageSourceImpl(CompletionHandlerImpl.class.getName());
+    private static MessageSource messages = new ResourceBundleMessageSource(CompletionHandlerImpl.class);
 
     public boolean complete(final ConsoleReader reader, final List candidates, final int
pos)
         throws IOException
@@ -112,7 +112,7 @@
         Set<String> distinct = new HashSet<String>(candidates);
 
         if (distinct.size() > reader.getAutoprintThreshhold()) {
-            reader.printString(messages.getMessage("display-candidates", candidates.size())
+ " ");
+            reader.printString(messages.format("display-candidates", candidates.size()) +
" ");
             reader.flushConsole();
 
             int c;

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
Fri Aug 31 15:33:26 2007
@@ -21,20 +21,17 @@
 
 import java.util.Iterator;
 
-import org.apache.geronimo.gshell.common.StopWatch;
 import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandContext;
 import org.apache.geronimo.gshell.command.CommandManager;
-import org.apache.geronimo.gshell.command.MessageSource;
-import org.apache.geronimo.gshell.command.MessageSourceImpl;
 import org.apache.geronimo.gshell.command.StandardVariables;
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.command.VariablesImpl;
 import org.apache.geronimo.gshell.commandline.CommandLine;
 import org.apache.geronimo.gshell.commandline.CommandLineBuilder;
+import org.apache.geronimo.gshell.common.StopWatch;
 import org.apache.geronimo.gshell.console.IO;
 import org.apache.geronimo.gshell.util.Arguments;
-import org.codehaus.plexus.MutablePlexusContainer;
 import org.codehaus.plexus.PlexusContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -53,7 +50,7 @@
     private IO io;
 
     // @Requirement
-    private MutablePlexusContainer container;
+    private PlexusContainer container;
 
     // @Requirement
     private CommandManager commandManager;
@@ -131,7 +128,7 @@
         }
 
         //
-        // FIXME: Probably need to pick a better way to name the command invocation container,
or do we even really need this?
+        // HACK: Probably need to pick a better way to name the command invocation container,
or do we even really need this?
         //
 
         final PlexusContainer childContainer = container.createChildContainer("command-invocation",
container.getContainerRealm());
@@ -150,17 +147,6 @@
 
             public Variables getVariables() {
                 return vars;
-            }
-
-            MessageSource messageSource;
-
-            public MessageSource getMessageSource() {
-                // Lazy init the messages, commands many not need them
-                if (messageSource == null) {
-                    messageSource = new MessageSourceImpl(command.getClass().getName() +
"Messages");
-                }
-
-                return messageSource;
             }
         });
 

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java
Fri Aug 31 15:33:26 2007
@@ -22,14 +22,13 @@
 import java.io.Reader;
 import java.io.StringReader;
 
-import org.apache.geronimo.gshell.Shell;
 import org.apache.geronimo.gshell.commandline.parser.ASTCommandLine;
 import org.apache.geronimo.gshell.commandline.parser.CommandLineParser;
 import org.apache.geronimo.gshell.commandline.parser.ParseException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Builds {@link CommandLine} instances ready for executing.

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/MockShell.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/MockShell.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/MockShell.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/MockShell.java
Fri Aug 31 15:33:26 2007
@@ -19,10 +19,8 @@
 
 package org.apache.geronimo.gshell;
 
-import junit.framework.TestCase;
-import org.apache.geronimo.gshell.console.IO;
-import org.apache.geronimo.gshell.command.CommandNotFoundException;
 import org.apache.geronimo.gshell.command.CommandException;
+import org.apache.geronimo.gshell.console.IO;
 
 /**
  * Mock {@link Shell}.

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java
Fri Aug 31 15:33:26 2007
@@ -20,8 +20,6 @@
 package org.apache.geronimo.gshell;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.gshell.console.IO;
-import org.apache.geronimo.gshell.command.CommandNotFoundException;
 
 /**
  * Unit tests for the {@link Shell} class.

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java
Fri Aug 31 15:33:26 2007
@@ -19,11 +19,11 @@
 
 package org.apache.geronimo.gshell.command;
 
-import junit.framework.TestCase;
-
 import java.util.HashMap;
-import java.util.Map;
 import java.util.Iterator;
+import java.util.Map;
+
+import junit.framework.TestCase;
 
 /**
  * Unit tests for the {@link VariablesImpl} class.

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java
Fri Aug 31 15:33:26 2007
@@ -20,7 +20,6 @@
 package org.apache.geronimo.gshell.commandline;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.gshell.MockShell;
 
 /**
  * Unit tests for the {@link CommandLineBuilder} class.

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java
Fri Aug 31 15:33:26 2007
@@ -21,8 +21,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.geronimo.gshell.MockShell;
-
 /**
  * Unit tests for the {@link ExecutingVisitor} usage.
  *

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserTest.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserTest.java
Fri Aug 31 15:33:26 2007
@@ -19,10 +19,10 @@
 
 package org.apache.geronimo.gshell.commandline.parser;
 
-import junit.framework.TestCase;
-
 import java.io.Reader;
 import java.io.StringReader;
+
+import junit.framework.TestCase;
 
 /**
  * Unit tests for the {@link CommandLineParser} class.

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserVisitorTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserVisitorTest.java?rev=571628&r1=571627&r2=571628&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserVisitorTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/parser/CommandLineParserVisitorTest.java
Fri Aug 31 15:33:26 2007
@@ -19,10 +19,10 @@
 
 package org.apache.geronimo.gshell.commandline.parser;
 
-import junit.framework.TestCase;
-
 import java.io.Reader;
 import java.io.StringReader;
+
+import junit.framework.TestCase;
 
 /**
  * Unit tests for the {@link CommandLineParserVisitor} usage.



Mime
View raw message