/** * Constructs a link to the given Java element. * * @param packageName packageName the name of the package. * @param typeName typeName the name of the Java type. * @param method the test method to link to. * @return the requested relative link. */ public String constructLink(final String packageName, final String typeName, final MethodInfo method) { final JavaElementRef ref = new JavaElementRef(packageName, typeName, method); return constructLink(ref); }
protected void renderReports(final Type type, final List<ExternalReport> reports, final TestMethodDoc testMethod) throws XMLStreamException { if (!reports.isEmpty()) { xmlWriter.writeStartElement(TESTDOC_NS, "reports"); for (final ExternalReport report : reports) { xmlWriter.writeStartElement(TESTDOC_NS, "report"); final String messageKey = report.getLabelKey(); final String label = messages.getLabel(messageKey); writeElement("name", label); final String link = report.constructLink(type.getPackageName(), type.getTypeName(), testMethod); writeElement("link", link); xmlWriter.writeEndElement(); } xmlWriter.writeEndElement(); } }
protected void renderReports(final Type type, final List<ExternalReport> reports, final TestMethodDoc testMethod) throws XMLStreamException { if (!reports.isEmpty()) { xmlWriter.writeStartElement(TESTDOC_NS, "reports"); for (final ExternalReport report : reports) { xmlWriter.writeStartElement(TESTDOC_NS, "report"); final String messageKey = report.getLabelKey(); final String label = messages.getLabel(messageKey); writeElement("name", label); final String link = report.constructLink(type.getPackageName(), type.getTypeName(), testMethod); writeElement("link", link); xmlWriter.writeEndElement(); } xmlWriter.writeEndElement(); } }
void renderTestMethodLink(final ExternalReport report) { final String messageKey = report.getLabelKey(); final Type type = getType(); final String link = report.constructLink(type.getPackageName(), type.getTypeName(), getTestMethod()); if (link != null) { sink.link(link); final String label = messages.getLabel(messageKey); sink.text(label); sink.link_(); } }
void renderTestMethodLink(final ExternalReport report) { final String messageKey = report.getLabelKey(); final Type type = getType(); final String link = report.constructLink(type.getPackageName(), type.getTypeName(), getTestMethod()); if (link != null) { sink.link(link); final String label = messages.getLabel(messageKey); sink.text(label); sink.link_(); } }