Examples of PrintfFormat


Examples of org.dmd.util.formatting.PrintfFormat

    }
   
    rules = sd.getParsedRules();
    if (rules != null){
      out.write("\n");
      PrintfFormat pf = new PrintfFormat("%-28s");
      out.write("        // Generated from: " + DebugInfo.getWhereWeAreNow() + "\n");
      out.write("        try{\n");
     
      while(rules.hasNext()){
        DmcUncheckedObject ruleData = rules.next();
View Full Code Here

Examples of org.dmd.util.formatting.PrintfFormat

      }
    }
   
    if ((rules != null) && (rules.size() > 0)){
      out.write("\n");
      PrintfFormat pf = new PrintfFormat("%-28s");
      out.write("        try{\n");
     
      for(DmcUncheckedObject ruleData: rules){
       
       
View Full Code Here

Examples of org.dmd.util.formatting.PrintfFormat

    int longest = finder.getLongestName() + 4;
   
    docGenerator = new DmsHtmlDocGenerator();
   
    String f = "%-" + longest + "s";
    format = new PrintfFormat(f);
   
    classifier = new Classifier();
  }
View Full Code Here

Examples of org.dmd.util.formatting.PrintfFormat

    parser = new DmgParser(baseWithDMGSchema, configFinder);
   
    codeGenerator = new DmoGenerator(System.out);
   
    String f = "%-" + configFinder.getLongestName() + "s";
    format = new PrintfFormat(f);
   
    fileHeader = "";
  }
View Full Code Here

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

Examples of org.dmd.util.formatting.PrintfFormat

  }
 
  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

Examples of org.dmd.util.formatting.PrintfFormat

     
      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

Examples of org.dmd.util.formatting.PrintfFormat

     
      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

Examples of org.dmd.util.formatting.PrintfFormat

  }
 
  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

Examples of org.hyperic.sigar.util.PrintfFormat

        ShellCommandHandler handler;
        PrintStream out = this.getOutStream();
        int useArgs;

        if (args.length == 0) {
            PrintfFormat fmt = new PrintfFormat("\t%-14s - %s");
            Object[] fArgs = new Object[2];
            ArrayList cmdNamesList = new ArrayList();
            String[] cmdNames;
            Iterator i;

            i = itsShell.getCommandNameIterator();
            while (i.hasNext()) {
                cmdNamesList.add(i.next());
            }
           
            cmdNames = (String[])cmdNamesList.toArray(new String[0]);
            Arrays.sort(cmdNames);
           
           
            out.println("Available commands:");

            for (int j=0; j<cmdNames.length; j++) {
                handler = itsShell.getHandler(cmdNames[j]);
                fArgs[0] = cmdNames[j];
                fArgs[1] = handler.getUsageShort();
                out.println(fmt.sprintf(fArgs));
            }

            return;
        }
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.