0

I have a problem with auto generated Spring controller classes. I configured my eclipse and now it change tabs to spaces. I done it according to: How do I change Eclipse to use spaces instead of tabs? It works perfectly but when I create, for example, simple Spring 'Hello World' application, my HomeController.java (which is generated automatically) will contain tabs, not spaces. Is there any way to replace tabs with spaces in this type of classes too? Thanks in advance for help.

Community
  • 1
  • 1
caro2
  • 155
  • 1
  • 4
  • 13
  • If it's a generated class, probably not easily. It depends on where it is coming from. If it's a template you can probably update the template. – javamonkey79 Nov 19 '13 at 18:00
  • Where can I change this template? You mean - Java -> Code Style -> Code Templates or Java -> Editor -> Templates? – caro2 Nov 19 '13 at 18:36
  • Eclipse has a bunch of templates that could be doing it, additional plugins contribute to this as well: Spring, Maven, etc. I'm not entirely sure what you are using to generate your Spring classes, but I'd bet it's in the Spring plugin. You can try just putting in "template" in the Window->preferences menu and see if one of those options is what you're looking for. Or provide more information :) Good luck. – javamonkey79 Nov 19 '13 at 18:58
  • To generate Spring project I'm using Spring Project -> Spring MVC Project. I was digging in Windows -> Preferences in Spring -> Template Project but there is not option to change generated classes or something like that. Don't get me wrong, is not a big issue. Only 'Home Controller' class is generating during create project. I'm asking rather out of curiosity. – caro2 Nov 21 '13 at 21:52

0 Answers0