Package org.dmd.util.formatting

Examples of org.dmd.util.formatting.PrintfFormat


  }
 
  static public String getFormattedImportsStatic(){
    StringBuffer   sb     = new StringBuffer();
    int       padding = staticLongestImport+17;
    PrintfFormat   format   = new PrintfFormat("%-" + padding + "s");
   
    sb.append("// Generated from: " + DebugInfo.getWhereWeAreNow() + "\n");
    sb.append("// " + DebugInfo.getWhereWeWereCalledFrom() + "\n");
   
    for(ImportStatement i: staticImports.values()){
      sb.append(format.sprintf("import " + i.className + ";") + "// " + i.reason + "\n");     
    }
   
    return(sb.toString());
  }
View Full Code Here


  }
 
  public String getFormattedImports(){
    StringBuffer   sb     = new StringBuffer();
    int       padding = longestImport+17;
    PrintfFormat   format   = new PrintfFormat("%-" + padding + "s");
   
    sb.append("// Generated from: " + DebugInfo.getWhereWeAreNow() + "\n");
    sb.append("// " + DebugInfo.getWhereWeWereCalledFrom() + "\n");
   
    for(ImportStatement i: imports.values()){
      sb.append(format.sprintf("import " + i.className + ";") + "// " + i.reason + "\n");     
    }
   
    return(sb.toString());
  }
View Full Code Here

     
      Summarizer summarizer = new Summarizer(manager,outdir);
     
      summarizer.dumpTextSummary();
     
      PrintfFormat format = new PrintfFormat("%-" + longest + "s");
     
      for(SchemaDefinition sd: allSchemasByID.values()){
        int end = sd.getSchemaBaseID() + sd.getSchemaIDRange();
        System.out.println(format.sprintf(sd.getName()) + " " + sd.getSchemaBaseID() " - " + end);
       
        SchemaPage.dumpSchemaPage(outdir, manager, sd, summarizer);
      }
           
    } catch (ResultException e) {
View Full Code Here

     
      summarizer.dumpTextSummary();
     
      summarizer.dumpSchemaSummaryPage(outdir);
     
      PrintfFormat format = new PrintfFormat("%-" + longest + "s");
     
      for(SchemaDefinition sd: allSchemasByID.values()){
        int end = sd.getSchemaBaseID() + sd.getSchemaIDRange();
        System.out.println(format.sprintf(sd.getName()) + " " + sd.getSchemaBaseID() " - " + end);
       
        SchemaPage.dumpSchemaPage(outdir, manager, sd, summarizer);
      }
           
    } catch (ResultException e) {
View Full Code Here

  }
 
  public static String formatImports(TreeMap<String,String> map, int longest){
    int padding = longest+17;
    StringBuffer sb = new StringBuffer();
    PrintfFormat format = new PrintfFormat("%-" + padding + "s");
   
    sb.append("// Generated from: " + DebugInfo.getWhereWeAreNow() + "\n");
   
    Iterator<String> keys = map.keySet().iterator();
    while(keys.hasNext()){
      String key = keys.next();
      sb.append(format.sprintf("import " + key + ";") + "// " + map.get(key) + "\n");
    }
   
    sb.append("\n");
   
    return(sb.toString());
View Full Code Here

TOP

Related Classes of org.dmd.util.formatting.PrintfFormat

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.