0
votes

It's our policy to use spaces instead of tabs. There are quite some postings for this topic but the following hasn't been answered yet. I use the following settings:

  • General > Editors > Text Editors. Check “Insert spaces for tabs”
  • Java > Code Style > Formatter. Create a new profile. Go to the Indentation tab and set “Tab policy” to “Spaces only”
  • Ant > Editor > Formatter. Uncheck "Use tab character instead of spaces"

Yet, Eclipse still uses tabs in .project files. If that can be prevented, how?

1

1 Answers

0
votes

The .project file is in internal Eclipse file which you should not be editing. Because it is an internal file it does not use any of the preference settings.

The file is actually written using the org.eclipse.core.internal.resources.XMLWriter class. This is hard coded to use tabs.