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 225221 - Reformat on save breaks javadoc formatting
Summary: Reformat on save breaks javadoc formatting
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-23 09:55 UTC by Jiri Prox
Modified: 2013-08-29 12:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test file (1.09 KB, text/plain)
2013-04-12 17:04 UTC, MackSix
Details
Format Settings (1.37 KB, application/zip)
2013-04-12 17:12 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2013-01-23 09:55:55 UTC
Reformat modified lines on save break javadoc formatting.

Steps to reproduce:
1) enable Reformat modified lines on save
2) have method with javadoc


    /**
     * Gets the number of words in the library.
     *
     * @return the total number of plain/scrambled word pairs in the library
     */

3) type something to javadoc
4) save the file

-> javadoc formatting  is broken
    /**

   * Gets the number of words in the library. Another sentence     *
     * @return the total number of plain/scrambled word pairs in the library
     */



Product Version: NetBeans IDE 7.3 RC1 (Build 201301222100)
Java: 1.7.0_11; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\7.3rc1
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\7.3rc1
Comment 1 MackSix 2013-03-25 16:05:15 UTC
Reproducible

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 2 Dusan Balek 2013-04-12 16:29:02 UTC
Unfortunately, I cannot reproduce the problem in the current dev build. Could you please attach your formatting options? Thanks.
Comment 3 MackSix 2013-04-12 17:03:58 UTC
(In reply to comment #2)
> Unfortunately, I cannot reproduce the problem in the current dev build. Could
> you please attach your formatting options? Thanks.

Use the default settings for formatting blank lines and right margin set to 80.

No need to save the file, just keep formatting it with Alt+Shift+F.

It only happens in Javadoc with line that extends past right margin.

Use attached code and keep formatting it with Alt+Shift+F and you will see the last line in the last 2 Javadocs split across 2 lines. Format again and they go back to one line. It keeps doing this each time you Format. Each time it merges back to one line a new "*" is added in the middle of the line. 

Product Version: NetBeans IDE Dev (Build 201304102301)
Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 4 MackSix 2013-04-12 17:04:43 UTC
Created attachment 133477 [details]
test file
Comment 5 MackSix 2013-04-12 17:12:56 UTC
Created attachment 133478 [details]
Format Settings

Here is an export of all of the default Formatting settings.
Comment 6 Dusan Balek 2013-04-15 16:52:01 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/2c73d535d55e
Comment 7 Quality Engineering 2013-04-18 02:19:15 UTC
Integrated into 'main-golden', will be available in build *201304172301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2c73d535d55e
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #225221: Reformat on save breaks javadoc formatting - fixed.
Comment 8 Jiri Prox 2013-08-29 12:28:30 UTC
v.