maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r634855 - in /maven/doxia/doxia/trunk: doxia-core/src/main/java/org/apache/maven/doxia/parser/ doxia-core/src/main/java/org/apache/maven/doxia/sink/ doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/ doxia-modul...
Date Fri, 07 Mar 2008 22:52:38 GMT
Author: ltheussl
Date: Fri Mar  7 14:52:35 2008
New Revision: 634855

URL: http://svn.apache.org/viewvc?rev=634855&view=rev
Log:
[DOXIA-144] Review signature methods, minor clean-ups

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
Fri Mar  7 14:52:35 2008
@@ -44,10 +44,10 @@
     implements Parser
 {
     /** Indicates that a second parsing is required. */
-    protected boolean secondParsing = false;
+    private boolean secondParsing = false;
 
     /** @plexus.requirement */
-    protected MacroManager macroManager;
+    private MacroManager macroManager;
 
     /** Log instance. */
     private Log log;
@@ -72,7 +72,7 @@
     public void executeMacro( String macroId, MacroRequest request, Sink sink )
         throws MacroExecutionException, MacroNotFoundException
     {
-        Macro macro = macroManager.getMacro( macroId );
+        Macro macro = getMacroManager().getMacro( macroId );
 
         macro.enableLogging( getLog() );
 
@@ -121,6 +121,16 @@
         this.secondParsing = second;
     }
 
+    /**
+     * Indicates if we are currently parsing a second time.
+     *
+     * @return true if we are currently parsing a second time.
+     */
+    protected boolean isSecondParsing()
+    {
+        return secondParsing;
+    }
+
     /** {@inheritDoc} */
     public void enableLogging( Log log )
     {
@@ -141,5 +151,15 @@
         }
 
         return log;
+    }
+
+    /**
+     * Gets the current {@link MacroManager}.
+     *
+     * @return The current {@link MacroManager}.
+     */
+    protected MacroManager getMacroManager()
+    {
+        return macroManager;
     }
 }

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java
Fri Mar  7 14:52:35 2008
@@ -80,7 +80,7 @@
      * @param sink the sink to receive the events.
      * @return True if the event has been handled by this method, i.e. the tag was recognized,
false otherwise.
      */
