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 230346 - [Formatter] alignment of parameters in JavaDoc is wrong, when right margin = 0
Summary: [Formatter] alignment of parameters in JavaDoc is wrong, when right margin = 0
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-27 21:04 UTC by markiewb
Modified: 2013-07-01 22:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Shows the reproduction and the wrong result (6.88 KB, image/png)
2013-05-27 21:06 UTC, markiewb
Details
Shows the reproduction and the wrong result (175.47 KB, image/png)
2013-05-27 21:07 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-05-27 21:04:53 UTC
[ BUILD # : 201305262300 ]
[ JDK VERSION : 1.7.0_21 ]

* Configure the Java-Formatter:
** Right margin = 0
** Comments: Wrap text at right margin =true
* Format a method with documented parameters in javadoc
For example:
<code>
    /**
     * @param foo this is my foo
     * @param bar that is my bar
     */
    private void blaBla(String foo, String bar) { }
</code>

ACTUAL: the parameter comment are aligned to the left - this looks very ugly
and IMHO this is unwanted behavior/bug - see screenshot
EXPECTED: ??? (when right margin==0, then no format of parameters in javadoc
should take place - what do you think?)
Comment 1 markiewb 2013-05-27 21:06:39 UTC
Created attachment 134975 [details]
Shows the reproduction and the wrong result
Comment 2 markiewb 2013-05-27 21:07:22 UTC
Created attachment 134976 [details]
Shows the reproduction and the wrong result
Comment 3 Dusan Balek 2013-05-29 08:17:28 UTC
What is the purpose of setting the right margin to 0? What would be the expected result of setting the right margin to 1, 2, ...?
Comment 4 markiewb 2013-05-29 20:41:39 UTC
(In reply to comment #3)
> What is the purpose of setting the right margin to 0? What would be the
> expected result of setting the right margin to 1, 2, ...?

@Dusan: Good catch! Setting the margin to 0 disables the right margin IMHO. (Or is there another way to disable the right margin?) 
I rather like that the option "Comments: Wrap text at right margin" won't be applied while formatting when the margin is set to 0.

Does this make sense?
Comment 5 Dusan Balek 2013-05-30 08:34:21 UTC
Sorry, it still doesn't make much sense to me :-(
You say: Setting the margin to 0 disables the right margin - OK.
But I don't understand why do you have "Comments: Wrap text at right margin = true" then?

But anyway, fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/6c79a9807377
Comment 6 Quality Engineering 2013-05-31 01:22:52 UTC
Integrated into 'main-golden', will be available in build *201305302301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6c79a9807377
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #230346: alignment of parameters in JavaDoc is wrong, when right margin = 0 - fixed.
Comment 7 markiewb 2013-07-01 22:50:26 UTC
Verified in 201307011244