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 253848 - Formatter does not generate paragraph for all blank lines
Summary: Formatter does not generate paragraph for all blank lines
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 09:47 UTC by stwr
Modified: 2015-09-01 11:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Shows missing paragraphs (113.02 KB, image/png)
2015-07-27 09:47 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-07-27 09:47:11 UTC
Created attachment 154939 [details]
Shows missing paragraphs

Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\8.1beta

Test Case --> http://services.netbeans.org/synergy/client/app/#/case/2215/suite/1700/v/1

Actually the formatter generates the paragraph tag for manually inserted blank lines. For focused part of code (see the picture) it generated only one tag at line 37. All lines where I expected generated tags are highlighted. The formatter result does not fit also to preview in Formatting options where I can see automatic paragraph tags for all blank lines.
Comment 1 Dusan Balek 2015-07-27 11:07:15 UTC
Unfortunately, I cannot reproduce the problem. Are you sure that your test source file has correct line endings (CRLF) for your operating system?
Comment 2 stwr 2015-07-27 11:16:47 UTC
All these test sources have been attached into the specification by author I guess. I did not check actually whether all lines are ending correctly or not.

Please note that empty lines between method description, return parameters and thrown exception have been inserted by IDE formatter. So if they have bad line ending it is not my fault.

I suggest to reproduce the test case and use the same sources.

Please also note that formatter result does not fit to preview and this is clearly visible on the attached picture.
Comment 3 Dusan Balek 2015-07-28 09:01:42 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/756f13e3656c
Comment 4 Quality Engineering 2015-07-29 01:28:51 UTC
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/756f13e3656c
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253848 - Formatter does not generate paragraph for all blank lines - fixed.
Comment 5 stwr 2015-09-01 11:08:22 UTC
Verified positively in *201508310002*.

However when the first comment line is a blank line it is not replaced with the paragraph tag. But IMO it does not make sense to have blank line nor <p> in the first line of comment.

Good job! Thanks.