Fix structure of events pumped into report sink
-----------------------------------------------
Key: MJAVACC-45
URL: http://jira.codehaus.org/browse/MJAVACC-45
Project: Maven 2.x JavaCC Plugin
Issue Type: Bug
Reporter: Benjamin Bentmann
Priority: Minor
I just noticed a line like
{code:java}
sink.rawText( "<h2>JJDoc Reports</h2>" );
{code}
If I got them right, the idea behind the Sink API is to avoid hard-coding
markup. Instead, appropriate calls to the sink should be used such that the
sink implementation can issue the type of formatting that is a suitable for the
current output format (HTML, PDF, ...). So instead of dumping a "<h2>", you
most likely want to do
{code:java}
sink.section2();
sink.text( "JJDoc Reports" );
sink.section2_();
{code}
Likewise, I don't think the following is correct:
{code:java}
public void createReportHeader( Sink sink )
{
...
sink.section2(); // OPEN HERE
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text( "Grammar File" );
sink.tableHeaderCell_();
sink.tableRow_();
}
public void createReportFooter( Sink sink )
{
sink.table_();
sink.section2_(); // BUT CLOSE HERE?
sink.body_();
}
{code}
The Javadoc for section2() states "Starting a second heading element which
contains the topic of the section". But a heading does not include the section
contents.
Last but not least, consider to put a call to sink.title() between sink.head()
such that the generated HTML page has a title string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email