Package jline

Examples of jline.ConsoleReader


      this.done = false;
      this.cmd = null;
      this.cmdIndex = 0;
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, new OutputStreamWriter(output));
      this.shell = new Shell(reader, new PrintWriter(output));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
          throw new IOException("mock shell config error");
View Full Code Here


    private ConsoleReader consoleReader;
    private List<Completor> completors;

    public JLineConsoleInterface() {
        try {
            this.consoleReader = new ConsoleReader();
        } catch (IOException e) {
            throw new Error(e);
        }
    }
View Full Code Here

  }

  private void cloneJob(Long jobId) throws IOException {
    printlnResource(Constants.RES_CLONE_CLONING_JOB, jobId);

    ConsoleReader reader = new ConsoleReader();

    MJob job = client.getJob(jobId);
    job.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);

    ResourceBundle connectorBundle = client.getResourceBundle(job.getConnectorId());
View Full Code Here

  }

  private void cloneConnection(Long connectionId) throws IOException {
    printlnResource(Constants.RES_CLONE_CLONING_CONN, connectionId);

    ConsoleReader reader = new ConsoleReader();

    MConnection connection = client.getConnection(connectionId);
    // Remove persistent id as we're making a clone
    connection.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);
View Full Code Here

  }

  private void createConnection(long connectorId) throws IOException {
    printlnResource(Constants.RES_CREATE_CREATING_CONN, connectorId);

    ConsoleReader reader = new ConsoleReader();

    MConnection connection = client.newConnection(connectorId);

    ResourceBundle connectorBundle = client.getResourceBundle(connectorId);
    ResourceBundle frameworkBundle = client.getFrameworkResourceBundle();
View Full Code Here

  }

  private void updateJob(Long jobId) throws IOException {
    printlnResource(Constants.RES_UPDATE_UPDATING_JOB, jobId);

    ConsoleReader reader = new ConsoleReader();

    MJob job = client.getJob(jobId);

    ResourceBundle connectorBundle = client.getResourceBundle(job.getConnectorId());
    ResourceBundle frameworkBundle = client.getFrameworkResourceBundle();
View Full Code Here

  }

  private void createJob(Long connectionId, String type) throws IOException {
    printlnResource(Constants.RES_CREATE_CREATING_JOB, connectionId);

    ConsoleReader reader = new ConsoleReader();
    MJob job = client.newJob(connectionId, MJob.Type.valueOf(type.toUpperCase()));

    ResourceBundle connectorBundle = client.getResourceBundle(job.getConnectorId());
    ResourceBundle frameworkBundle = client.getFrameworkResourceBundle();
View Full Code Here

  }

  private void updateConnection(Long connectionId) throws IOException {
    printlnResource(Constants.RES_UPDATE_UPDATING_CONN, connectionId);

    ConsoleReader reader = new ConsoleReader();

    MConnection connection = client.getConnection(connectionId);

    ResourceBundle connectorBundle = client.getResourceBundle(connection.getConnectorId());
    ResourceBundle frameworkBundle = client.getFrameworkResourceBundle();
View Full Code Here

     *
     * @param prompt The prompt to request password
     * @return Password
     */
    private String readPassword(String prompt) {
        ConsoleReader reader;
        try {
            reader = new ConsoleReader();
            Character mask = 0;
            return reader.readLine(prompt, mask);
        } catch (IOException ignored) {
        }
        return null;
    }
View Full Code Here

        this.out = out;
        this.err = err;

        // Initialize the JLine console input reader
        Writer writer = new OutputStreamWriter(out);
        reader = new ConsoleReader(in, writer);
        reader.setDefaultPrompt("groovy> ");

        // Add some completors to fancy things up
        reader.addCompletor(new CommandNameCompletor());
View Full Code Here

TOP

Related Classes of jline.ConsoleReader

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.