History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-17068
Type: Bug Bug
Status: Open Open
Assignee: Maxim Shafirov
Reporter: Mike Hanafey
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

IDEA does not format block comments sensibly

Created: 05 Feb 08 18:11   Updated: 11 Feb 08 18:37
Component/s: Code Formatting and Code Style

Build: 7,675
Severity: Low


 Description  « Hide
Java has two kinds of block comments. JavaDoc comments look like "/** .... /", but non-JavaDoc block comments look like "/ ...*/". The problem is non-JavaDoc block comments are not formatted properly.

For example, say there is a section comment:

        /* =================================
         *   GETTERS and SETTERS
         * ================================= */
        public int getFoo() {...}

If this code is moved to an inner class, the indentation level changes, and when the code is reformatted, the following appears:

        /* =================================
      *   GETTERS and SETTERS
      * ================================= */
        public int getFoo() {...}

The correct behaviour would line up the "" in the comment, just like a /* comment would do.

A further convention from java.sun.com is that comments like following are protected from getting wrapped:

    /*-
     * Here is a block comment with some very special
     * formatting that should not be messed with.
     *
     *    one
     *        two
     *            three
     */

http://java.sun.com/docs/codeconv/html/CodeConventions.doc4.html



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.