Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » tabs for spaces/spaces for tabs
tabs for spaces/spaces for tabs [message #135686] Mon, 19 January 2004 15:43 Go to next message
Eclipse UserFriend
Originally posted by: fischerj.oclc.org

Not a big deal, but I'm wondering what the intent here is:
Under Perferences/Java/Editor/Typing there is a check box for
"Insert spaces for tabs (see Code Formatter preference page)." Then
under Code Preference/Style there is a check box for "Insert tabs for
identation, not spaces."
Although I have not played with the various combinations of
these flags extensively, it seems like a conflict can arise when both
are set. Which one wins?
Re: tabs for spaces/spaces for tabs [message #135720 is a reply to message #135686] Mon, 19 January 2004 16:17 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-user.jibeinc.com

fischerj@oclc.org wrote:

> Not a big deal, but I'm wondering what the intent here is:
> Under Perferences/Java/Editor/Typing there is a check box for
> "Insert spaces for tabs (see Code Formatter preference page)." Then
> under Code Preference/Style there is a check box for "Insert tabs for
> identation, not spaces."
> Although I have not played with the various combinations of
> these flags extensively, it seems like a conflict can arise when both
> are set. Which one wins?

They come into play at different times, under different usage scenarios.
The first (Java > Editor > Typing) is used as you enter (type) code into
the Java editor. If selected, when you press <Tab> it will instead put
in spaces, IIUC.
The second applies when you use the Code Formatter (select code and
right-click to choose Source > Format). In that scenario, the second
preference you mention, if selected, causes the formatter to use tab
characters as it automatically indents the code.

What I'm not sure about which preference is used when Eclipse is
generating code, as in Generate Getters/Setters.

<soapbox> In any case, I see usage of spaces for indentation as
brain-dead and contributing to the problem it is supposed to
relieve.</soapbox>

Eric
--
Eric Rizzo
Software Architect
Jibe, Inc.
http://www.jibeinc.com
Previous Topic:Postings
Next Topic:Adding menu items to Java editor's context menu
Goto Forum:
  


Current Time: Tue Jul 22 02:25:23 EDT 2025

Powered by FUDForum. Page generated in 0.12319 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top