Package jline.console.completer

Examples of jline.console.completer.FileNameCompleter


      List<String> options = new ArrayList<String>();
      for (OptionHelp optionHelp : command.getOptionsHelp()) {
        options.addAll(optionHelp.getOptions());
      }
      AggregateCompleter arguementCompleters = new AggregateCompleter(
          new StringsCompleter(options), new FileNameCompleter());
      ArgumentCompleter argumentCompleter = new ArgumentCompleter(
          argumentDelimiter, arguementCompleters);
      argumentCompleter.setStrict(false);
      this.commandCompleters.put(command.getName(), argumentCompleter);
    }
View Full Code Here


   public FileResource<?> promptFile(final String message)
   {
      String path = "";
      while ((path == null) || path.trim().isEmpty())
      {
         path = promptWithCompleter(message, new FileNameCompleter());
      }

      path = Files.canonicalize(path);
      Resource<File> resource = getResourceFactory().getResourceFrom(new File(path));
View Full Code Here

   @Override
   public FileResource<?> promptFile(final String message, final FileResource<?> defaultIfEmpty)
   {
      FileResource<?> result = defaultIfEmpty;
      String path = promptWithCompleter(message, new FileNameCompleter());
      if ((path != null) && !path.trim().isEmpty())
      {
         path = Files.canonicalize(path);
         Resource<File> resource = getResourceFactory().getResourceFrom(new File(path));
View Full Code Here

   public FileResource<?> promptFile(final String message)
   {
      String path = "";
      while ((path == null) || path.trim().isEmpty())
      {
         path = promptWithCompleter(message, new FileNameCompleter());
      }

      path = Files.canonicalize(path);
      Resource<File> resource = getResourceFactory().getResourceFrom(new File(path));
View Full Code Here

   @Override
   public FileResource<?> promptFile(final String message, final FileResource<?> defaultIfEmpty)
   {
      FileResource<?> result = defaultIfEmpty;
      String path = promptWithCompleter(message, new FileNameCompleter());
      if ((path != null) && !path.trim().isEmpty())
      {
         path = Files.canonicalize(path);
         Resource<File> resource = getResourceFactory().getResourceFrom(new File(path));
View Full Code Here

   public FileResource<?> promptFile(final String message)
   {
      String path = "";
      while ((path == null) || path.trim().isEmpty())
      {
         path = promptWithCompleter(message, new FileNameCompleter());
      }

      path = Files.canonicalize(path);
      Resource<File> resource = getResourceFactory().getResourceFrom(new File(path));
View Full Code Here

   @Override
   public FileResource<?> promptFile(final String message, final FileResource<?> defaultIfEmpty)
   {
      FileResource<?> result = defaultIfEmpty;
      String path = promptWithCompleter(message, new FileNameCompleter());
      if ((path != null) && !path.trim().isEmpty())
      {
         path = Files.canonicalize(path);
         Resource<File> resource = getResourceFactory().getResourceFrom(new File(path));
View Full Code Here

      List<String> options = new ArrayList<String>();
      for (OptionHelp optionHelp : command.getOptionsHelp()) {
        options.addAll(optionHelp.getOptions());
      }
      AggregateCompleter arguementCompleters = new AggregateCompleter(
          new StringsCompleter(options), new FileNameCompleter());
      ArgumentCompleter argumentCompleter = new ArgumentCompleter(
          argumentDelimiter, arguementCompleters);
      argumentCompleter.setStrict(false);
      this.commandCompleters.put(command.getName(), argumentCompleter);
    }
View Full Code Here

    output.println("Successfully deployed application");
  }

  @Override
  public List<? extends Completer> getCompleters(String prefix) {
    return Lists.newArrayList(prefixCompleter(prefix, new FileNameCompleter()));
  }
View Full Code Here

    output.printf("Successfully deployed dataset module '%s'\n", moduleName);
  }

  @Override
  public List<? extends Completer> getCompleters(String prefix) {
    return Lists.newArrayList(prefixCompleter(prefix, new FileNameCompleter()));
  }
View Full Code Here

TOP

Related Classes of jline.console.completer.FileNameCompleter

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.