com.sun.tools.doclets.formats.html.ConfigurationImpl Java Examples

The following examples show how to use com.sun.tools.doclets.formats.html.ConfigurationImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HtmlDocWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Print the frames version of the Html file header.
 * Called only when generating an HTML frames file.
 *
 * @param title Title of this HTML document
 * @param configuration the configuration object
 * @param body the body content tree to be added to the HTML document
 */
public void printFramesDocument(String title, ConfigurationImpl configuration,
        HtmlTree body) throws IOException {
    Content htmlDocType = configuration.isOutputHtml5()
            ? DocType.HTML5
            : DocType.TRANSITIONAL;
    Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
    Content head = new HtmlTree(HtmlTag.HEAD);
    head.addContent(getGeneratedBy(!configuration.notimestamp));
    Content windowTitle = HtmlTree.TITLE(new StringContent(title));
    head.addContent(windowTitle);
    Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
            (configuration.charset.length() > 0) ?
                    configuration.charset : HtmlConstants.HTML_DEFAULT_CHARSET);
    head.addContent(meta);
    head.addContent(getStyleSheetProperties(configuration));
    head.addContent(getFramesJavaScript());
    Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
            head, body);
    Content htmlDocument = new HtmlDocument(htmlDocType,
            htmlComment, htmlTree);
    write(htmlDocument);
}
 
Example #2
Source File: HtmlDocWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a link to the stylesheet file.
 *
 * @return an HtmlTree for the lINK tag which provides the stylesheet location
 */
public HtmlTree getStyleSheetProperties(ConfigurationImpl configuration) {
    String stylesheetfile = configuration.stylesheetfile;
    DocPath stylesheet;
    if (stylesheetfile.isEmpty()) {
        stylesheet = DocPaths.STYLESHEET;
    } else {
        DocFile file = DocFile.createFileForInput(configuration, stylesheetfile);
        stylesheet = DocPath.create(file.getName());
    }
    HtmlTree link = HtmlTree.LINK("stylesheet", "text/css",
            pathToRoot.resolve(stylesheet).getPath(),
            "Style");
    return link;
}
 
Example #3
Source File: WriterUtils.java    From sarl with Apache License 2.0 5 votes vote down vote up
/** Add a type parameter to the given executable member.
 *
 * @param typeParameters the type parameters.
 * @param htmlTree the output.
 * @param configuration the configuration.
 * @param writer the background writer.
 */
public static void addTypeParameters(Content typeParameters, Content htmlTree,
		ConfigurationImpl configuration, SubWriterHolderWriter writer) {
	if (!typeParameters.isEmpty()) {
		htmlTree.addContent(" "); //$NON-NLS-1$
		htmlTree.addContent(Utils.keyword(Utils.getKeywords().getWithKeyword()));
		htmlTree.addContent(" "); //$NON-NLS-1$
		htmlTree.addContent(typeParameters);
		htmlTree.addContent(" "); //$NON-NLS-1$
	}
}
 
Example #4
Source File: SarlDoclet.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Constructor.
 */
public SarlDoclet() {
	final ConfigurationImpl config = new SarlConfiguration();
	this.configuration = config;
}
 
Example #5
Source File: SarlConfiguration.java    From sarl with Apache License 2.0 4 votes vote down vote up
/** Constructor.
 */
public SarlConfiguration() {
	Reflect.setField(this, ConfigurationImpl.class, "standardmessage", new SarlMessageRetreiver(this)); //$NON-NLS-1$
	final SARLFeatureAccess sarlKeywords = new SARLFeatureAccess();
	Utils.setKeywords(sarlKeywords);
}
 
Example #6
Source File: WriterUtils.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** Add a type parameter to the given executable member.
 *
 * @param member the member to update.
 * @param htmlTree the output.
 * @param configuration the configuration.
 * @param writer the background writer.
 */
public static void addAnnotations(ExecutableMemberDoc member, Content htmlTree,
		ConfigurationImpl configuration, SubWriterHolderWriter writer) {
	writer.addAnnotationInfo(member, htmlTree);
}
 
Example #7
Source File: SarlClassWriter.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** Constructor.
 * @param configuration the configuration.
 * @param classDoc the documentation.
 * @param prevClass the previous class.
 * @param nextClass the next class.
 * @param classTree the class hierarchy.
 * @throws IOException in case of error.
 */
public SarlClassWriter(ConfigurationImpl configuration, ClassDoc classDoc, ClassDoc prevClass, ClassDoc nextClass,
		ClassTree classTree) throws IOException {
	super(configuration, classDoc, prevClass, nextClass, classTree);
}
 
Example #8
Source File: SarlAnnotationTypeWriter.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** Constructor.
 * @param configuration the configuration.
 * @param annotationType the type.
 * @param prevType the previous type.
 * @param nextType the next type.
 * @throws Exception in case of error.
 */
public SarlAnnotationTypeWriter(ConfigurationImpl configuration, AnnotationTypeDoc annotationType, Type prevType,
		Type nextType) throws Exception {
	super(configuration, annotationType, prevType, nextType);
}