Skip to content

Commit

Permalink
[MPIR-427] Explicitly start and end tables with Doxia Sinks in report…
Browse files Browse the repository at this point in the history
… renderers
  • Loading branch information
michael-o committed Jan 6, 2023
1 parent 7f80826 commit 88f2f76
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ private void generateConvergence( Locale locale, Sink sink, DependencyAnalyzeRes
private void generateDependencyDetails( Locale locale, Sink sink, List<ReverseDependencyLink> depList )
{
sink.table();
sink.tableRows( null, false );

Map<String, List<ReverseDependencyLink>> artifactMap = getSortedUniqueArtifactMap( depList );

Expand All @@ -314,6 +315,7 @@ private void generateDependencyDetails( Locale locale, Sink sink, List<ReverseDe
sink.tableCell();

sink.table();
sink.tableRows( null, false );

for ( String version : artifactMap.keySet() )
{
Expand All @@ -328,11 +330,14 @@ private void generateDependencyDetails( Locale locale, Sink sink, List<ReverseDe

sink.tableRow_();
}
sink.tableRows_();
sink.table_();

sink.tableCell_();

sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand Down Expand Up @@ -518,6 +523,7 @@ private Map<String, List<ReverseDependencyLink>> getSortedUniqueArtifactMap( Lis
private void generateLegend( Locale locale, Sink sink )
{
sink.table();
sink.tableRows( null, false );
sink.tableCaption();
sink.bold();
sink.text( getI18nString( locale, "legend" ) );
Expand All @@ -535,6 +541,7 @@ private void generateLegend( Locale locale, Sink sink )

sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand All @@ -557,6 +564,7 @@ private void generateStats( Locale locale, Sink sink, DependencyAnalyzeResult re

// Create report
sink.table();
sink.tableRows( null, false );
sink.tableCaption();
sink.bold();
sink.text( getI18nString( locale, "stats.caption" ) );
Expand Down Expand Up @@ -665,6 +673,7 @@ private void generateStats( Locale locale, Sink sink, DependencyAnalyzeResult re
sink.tableCell_();
sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ private void printDependencyListing( DependencyNode node )

String javascript = String.format( "<img id=\"%s\" src=\"%s\" alt=\"%s\""
+ " onclick=\"toggleDependencyDetails( '%s', '%s' );\""
+ " style=\"cursor: pointer; vertical-align: text-bottom;\"></img>",
+ " style=\"cursor: pointer; vertical-align: text-bottom;\" />",
imgId, IMG_INFO_URL, getI18nString( "graph.icon.information" ), dependencyDetailId, imgId );

sink.rawText( javascript );
Expand Down Expand Up @@ -911,6 +911,7 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid )
List<License> licenses = artifactProject.getLicenses();

sink.table();
sink.tableRows( null, false );

sink.tableRow();
sink.tableHeaderCell();
Expand Down Expand Up @@ -1007,10 +1008,12 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid )
sink.tableCell_();
sink.tableRow_();

sink.tableRows_();
sink.table_();
}
catch ( ProjectBuildingException e )
{
sink.text( getI18nString( "index", "nodescription" ) );
if ( log.isDebugEnabled() )
{
log.debug( "Unable to create Maven project from repository for artifact '"
Expand All @@ -1026,6 +1029,7 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid )
else
{
sink.table();
sink.tableRows( null, false );

sink.tableRow();
sink.tableHeaderCell();
Expand Down Expand Up @@ -1056,6 +1060,7 @@ private void printDescriptionsAndURLs( DependencyNode node, String uid )
sink.tableCell_();
sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand Down

0 comments on commit 88f2f76

Please sign in to comment.