Are there any tools in IDEs to automatically fix comment formatting?

Posted by Fragsworth on Stack Overflow See other posts from Stack Overflow or by Fragsworth
Published on 2010-03-08T17:18:53Z Indexed on 2010/03/08 17:21 UTC
Read the original article Hit count: 257

Filed under:
|
|
|
|
/* Suppose I have a multi-line comment with hard line-breaks
 * that are roughly uniform on the right side of the text,
 * and I want to add text to a line in order to make the
 * comment a bit more descriptive.
 */

Now, most unfortunately, I need to add text to one of the top lines.

/* Suppose I have a multi-line comment with hard line-breaks (here is some added text for happy fun time)
 * that are roughly uniform on the right side of the text,
 * and I want to add text to a line in order to make the
 * comment a bit more descriptive.
 */

It takes O(n) time (n being the number of lines) to fix each line so that they roughly line up again. The computer should do this, not me.

Are there tools to deal with this in our IDEs? What are they called?

© Stack Overflow or respective owner

Related posts about netbeans

Related posts about eclipse