当前位置: 首页>>代码示例>>Java>>正文


Java Sink.tableCell方法代码示例

本文整理汇总了Java中org.apache.maven.doxia.sink.Sink.tableCell方法的典型用法代码示例。如果您正苦于以下问题:Java Sink.tableCell方法的具体用法?Java Sink.tableCell怎么用?Java Sink.tableCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.doxia.sink.Sink的用法示例。


在下文中一共展示了Sink.tableCell方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createReportLink

import org.apache.maven.doxia.sink.Sink; //导入方法依赖的package包/类
/**
 * Create a table row containing a link to the JJDoc report for a grammar
 * file.
 *
 * @param sink
 *        The sink to write the report
 * @param sourceDirectory
 *        The source directory of the grammar file.
 * @param grammarFile
 *        The JavaCC grammar file.
 * @param linkPath
 *        The path to the JJDoc output.
 */
private void createReportLink (final Sink sink, final File sourceDirectory, final File grammarFile, String linkPath)
{
  sink.tableRow ();
  sink.tableCell ();
  if (linkPath.startsWith ("/"))
  {
    linkPath = linkPath.substring (1);
  }
  sink.link (linkPath);
  String grammarFileRelativePath = sourceDirectory.toURI ().relativize (grammarFile.toURI ()).toString ();
  if (grammarFileRelativePath.startsWith ("/"))
  {
    grammarFileRelativePath = grammarFileRelativePath.substring (1);
  }
  sink.text (grammarFileRelativePath);
  sink.link_ ();
  sink.tableCell_ ();
  sink.tableRow_ ();
}
 
开发者ID:phax,项目名称:ph-javacc-maven-plugin,代码行数:33,代码来源:JJDocMojo.java

示例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_();
}
 
开发者ID:mkolisnyk,项目名称:Muto,代码行数:30,代码来源:MavenMutoReporterDrawer.java

示例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_();
}
 
开发者ID:mkolisnyk,项目名称:Muto,代码行数:36,代码来源:MavenMutoReporterDrawer.java

示例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_();
}
 
开发者ID:mybatis,项目名称:migrations-maven-plugin,代码行数:38,代码来源:MigrationStatusReportView.java

示例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_();

}
 
开发者ID:mojohaus,项目名称:jdepend-maven-plugin,代码行数:76,代码来源:ReportGenerator.java

示例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_();
    }

}
 
开发者ID:mojohaus,项目名称:jdepend-maven-plugin,代码行数:60,代码来源:ReportGenerator.java

示例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_();
}
 
开发者ID:revapi,项目名称:revapi,代码行数:81,代码来源:ReportMojo.java

示例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_();
}
 
开发者ID:mkolisnyk,项目名称:Muto,代码行数:65,代码来源:MavenMutoReporterDrawer.java

示例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();
}
 
开发者ID:mybatis,项目名称:migrations-maven-plugin,代码行数:77,代码来源:MigrationStatusReportView.java


注:本文中的org.apache.maven.doxia.sink.Sink.tableCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。