Package com.fathomdb.cli.commands

Examples of com.fathomdb.cli.commands.Ansi


    return new SimpleAutoCompleter(new AutoCompleteItemType());
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);

    Iterable<UntypedItem> items = (Iterable<UntypedItem>) o;
    for (UntypedItem item : items) {
      UntypedItemFormatter.formatItem(item, ansi, false);
    }

    ansi.reset();
  }
View Full Code Here


    } else {
      super.formatRaw(o, writer);
      return;
    }

    Ansi ansi = new Ansi(writer);

    ansi.print(data);
    ansi.println();

    ansi.reset();
  }
View Full Code Here

    return client.listRoots();
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);

    Iterable<UntypedItem> items = (Iterable<UntypedItem>) o;
    for (UntypedItem item : items) {
      UntypedItemFormatter.formatItem(item, ansi, true);
    }

    ansi.reset();
  }
View Full Code Here

      } catch (IOException e) {
        throw new CliException("Error formatting for output", e);
      }
    }

    Ansi ansi = new Ansi(writer);

    for (JobData job : jobs.getJobs()) {
      // JobState state = job.state;
      // if (state != null) {
      // ansi.setColorBlue();
      // switch (job.state) {
      // case FAILED:
      // ansi.setColorRed();
      // break;
      //
      // case SUCCESS:
      // ansi.setColorGreen();
      // break;
      //
      // case RUNNING:
      // ansi.setColorBlue();
      // break;
      //
      // default:
      // ansi.setColorBlue();
      // break;
      // }
      // }

      writer.println(job.key);
    }

    ansi.reset();
  }
View Full Code Here

      } catch (IOException e) {
        throw new CliException("Error formatting for output", e);
      }
    }

    Ansi ansi = new Ansi(writer);

    for (JobExecutionData job : jobs) {
      JobState state = job.state;
      if (state != null) {
        switch (job.state) {
        case FAILED:
          ansi.setColorRed();
          break;

        case SUCCESS:
          ansi.setColorGreen();
          break;

        case RUNNING:
          ansi.setColorBlue();
          break;

        default:
          ansi.setColorBlue();
          break;
        }
      } else {
        ansi.setColorBlue();
      }

      writer.println(job.getJobId() + "/" + job.executionId);
    }

    ansi.reset();
  }
View Full Code Here

  int depth;
  String indent;

  public JobLogPrinter(PrintWriter writer) {
    this.writer = writer;
    this.ansi = new Ansi(writer);
  }
View Full Code Here

    return client.listChildren(key, includeDeleted);
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);

    Iterable<UntypedItem> items = (Iterable<UntypedItem>) o;
    for (UntypedItem item : items) {
      UntypedItemFormatter.formatItem(item, ansi, true);
    }

    ansi.reset();
  }
View Full Code Here

TOP

Related Classes of com.fathomdb.cli.commands.Ansi

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.