Bug 30155 - Default indentation goes wrong when Tabs are disabled
Summary: Default indentation goes wrong when Tabs are disabled
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: 2003-01-24 06:01 EST by Anjum CLA
Modified: 2003-02-10 10:06 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anjum CLA 2003-01-24 06:01:39 EST
If I set "Indentation is represented by a tab" in Window-Preferences-Java-Code 
Formatter-Style, then when I press enter after the { in the code below (the dot 
represents the cursor position):
   if (something)
   {.
the result is as expected, i.e:
   if (something)
   {
      .
Howerver, if I do not set the above option (which is what I want), then I get:
   if (something)
   {
         .
This is very annoying as I have to continually delete the extra spaces that are 
inserted.
Comment 1 Kai-Uwe Maetzel CLA 2003-02-10 09:19:53 EST
How the indentation looks depends on your settings. There are two settings: One 
that talks about the usage of tabs and the other one talking about how many 
spaces are representing an indentation level. The example you give makes me 
believe that your value fir the latter setting is 8.
Comment 2 Anjum CLA 2003-02-10 09:29:29 EST
I still think its a BUG because I use the following settings:

Window-Preferences-Java-Editor: Appearance Tab
----------------------------------------------
Displayed Tab Width = 8

Window-Preferences-Java-Code Formatter: Style Tab
-------------------------------------------------
Insert tabs for indentation, not spaces is DISABLED
Number of spaces representing an indentation level = 3

I use these so that I can spot when TABS have been inserted incorrectly via 
other editors because the print view will be tabbed to 8 instead of 3.

BUG 28454 seems to have a patch for this - why don't you use it?
Comment 3 Kai-Uwe Maetzel CLA 2003-02-10 10:04:02 EST
If you know that this is a dup, why aren't you marking it as one?

*** This bug has been marked as a duplicate of 28545 ***
Comment 4 Kai-Uwe Maetzel CLA 2003-02-10 10:05:45 EST
Wrong bug #.
Comment 5 Kai-Uwe Maetzel CLA 2003-02-10 10:06:26 EST

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