Bug 4136 - EC DCR: "Convert all tabs to spaces" option in Java editor (1GIV5Z7)
Summary: EC DCR: "Convert all tabs to spaces" option in Java editor (1GIV5Z7)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kai-Uwe Maetzel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 23:06 EDT by Carolyn MacLeod CLA
Modified: 2003-08-20 13:33 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2001-10-10 23:06:39 EDT
From Eclipse Corner: Java Editor feature requests

Finally, it would be nice to have a "convert all tabs to spaces" option. 
Given the two problems above, it's much easier to tab to the right place 
than to hold down the space bar, but our convention (sensible, I think) 
is to use spaces instead of tabs in our source files. I'd rather not 
mess that up :)


NOTES:
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:13:53 EDT
moved to 'active'
Comment 2 DJ Houghton CLA 2001-10-29 17:33:53 EST
PRODUCT VERSION:
	R0.9

Comment 3 Mike Miller CLA 2001-11-14 17:38:12 EST
The feature I would like to see is a setting where tabs are tabs during editing
but when the file is saved to disk all tabs are converted to spaces.   An
related option (separately settable) would be to automatically convert leading
spaces to tabs when a file is loaded.  
This behavior allows you to keep the benefits of tabs during editing but avoids
the troubles that often occur when they appear in the repository/library system
used by the team.
Comment 4 Erich Gamma CLA 2001-11-19 09:22:07 EST
we need a consistent story for how to handle the different TAB related feature 
requests.
Comment 5 Claude Knaus CLA 2002-01-17 09:02:26 EST
Mike,

why would you want to edit with tabs if you want spaces? If there was an option
to insert spaces for each tab being hit, wouldn't that be enough?

Conversion of tabs <-> spaces on save and loading should be part of the encoding
story, or at least use the same mechanism.

For now, I see two important feature requests (in this order):

  1) option to insert spaces when a tab is hit
  2) action to convert all tabs to spaces or vice versa
     (similar to code format action)
Comment 6 Claude Knaus CLA 2002-04-12 11:18:39 EDT
------- Additional Comments from John Verhaeg (mailto:JVerhaeg@MetaMatrix.Com) -
------

I agree with Mike's comment:

"The feature I would like to see is a setting where tabs are tabs during
editing
but when the file is saved to disk all tabs are converted to spaces.   An
related option (separately settable) would be to automatically convert
leading
spaces to tabs when a file is loaded.  
This behavior allows you to keep the benefits of tabs during editing but
avoids
the troubles that often occur when they appear in the repository/library
system
used by the team."

This benefit I see is that you would be able to cursor over tabs within the
editor quickly, e.g., if tabs were set to 4, and a pair of tokens were
separated by 16 "spaces", it would only take 4 keystrokes to move from one
token to the other.
Comment 7 Erich Gamma CLA 2002-05-09 08:38:28 EDT
option to insert tabs for spaces is in the current stream.

converting all tabs to spaces is supported by the code formatter