package com.obidea.semantika.cli2.command;

public class CommandFactory
{
   public static Command create(String command) throws Exception
   {
      if (command.startsWith(Command.SELECT)) {
         return new SelectCommand(command);
      }
      else if (command.startsWith(Command.SET_PREFIX)) {
         return new SetPrefixCommand(command);
      }
      else if (command.startsWith(Command.SHOW_PREFIXES)) {
         return new ShowPrefixesCommand(command);
      }
      throw new Exception("Unknown command"); //$NON-NLS-1$
   }
}

@@ -143,32 +143,24 @@
 %7B%0A      if (
-command.
 startsWith(C
@@ -150,32 +150,41 @@
  if (startsWith(
+command, 
 Command.SELECT))
@@ -249,32 +249,24 @@
    else if (
-command.
 startsWith(C
@@ -256,32 +256,41 @@
  if (startsWith(
+command, 
 Command.SET_PREF
@@ -370,16 +370,8 @@
 if (
-command.
 star
@@ -377,16 +377,25 @@
 rtsWith(
+command, 
 Command.
@@ -534,11 +534,178 @@
 -1$%0A   %7D
+%0A%0A   private static boolean startsWith(String command, String keyword)%0A   %7B%0A      return command.startsWith(keyword) %7C%7C command.startsWith(keyword.toUpperCase());%0A   %7D
 %0A%7D%0A

Set the string comparison to ignore letter cases.