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

Bug 135512

Summary: [formatter] Incorrect indent amount for 2nd line of long 'if' statement
Product: [Eclipse Project] JDT Reporter: Andrzej Miazga <Andrzej.Miazga>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P5 CC: daniel_megert, Olivier_Thomann
Version: 3.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andrzej Miazga CLA 2006-04-07 06:11:43 EDT
In the following statement:
if (identifiable1 == null || identifiable2 == null
    || identifiable1.getClass() != identifiable2.getClass()) {
    ...
}
the 2nd line of the 'if' statement is indented by one (4 spaces), but I would like it to be indented by two.

I set the following formatter options in 'Line wrapping' tab:
- Default indentation for wrapped lines: 2
Statements:
- Line wrapping policy: Wrap only when necessary
- Indentation policy: Default indentation.

I set the same options for 'Method Declarations -> Parameters' and they work OK.

I use build I20060331-2000.
Comment 1 Frederic Fusier CLA 2008-08-18 08:07:17 EDT
Ownership has changed for the formatter, but I surely will not have enough time to fix your bug during the 3.5 development process, hence set its priority to P5.
Please provide a patch if you definitely need the bug to be fixed in this version and I'll have a look at it...
TIA
Comment 2 Dani Megert CLA 2013-01-11 04:56:37 EST
Works for me using N20130110-2000.