maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r747837 - in /maven/doxia/doxia/trunk: doxia-core/src/main/java/org/apache/maven/doxia/sink/ doxia-core/src/test/java/org/apache/maven/doxia/sink/ doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/...
Date Wed, 25 Feb 2009 15:50:40 GMT
Author: ltheussl
Date: Wed Feb 25 15:50:39 2009
New Revision: 747837

URL: http://svn.apache.org/viewvc?rev=747837&view=rev
Log:
Replace deprecated verbatim( boxed ).

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java
    maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java
    maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/VerbatimBlock.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java
Wed Feb 25 15:50:39 2009
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import javax.swing.text.MutableAttributeSet;
+
 /**
  * Empty implementation of the <code>Sink</code> interface. Useful for testing
purposes.
  *
@@ -804,12 +806,13 @@
     /** {@inheritDoc} */
     public void verbatim( SinkEventAttributes attributes )
     {
+        MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_VERBATIM_ATTRIBUTES
);
+
         boolean boxed = false;
 
-        if ( attributes != null && attributes.isDefined( "boxed" ) )
+        if ( atts != null && atts.isDefined( SinkEventAttributes.DECORATION ) )
         {
-            boxed = Boolean.valueOf(
-                (String) attributes.getAttribute( "boxed" ) ).booleanValue();
+            boxed = "boxed".equals( atts.getAttribute( SinkEventAttributes.DECORATION ).toString()
);
         }
 
         verbatim( boxed );

Modified: maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java
Wed Feb 25 15:50:39 2009
@@ -476,14 +476,14 @@
     }
 
     /**
-     * Checks that the sequence <code>[verbatim( true ), text( text ),
+     * Checks that the sequence <code>[verbatim( SinkEventAttributeSet.BOXED ), text(
text ),
      * verbatim_()]</code>, invoked on the current sink, produces the
      * same result as {@link #getVerbatimBlock getVerbatimBlock}( text ).
      */
     public void testVerbatim()
     {
         String text = "Text";
-        sink.verbatim( true );
+        sink.verbatim( SinkEventAttributeSet.BOXED );
         sink.text( text );
         sink.verbatim_();
         sink.flush();

Modified: maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java
Wed Feb 25 15:50:39 2009
@@ -85,7 +85,7 @@
 
         generateList( sink );
 
-        sink.verbatim( true );
+        sink.verbatim( SinkEventAttributeSet.BOXED );
         sink.text( "Verbatim text not contained in list item 3" );
         sink.verbatim_();
 
@@ -266,7 +266,7 @@
         sink.definedTerm_();
         sink.definition();
         sink.text( "of definition list." );
-        sink.verbatim( true );
+        sink.verbatim( SinkEventAttributeSet.BOXED );
         sink.text( "Verbatim text" + eol + "                        in a box        " );
         sink.verbatim_();
         sink.definition_();

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.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/ConfluenceSink.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
Wed Feb 25 15:50:39 2009
@@ -1026,12 +1026,6 @@
     }
 
     /** {@inheritDoc} */
-    public void verbatim( SinkEventAttributes attributes )
-    {
-        verbatim( false );
-    }
-
-    /** {@inheritDoc} */
     public void verbatim_()
     {
         if ( verbatimBoxedFlag )

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.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/parser/VerbatimBlock.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java
Wed Feb 25 15:50:39 2009
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkEventAttributeSet;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -38,7 +39,7 @@
     /** {@inheritDoc} */
     public void traverse( Sink sink )
     {
-        sink.verbatim( true );
+        sink.verbatim( SinkEventAttributeSet.BOXED );
 
         sink.text( text );
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
Wed Feb 25 15:50:39 2009
@@ -19,14 +19,6 @@
  * under the License.
  */
 
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.parser.AbstractXmlParser;
-import org.apache.maven.doxia.sink.Sink;
-
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.pull.XmlPullParser;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
 import java.io.IOException;
 import java.util.Collection;
 import java.util.HashSet;
@@ -35,6 +27,15 @@
 import javax.swing.text.html.HTML.Attribute;
 import javax.swing.text.html.HTML.Tag;
 
+import org.apache.maven.doxia.macro.MacroExecutionException;
+import org.apache.maven.doxia.parser.AbstractXmlParser;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkEventAttributeSet;
+
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.pull.XmlPullParser;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
 /**
  * Parse a <a href="http://www.docbook.org/schemas/simplified"><code>Simplified
DocBook</code></a> document
  * and emit events into the specified doxia Sink.
@@ -367,7 +368,7 @@
         }
         else if ( DocBookParser.VERBATIM_ELEMENTS.contains( parser.getName() ) )
         {
-            sink.verbatim( true );
+            sink.verbatim( SinkEventAttributeSet.BOXED );
         }
 
         else if ( DocBookParser.BOLD_ELEMENTS.contains( parser.getName() )

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.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/FmlContentParser.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java
Wed Feb 25 15:50:39 2009
@@ -22,6 +22,7 @@
 import org.apache.maven.doxia.macro.MacroExecutionException;
 import org.apache.maven.doxia.parser.XhtmlBaseParser;
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkEventAttributeSet;
 
 import org.codehaus.plexus.util.xml.pull.XmlPullParser;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@@ -65,7 +66,7 @@
         {
             verbatim();
 
-            sink.verbatim( true );
+            sink.verbatim( SinkEventAttributeSet.BOXED );
         }
         else if ( !baseStartTag( parser, sink ) )
         {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/VerbatimBlock.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/parser/VerbatimBlock.java?rev=747837&r1=747836&r2=747837&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/VerbatimBlock.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/VerbatimBlock.java
Wed Feb 25 15:50:39 2009
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkEventAttributeSet;
 
 /**
  * Represents a verbatim block
@@ -43,7 +44,7 @@
     /** {@inheritDoc} */
     final void before( final Sink sink )
     {
-        sink.verbatim( true );
+        sink.verbatim( SinkEventAttributeSet.BOXED );
     }
 
     /** {@inheritDoc} */



Mime
View raw message