Search in sources :

Example 1 with JTextFile

use of com.sun.codemodel.fmt.JTextFile in project jaxb-ri by eclipse-ee4j.

the class BGMBuilder method processPackageJavadoc.

/**
 * Generates <code>package.html</code> if the customization
 * says so.
 */
private void processPackageJavadoc(XSSchema s) {
    // look for the schema-wide customization
    BISchemaBinding cust = getBindInfo(s).get(BISchemaBinding.class);
    // not present
    if (cust == null)
        return;
    cust.markAsAcknowledged();
    // no javadoc customization
    if (cust.getJavadoc() == null)
        return;
    // produce a HTML file
    JTextFile html = new JTextFile("package.html");
    html.setContents(cust.getJavadoc());
    getClassSelector().getPackage(s.getTargetNamespace()).addResourceFile(html);
}
Also used : BISchemaBinding(com.sun.tools.xjc.reader.xmlschema.bindinfo.BISchemaBinding) JTextFile(com.sun.codemodel.fmt.JTextFile)

Aggregations

JTextFile (com.sun.codemodel.fmt.JTextFile)1 BISchemaBinding (com.sun.tools.xjc.reader.xmlschema.bindinfo.BISchemaBinding)1