Author: davsclaus
Date: Mon Oct 13 04:47:03 2008
New Revision: 704021

URL: http://svn.apache.org/viewvc?rev=704021&view=rev
Log:
CAMEL-968. Applied patch with thanks.

Modified:
    
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java

Modified: 
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java?rev=704021&r1=704020&r2=704021&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
 (original)
+++ 
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
 Mon Oct 13 04:47:03 2008
@@ -193,16 +193,22 @@
      * Displays the command line options
      */
     public void showOptions() {
-        System.out.println("Apache Camel Runner takes the following options");
-        System.out.println();
+        showOptionsHeader();
 
         for (Option option : options) {
-            System.out.println("  " + option.getAbbreviation() + " or " + 
option.getFullName() + " = "
-                    + option.getDescription());
+            System.out.println(option.getInformation());
         }
     }
 
     /**
+     * Displays the header message for the command line options
+     */
+    public void showOptionsHeader() {
+      System.out.println("Apache Camel Runner takes the following options");
+      System.out.println();
+    }
+
+    /**
      * Parses the command line arguments
      */
     public void parseArguments(String[] arguments) {
@@ -267,6 +273,10 @@
             return fullName;
         }
 
+        public String getInformation() {
+            return "  " + getAbbreviation() + " or " + getFullName() + " = " + 
getDescription();
+        }
+
         protected abstract void doProcess(String arg, LinkedList<String> 
remainingArgs);
     }
 
@@ -290,6 +300,11 @@
             }
         }
 
+        public String getInformation() {
+            return "  " + getAbbreviation() + " or " + getFullName()
+                    + " <" + parameterName + "> = " + getDescription();
+        }
+
         protected abstract void doProcess(String arg, String parameter, 
LinkedList<String> remainingArgs);
     }
 


Reply via email to