8

My eclipse version is Mars Release (4.5.0).Preferences->XML->XML Files->Editor,I can not set the value of Indentation size. The "+" and "-" can not be clicked . I can not input value yet!

1
  • This applies to STS-3.7.2 as well Commented Apr 22, 2016 at 11:00

3 Answers 3

25

Had the same problem, I found the following workaround:

  1. open with a text editor this file in your workspace folder: .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.core.prefs
  2. change or add the following line ("4" is just an example): indentationSize=4
  3. (Re)start Eclipse
Sign up to request clarification or add additional context in comments.

3 Comments

According to this method ,I have solved the problem .Thanks!+1
If the file isn't there just change the max line length and apply in Eclipse and the file will be created. Thanks!
Seems to be due to a bug that is not yet fixed/released. See more at bugs.eclipse.org/bugs/show_bug.cgi?id=428246
0

This is a known bug in Eclipse. It is related to GTK3: https://bugs.eclipse.org/bugs/show_bug.cgi?id=428246

It was originally reported in early 2014 for the Kepler release.

Comments

0

In addition to Kollgandren's answer, if you want to use spaces as your indent, include two options in your ${WORKSPACE}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.core.prefs file.

indentationChar=space indentationSize=4 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.