Package org.jboss.aesh.cl.parser

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


                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

            }
            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

            }
            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

            }
            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

            }
            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

      }

      @Override
      public CommandLineCompletionParser getCompletionParser()
      {
         return new CommandLineCompletionParser()
         {
            @Override
            @SuppressWarnings("rawtypes")
            public void injectValuesAndComplete(ParsedCompleteObject completeObject, Command originalCommand,
                     CompleteOperation completeOperation, InvocationProviders invocationProviders)
View Full Code Here

            }
            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

      }

      @Override
      public CommandLineCompletionParser getCompletionParser()
      {
         return new CommandLineCompletionParser()
         {
            @Override
            @SuppressWarnings("rawtypes")
            public void injectValuesAndComplete(ParsedCompleteObject completeObject, Command originalCommand,
                     CompleteOperation completeOperation, InvocationProviders invocationProviders)
View Full Code Here

                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

TOP

Related Classes of org.jboss.aesh.cl.parser.CommandLineCompletionParser

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.