Package org.jboss.forge.shell.completer

Examples of org.jboss.forge.shell.completer.CompleterAdaptor


   @Override
   public String promptCompleter(final String string, final Class<? extends CommandCompleter> type)
   {
      return promptWithCompleter(string,
               new CompleterAdaptor(BeanManagerUtils.getContextualInstance(getBeanManager(), type)));
   }
View Full Code Here


   public <T extends Enum<T>> T promptEnum(final String message, final Class<T> type)
   {
      String value = "";
      while ((value == null) || value.trim().isEmpty())
      {
         value = promptWithCompleter(message, new CompleterAdaptor(new EnumCompleter(type)));
      }

      T result = (T) Enums.valueOf(type, value.trim());
      if (result == null)
      {
View Full Code Here

   public <T extends Enum<T>> T promptEnum(final String message, final Class<T> type, final T defaultIfEmpty)
   {
      T result;
      do
      {
         String value = promptWithCompleter(message, new CompleterAdaptor(
                  new EnumCompleter(type)));

         if ((value == null) || value.trim().isEmpty())
         {
            result = defaultIfEmpty;
View Full Code Here

   @Override
   public String promptCompleter(final String string, final Class<? extends CommandCompleter> type)
   {
      return promptWithCompleter(string,
               new CompleterAdaptor(BeanManagerUtils.getContextualInstance(getBeanManager(), type)));
   }
View Full Code Here

   public <T extends Enum<T>> T promptEnum(final String message, final Class<T> type)
   {
      String value = "";
      while ((value == null) || value.trim().isEmpty())
      {
         value = promptWithCompleter(message, new CompleterAdaptor(new EnumCompleter(type)));
      }

      T result = (T) Enums.valueOf(type, value.trim());
      if (result == null)
      {
View Full Code Here

   {
      T result;
      do
      {
         String query = " [" + defaultIfEmpty + "] ";
         String value = promptWithCompleter(message + query, new CompleterAdaptor(
                  new EnumCompleter(type)));

         if ((value == null) || value.trim().isEmpty())
         {
            result = defaultIfEmpty;
View Full Code Here

   @Override
   public String promptCompleter(final String string, final Class<? extends CommandCompleter> type)
   {
      return promptWithCompleter(string,
               new CompleterAdaptor(BeanManagerUtils.getContextualInstance(getBeanManager(), type)));
   }
View Full Code Here

   public <T extends Enum<T>> T promptEnum(final String message, final Class<T> type)
   {
      String value = "";
      while ((value == null) || value.trim().isEmpty())
      {
         value = promptWithCompleter(message, new CompleterAdaptor(new EnumCompleter(type)));
      }

      T result = (T) Enums.valueOf(type, value.trim());
      if (result == null)
      {
View Full Code Here

   public <T extends Enum<T>> T promptEnum(final String message, final Class<T> type, final T defaultIfEmpty)
   {
      T result;
      do
      {
         String value = promptWithCompleter(message, new CompleterAdaptor(
                  new EnumCompleter(type)));

         if ((value == null) || value.trim().isEmpty())
         {
            result = defaultIfEmpty;
View Full Code Here

   @Override
   public String promptCompleter(final String string, final Class<? extends CommandCompleter> type)
   {
      return promptWithCompleter(string,
               new CompleterAdaptor(BeanManagerUtils.getContextualInstance(getBeanManager(), type)));
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.shell.completer.CompleterAdaptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.