Author: michaelo Date: Sun Feb 23 19:59:35 2014 New Revision: 1571080 URL: http://svn.apache.org/r1571080 Log: [MCHECKSTYLE-218] Put file anchor directly on the h2 tag
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java?rev=1571080&r1=1571079&r2=1571080&view=diff ============================================================================== --- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java (original) +++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java Sun Feb 23 19:59:35 2014 @@ -29,6 +29,8 @@ import java.util.List; import java.util.ResourceBundle; import org.apache.maven.doxia.sink.Sink; +import org.apache.maven.doxia.sink.SinkEventAttributeSet; +import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.tools.SiteTool; import org.apache.maven.plugin.logging.Log; import org.apache.maven.plugin.logging.SystemStreamLog; @@ -716,12 +718,11 @@ public class CheckstyleReportGenerator } sink.section2(); - sink.sectionTitle2(); + SinkEventAttributes attrs = new SinkEventAttributeSet(); + attrs.addAttribute( SinkEventAttributes.ID, file.replace( '/', '.' ) ); + sink.sectionTitle( Sink.SECTION_LEVEL_2, attrs ); sink.text( file ); - sink.sectionTitle2_(); - - sink.anchor( file.replace( '/', '.' ) ); - sink.anchor_(); + sink.sectionTitle_( Sink.SECTION_LEVEL_2 ); sink.table(); sink.tableRow();