Bug 28005 - Wrong indentation after class declaration
Summary: Wrong indentation after class declaration
Status: RESOLVED DUPLICATE of bug 28454
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-10 06:38 EST by ofir CLA
Modified: 2003-02-10 10:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ofir CLA 2002-12-10 06:38:54 EST
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.
Comment 1 Kai-Uwe Maetzel CLA 2003-02-10 10:09:41 EST

*** This bug has been marked as a duplicate of 28454 ***