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

Bug 472462

Summary: Formmater indentation with "Tab size: 2"
Product: [Eclipse Project] JDT Reporter: Lucas Neiva <lucas.neiva>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, mateusz.matela
Version: 4.5   
Target Milestone: 4.5.1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Workspace with the described formatter settings none

Description Lucas Neiva CLA 2015-07-13 04:50:20 EDT
Created attachment 255143 [details]
Workspace with the described formatter settings

Migrating from Eclipse Luna to Eclipse Mars, previously working formatter settings with "Tab size" set to 2, now lose the first level of indentation.

Steps to reproduce:
- Clone the eclipse formatter settings.
- Edit the formatter settings.
- Set the "Tab policy" to "Tabs only", and the "Tab size" to "2".
- Run the formatter on a method body indented with using tabs.

I've attached a workspace, where Example.java shows this effect.
Comment 1 Mateusz Matela CLA 2015-07-13 16:30:16 EDT
Duplicate of bug 467229.
Workaround: change tab policy so that you can edit both tab size and indentation size, change both to desired value, switch tab policy back to tabs.
Comment 2 Lucas Neiva CLA 2015-07-14 04:01:22 EDT
Sorry. I was unable to find the previous bug report. Thanks Mateusz.

*** This bug has been marked as a duplicate of bug 467229 ***
Comment 3 Sasikanth Bharadwaj CLA 2015-08-21 03:04:48 EDT
Verified for 4.5.1 using M20150819-1000 build