/**
 * Copyright 2014 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.jboss.forge.addon.shell.commands;

import javax.inject.Inject;

import org.jboss.forge.addon.ui.annotation.Command;
import org.jboss.forge.addon.ui.output.UIOutput;
import org.jboss.forge.furnace.Furnace;
import org.jboss.forge.furnace.versions.Version;

/**
 * 
 * @author <a href="ggastald@redhat.com">George Gastaldi</a>
 */
public class AboutCommand
{
   @Inject
   Furnace furnace;

   @Command(value = "version", help = "Displays the current Forge version.")
   public void showVersion(final UIOutput output)
   {
      Version version = furnace.getVersion();
      output.out().println(
               "JBoss Forge, version [ " + version + " ] - JBoss, by Red Hat, Inc. [ http://jboss.org/forge ]");
   }

   @Command(value = "about", help = "Display information about this forge.")
   public void showAbout(final UIOutput output)
   {
      output.out().println();
      output.out().println("    _____                    ");
      output.out().println("   |  ___|__  _ __ __ _  ___ ");
      output.out().println("   | |_ / _ \\| `__/ _` |/ _ \\  \\\\");
      output.out().println("   |  _| (_) | | | (_| |  __/  //");
      output.out().println("   |_|  \\___/|_|  \\__, |\\___| ");
      output.out().println("                   |___/      ");
      output.out().println("");
      showVersion(output);
   }
}

@@ -304,16 +304,89 @@
 ommand;%0A
+import org.jboss.forge.addon.ui.annotation.handler.NonGUIEnabledHandler;%0A
 import o
@@ -426,16 +426,16 @@
 Output;%0A
-
 import o
@@ -724,16 +724,61 @@
 ersion.%22
+, enabledHandler = NonGUIEnabledHandler.class
 )%0A   pub
@@ -1019,16 +1019,16 @@
 ;%0A   %7D%0A%0A
-
    @Comm
@@ -1094,16 +1094,61 @@
  forge.%22
+, enabledHandler = NonGUIEnabledHandler.class
 )%0A   pub

version and about commands should be shown in shell only