com.sun.tools.doclets.internal.toolkit.util.DocPath Java Examples

The following examples show how to use com.sun.tools.doclets.internal.toolkit.util.DocPath. 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: Utils.java    From sarl with Apache License 2.0 6 votes vote down vote up
/** Copy the given file.
 *
 * @param filename the file to copy.
 * @param configuration the configuration.
 * @throws DocletAbortException a runtime exception.
 */
public static void performCopy(String filename, SarlConfiguration configuration) {
	if (filename.isEmpty()) {
		return;
	}

	try {
		final DocFile fromfile = DocFile.createFileForInput(configuration, filename);
		final DocPath path = DocPath.create(fromfile.getName());
		final DocFile toFile = DocFile.createFileForOutput(configuration, path);
		if (toFile.isSameFile(fromfile)) {
			return;
		}
		configuration.message.notice((SourcePosition) null,
				"doclet.Copying_File_0_To_File_1", //$NON-NLS-1$
				fromfile.toString(), path.getPath());
		toFile.copyFile(fromfile);
	} catch (IOException exc) {
		configuration.message.error((SourcePosition) null,
				"doclet.perform_copy_exception_encountered", //$NON-NLS-1$
				exc.toString());
		throw new DocletAbortException(exc);
	}
}
 
Example #2
Source File: HtmlDocWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #3
Source File: HtmlDocWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #4
Source File: HtmlDocWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #5
Source File: HtmlDocWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #6
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 #7
Source File: HtmlDocWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    this.pathToRoot = filename.parent().invert();
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #8
Source File: HtmlDocWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #9
Source File: HtmlDocWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #10
Source File: HtmlDocWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor. Initializes the destination file name through the super
 * class HtmlWriter.
 *
 * @param filename String file name.
 */
public HtmlDocWriter(Configuration configuration, DocPath filename)
        throws IOException {
    super(configuration, filename);
    configuration.message.notice("doclet.Generating_0",
        DocFile.createFileForOutput(configuration, filename).getPath());
}
 
Example #11
Source File: HtmlDocWriter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #12
Source File: HtmlDocWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #13
Source File: HtmlDocWriter.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #14
Source File: HtmlDocWriter.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #15
Source File: HtmlDocWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #16
Source File: HtmlDocWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #17
Source File: HtmlDocWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #18
Source File: HtmlDocWriter.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #19
Source File: HtmlDocWriter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #20
Source File: HtmlDocWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #21
Source File: HtmlDocWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #22
Source File: HtmlDocWriter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #23
Source File: HtmlDocWriter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #24
Source File: HtmlDocWriter.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link, String label) {
    return getHyperLink(link, new StringContent(label), false, "", "", "");
}
 
Example #25
Source File: HtmlDocWriter.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #26
Source File: HtmlDocWriter.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Content getHyperLink(DocPath link,
                           Content label, boolean strong,
                           String stylename, String title, String target) {
    return getHyperLink(new DocLink(link), label, strong,
            stylename, title, target);
}
 
Example #27
Source File: HtmlDocWriter.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Get Html Hyper Link.
 *
 * @param link       String name of the file.
 * @param label      Tag for the link.
 * @param title      String that describes the link's content for accessibility.
 * @param target     Target frame.
 * @return a content tree for the hyper link.
 */
public Content getHyperLink(DocPath link,
        Content label, String title, String target) {
    return getHyperLink(new DocLink(link), label, title, target);
}
 
Example #28
Source File: AbstractProfileIndexWriter.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructor. Also initializes the profiles variable.
 *
 * @param configuration  The current configuration
 * @param filename Name of the profile index file to be generated.
 */
public AbstractProfileIndexWriter(ConfigurationImpl configuration,
                                  DocPath filename) throws IOException {
    super(configuration, filename);
    profiles = configuration.profiles;
}
 
Example #29
Source File: HtmlDocWriter.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Get Html Hyper Link.
 *
 * @param link       String name of the file.
 * @param label      Tag for the link.
 * @param title      String that describes the link's content for accessibility.
 * @param target     Target frame.
 * @return a content tree for the hyper link.
 */
public Content getHyperLink(DocPath link,
        Content label, String title, String target) {
    return getHyperLink(new DocLink(link), label, title, target);
}
 
Example #30
Source File: AbstractPackageIndexWriter.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructor. Also initializes the packages variable.
 *
 * @param configuration  The current configuration
 * @param filename Name of the package index file to be generated.
 */
public AbstractPackageIndexWriter(ConfigurationImpl configuration,
                                  DocPath filename) throws IOException {
    super(configuration, filename);
    packages = configuration.packages;
}