Examples of CommandLineCompletionParser


Examples of org.jboss.aesh.cl.CommandLineCompletionParser

   }

   @Override
   public ParsedCompleteObject parseCompleteObject(String line) throws CommandLineParserException
   {
      return new CommandLineCompletionParser(getParser()).findCompleteObject(line);
   }
View Full Code Here

Examples of org.jboss.aesh.cl.CommandLineCompletionParser

   @Override
   public ParsedCompleteObject parseCompleteObject(String line) throws CommandLineParserException
   {
      // Should populate current inputs to determine which fields will appear
      populateInputs(line, true);
      return new CommandLineCompletionParser(fullCommandLineParser).findCompleteObject(line);
   }
View Full Code Here

Examples of org.jboss.aesh.cl.CommandLineCompletionParser

           }
           // complete options/arguments
           else if (completeOperation.getBuffer().startsWith(param.getName()))
           {
               ParsedCompleteObject completeObject = null;
               completeObject = new CommandLineCompletionParser(context.getParser())
                       .findCompleteObject(completeOperation.getBuffer());
               //logger.info("ParsedCompleteObject: " + completeObject);
               if (completeObject.doDisplayOptions())
               {
                   // we have a partial/full name
View Full Code Here

Examples of org.jboss.aesh.cl.CommandLineCompletionParser

        InputComponent inputOption = context.findInput("arguments"); // default for arguments

        //use the arguments completor as default if it has any
        if(inputOption != null)
        {
            argumentCompletion(completeOperation, new CommandLineCompletionParser(context.getParser())
                     .findCompleteObject(completeOperation.getBuffer()));
        }
        else {
            completeOperation.addCompletionCandidates(context.getParser().getParameters().get(0).getOptionLongNamesWithDash());
        }
View Full Code Here

Examples of org.jboss.aesh.cl.CommandLineCompletionParser

      else if (completeOperation.getBuffer().startsWith(param.getName()))
      {
         ParsedCompleteObject completeObject = null;
         try
         {
            completeObject = new CommandLineCompletionParser(context.getParser())
                     .findCompleteObject(completeOperation.getBuffer());
         }
         catch (CommandLineParserException e)
         {
            logger.info(e.getMessage());
View Full Code Here

Examples of org.jboss.aesh.cl.parser.CommandLineCompletionParser

                completeOperation.addCompletionCandidates(completedCommands);
            } else {
                try (CommandContainer commandContainer = getCommand(
                        Parser.findFirstWord(completeOperation.getBuffer()),
                        completeOperation.getBuffer())) {
                    CommandLineCompletionParser completionParser = commandContainer
                            .getParser().getCompletionParser();

                    ParsedCompleteObject completeObject = completionParser
                            .findCompleteObject(completeOperation.getBuffer(),
                                    completeOperation.getCursor());
                    completionParser.injectValuesAndComplete(completeObject,
                            commandContainer.getCommand(), completeOperation,
                            invocationProviders);
                } catch (CommandLineParserException e) {
                    logger.warning(e.getMessage());
                } catch (CommandNotFoundException ignored) {
View Full Code Here

Examples of org.jboss.aesh.cl.parser.CommandLineCompletionParser

                completeOperation.addCompletionCandidates(completedCommands);
            } else {
                try (CommandContainer commandContainer = getCommand(
                        Parser.findFirstWord(completeOperation.getBuffer()),
                        completeOperation.getBuffer())) {
                    CommandLineCompletionParser completionParser = commandContainer
                            .getParser().getCompletionParser();

                    ParsedCompleteObject completeObject = completionParser
                            .findCompleteObject(completeOperation.getBuffer(),
                                    completeOperation.getCursor());
                    completionParser.injectValuesAndComplete(completeObject,
                            commandContainer.getCommand(), completeOperation,
                            invocationProviders);
                } catch (CommandLineParserException e) {
                    logger.warning(e.getMessage());
                } catch (CommandNotFoundException ignored) {
View Full Code Here

Examples of org.jboss.aesh.cl.parser.CommandLineCompletionParser

            }
            else {
                try {
                    CommandContainer commandContainer =
                            getCommand( Parser.findFirstWord(completeOperation.getBuffer()), completeOperation.getBuffer());
                    CommandLineCompletionParser completionParser = commandContainer.getParser().getCompletionParser();

                    ParsedCompleteObject completeObject =
                            completionParser.findCompleteObject( completeOperation.getBuffer(), completeOperation.getCursor());
                    completionParser.injectValuesAndComplete(completeObject, commandContainer.getCommand(), completeOperation);
                }
                catch (CommandLineParserException e) {
                    logger.warning(e.getMessage());
                }
                catch (CommandNotFoundException ignored) {
View Full Code Here

Examples of org.jboss.aesh.cl.parser.CommandLineCompletionParser

            }
            else {
                try (CommandContainer commandContainer = getCommand(
                    Parser.findFirstWord(completeOperation.getBuffer()),
                    completeOperation.getBuffer())) {
                    CommandLineCompletionParser completionParser = commandContainer
                        .getParser().getCompletionParser();

                    ParsedCompleteObject completeObject = completionParser
                            .findCompleteObject(completeOperation.getBuffer(),
                                    completeOperation.getCursor());
                    completionParser.injectValuesAndComplete(completeObject,
                            commandContainer.getCommand(), completeOperation, invocationProviders);
                }
                catch (CommandLineParserException e) {
                    LOGGER.warning(e.getMessage());
                }
View Full Code Here

Examples of org.jboss.aesh.cl.parser.CommandLineCompletionParser

            }
            else {
                AeshLine aeshLine = Parser.findAllWords(completeOperation.getBuffer());
                try (CommandContainer commandContainer = getCommand( aeshLine, completeOperation.getBuffer())) {

                    CommandLineCompletionParser completionParser = commandContainer
                        .getParser().getCompletionParser();

                    ParsedCompleteObject completeObject = completionParser
                            .findCompleteObject(completeOperation.getBuffer(),
                                    completeOperation.getCursor());
                    completeObject.getCompletionParser().injectValuesAndComplete(completeObject, completeOperation, invocationProviders);
                }
                catch (CommandLineParserException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.