OverviewDownloadDocumentationPlug-insLinksContact
Features | History | Manual | FAQ | Javadoc
This page generated: December 10 2003

4.3.6. Comments

Controls how Jalopy handles certain types of comments.

As far as Jalopy is concerned, there are five types of comments:

  1. Single-line comments // text

    An end-of-line comment: all text from the ASCII characters // to the end of the line

    Example 4.130. Single-line comment

    // [PENDING] this should be part of the ErrorManager
    

  2. Multi-line comments /* text */

    A traditional comment: all text from the ASCII characters /* to the ASCII characters */

    Example 4.131. Multi-line comment

    /* public int getSubregionStartOffset(int line, int subregion)
    {
    	ChunkCache.LineInfo[] lineInfos = chunkCache.getLineInfosForPhysicalLine(line);
    	return buffer.getLineStartOffset(lineInfos[subregion].physicalLine)
    		+ lineInfos[subregion].offset;
    } */
    

  3. Javadoc comments /** text */

    A documentation comment: actually a special kind of multi-line comment as defined by the Sun Javadoc specification; all text from the ASCII characters /** to the ASCII characters */

    Example 4.132. Javadoc comment

    /**
     * A scroll listener will be notified when the text area is scrolled, either
     * horizontally or vertically.
     *
     * @author Slava Pestov
     * @since jEdit 3.2pre2
     */
    

  4. Separator comments //~ text

    A Jalopy-specific separator comment: actually a special kind of single-line comment; all text from the ASCII characters //~ to the end of the line

    Example 4.133. Separator comment

    //~ Inner classes .......................................
    

  5. Pragma comments //J[directive]

    A Jalopy-specific control comment: actually a special kind of single-line comment; all text from the ASCII characters //J[-|+] to the end of the line

    Example 4.134. Control comments

    //J-
        if {condition()) return value;
    //J+
    

    Currently, Jalopy recognizes two pragma comments: //J- and //J+

    With these comments you can disable formatting for certain code sections. //J- tells Jalopy to disable formatting until //J+ will enable it again. Note that these comments can only be used in conjunction! Omitting the //J+ will certainly produce errors.

4.3.6.1. Remove

Controls whether and what types of comments should be removed during the formatting process.

  • Single-line comments

    If enabled, removes all single-line comments found in a source file.

  • Multi-line comments

    If enabled, removes all multi-line comments (sometimes called block comments) found in a source file.

  • Javadoc comments

    If enabled, removes all Javadoc comments found in a source file. This may prove useful in conjunction with the Javadoc auto-generation capabilities to build Javadoc from scratch.

4.3.6.2. Format

Controls the reformatting of comments.

  • Multi-line comments

    Enables the reformatting of multi-line comments. Only affects the leading asterixes of consecutive comment lines as shown in the examples below.

    Example 4.135. Multi-line comment

    /* Multi-line
    * comment.
    * end.
    */
    

    Example 4.136. Multi-line comment (reformatted)

    /* Multi-line
     * comment.
     * end.
     */
    

to top