org.apache.maven.doxia.sink.Sink类的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(12.6k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.apache.maven.doxia.sink.Sink类的一些代码示例,展示了Sink类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Sink类的具体详情如下:
包路径:org.apache.maven.doxia.sink.Sink
类名称:Sink

Sink介绍

暂无

代码示例

代码示例来源:origin: org.apache.maven.plugins/maven-pmd-plugin

public void beginDocument()
{
  sink.head();
  sink.title();
  sink.text( getTitle() );
  sink.title_();
  sink.head_();
  sink.body();
  sink.section1();
  sink.sectionTitle1();
  sink.text( getTitle() );
  sink.sectionTitle1_();
  sink.paragraph();
  sink.text( bundle.getString( "report.pmd.pmdlink" ) + " " );
  sink.link( "https://pmd.github.io" );
  sink.text( "PMD" );
  sink.link_();
  sink.text( " " + AbstractPmdReport.getPmdVersion() + "." );
  sink.paragraph_();
  sink.section1_();
  // TODO overall summary
}

代码示例来源:origin: stackoverflow.com

Sink sink = getSink();
   sink.head();
   sink.title();
   sink.text("Hello");
   sink.title_();
   sink.head_();
   sink.body();
   sink.rawText("Hello World");
   sink.body_();
   sink.flush();
   sink.close();

代码示例来源:origin: org.xwiki.rendering/xwiki-rendering-syntax-doxia

@Override
public void beginDocument(MetaData metadata)
{
  this.sink.head();
  this.sink.head_();
  this.sink.body();
}

代码示例来源:origin: de.smartics.testdoc/testdoc-maven-report-plugin

void renderLink(final String label, final String link)
{
 sink.link(link);
 sink.text(label);
 sink.link_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-pmd-plugin

sink.section1();
sink.sectionTitle1();
sink.text( bundle.getString( "report.pmd.processingErrors.title" ) );
sink.sectionTitle1_();
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text( bundle.getString( "report.pmd.processingErrors.column.filename" ) );
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text( bundle.getString( "report.pmd.processingErrors.column.problem" ) );
sink.tableHeaderCell_();
sink.tableRow_();
sink.table_();
sink.section1_();

代码示例来源:origin: revapi/revapi

protected void startReport(Sink sink, ResourceBundle messages) {
  sink.head();
  sink.title();
  sink.text(messages.getString("report.revapi.title"));
  sink.title_();
  sink.head_();
  sink.body();
  sink.section1();
  sink.sectionTitle1();
  sink.rawText(messages.getString("report.revapi.title"));
  sink.sectionTitle1_();
}

代码示例来源:origin: org.jvnet.hudson.plugins/jdepend

public void doCycleSection( ResourceBundle bundle, Sink sink )
{
  sink.anchor( bundle.getString( "report.cycles.text" ) ); //$NON-NLS-1$
  sink.anchor_();
  sink.sectionTitle1();
  sink.text( bundle.getString( "report.cycles.title" ) ); //$NON-NLS-1$
  sink.sectionTitle1_();
  doSectionLinks( bundle, sink );
  sink.lineBreak();
  sink.lineBreak();
  doCycles( bundle, sink );
}

代码示例来源:origin: org.codehaus.mojo/javacc-maven-plugin

/**
 * 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( ResourceBundle bundle, 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_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-checkstyle-plugin

sink.head();
sink.title();
sink.text( getTitle() );
sink.title_();
sink.head_();
sink.body();
sink.section1();
sink.sectionTitle1();
sink.text( getTitle() );
sink.sectionTitle1_();
sink.paragraph();
sink.text( bundle.getString( "report.checkstyle.checkstylelink" ) + " " );
sink.link( "http://checkstyle.sourceforge.net/" );
sink.text( "Checkstyle" );
sink.link_();
String version = getCheckstyleVersion();
if ( version != null )
  sink.text( " " );
  sink.text( version );
sink.text( " " );
sink.text( String.format( bundle.getString( "report.checkstyle.ruleset" ), ruleset ) );
sink.text( "." );
  sink.nonBreakingSpace();

代码示例来源:origin: org.apache.felix/maven-bundle-plugin

sink.head();
sink.title();
String title = getBundle( ctx.locale ).getString( "report.baseline.title" );
sink.text( title );
sink.title_();
sink.head_();
sink.body();
sink.section1();
sink.sectionTitle1();
sink.text( title );
sink.sectionTitle1_();
sink.paragraph();
sink.text( getBundle( ctx.locale ).getString( "report.baseline.bndlink" ) + " " );
sink.link( "http://www.aqute.biz/Bnd/Bnd" );
sink.text( "Bnd" );
sink.link_();
sink.text( "." );
sink.paragraph_();
sink.paragraph();
sink.text( getBundle( ctx.locale ).getString( "report.baseline.bundle" ) + " " );
sink.figure();
sink.figureGraphics( "images/baseline/bundle.gif" );
sink.figure_();
sink.text( " " );

代码示例来源:origin: org.jvnet.hudson.plugins/jdepend

public void doGenerateReport( ResourceBundle bundle, Sink sink, JDependParser jdepend )
{
  this.jdepend = jdepend;
  sink.head();
  sink.title();
  sink.text( bundle.getString( "report.title" ) ); //$NON-NLS-1$
  sink.title_();
  sink.head_();
  sink.body();
  sink.section1();
  sink.sectionTitle1();
  sink.text( bundle.getString( "report.metricresults" ) ); //$NON-NLS-1$
  sink.sectionTitle1_();
  doSectionLinks( bundle, sink );
  sink.lineBreak();
  sink.lineBreak();
  sink.text( bundle.getString( "report.intro" ) ); //$NON-NLS-1$
  sink.lineBreak();
  sink.lineBreak();
  doSummarySection( bundle, sink );
  doPackagesSection( bundle, sink );
  doCycleSection( bundle, sink );
  doExplanationSection( bundle, sink );
  sink.section1_();
  sink.body_();
  sink.flush();
  sink.close();
}

代码示例来源:origin: org.apache.maven.plugins/maven-pmd-plugin

private void startFileSection( String currentFilename, PmdFileInfo fileInfo )
{
  sink.section2();
  sink.sectionTitle2();
  // prepare the filename
  this.currentFilename = shortenFilename( currentFilename, fileInfo );
  sink.text( makeFileSectionName( this.currentFilename, fileInfo ) );
  sink.sectionTitle2_();
  sink.table();
  sink.tableRow();
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.pmd.column.violation" ) );
  sink.tableHeaderCell_();
  if ( this.renderRuleViolationPriority )
  {
    sink.tableHeaderCell();
    sink.text( bundle.getString( "report.pmd.column.priority" ) );
    sink.tableHeaderCell_();
  }
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.pmd.column.line" ) );
  sink.tableHeaderCell_();
  sink.tableRow_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-checkstyle-plugin

sink.section1();
sink.sectionTitle1();
sink.text( bundle.getString( "report.checkstyle.details" ) );
sink.sectionTitle1_();
  sink.section2();
  SinkEventAttributes attrs = new SinkEventAttributeSet();
  attrs.addAttribute( SinkEventAttributes.ID, file.replace( '/', '.' ) );
  sink.sectionTitle( Sink.SECTION_LEVEL_2, attrs );
  sink.text( file );
  sink.sectionTitle_( Sink.SECTION_LEVEL_2 );
  sink.table();
  sink.tableRow();
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.checkstyle.column.severity" ) );
  sink.tableHeaderCell_();
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.checkstyle.rule.category" ) );
  sink.tableHeaderCell_();
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.checkstyle.rule" ) );
  sink.tableHeaderCell_();
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.checkstyle.column.message" ) );
  sink.tableHeaderCell_();
  sink.tableHeaderCell();
  sink.text( bundle.getString( "report.checkstyle.column.line" ) );
  sink.tableHeaderCell_();

代码示例来源:origin: org.apache.maven.plugins/maven-checkstyle-plugin

/**
 * Render an icon of given level with associated text.
 * @param level one of <code>INFO</code>, <code>WARNING</code> or <code>ERROR</code> constants
 * @param textType one of <code>NO_TEXT</code>, <code>TEXT_SIMPLE</code>, <code>TEXT_TITLE</code> or
 * <code>TEXT_ABBREV</code> constants
 */
public void iconSeverity( String level, int textType )
{
  sink.figure();
  sink.figureGraphics( "images/icon_" + level + "_sml.gif" );
  sink.figure_();
  if ( textType > 0 )
  {
    sink.nonBreakingSpace();
    sink.text( bundle.getString( "report.checkstyle." + level + suffix( textType ) ) );
  }
}

代码示例来源:origin: org.jvnet.hudson.plugins/jdepend

public void doSectionLinks( ResourceBundle bundle, Sink sink )
{
  sink.text( bundle.getString( "report.square-open" ) ); //$NON-NLS-1$
  sink.link( bundle.getString( "report.summary.anchor" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.summary.text" ) ); //$NON-NLS-1$
  sink.link_();
  sink.text( bundle.getString( "report.square-close" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.square-open" ) ); //$NON-NLS-1$
  sink.link( bundle.getString( "report.packages.anchor" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.packages.text" ) ); //$NON-NLS-1$
  sink.link_();
  sink.text( bundle.getString( "report.square-close" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.square-open" ) ); //$NON-NLS-1$
  sink.link( bundle.getString( "report.cycles.anchor" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.cycles.text" ) ); //$NON-NLS-1$
  sink.link_();
  sink.text( bundle.getString( "report.square-close" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.square-open" ) ); //$NON-NLS-1$
  sink.link( bundle.getString( "report.explanations.anchor" ) ); //$NON-NLS-1$
  sink.text( bundle.getString( "report.explanations.text" ) ); //$NON-NLS-1$
  sink.link_();
  sink.text( bundle.getString( "report.square-close" ) ); //$NON-NLS-1$
}

代码示例来源:origin: revapi/revapi

private void reportDifferences(
  EnumMap<CompatibilityType, List<ReportTimeReporter.DifferenceReport>> diffsPerType, Sink sink,
  ResourceBundle bundle, String typeKey) {
  if (diffsPerType == null || diffsPerType.isEmpty()) {
    return;
  }
  sink.section2();
  sink.sectionTitle2();
  sink.text(bundle.getString(typeKey));
  sink.sectionTitle2_();
  reportDifferences(diffsPerType.get(CompatibilityType.BINARY), sink, bundle,
    "report.revapi.compatibilityType.binary");
  reportDifferences(diffsPerType.get(CompatibilityType.SOURCE), sink, bundle,
    "report.revapi.compatibilityType.source");
  reportDifferences(diffsPerType.get(CompatibilityType.SEMANTIC), sink, bundle,
    "report.revapi.compatibilityType.semantic");
  reportDifferences(diffsPerType.get(CompatibilityType.OTHER), sink, bundle,
    "report.revapi.compatibilityType.other");
  sink.section2_();
}

代码示例来源:origin: org.apache.maven.plugins/maven-site-plugin

private void extract( DecorationModel decoration, Sink sink, Locale locale )
{
  sink.head();
  sink.title();
  sink.text( i18n.getString( "site-plugin", locale, "site.sitemap.title" ) );
  sink.title_();
  sink.head_();
  sink.body();
  sink.section1();
  sink.sectionTitle1();
  sink.text( i18n.getString( "site-plugin", locale, "site.sitemap.section.title" ) );
  sink.sectionTitle1_();
  sink.paragraph();
  sink.text( i18n.getString( "site-plugin", locale, "site.sitemap.description" ) );
  sink.paragraph_();
  for ( Menu menu : decoration.getMenus() )
  {
    sink.section3();
    sink.sectionTitle3();
    sink.text( menu.getName() );
    sink.sectionTitle3_();
    sink.horizontalRule();
    extractItems( menu.getItems(), sink );
    sink.section3_();
  }
  sink.section1_();
  sink.body_();
}

代码示例来源:origin: org.apache.maven.doxia/doxia-module-docbook-simple

sink.body_();
sink.section_( level );
sink.list_();
parent.pop();
sink.numberedList_();
parent.pop();
  sink.definition_();
  sink.numberedListItem_();
  sink.listItem_();
sink.definitionList_();
sink.definitionListItem_();
sink.definedTerm_();
sink.figure_();
parent.pop();
sink.table_();
sink.tableRow_();

代码示例来源:origin: apache/maven-surefire

sink.head();
sink.title();
sink.text( bundle.getReportHeader() );
sink.title_();
sink.head_();
sink.body();
SinkEventAttributeSet atts = new SinkEventAttributeSet();
atts.addAttribute( TYPE, "application/javascript" );
sink.unknown( "script", new Object[]{ HtmlMarkup.TAG_TYPE_START }, atts );
sink.unknown( "cdata", new Object[]{ HtmlMarkup.CDATA_TYPE, javascriptToggleDisplayCode() }, null );
sink.unknown( "script", new Object[]{ HtmlMarkup.TAG_TYPE_END }, null );
sink.section1();
sink.sectionTitle1();
sink.text( bundle.getReportHeader() );
sink.sectionTitle1_();
sink.section1_();
sink.body_();
sink.flush();
sink.close();

代码示例来源:origin: apache/maven-surefire

sink.section1();
sink.sectionTitle1();
sink.text( bundle.getReportLabelFailureDetails() );
sink.sectionTitle1_();
sink.table();
sink.tableRows( new int[]{ LEFT, LEFT }, true );
  sink.tableRow();
  sink.tableCell();
  sink.tableCell_();
  sink.tableRow_();
  sink.tableRow();
  sink.tableRow_();
    sink.tableRow();
    sink.tableCell();
    SinkEventAttributeSet atts = new SinkEventAttributeSet();
    atts.addAttribute( ID, tCase.getName() + toHtmlIdFailure( tCase ) );
    sink.unknown( "div", TAG_TYPE_START, atts );
      sink.link( xrefLocation + "/" + path + ".html#" + errorLineNumber );

相关文章