-    public boolean baseStartTag( XmlPullParser parser, Sink sink )
+    protected boolean baseStartTag( XmlPullParser parser, Sink sink )
     {
         boolean visited = true;
 
@@ -379,7 +379,7 @@
      * @param sink the sink to receive the events.
      * @return True if the event has been handled by this method, false otherwise.
      */
-    public boolean baseEndTag( XmlPullParser parser, Sink sink )
+    protected boolean baseEndTag( XmlPullParser parser, Sink sink )
     {
         boolean visited = true;
 

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java
Fri Mar  7 14:52:35 2008
@@ -1132,7 +1132,7 @@
      * @see javax.swing.text.html.HTML.Tag#TH
      * @see javax.swing.text.html.HTML.Tag#TD
      */
-    public void tableCell_( boolean headerRow )
+    private void tableCell_( boolean headerRow )
     {
         Tag t = ( headerRow ? Tag.TH : Tag.TD );
 
@@ -1576,29 +1576,19 @@
      * @return the text escaped, "" if null String input
      * @see org.apache.maven.doxia.util.HtmlTools#escapeHTML(String)
      */
-    public static String escapeHTML( String text )
+    protected static String escapeHTML( String text )
     {
         return HtmlTools.escapeHTML( text );
     }
 
     /**
-     * @param text
-     * @return a fragment encoded
-     * @see #encodeURL(String)
-     */
-    public static String encodeFragment( String text )
-    {
-        return encodeURL( StructureSinkUtils.linkToKey( text ) );
-    }
-
-    /**
      * Forward to HtmlTools.encodeURL( text ).
      *
      * @param text the String to encode, may be null.
      * @return the text encoded, null if null String input.
      * @see org.apache.maven.doxia.util.HtmlTools#encodeURL(String)
      */
-    public static String encodeURL( String text )
+    protected static String encodeURL( String text )
     {
         return HtmlTools.encodeURL( text );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
Fri Mar  7 14:52:35 2008
@@ -92,7 +92,7 @@
     private static final int HORIZONTAL_RULE = 13;
 
     /** Page break event id */
-    private static final int PAGE_BREAK = 14;
+    private static final int PG_BREAK = 14;
 
     /** List break event id */
     private static final int LIST_BREAK = 15;
@@ -106,7 +106,7 @@
     /** String representations of event ids */
     private static final String TYPE_NAMES[] = {"TITLE", "SECTION1", "SECTION2", "SECTION3",
"SECTION4", "SECTION5",
         "PARAGRAPH", "VERBATIM", "FIGURE", "TABLE", "LIST_ITEM", "NUMBERED_LIST_ITEM", "DEFINITION_LIST_ITEM",
-        "HORIZONTAL_RULE", "PAGE_BREAK", "LIST_BREAK", "MACRO", "COMMENT_BLOCK"};
+        "HORIZONTAL_RULE", "PG_BREAK", "LIST_BREAK", "MACRO", "COMMENT_BLOCK"};
 
     /** An array of spaces. */
     private static final char SPACES[] = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '
', ' ', ' ', ' ', ' ', ' ',
@@ -147,7 +147,9 @@
     // Public methods
     // ----------------------------------------------------------------------
 
-    /** {@inheritDoc} */
+    /** {@inheritDoc}
+     * @throws org.apache.maven.doxia.module.apt.AptParseException 
+     */
     public void parse( Reader source,
                        Sink sink )
         throws AptParseException
@@ -357,7 +359,7 @@
                 case FIGURE:
                 case TABLE:
                 case HORIZONTAL_RULE:
-                case PAGE_BREAK:
+                case PG_BREAK:
                 case MACRO:
                 case COMMENT_BLOCK:
                     block.traverse();
@@ -431,7 +433,7 @@
                 case FIGURE:
                 case TABLE:
                 case HORIZONTAL_RULE:
-                case PAGE_BREAK:
+                case PG_BREAK:
                     block.traverse();
                     nextBlock();
                     break;
@@ -526,7 +528,7 @@
                 case FIGURE:
                 case TABLE:
                 case HORIZONTAL_RULE:
-                case PAGE_BREAK:
+                case PG_BREAK:
                     block.traverse();
                     nextBlock();
                     break;
@@ -621,7 +623,7 @@
                 case FIGURE:
                 case TABLE:
                 case HORIZONTAL_RULE:
-                case PAGE_BREAK:
+                case PG_BREAK:
                     block.traverse();
                     nextBlock();
                     break;
@@ -863,7 +865,7 @@
                     block = new HorizontalRule( indent, line );
                 }
                 break;
-            case AptMarkup.PAGE_BREAK:
+            case PAGE_BREAK:
                 if ( indent == 0 )
                 {
                     block = new PageBreak( indent, line );
@@ -1452,7 +1454,7 @@
     {
         final StringBuffer buffer = new StringBuffer( end - begin );
 
-        Sink sink = new SinkAdapter()
+        Sink linkSink = new SinkAdapter()
         {
             public void lineBreak()
             {
@@ -1469,7 +1471,7 @@
                 buffer.append( text );
             }
         };
-        doTraverseText( text, begin, end, sink );
+        doTraverseText( text, begin, end, linkSink );
 
         return buffer.toString().trim();
     }
@@ -2659,7 +2661,7 @@
                           String firstLine )
             throws AptParseException
         {
-            super( PAGE_BREAK, indent );
+            super( PG_BREAK, indent );
         }
 
         /** {@inheritDoc} */
@@ -2694,7 +2696,7 @@
         public void traverse()
             throws AptParseException
         {
-            if ( secondParsing )
+            if ( isSecondParsing() )
             {
                 return;
             }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java
Fri Mar  7 14:52:35 2008
@@ -23,7 +23,6 @@
 import java.io.Writer;
 import java.util.Stack;
 
-import org.apache.maven.doxia.util.HtmlTools;
 import org.apache.maven.doxia.sink.AbstractTextSink;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -607,8 +606,8 @@
     /** Construct a table row. */
     private void buildRowLine()
     {
-        StringBuffer rowLine = new StringBuffer();
-        rowLine.append( TABLE_ROW_START_MARKUP );
+        StringBuffer rLine = new StringBuffer();
+        rLine.append( TABLE_ROW_START_MARKUP );
 
         for ( int i = 0; i < cellCount; i++ )
         {
@@ -617,23 +616,23 @@
                 switch ( cellJustif[i] )
                 {
                 case 1:
-                    rowLine.append( TABLE_COL_LEFT_ALIGNED_MARKUP );
+                    rLine.append( TABLE_COL_LEFT_ALIGNED_MARKUP );
                     break;
                 case 2:
-                    rowLine.append( TABLE_COL_RIGHT_ALIGNED_MARKUP );
+                    rLine.append( TABLE_COL_RIGHT_ALIGNED_MARKUP );
                     break;
                 default:
-                    rowLine.append( TABLE_COL_CENTERED_ALIGNED_MARKUP );
+                    rLine.append( TABLE_COL_CENTERED_ALIGNED_MARKUP );
                 }
             }
             else
             {
-                rowLine.append( TABLE_COL_CENTERED_ALIGNED_MARKUP );
+                rLine.append( TABLE_COL_CENTERED_ALIGNED_MARKUP );
             }
         }
-        rowLine.append( EOL );
+        rLine.append( EOL );
 
-        this.rowLine = rowLine.toString();
+        this.rowLine = rLine.toString();
     }
 
     /** {@inheritDoc} */
@@ -904,30 +903,6 @@
     protected void verbatimContent( String text )
     {
         write( escapeAPT( text ) );
-    }
-
-    /**
-     * Forward to HtmlTools.encodeFragment( text ).
-     *
-     * @param text the String to fragment, may be null.
-     * @return the fragmented text, null if null String input.
-     * @see org.apache.maven.doxia.util.HtmlTools#encodeURL(String).
-     */
-    public static String encodeFragment( String text )
-    {
-        return HtmlTools.encodeFragment( text );
-    }
-
-    /**
-     * Forward to HtmlTools.encodeURL( text ).
-     *
-     * @param text the String to encode, may be null.
-     * @return the text encoded, null if null String input.
-     * @see org.apache.maven.doxia.util.HtmlTools#encodeURL(String).
-     */
-    public static String encodeURL( String text )
-    {
-        return HtmlTools.encodeURL( text );
     }
 
     /** {@inheritDoc} */

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
Fri Mar  7 14:52:35 2008
@@ -72,7 +72,7 @@
                 listParser, tableParser, paragraphParser };
     }
 
