Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 421492

Summary: [formatter] Allow to add blank line(s) before a statement
Product: [Eclipse Project] JDT Reporter: Lyle Ziegelmiller <lyle_z>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, jarthana, mateusz.matela
Version: 4.4   
Target Milestone: 4.13 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/147518
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=0da21f8ea91a757805c7fad5645bcf49a36c1bb9
Whiteboard:
Bug Depends on:    
Bug Blocks: 550083    

Description Lyle Ziegelmiller CLA 2013-11-11 18:57:30 EST
Hi. It would be nice if, when there is no blank line above/below a block of code, such as an if {...}, while {...}, try/catch block, etc., the code formatter could be configured to insert a blank line(s):

This:

int i = 1;
while (...)
{
}
int j = 2;

would become this:

int i = 1;

while (...)
{
}

int j = 2;



thanks

Lyle
Comment 1 Eclipse Genie CLA 2019-08-11 19:05:10 EDT
New Gerrit change created: https://git.eclipse.org/r/147518
Comment 3 Mateusz Matela CLA 2019-08-12 15:44:45 EDT
Added a setting for before and after a statement with a code block.
Comment 4 Jay Arthanareeswaran CLA 2019-08-21 10:04:06 EDT
Verified for 4.13 M3 using build I20190820-1800