本文整理汇总了Java中org.apache.maven.doxia.sink.Sink.table方法的典型用法代码示例。如果您正苦于以下问题:Java Sink.table方法的具体用法?Java Sink.table怎么用?Java Sink.table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.maven.doxia.sink.Sink
的用法示例。
在下文中一共展示了Sink.table方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createReportHeader
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
* Create the header and title for the HTML report page.
*
* @param bundle
* The resource bundle with the text.
* @param sink
* The sink for writing to the main report file.
*/
private void createReportHeader (final ResourceBundle bundle, final Sink sink)
{
sink.head ();
sink.title ();
sink.text (bundle.getString ("report.jjdoc.title"));
sink.title_ ();
sink.head_ ();
sink.body ();
sink.section1 ();
sink.sectionTitle1 ();
sink.text (bundle.getString ("report.jjdoc.title"));
sink.sectionTitle1_ ();
sink.text (bundle.getString ("report.jjdoc.description"));
sink.section1_ ();
sink.lineBreak ();
sink.table ();
sink.tableRow ();
sink.tableHeaderCell ();
sink.text (bundle.getString ("report.jjdoc.table.heading"));
sink.tableHeaderCell_ ();
sink.tableRow_ ();
}
示例2: drawStatsTable
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
* .
* @param sink .
* @param results .
*/
public static void drawStatsTable(
final Sink sink,
final Map<String, Integer> results) {
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text("Rule Name");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Errors Detected");
sink.tableHeaderCell_();
sink.tableRow_();
for (Entry<String, Integer> rule : results.entrySet()) {
sink.tableRow();
sink.tableCell();
sink.text(rule.getKey());
sink.tableCell_();
sink.tableCell();
sink.text(rule.getValue().toString());
sink.tableCell_();
sink.tableRow_();
}
sink.table_();
}
示例3: drawTestCasesStatsTable
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
* .
* @param sink .
* @param results .
*/
public static void drawTestCasesStatsTable(
final Sink sink,
final Map<String, Integer> results) {
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text("Test Class Name");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Test Name");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Errors Detected");
sink.tableHeaderCell_();
sink.tableRow_();
for (Entry<String, Integer> testRecord : results.entrySet()) {
sink.tableRow();
sink.tableCell();
sink.text(testRecord.getKey().split(" ")[0]);
sink.tableCell_();
sink.tableCell();
sink.text(testRecord.getKey().split(" ")[1]);
sink.tableCell_();
sink.tableCell();
sink.text(testRecord.getValue().toString());
sink.tableCell_();
sink.tableRow_();
}
sink.table_();
}
示例4: generateStatisticsTable
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
* Generates statistic table.
*
* @param sink the sink
* @param changes the changes
*/
private void generateStatisticsTable(Sink sink, List<Change> changes) {
sink.table();
sink.tableRow();
sink.tableCell();
sink.text(" Number of migration changes: ");
sink.tableCell_();
sink.tableCell();
sink.text("" + changes.size());
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
sink.tableCell();
sink.text(" Number of pending migrations: ");
sink.tableCell_();
int nop = numberOfPending(changes);
sink.tableCell();
sink.text(nop + " (" + calcPerc(changes.size(), nop) + ") ");
sink.nonBreakingSpace();
sink.figure();
sink.figureGraphics(nop == 0 ? "images/icon_success_sml.gif" : "images/icon_warning_sml.gif");
sink.figure_();
sink.tableCell_();
sink.tableRow_();
sink.table_();
}
示例5: doSummarySection
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
public void doSummarySection( ResourceBundle bundle, Sink sink )
{
sink.anchor( bundle.getString( "report.summary.text" ) ); //$NON-NLS-1$
sink.anchor_();
sink.sectionTitle1();
sink.text( bundle.getString( "report.summary.title" ) ); //$NON-NLS-1$
sink.sectionTitle1_();
doSectionLinks( bundle, sink );
sink.lineBreak();
sink.lineBreak();
sink.table();
generateHeaderRow( bundle, sink );
list = jdepend.packages;
for ( int i = 0; i < list.size(); i++ )
{
jdpackage = (JDPackage) list.get( i );
stats = jdpackage.getStats();
sink.tableRow();
sink.tableCell();
sink.link( bundle.getString( "report.dash" ) + jdpackage.getPackageName() ); //$NON-NLS-1$
sink.text( jdpackage.getPackageName() );
sink.link_();
sink.tableCell_();
sink.tableCell();
sink.text( stats.getTotalClasses() );
sink.tableCell_();
sink.tableCell();
sink.text( stats.getConcreteClasses() );
sink.tableCell_();
sink.tableCell();
sink.text( stats.getAbstractClasses() );
sink.tableCell_();
sink.tableCell();
sink.text( stats.getCa() );
sink.tableCell_();
sink.tableCell();
sink.text( stats.getCe() );
sink.tableCell_();
sink.tableCell();
sink.text( convertToPercent( stats.getA() ) );
sink.tableCell_();
sink.tableCell();
sink.text( convertToPercent( stats.getI() ) );
sink.tableCell_();
sink.tableCell();
sink.text( convertToPercent( stats.getD() ) );
sink.tableCell_();
sink.tableCell();
sink.text( stats.getV() );
sink.tableCell_();
sink.tableRow_();
}
sink.table_();
}
示例6: doCycles
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
public void doCycles( ResourceBundle bundle, Sink sink )
{
List cycleList = jdepend.cycles;
if ( cycleList.size() <= 0 )
{
sink.text( bundle.getString( "report.nocyclicdependencies" ) ); //$NON-NLS-1$
sink.lineBreak();
}
else
{
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text( bundle.getString( "report.package.title" ) ); //$NON-NLS-1$
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text( bundle.getString( "report.packagedependencies" ) ); //$NON-NLS-1$
sink.tableHeaderCell_();
sink.tableRow_();
for ( int i = 0; i < cycleList.size(); i++ )
{
cyclepackage = (CyclePackage) cycleList.get( i );
sink.tableRow();
sink.tableCell();
sink.text( cyclepackage.getName() );
sink.tableCell_();
/* Package Dependencies List */
List packageList = cyclepackage.getPackageList();
sink.tableCell();
if ( packageList.size() <= 0 )
{
sink.italic();
sink.text( bundle.getString( "report.none" ) ); //$NON-NLS-1$
sink.italic_();
}
else
{
for ( int j = 0; j < packageList.size(); j++ )
{
sink.text( (String) packageList.get( j ) );
sink.lineBreak();
}
}
sink.tableCell_();
sink.tableRow_();
}
sink.table_();
}
}
示例7: reportDifferences
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
private void reportDifferences(List<ReportTimeReporter.DifferenceReport> diffs, Sink sink, ResourceBundle bundle,
String typeKey) {
if (diffs == null || diffs.isEmpty()) {
return;
}
sink.section3();
sink.sectionTitle3();
sink.text(bundle.getString(typeKey));
sink.sectionTitle3_();
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text(bundle.getString("report.revapi.difference.code"));
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text(bundle.getString("report.revapi.difference.element"));
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text(bundle.getString("report.revapi.difference.description"));
sink.tableHeaderCell_();
sink.tableRow_();
diffs.sort((d1, d2) -> {
String c1 = d1.difference.code;
String c2 = d2.difference.code;
int cmp = c1.compareTo(c2);
if (cmp != 0) {
return cmp;
}
Element e1 = d1.newElement == null ? d1.oldElement : d1.newElement;
Element e2 = d2.newElement == null ? d2.oldElement : d2.newElement;
cmp = e1.getClass().getName().compareTo(e2.getClass().getName());
if (cmp != 0) {
return cmp;
}
return e1.getFullHumanReadableString().compareTo(e2.getFullHumanReadableString());
});
for (ReportTimeReporter.DifferenceReport d : diffs) {
String element = d.oldElement == null ? (d.newElement.getFullHumanReadableString()) :
d.oldElement.getFullHumanReadableString();
sink.tableRow();
sink.tableCell();
sink.monospaced();
sink.text(d.difference.code);
sink.monospaced_();
sink.tableCell_();
sink.tableCell();
sink.monospaced();
sink.bold();
sink.text(element);
sink.bold_();
sink.monospaced_();
sink.tableCell();
sink.text(d.difference.description);
sink.tableCell_();
sink.tableRow_();
}
sink.table_();
sink.section3_();
}
示例8: drawTestRuns
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
* .
* @param sink .
* @param results .
* @param passedOnly .
*/
public static void drawTestRuns(
final Sink sink,
final MutoResult[] results,
final boolean passedOnly) {
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text("Rule Name");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Mutated File");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Change Location");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Changed Fragment");
sink.tableHeaderCell_();
if (!passedOnly) {
sink.tableHeaderCell();
sink.text("Affected Tests");
sink.tableHeaderCell_();
}
sink.tableRow_();
for (MutoResult result : results) {
if (result.isPassed() == passedOnly) {
sink.tableRow();
sink.tableCell();
sink.text(result.getLocation().getRuleName());
sink.tableCell_();
sink.tableCell();
sink.text(result.getLocation().getFileName());
sink.tableCell_();
sink.tableCell();
sink.text("from position "
+ result.getLocation().getStartPosition()
+ " to "
+ result.getLocation().getEndPosition());
sink.tableCell_();
sink.tableCell();
sink.text(result.getLocation().getMatchedText());
sink.tableCell_();
if (!passedOnly) {
sink.tableCell();
sink.text("-");
sink.tableCell_();
}
sink.tableRow_();
}
}
sink.table_();
}
示例9: generateChangesTable
import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
* Generate a table for the given dependencies iterator.
*
* @param sink
* the {@link Sink} instance
* @param iter
* list of {@link Change}
*/
public void generateChangesTable(Sink sink, List<Change> iter) {
sink.table();
sink.tableRow();
sink.tableCell();
sink.bold();
sink.text("ID");
sink.bold_();
sink.tableCell_();
sink.tableCell();
sink.bold();
sink.text("Applied At");
sink.bold_();
sink.tableCell_();
sink.tableCell();
sink.bold();
sink.text("Description");
sink.bold_();
sink.tableCell_();
sink.tableCell();
sink.bold();
sink.text("Filename");
sink.bold_();
sink.tableCell_();
sink.tableCell();
sink.bold();
sink.text("Status");
sink.bold_();
sink.tableCell_();
sink.tableRow_();
for (Change change : iter) {
sink.tableRow();
sink.tableCell();
sink.text("" + change.getId());
sink.tableCell_();
sink.tableCell();
sink.text(change.getAppliedTimestamp() == null ? " ... pending ... " : change.getAppliedTimestamp());
sink.tableCell_();
sink.tableCell();
sink.text(change.getDescription());
sink.tableCell_();
sink.tableCell();
sink.text(change.getFilename());
sink.tableCell_();
sink.tableCell();
sink.figure();
sink.figureGraphics(
change.getAppliedTimestamp() != null ? "images/icon_success_sml.gif" : "images/icon_warning_sml.gif");
sink.figure_();
sink.tableCell_();
sink.tableRow_();
}
sink.table_();
sink.horizontalRule();
}