package com.obidea.semantika.cli2.command;

import java.io.PrintStream;
import java.util.Map;

import com.obidea.semantika.cli2.runtime.ConsoleSession;

public class ShowPrefixesCommand extends Command
{
   private ConsoleSession mSession;

   public ShowPrefixesCommand(String command, ConsoleSession session)
   {
      mSession = session;
   }

   @Override
   public Object execute() throws Exception
   {
      return mSession.getPrefixMapper();
   }

   @Override
   public void printOutput(PrintStream out, Object output)
   {
      if (output instanceof Map<?, ?>) {
         @SuppressWarnings("unchecked")
         Map<String, String> map = (Map<String, String>) output;
         for (String prefix : map.keySet()) {
            out.println(prefix + ": " + map.get(prefix));
         }
      }
      out.println();
   }
}

@@ -144,16 +144,62 @@
 Session;
+%0Aimport com.obidea.semantika.util.StringUtils;
 %0A%0Apublic
@@ -740,22 +740,19 @@
 (String 
-prefix
+key
  : map.k
@@ -758,24 +758,158 @@
 keySet()) %7B%0A
+            String prefix = key;%0A            if (StringUtils.isEmpty(prefix)) %7B%0A               prefix = %22(default)%22; //%0A            %7D%0A
             
@@ -930,17 +930,18 @@
 efix + %22
-:
+ =
  %22 + map
@@ -945,22 +945,19 @@
 map.get(
-prefix
+key
 ));%0A    

Change the show prefixes commmand output.