openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r947917 - in /openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools: ant/Java2HTMLConverterTask.java converter/HTMLTokenRenderer.java converter/PlainTokenRenderer.java
Date Tue, 25 May 2010 05:21:05 GMT
Author: ppoddar
Date: Tue May 25 05:21:05 2010
New Revision: 947917

URL: http://svn.apache.org/viewvc?rev=947917&view=rev
Log:
Use correct printf format

Modified:
    openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/ant/Java2HTMLConverterTask.java
    openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/HTMLTokenRenderer.java
    openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/PlainTokenRenderer.java

Modified: openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/ant/Java2HTMLConverterTask.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/ant/Java2HTMLConverterTask.java?rev=947917&r1=947916&r2=947917&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/ant/Java2HTMLConverterTask.java
(original)
+++ openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/ant/Java2HTMLConverterTask.java
Tue May 25 05:21:05 2010
@@ -43,7 +43,7 @@ public class Java2HTMLConverterTask exte
     private boolean anchorLineNumber = false;
     private boolean addLineBreak     = true;
     private boolean addExplicitSpace = true;
-    private String lineNumberFormat  = "%%0%4d";
+    private String lineNumberFormat  = "%04d";
     private boolean verbose          = false;
     
     private List<Arg> _args = new ArrayList<Arg>();

Modified: openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/HTMLTokenRenderer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/HTMLTokenRenderer.java?rev=947917&r1=947916&r2=947917&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/HTMLTokenRenderer.java
(original)
+++ openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/HTMLTokenRenderer.java
Tue May 25 05:21:05 2010
@@ -67,7 +67,7 @@ public class HTMLTokenRenderer implement
     private boolean anchorLineNumber = false;
     private boolean addLineBreak     = true;
     private boolean addExplicitSpace = true;
-    private String lineNumberFormat  = "%%0%4d    ";
+    private String lineNumberFormat  = "%04d";
     
     /**
      * The CSS named styles.
@@ -100,7 +100,7 @@ public class HTMLTokenRenderer implement
     public String newLine(int line) {
         String result = "";
         if (showLineNumber) {
-            result = span(CSS_LINE_NO, fillWhiteSpace(String.format(lineNumberFormat, line)));
+            result = span(CSS_LINE_NO, String.format(lineNumberFormat, line) + fillWhiteSpace("
   "));
         }
         if (anchorLineNumber) {
             result = "<A name=" + quote("line."+line) + ">" + result + "</A>";

Modified: openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/PlainTokenRenderer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/PlainTokenRenderer.java?rev=947917&r1=947916&r2=947917&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/PlainTokenRenderer.java
(original)
+++ openjpa/trunk/openjpa-examples/openbooks/src/main/java/openbook/tools/converter/PlainTokenRenderer.java
Tue May 25 05:21:05 2010
@@ -29,7 +29,7 @@ import org.antlr.runtime.Token;
 public class PlainTokenRenderer implements TokenRenderer {
     private static final String EMPTY = "";
     private boolean showLineNumber;
-    private String lineNumberFormat  = "%%0%4d :";
+    private String lineNumberFormat  = "%04d :";
     
     public String endLine(int line) {
         return EMPTY;



Mime
View raw message