2

I have the settings for this done correctly.

enter image description here However for certain cases, like when I declare or initialize an anonymous class, and eclipse puts out auto-generated code, all of that is still tab-spaced. Is there a workaround to this?

  • Which editor in Eclipse are you actually using, though? Formatting rules might case an editor to ignore this preference. – nitind Feb 18 '15 at 16:05
  • normal java editor - eclipse luna – deostroll Feb 18 '15 at 16:44
2

For the Java Editor, it's controlled with/by the Java Formatter preferences. Java Editor Typing preferences Relevant section of the Formatter profile

  • I'm not sure why there would be a general offer of 'insert spaces for tabs' yet not respect it. – Queso May 6 '16 at 14:48
  • Thanks. I couldn't modify the built-in profile, so first I had to create my own. Luckily, you can copy a built-in profile and then customize it. – Jabba Oct 9 '16 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.