Package org.codehaus.groovy.tools.shell

Examples of org.codehaus.groovy.tools.shell.Command


  @SuppressWarnings({ "rawtypes", "unchecked" })
  protected List createCompletors() {
    SimpleCompletor completor = new SimpleCompletor();
    Iterator<Command> iterator = registry.iterator();
    while (iterator.hasNext()) {
      Command command = iterator.next();
      if (command.getHidden()) {
        continue;
      }
           
      completor.add(command.getName());
    }

    List completors = new LinkedList();
    completors.add(completor);
    return completors;
View Full Code Here


    CommandRegistry registry = shell.getRegistry();
    @SuppressWarnings("unchecked")
    Iterator<Command> iterator = registry.iterator();
    while (iterator.hasNext()) {
      Command command = iterator.next();
      if (!commandsToKeep.contains(command.getName())) {
        iterator.remove();
        // remove from "names" set to avoid duplicate error.
        registry.remove(command);
      }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.tools.shell.Command

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.