Community
Participate
Working Groups
In Preferences/XML/XML Files/Editor, I have "Indent with tabs" on and "Indentation size" set to 2. However, when I do Source/Format on an opened XML file (either a specific format like pom.xml, or a generic test.xml), it formats in a completely different way: 2 tabs for every indentation, each tab rendered as 2 spaces. Is there another option for that? Is it a bug? The problem seems to have been around for a while [1]. [1]: https://stackoverflow.com/questions/7960612/adt-15-0-xml-indentation-formatting-broken
I suggest to give wild web developer a try (available via Eclipse marketplace).
As mentioned in that SO's answer, ADT implemented a different formatter for its file types. I must be confused, because the Text Editors preference page controls how many columns a tab character occupies, and otherwise it sounds like the formatter is doingg exactly what you told it to: indent using 2 tab characters.
Thanks for your answers. It's not doing what I expect and what other editors (eg, Java) actually do: If I say "indent with tabs" and "tab size=2", I expect that one indentation level is rendered with a single tab character and showing two character positions. Sorry with the confusion about the Android Development PlugIn: the SO post mentions it, however I see the same behaviour without using anything related to Android (I mostly develop for the server side and I know almost nothing about Android). To me, the XML editor is a pretty basic feature of the Eclipse IDE, even if it's tecnically a plug-in.