Community
Participate
Working Groups
I wanted to set the tab width to 8 while indenting by 4 spaces (common Java style). To do that, I've set the following: Window -> Preferences -> Java -> Editor -> Appearance -> Displayed tab width: 8 Window -> Preferences -> Java -> Code Formatter -> Style -> Indentation is represented by a tab: unchecked Window -> Preferences -> Java -> Code Formatter -> Style -> Number of spaces representing a tab: 4 The behavior expected: formatting the code or pressing enter will indent by 4 spaces, while displaying files that contain \t will display them as 8 spaces. The behavior in practice: formatting the code indeed indent by 4 spaces, but when pressing enter after a class/interface declaration, it indents by 8 spaces instead of 4. If indenting manually then pressing enter it goes back to 4.
*** This bug has been marked as a duplicate of 28454 ***