This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218898 - Formatting option set default to format comments
Summary: Formatting option set default to format comments
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.3
Hardware: PC All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 11:11 UTC by Chiana
Modified: 2016-07-07 07:31 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2012-09-24 11:11:11 UTC
[ JDK VERSION : 1.7.7 ]

Imho this is an error, normally comments should not be formatted, but the
default setting for this is to enable comment formatting.

I think the default setting for this should be comment formatting disabled.
Comment 1 Ralph Ruijs 2012-09-24 11:37:38 UTC
I do not agree, the problem described in #218825 is from using simple comments as Javadoc. Javadoc is written in HTML and should be limited by a line-width of 80 characters[1]. When formatting "shuffles" all your comment's text around, you can clearly see something is wrong with the written Javadoc. A simple; undo, fix the javadoc and again reformat should fix the problem.

[1] - http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#format
Comment 2 Chiana 2012-09-24 11:51:38 UTC
Well, if you look again you can clearly see that the reformat actually *made* lines longer than 80 chars.
Comment 3 Ralph Ruijs 2012-09-24 11:57:51 UTC
(In reply to comment #2)
> Well, if you look again you can clearly see that the reformat actually *made*
> lines longer than 80 chars.

Yes, but this looks like intended, I can not see the red line for the right margin.
Comment 4 Chiana 2012-09-24 12:10:07 UTC
Probable becase the editor margin is at 140 chars.

The actual problem is that the formatter messed up my nice looking comment when I reformatted the code, and that is not good.
Comment 5 Jan Lahoda 2012-09-24 12:21:09 UTC
(In reply to comment #4)
> The actual problem is that the formatter messed up my nice looking comment when
> I reformatted the code, and that is not good.

For the record: when a javadoc is rendered to HTML, it will be "flattened" basically in the same way as after the format. So for everybody reading the javadoc not the source, the result won't be nice. <pre></pre> should be used when preformated text is present.
Comment 6 Martin Balin 2016-07-07 07:31:34 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss