Bug 19036 - [preferences] spaces for tabs - confusing to have 2 setting places
Summary: [preferences] spaces for tabs - confusing to have 2 setting places
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement with 7 votes (vote)
Target Milestone: 3.1 M4   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 26270 37469 63520 78257 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-04 09:24 EDT by Adam Kiezun CLA
Modified: 2004-12-14 07:00 EST (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-06-04 09:24:24 EDT
F2
editor has one 
and the formatter has one too

the result is user confusion
Comment 1 Erich Gamma CLA 2002-06-04 17:56:25 EDT
suggest no action for 2.0
Comment 2 Dirk Baeumer CLA 2002-07-22 09:13:42 EDT
Reopening for 2.1 consideration
Comment 3 Peter Kidson CLA 2003-03-05 06:10:59 EST
Confusing, yes.

Editor:
   "Insert space for tabs (see code formatter preference page)"
Formatter:
   "Insert tabs for indentation, not tabs"

(1) In the one you check the box for tabs, in the other you do exactly the 
opposite - check the box for spaces.  (Presumably done by different teams).

(2) The editor one seems to take preference over the formatter one.  Poor souls 
only aware of the formatter one, have the mistaken but understandable 
impression that the feature just does not work.

(3) Although the editor one warns you of the existence of the formatter one, 
the reverse is not true.

(M5, w2k).

Comment 4 Dani Megert CLA 2004-01-12 11:19:52 EST
*** Bug 37469 has been marked as a duplicate of this bug. ***
Comment 5 Adam Kiezun CLA 2004-05-14 19:09:40 EDT
this is really a bug, not an enhancement
Comment 6 Tom Hofmann CLA 2004-05-28 04:06:23 EDT
*** Bug 63520 has been marked as a duplicate of this bug. ***
Comment 7 Tom Hofmann CLA 2004-06-11 05:52:10 EDT
*** Bug 66614 has been marked as a duplicate of this bug. ***
Comment 8 Jim Kingdon CLA 2004-06-13 23:35:53 EDT
This is a duplicate of bug 26270.
Comment 9 Tom Hofmann CLA 2004-06-14 01:27:21 EDT
*** Bug 26270 has been marked as a duplicate of this bug. ***
Comment 10 Alex Blewitt CLA 2004-06-14 08:52:53 EDT
An additional comment from bug 26270 that I made and is not in here:

In later versions of Eclipse, it would make sense to have a generic editor preferences configuration box 
in Eclipse, and then (if necessary) have as sub Java/XML/Whatever child from that, rather than a specific 
Java/Editor; in other words, use:

+ Editor <- tab/space configuration, general fonts (comments, string literals etc)
 - Java <- preferences with Java editors (formatting, close brace etc.)
 - XML <- location of DTDs etc

instead of
+ Java
 - Editor
+ XML
 - Editor
Comment 11 Alex Blewitt CLA 2004-06-14 08:54:05 EDT
An additional comment from bug 26270: this bug should also consider the 'show x spaces for tab', 
which is currently also shown in two places.
Comment 12 Dani Megert CLA 2004-11-10 05:21:51 EST
*** Bug 78257 has been marked as a duplicate of this bug. ***
Comment 13 Tom Hofmann CLA 2004-12-14 06:28:39 EST
This has been resolved for M4.

The current approach is to take the settings from the formatter. In order to
make this obvious, a link to the formatter preferences has been added on the
editor page.

One new confusing thing is that the Java editor does not respect the newly
shared text editor preference for tab width. But there is no way around this.
Comment 14 Noel Grandin CLA 2004-12-14 06:54:12 EST
>One new confusing thing is that the Java editor does not respect the newly
>shared text editor preference for tab width. But there is no way around this.

That doesn't sound right - how hard can it be for the Java Editor to retrieve
the values from the shared text editor preferences??
Comment 15 Tom Hofmann CLA 2004-12-14 07:00:43 EST
re comment 14: 

not hard at all for the editor - but the formatter also works headlessly, ie.
without an editor being displayed. Hence, it cannot use the editor display
preferences. In order to make the Java editor consistent, we chose to go down
this way...