com.sun.tools.doclets.internal.toolkit.util.DocFile Java Examples
The following examples show how to use
com.sun.tools.doclets.internal.toolkit.util.DocFile.
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 |
/** 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 |
/** * 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 jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * 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-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * 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 openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * 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 |
/** * 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 #7
Source File: HtmlDocWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * 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 #8
Source File: HtmlDocWriter.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * 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-8-source with GNU General Public License v2.0 | 5 votes |
/** * 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 openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * 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: SarlDoclet.java From sarl with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("checkstyle:npathcomplexity") protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception { super.generateOtherFiles(root, classtree); if (configuration().linksource) { SourceToHTMLConverter.convertRoot(configuration(), root, DocPaths.SOURCE_OUTPUT); } if (configuration().topFile.isEmpty()) { configuration().standardmessage.error("doclet.No_Non_Deprecated_Classes_To_Document"); //$NON-NLS-1$ return; } final boolean nodeprecated = configuration().nodeprecated; Utils.performCopy(configuration().helpfile, configuration()); Utils.performCopy(configuration().stylesheetfile, configuration()); // do early to reduce memory footprint if (configuration().classuse) { ClassUseWriter.generate(configuration(), classtree); } final IndexBuilder indexbuilder = new IndexBuilder(configuration(), nodeprecated); if (configuration().createtree) { TreeWriter.generate(configuration(), classtree); } if (configuration().createindex) { if (configuration().splitindex) { SplitIndexWriter.generate(configuration(), indexbuilder); } else { SingleIndexWriter.generate(configuration(), indexbuilder); } } if (!(configuration().nodeprecatedlist || nodeprecated)) { configuration().getProxyInstaller().noProxy(configuration(), () -> { DeprecatedListWriter.generate(configuration()); }); } AllClassesFrameWriter.generate(configuration(), new IndexBuilder(configuration(), nodeprecated, true)); FrameOutputWriter.generate(configuration()); if (configuration().createoverview) { PackageIndexWriter.generate(configuration()); } if (configuration().helpfile.length() == 0 && !configuration().nohelp) { HelpWriter.generate(configuration()); } // If a stylesheet file is not specified, copy the default stylesheet // and replace newline with platform-specific newline. DocFile file; if (configuration().stylesheetfile.length() == 0) { file = DocFile.createFileForOutput(configuration(), DocPaths.STYLESHEET); file.copyResource(DocPaths.RESOURCES.resolve(DocPaths.STYLESHEET), false, true); } file = DocFile.createFileForOutput(configuration(), DocPaths.JAVASCRIPT); file.copyResource(DocPaths.RESOURCES.resolve(DocPaths.JAVASCRIPT), true, true); }