-    public List parse( ByLineSource source )
+    private List parse( ByLineSource source )
         throws ParseException
     {
         List blocks = new ArrayList();
@@ -114,16 +114,16 @@
     }
 
     /** {@inheritDoc} */
-    public synchronized void parse( Reader reader, Sink sink )
+    public synchronized void parse( Reader source, Sink sink )
         throws ParseException
     {
         List blocks;
 
-        ByLineSource source = new ByLineReaderSource( reader );
+        ByLineSource src = new ByLineReaderSource( source );
 
         try
         {
-            blocks = parse( source );
+            blocks = parse( src  );
         }
         catch ( ParseException e )
         {
@@ -131,7 +131,7 @@
         }
         catch ( Exception e )
         {
-            throw new ParseException( e, source.getName(), source.getLineNumber() );
+            throw new ParseException( e, src.getName(), src.getLineNumber() );
         }
 
         sink.head();

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
Fri Mar  7 14:52:35 2008
@@ -21,7 +21,6 @@
 
 import java.io.IOException;
 import java.io.Reader;
-import java.io.StringReader;
 import java.util.Iterator;
 
 import javax.swing.text.html.HTML.Attribute;
@@ -34,12 +33,10 @@
 import org.apache.maven.doxia.parser.AbstractXmlParser;
 import org.apache.maven.doxia.parser.ParseException;
 import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.parser.XhtmlBaseParser;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.util.HtmlTools;
 
 import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.pull.MXParser;
 import org.codehaus.plexus.util.xml.pull.XmlPullParser;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
@@ -76,11 +73,11 @@
 
 
     /** {@inheritDoc} */
-    public void parse( Reader reader, Sink sink )
+    public void parse( Reader source, Sink sink )
         throws ParseException
     {
         // this populates faqs
-        super.parse( reader, sink );
+        super.parse( source, sink );
 
         try
         {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
Fri Mar  7 14:52:35 2008
@@ -541,9 +541,9 @@
     }
 
     /** {@inheritDoc} */
-    public void figureGraphics( String s )
+    public void figureGraphics( String name )
     {
-        writeln( " src=\"" + s + "\"/>" );
+        writeln( " src=\"" + name + "\"/>" );
     }
 
     /** {@inheritDoc} */

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java
Fri Mar  7 14:52:35 2008
@@ -785,7 +785,7 @@
      *
      * @param header True if this is a header cell.
      */
-    public void tableCell( boolean header )
+    private void tableCell( boolean header )
     {
         lastCellWasHeader = header;
         
@@ -816,7 +816,7 @@
      *
      * @param header True if this is a header cell.
      */
-    public void tableCell_( boolean header )
+    private void tableCell_( boolean header )
     {
         markup( "\\end{pcell}" );
         ++cellCount;
@@ -1160,11 +1160,9 @@
      */
     protected String defaultPreamble()
     {
-        String preamble = "";
-
         try
         {
-            preamble = IOUtil.toString( getDefaultPreamble() );
+            return IOUtil.toString( getDefaultPreamble() );
         }
         catch ( IOException ioe )
         {
@@ -1174,8 +1172,6 @@
 
             return "";
         }
-
-        return preamble;
     }
 
 }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.java
Fri Mar  7 14:52:35 2008
@@ -42,7 +42,6 @@
 public class RtfSink
     extends SinkAdapter
 {
-    private static final String EOL = System.getProperty( "line.separator" );
 
     public static final double DEFAULT_PAPER_WIDTH = 21.;   /*cm*/
 
@@ -369,9 +368,9 @@
 
     public void title()
     {
-        Paragraph paragraph = new Paragraph( STYLE_BOLD, fontSize + 6 );
-        paragraph.justification = Parser.JUSTIFY_CENTER;
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph( STYLE_BOLD, fontSize + 6 );
+        p.justification = Parser.JUSTIFY_CENTER;
+        beginParagraph( p );
         emptyHeader = false;
     }
 
@@ -382,9 +381,9 @@
 
     public void author()
     {
-        Paragraph paragraph = new Paragraph( STYLE_ROMAN, fontSize + 2 );
-        paragraph.justification = Parser.JUSTIFY_CENTER;
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph( STYLE_ROMAN, fontSize + 2 );
+        p.justification = Parser.JUSTIFY_CENTER;
+        beginParagraph( p );
         emptyHeader = false;
     }
 
@@ -395,9 +394,9 @@
 
     public void date()
     {
-        Paragraph paragraph = new Paragraph( STYLE_ROMAN, fontSize );
-        paragraph.justification = Parser.JUSTIFY_CENTER;
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph( STYLE_ROMAN, fontSize );
+        p.justification = Parser.JUSTIFY_CENTER;
+        beginParagraph( p );
         emptyHeader = false;
     }
 
@@ -463,7 +462,7 @@
 
     public void sectionTitle()
     {
-        int style = STYLE_BOLD;
+        int stl = STYLE_BOLD;
         int size = fontSize;
 
         switch ( sectionLevel )
@@ -480,14 +479,14 @@
             case 4:
                 break;
             case 5:
-                style = STYLE_ROMAN;
+                stl = STYLE_ROMAN;
                 break;
         }
 
-        Paragraph paragraph = new Paragraph( style, size );
-        paragraph.style = styleNumber( sectionLevel );
+        Paragraph p = new Paragraph( stl, size );
+        p.style = styleNumber( sectionLevel );
 
-        beginParagraph( paragraph );
+        beginParagraph( p );
     }
 
     public void sectionTitle_()
@@ -514,10 +513,10 @@
 
     public void listItem()
     {
-        Paragraph paragraph = new Paragraph();
-        paragraph.leftIndent = indentation.get() + listItemIndent;
-        paragraph.firstLineIndent = ( -listItemIndent );
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph();
+        p.leftIndent = indentation.get() + listItemIndent;
+        p.firstLineIndent = ( -listItemIndent );
+        beginParagraph( p );
 
         beginStyle( STYLE_BOLD );
         writer.println( LIST_ITEM_HEADER );
@@ -565,10 +564,10 @@
             indent = textWidth( header, font );
         }
 
-        Paragraph paragraph = new Paragraph();
-        paragraph.leftIndent = indentation.get() + indent;
-        paragraph.firstLineIndent = ( -indent );
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph();
+        p.leftIndent = indentation.get() + indent;
+        p.firstLineIndent = ( -indent );
+        beginParagraph( p );
 
         beginStyle( STYLE_TYPEWRITER );
         writer.println( header );
@@ -881,10 +880,10 @@
 
     public void tableCaption()
     {
-        Paragraph paragraph = new Paragraph();
-        paragraph.justification = Parser.JUSTIFY_CENTER;
-        paragraph.spaceBefore /= 2;
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph();
+        p.justification = Parser.JUSTIFY_CENTER;
+        p.spaceBefore /= 2;
+        beginParagraph( p );
     }
 
     public void tableCaption_()
@@ -905,10 +904,10 @@
         endParagraph();
     }
 
-    private void beginParagraph( Paragraph paragraph )
+    private void beginParagraph( Paragraph p )
     {
-        paragraph.begin();
-        this.paragraph = paragraph;
+        p.begin();
+        this.paragraph = p;
         if ( style != STYLE_ROMAN )
         {
             beginStyle( style );
@@ -940,11 +939,11 @@
     {
         String text = verbatim.toString();
 
-        Paragraph paragraph = new Paragraph();
-        paragraph.fontStyle = STYLE_TYPEWRITER;
-        paragraph.frame = frame;
+        Paragraph p = new Paragraph();
+        p.fontStyle = STYLE_TYPEWRITER;
+        p.frame = frame;
 
-        beginParagraph( paragraph );
+        beginParagraph( p );
 
         StringTokenizer t = new StringTokenizer( text, EOL, true );
         while ( t.hasMoreTokens() )
@@ -980,9 +979,9 @@
             getLog().warn( "Unsupported image type: " + name );
         }
 
-        Paragraph paragraph = new Paragraph();
-        paragraph.justification = Parser.JUSTIFY_CENTER;
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph();
+        p.justification = Parser.JUSTIFY_CENTER;
+        beginParagraph( p );
 
         try
         {
@@ -1186,10 +1185,10 @@
 
     public void figureCaption()
     {
-        Paragraph paragraph = new Paragraph();
-        paragraph.justification = Parser.JUSTIFY_CENTER;
-        paragraph.spaceBefore /= 2;
-        beginParagraph( paragraph );
+        Paragraph p = new Paragraph();
+        p.justification = Parser.JUSTIFY_CENTER;
+        p.spaceBefore /= 2;
+        beginParagraph( p );
     }
 
     public void figureCaption_()
@@ -1697,9 +1696,9 @@
 
         int getNext()
         {
-            int next = this.next;
+            int nxt = this.next;
             this.next = space;
-            return next;
+            return nxt;
         }
 
         void skip()

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
Fri Mar  7 14:52:35 2008
@@ -162,16 +162,16 @@
     }
 
     /** {@inheritDoc} */
-    public final synchronized void parse( final Reader reader, final Sink sink )
+    public final synchronized void parse( final Reader source, final Sink sink )
         throws ParseException
     {
 
         List blocks;
-        final ByLineSource source = new ByLineReaderSource( reader );
+        final ByLineSource src = new ByLineReaderSource( source );
 
         try
         {
-            blocks = parse( source );
+            blocks = parse( src );
         }
         catch ( final ParseException e )
         {
@@ -179,13 +179,13 @@
         }
         catch ( final Exception e )
         {
-            throw new ParseException( e, source.getName(),
-                                      source.getLineNumber() );
+            throw new ParseException( e, src.getName(),
+                                      src.getLineNumber() );
         }
 
         sink.head();
         
-        final String title = getTitle( blocks, source ); 
+        final String title = getTitle( blocks, src ); 
         if ( title != null ) 
         {
             sink.title();
@@ -209,6 +209,8 @@
      * If it doesn't find any section tries to get it from 
      * {@link ByLineReaderSource#getName()}
      * 
+     * @param blocks blocks to parse
+     * @param source source to parse
      * @return a title for a page
      */
     public final String getTitle( final List blocks, final ByLineSource source ) 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java?rev=634855&r1=634854&r2=634855&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
Fri Mar  7 14:52:35 2008
@@ -170,7 +170,7 @@
 
         else if ( parser.getName().equals( MACRO_TAG.toString() ) )
         {
-            if ( !secondParsing )
+            if ( !isSecondParsing() )
             {
                 macroName = parser.getAttributeValue( null, Attribute.NAME.toString() );
 
@@ -183,7 +183,7 @@
         }
         else if ( parser.getName().equals( Tag.PARAM.toString() ) )
         {
-            if ( !secondParsing )
+            if ( !isSecondParsing() )
             {
                 if ( StringUtils.isNotEmpty( macroName ) )
                 {
@@ -281,7 +281,7 @@
 
         else if ( parser.getName().equals( MACRO_TAG.toString() ) )
         {
-            if ( !secondParsing )
+            if ( !isSecondParsing() )
             {
                 if ( StringUtils.isNotEmpty( macroName ) )
                 {



Mime
View raw message