Community
Participate
Working Groups
In 3.1M4 I set "General-Editors-All Text Editors-Displayed tab width" to 8. Under "Java-Code Style-Formatter-Indentation-General settings" i set Tab size to 4, using spaces. In version 3.0.1 I had the opportunity to set "Displayed tab width" to 8 under "Java-Editor-Appearance", but in 3.1M4 this seems to be removed, and what is worse, the "Displayed tab width" setting from the "All Text Editors" doesn't seem to be used. To change all tabs to 8 spaces is not an option, as a huge diff would be the result (we have some 3-4000 .java files in the project). The Java editor should use the "General-Editors-All Text Editors-Displayed tab width" setting. As it is now, the code looks completely messed up and the 3.1M4 is impossible to use (but we need it for Java 1.5).
>Under "Java-Code Style-Formatter-Indentation-General settings" i set Tab size to >4, using spaces. Why don't you set it to 8 then? Tom please comment.
Because one indentation level is 4 spaces. A tab is two indentations (4 spaces each). Setting Java-Code Style-Formatter-Indentation-General settings-Tab size" to 8 will make all indentations one level too deep.
Tempted to close as dup of bug 73104 - eclipse simply does not currently (and never did) support mixed indentations. I wonder how the setup worked out for you before, as you were not able to use the formatter nor auto-indent.
It worked perfectly fine, both auto-indent and formatting was OK! I really hope you can find a way to make it work as before, or we'll have a bad problem here.
In 3.0 at least you had the option of 8-column "display tab width" so you could view existing files, plus you could set the formatter indent width to 4, as long you told the formatter to not use tabs. Thus you had to option to *incrementally* migrate to using the Eclipse formatter, without tabs. I was set to go this approach, but I clearly can't use 3.1M4, since it gives me the unappealing choice of either having all my existing files unreadable, or not being able to re-format. Tom Eicher wrote: "eclipse simply does not currently (and never did) support mixed indentations". Right, but I hoped in bug 73104 I explained why it is important to fix this. It seems trivial: de-couple the display width and the indentation width configuration parameters; when formatting a line, calculate the indentation, and then (if using tabs) represent an indentation of I columns by (I/T) tabs followed by (I%T) spaces. where T is the display tab width.
The solution of bug 73104 will solve this one. *** This bug has been marked as a duplicate of 73104 ***