// parse the line into javadoc elements
// (the line needs to be parsed into fragments before we can find semantic references)
new BasicJavadocParser(getSemanticTagHandlers()).parseSemanticLineIntoFragments(String.valueOf(html), factory, e);
AdditionalDocumentation doc = factory.createAdditionalDocumentation();
doc.setDescription( e );
// add javadoc element to root
root.getReferences().add( e );
FileReference ref = factory.createFileReference();
ref.setName(cls.getName() + ".html");
ref.setPackage(packageBase);
ref.setPlugin(plugin);
root.getReferences().add(ref);
doc.setReference(ref);
cls.getAdditionalDocumentation().add(doc);
} catch (IOException e) {
throw new DocumentationGenerationException(e);
}
}
}
// does a TEX file exist here?
{
File f = new File(docBase + File.separator + cls.getName() + ".tex");
if (f.exists()) {
// it exists; load it in as additional documentation
try {
char[] html = readFile(f);
// parse into a JavadocTextElement
JavadocTextElement e = factory.createJavadocTextElement();
e.setValue( new String(html) );
AdditionalLatex doc = factory.createAdditionalLatex();
doc.setDescription( e );
// add javadoc element to root
root.getReferences().add( e );
FileReference ref = factory.createFileReference();
ref.setName(cls.getName() + ".tex");
ref.setPackage(packageBase);
ref.setPlugin(plugin);
root.getReferences().add(ref);
doc.setReference(ref);
cls.getAdditionalLatex().add(doc);
} catch (IOException e) {
throw new DocumentationGenerationException(e);
}