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/09/14 08:25:01 UTC
svn commit: r695124 - in /geronimo/gshell/trunk:
gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/
gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/
gshell-wisdom/gshell-wisdom-core/src/m...
Author: jdillon
Date: Sat Sep 13 23:25:00 2008
New Revision: 695124
URL: http://svn.apache.org/viewvc?rev=695124&view=rev
Log:
Add some meat to the i18n files
Allow documenter and completer to be optional in configuration, construct default versions if needed
Modified:
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ClearCommand.properties
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-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml?rev=695124&r1=695123&r2=695124&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml Sat Sep 13 23:25:00 2008
@@ -35,14 +35,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.ClearCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
@@ -51,14 +43,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.EchoCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
@@ -67,14 +51,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.ExitCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
@@ -83,14 +59,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.HelpCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
@@ -99,14 +67,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.SetCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
@@ -115,14 +75,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.SourceCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
@@ -131,14 +83,6 @@
<property name="action">
<bean class="org.apache.geronimo.gshell.commands.builtins.UnsetCommand"/>
</property>
-
- <property name="completer">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
- </property>
-
- <property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
- </property>
</bean>
</beans>
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ClearCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ClearCommand.properties?rev=695124&r1=695123&r2=695124&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ClearCommand.properties (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/org/apache/geronimo/gshell/commands/builtins/ClearCommand.properties Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=clear
-command.description=
\ No newline at end of file
+command.description=Clear the terminal screen.
\ No newline at end of file
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=695124&r1=695123&r2=695124&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 Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=echo
-command.description=
\ No newline at end of file
+command.description=Print arguments to standard output.
\ No newline at end of file
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=695124&r1=695123&r2=695124&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 Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=exit
-command.description=
\ No newline at end of file
+command.description=Exit the current shell.
\ 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=695124&r1=695123&r2=695124&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 Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=help
-command.description=
\ No newline at end of file
+command.description=Display help for the current context.
\ 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=695124&r1=695123&r2=695124&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 Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=set
-command.description=
\ No newline at end of file
+command.description=Set a variable or property.
\ 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=695124&r1=695123&r2=695124&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 Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=source
-command.description=
\ No newline at end of file
+command.description=Read and execute commands from a file/url in the current shell environment.
\ 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=695124&r1=695123&r2=695124&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 Sat Sep 13 23:25:00 2008
@@ -21,6 +21,6 @@
## $Rev$ $Date$
##
-command.name=
+command.name=unset
-command.description=
\ No newline at end of file
+command.description=Unset a variable or property.
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java?rev=695124&r1=695123&r2=695124&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandContainerImpl.java Sat Sep 13 23:25:00 2008
@@ -61,6 +61,8 @@
private CommandCompleter completer;
+ // TODO: MessageSource
+
public String getId() {
return id;
}
@@ -107,9 +109,17 @@
assert registry != null;
assert id != null;
assert action != null;
- assert documenter != null;
- assert completer != null;
+ // Create default components if not configured
+ if (documenter == null) {
+ setDocumenter(new CommandDocumenterImpl());
+ }
+ if (completer == null) {
+ setCompleter(new CommandCompleterImpl());
+ }
+
+ // TODO: Setup MessageSource
+
// Inject ourself into CommandContainerAware instances
Object[] children = {
action,
@@ -140,9 +150,10 @@
try {
CommandAction action = getAction();
- // Process command line options/arguments, return if we have been asked to display --help
try {
+ // Process command line options/arguments
if (processArguments(context, action, context.getArguments())) {
+ // return if we have been asked to display --help
return new CommandResult(CommandAction.Result.SUCCESS);
}