Examples of PrettyPrinter


Examples of anvil.util.PrettyPrinter

      if (printPretty) {
        ByteArrayOutputStream byteStream =(ByteArrayOutputStream)scriptOutput;
        InputSource inputSource =
          new StreamInputSource(new ByteArrayInputStream(byteStream.toByteArray()));
        Writer writer = new PrintWriter(finalOutput);
        PrettyPrinter prettyPrinter = new PrettyPrinter(inputSource, writer);
        prettyPrinter.print();
        writer.flush();

      }
    } finally {
      Log log = context.log();
View Full Code Here

Examples of avrora.core.isdl.gen.PrettyPrinter

     * @param args the arguments from the command line to the DBBC test program
     * @throws Exception
     */
    public void run(String[] args) throws Exception {
        Printer printer = Printer.STDOUT;
        PrettyPrinter pp = new PrettyPrinter(printer);
        Program p = Main.loadProgram(args);
        DBBC dbbc = new DBBC(p, options);

        ControlFlowGraph cfg = p.getCFG();
        Iterator i = cfg.getSortedBlockIterator();
        while (i.hasNext()) {
            ControlFlowGraph.Block b = (ControlFlowGraph.Block)i.next();
            printer.startblock("block starting at: " + StringUtil.addrToString(b.getAddress()));
            DBBC.CodeBlock code = dbbc.getCodeBlock(b.getAddress());
            if (code != null) {
                printer.println("// worst case execution time = " + code.wcet + " cycles");
                pp.visitStmtList(code.stmts);
            } else {
                printer.println("// no code generated for this block");
            }
            printer.endblock();
        }
View Full Code Here

Examples of com.fasterxml.jackson.core.PrettyPrinter

        assertSame(orig, back);
    }

    public void testPrettyPrinter() throws Exception
    {
        PrettyPrinter p = new DefaultPrettyPrinter();
        byte[] stuff = jdkSerialize(p);
        PrettyPrinter back = jdkDeserialize(stuff);
        // what should we test?
        assertNotNull(back);
    }
View Full Code Here

Examples of com.ibm.icu.dev.test.util.PrettyPrinter

      "[:linebreak=AL:]",
  };
 
  public void TestPrettyPrinting() {
    try{
      PrettyPrinter pp = new PrettyPrinter();
     
      int i = 0;
      for (; i < prettyData.length; ++i) {
        UnicodeSet test = new UnicodeSet(prettyData[i]);
        checkPrettySet(pp, i, test);
View Full Code Here

Examples of flex.messaging.util.PrettyPrinter

    {
        if (targets.size() > 0 && (!verifyLevel || (level >= Log.getTargetLevel())))
        {
            if (parameters != null)
            {
                PrettyPrinter prettyPrinter = Log.getPrettyPrinter();

                // replace all of the parameters in the msg string
                for(int i = 0; i < parameters.length; i++)
                {
                    String replacement = parameters[i] != null ? prettyPrinter.prettify(parameters[i]) : "null";

                    //this guy runs into problems if the replacement has a \ or $ in it
                    //message = message.replaceAll("\\{" + i + "\\}", replacement);
                    message = StringUtils.substitute(message, "{" + i + "}", replacement);
                }
View Full Code Here

Examples of flex.messaging.util.PrettyPrinter

    {
        if (targets.size() > 0 && (!verifyLevel || (level >= Log.getTargetLevel())))
        {
            if (parameters != null)
            {
                PrettyPrinter prettyPrinter = Log.getPrettyPrinter();
               
                // replace all of the parameters in the msg string
                for(int i = 0; i < parameters.length; i++)
                {
                    String replacement = parameters[i] != null ? prettyPrinter.prettify(parameters[i]) : "null";

                    //this guy runs into problems if the replacement has a \ or $ in it
                    //message = message.replaceAll("\\{" + i + "\\}", replacement);
                    message = StringUtils.substitute(message, "{" + i + "}", replacement);
                }
View Full Code Here

Examples of hu.jokeman.xparser.gui.viewer.PrettyPrinter

    private PrettyPrinter _pp;

    public TreePrinter (OutputStream os)  {
        super ();
        _pp = new PrettyPrinter (os);
    }
View Full Code Here

Examples of hu.jokeman.xparser.gui.viewer.PrettyPrinter

    private PrettyPrinter _pp;

    public SyntaxHighlighter (OutputStream anOutputStream)  {
        super ();
        _pp = new PrettyPrinter (anOutputStream);
    }
View Full Code Here

Examples of org.apache.jackrabbit.test.config.util.PrettyPrinter

  }
   
  public void testReadDynamicConfigFromXml() throws Exception {
    RepositoryConf conf = getRepositoryConf();
    System.out.println(">>>>>>>>>> Config read from 'applications/test/repository.xml'");
    conf.print(new PrettyPrinter(System.out));
    System.out.println();
  }
View Full Code Here

Examples of org.apache.jackrabbit.test.config.util.PrettyPrinter

  }
 
  public void testStartRepoWithDefaultConfig() throws Exception {
    RepositoryConf conf = new RepositoryConf();
    System.out.println(">>>>>>>>>> Default config:");
    conf.print(new PrettyPrinter(System.out));
    System.out.println();
   
    RepositoryConfig config = conf.createConfig("applications/test2");
    config.init();
    TransientRepository repo = new TransientRepository(config);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.