Package jline

Examples of jline.NullCompletor


    }

    public static Completor extractCompletor(Map<String, CommandExecutable> cmdTable) {
        SimpleCompletor cmdCompletor = new SimpleCompletor(getAllCommands(cmdTable));
        SimpleCompletor argCompletor = new SimpleCompletor(getAllArguments(cmdTable));
        return new ArgumentCompletor(new Completor [] { cmdCompletor, argCompletor, new NullCompletor() });
    }
View Full Code Here


    public TShellCompletor(Shell shell) {
        super((Completor)null);
        this.shell = shell;
        completors = new HashMap<String, Completor[]>();
        completors.put("help", new Completor[]{commandCompletor, commandCompletor, new NullCompletor()});   
        completors.put("install", new Completor[]{commandCompletor, new InstallCompletor(shell)});   
        completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("load", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("run", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("save", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("status", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("stop", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
    }
View Full Code Here

        return helpText.toString();
    }

    @Override
    public Completor[] getCompletors() {
        return new Completor[]{new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()};
    }
View Full Code Here

        return helpText.toString();
    }

    @Override
    public Completor[] getCompletors() {
        return new Completor[]{new ICURICompletor(shell), new FileNameCompletor(), new NullCompletor()};
    }
View Full Code Here

        return helpText.toString();
    }

    @Override
    public Completor[] getCompletors() {
        return new Completor[]{new ServiceCompletor(shell), new ServiceOperationCompletor(shell), new NullCompletor()};
    }
View Full Code Here

        return helpText.toString();
    }

    @Override
    public Completor[] getCompletors() {
        return new Completor[]{new ICURICompletor(shell), new CompositeURICompletor(shell), new RemoteNodeCompletor(shell), new NullCompletor()};
    }
View Full Code Here

        return helpText.toString();
    }

    @Override
    public Completor[] getCompletors() {
        return new Completor[]{new ICURICompletor(shell), new NullCompletor()};
    }
View Full Code Here

        super((Completor)null);
        this.shell = shell;
        this.commandCompletor = new SimpleCompletor(shell.getCommandNames());
       
        completors = new HashMap<String, Completor[]>();
        completors.put("help", new Completor[]{commandCompletor, commandCompletor, new NullCompletor()});   
        completors.put("install", new Completor[]{commandCompletor, new InstallCompletor(shell)});   
        completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("invoke", new Completor[]{commandCompletor, new ServiceCompletor(shell), new ServiceOperationCompletor(shell), new NullCompletor()});   
        completors.put("load", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("run", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("save", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new RemoteNodeCompletor(shell), new NullCompletor()});   
        completors.put("started", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("stop", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
       
        for (Command c : shell.getCommands().values()) {
            List<Completor> compleors = new ArrayList<Completor>();
            compleors.add(commandCompletor);
            compleors.addAll(Arrays.asList(c.getCompletors()));
View Full Code Here

    public TShellCompletor(Shell shell) {
        super((Completor)null);
        this.shell = shell;
        completors = new HashMap<String, Completor[]>();
        completors.put("help", new Completor[]{commandCompletor, commandCompletor, new NullCompletor()});   
        completors.put("install", new Completor[]{commandCompletor, new InstallCompletor(shell)});   
        completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("invoke", new Completor[]{commandCompletor, new ServiceCompletor(shell), new ServiceOperationCompletor(shell), new NullCompletor()});   
        completors.put("load", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(shell), new NullCompletor()});   
        completors.put("run", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("save", new Completor[]{commandCompletor, new FileNameCompletor(), new NullCompletor()});   
        completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("started", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
        completors.put("stop", new Completor[]{commandCompletor, new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()});   
    }
View Full Code Here

    this.beeLine = beeLine;
    name = names[0];
    this.names = names;
    this.helpText = helpText;
    if (completors == null || completors.length == 0) {
      parameterCompletors = new Completor[] { new NullCompletor() };
    } else {
      List<Completor> c = new LinkedList<Completor>(Arrays.asList(completors));
      c.add(new NullCompletor());
      parameterCompletors = c.toArray(new Completor[0]);
    }
  }
View Full Code Here

TOP

Related Classes of jline.NullCompletor

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.