johnthad / Javadoc-Frames-Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Javadoc Frames Generator

The Java Standard Edition API since version 11 has been published without the traditional HTML frames layout that many developers have become accustomed to. If you want to view the Java edition 11 (or later) API with HTML frames, as you could with earlier Java editions, then you may want to give this a try. The Javadoc Frames Generator is pure JavaScript. It uses Phantomjs to parse the javadoc files in a local directory and produce the files needed for an HTML frames layout. The generated layout is similar to that of the Java SE 10 API.

Usage

First you must have Phantomjs installed. Then you can copy the script and template files to a directory of your choice, and from that directory, execute:

 $ phantomjs jf-generator.js <path-to-javadoc-home> 

Alternatively, the path-to-javadoc-home parameter can be supplied by editing the configuration file js-config.js. For example:

exports.javadocPath = '/path/to/jdk11/docs/api';
...

After the script executes, open the newly created file: <path-to-javadoc-home>/main.html

Screenshots

The generated frames layout is similar to the Java SE 10 API, with a few notable differences:

API frames layout

View packages in the package list frame (upper left), grouped by module, in the All Modules list, which has expandable tabs.

package list frame   package list frame

Or select the All Packages list, as was available in previous editions.

package list frame

Note that a FRAMES/NO FRAMES button is placed in the upper right corner (just to the left of the API version header) to toggle the view mode from frames to no-frames.

The Javadoc Frames Generator only creates new files under the specified directory. None of the original API files are modified.

Dependencies

Phantomjs is the only dependency. You can download it from the Phantomjs website, or from Github, https://github.com/ariya/phantomjs.


Copyright © 2021 James P Hunter

About


Languages

Language:JavaScript 61.8%Language:HTML 36.0%Language:CSS 2.2%