Document! X 2017
Getting Started / Getting Started with Java Reference Documentation
In This Topic
    Getting Started with Java Reference Documentation
    In This Topic

    The Java documentation support in Document! X allows you to create documentation for your Java source code projects.

    A full documentation set is generated including pages for each class, interface, enumeration, constructor, method and field you choose to include. Inheritance hierarchies, cross topic links, Object Model diagrams, Syntax sections are all automatically generated and combined with content from Javadoc source comments and any additional content you choose to author in a Document! X Content File.

    The Document! X Java Documentation support fully leverages Javadoc source comments, adding features and functionality to what is possible with the Standard Javadoc generator.

    Java Reference Documentation Fundamentals

    Create a new Java Reference Documentation Project

    1. Click the Application Menu button at the top left of the Ribbon;
    2. Select the New page;
    3. Choose Empty Project from the available Project Types;
    4. On the New Project dialog, type a descriptive Project Name for the new project; 
    5. You can optionally choose a specific directory in which to save your project by editing the Project Directory field; the project will by default be saved to a subdirectory of the default New / Save directory which is configurable in the Options editor (Paths page).
    6. Click Ok;

    The new empty documentation project will be created and opened for edit. You can now add the Java Projects that you wish to document:

    1. Click the Add Java Project Ribbon button on the Project Ribbon tab.
    2. Use the displayed dialog to define the source location, package names and other properties of the Java Project you would like to document in this project.

    The selected Java Project will be added to the Project Explorer under the Java Projects node. You can expand down through each project node to tick / untick individual packages or types in order to include / exclude them from the generated output; by default private and protected types are excluded (unticked).

    You can add as many additional Java Projects as you wish by repeating the procedure above.

    A Content File will be created and added to the project under the Content Files node for each Java Project you add to the project. You can use this Content File to author additional content in the pages that Document! X will automatically generate.

    Javadoc Comments from your source code will be automatically used in the generated output. Javadoc content is displayed in the Content File Editor so you can see at a glance what content is already available from source comments and what requires further authoring.

     

    Author content in Javadoc comments

    You can use standard Javadoc source comments in your Java source code and Document! X will use them by default in the generated output.

    Example

    /**
     * <p>Returns an Image object that can then be painted on the screen.
     * The url argument must specify an absolute {@link URL}. The name
     * argument is a specifier that is relative to the url argument.</p>
     * <p>This method always returns immediately, whether or not the
     * image exists. When this applet attempts to draw the image on
     * the screen, the data will be loaded. The graphics primitives
     * that draw the image will incrementally paint on the screen.</p>
     *  
     * @param  url  an absolute URL giving the base location of the image
     * @param  name the location of the image, relative to the url argument
     * @return      the image at the specified URL
     * @see  Image
     */
     public Image getImage(URL url, String name) {
            try {
                return getImage(new URL(url, name));
            } catch (MalformedURLException e) {
                return null;
            }
     }
    Each time you load your project, Document! X will extract the latest Javadoc source comments for use in the documentation generation process so your documentation is always right up to date.

      

    Author content outside of the source code

    If you would like to supplement the content of the pages automatically generated by Document! X outside of the source code, you can do so using the Document! X Content File Editor.

    The Content File Editor allows you to review and author content for any item for which a reference documentation page is generated.

    To open the Content File Editor:

    1. Expand the Content Files node on the Project Explorer.
    2. Locate the Content File for the item you wish to author content for.
    3. Right click on the Content File and select Edit.
    4. The Content File will be opened for edit. The tree on the left hand side of the editor shows you a hierarchical view of the item you are documenting.
    5. Drill down and select an item from the tree and the related documentation pages will be shown in the right hand side of the editor.
    6. Type directly in the editable portions of the page on the right hand side of the editor.
    7. Select a specific content type from the toolbar / vertical menu to edit a specific type of content (e.g. Summary, See Also, Keywords).

    Content File Editor Movies

     

    Add Conceptual Topics

    Conceptual information is a key part of reference documentation, providing a high level introduction, tutorials or other conceptual information. You can easily create conceptual topics in Document! X.

    1. Click the New Topic button on the Project Ribbon tab, or use the Ctrl+T shortcut key.
    2. The new Topic will be created in the currently selected Topic Category on the Project Explorer (or under the (Un-categorized) node if no category is selected) and will be opened for edit.
    3. Type your conceptual content directly in the editable area of the Topic Editor.

    You can find more information on Topic Editing in the Topic Editor topic.

    Conceptual Authoring Movies

     

    Change Java documentation settings

    The settings that govern Java documentation generation are defined in the Build Profile editor. In a new project there is a single Build Profile but you can define many build profiles if you want to create multiple outputs with different settings.

    To edit Java documentation settings:

    1. Expand the Build Profiles node in the Project Explorer.
    2. Select the Build Profile that you wish to edit.
    3. Right click on the Build Profile and select Edit.
    4. The Build Profile will be opened for edit.

    In the Build Profile editor, you can find the Java Settings pages under the Reference Documentation section.

    You can change the Template used for Java documentation (which defines the look and feel of generated pages) on the Templates page.

     

    Identify undocumented items 

    An essential part of delivering a complete documentation set is ensuring that all the items have been documented. Document! X includes the Undocumented Items tool to quickly and easily identify undocumented items.

    To identify undocumented items:

    1. On the Tools Ribbon Tab, click the Undocumented Items button;
    2. If your project contains more than one Build Profile, select the Profile for which you wish to find undocumented items;
    3. Tick the Item Types (e.g. Class, Method, Schema, Column) that you wish to check for undocumented items;
    4. Tick the Content Types that items must have to be considered documented (just Summary by default);
    5. Tick the Content Sources that should be used when checking for content;
    6. Click the Execute button. Any undocumented items will be listed in the results grid.

    See the Undocumented Items topic for more information.

    Find Undocumented Items Movies

     

    Build and deploy Java Reference Documentation

    Click the  Build Ribbon button on the Project ribbon tab to build your Java Reference Documentation.

    In a new project, the default Build Profile will be configured to generate output in CHM Html Help 1.x format. You can define additional Build Profiles if you want to generate multiple output types.

    Java documentation generated by Document! X can be published and associated with your Java Projects in Java Development tools in order to drive both tooltip and Shift+F1 help functionality, thereby providing developments who use your Java Projects with instant access to the documentation.

    Refer to the Deploying Java Documentation topic for more information on publishing your Java documentation.

    Movies

    See Also

    Root Topics