Archive for the 'Eclipse' Category

Eclipse and the hunt for soft tabs

If I want to change the default behaviour for using soft tabs–using spaces instead of tabs when I press the tab key–in NetBeans, I only need to make the change in one place. If I want to do the same in jEdit, I only need to set it once. If I want to set soft tabs in Eclipse, I need to change it all over the place.

I was working on an Ant build script today in Eclipse and wanted to change the default editor behaviour to use spaces instead of tabs. So I wandered into the Preferences section. I know the setting is not going to be under Java, so I try the General tab, no luck. Finally, I try the “Web and XML” tab. Sure enough, there is a tab for XML files under which I can set the “Indent using spaces” option and press apply.

I then go back to editing my build file and it is still using tabs. Apparently, to Eclipse, a build file is not an XML file. So back into the preferences I go. This time I see the Ant tab and am able to set it to use spaces there.

Something as fundamental to programming as the option of using Tabs or Spaces should be obvious and easy to set for every editor. This is one area that NetBeans has Eclipse beat hands down. It is very easy to set editor styles in NetBeans. Granted, Eclipse’s editor styles and setting are more powerful, but they are also incredibly complex and confusing.

Every time I go looking to set spaces instead of tabs for the Java editor, it takes me at least a half hour of searching and hunting. This is because it is not even an option. Instead, it needs to be configured via the Code Style Formatter by either creating a new style or modifying one of the default styles.

What is the saying, “Make the simple things simple and the complex things possible”? This is one area that Eclipse makes what should be an easy thing incredibly complex. i think this is Eclipse’s biggest downfall, it simply is not simple to use. Nothing is intuitive about the application. True, it is very powerful and configurable. I guess that it is why it is the number one IDE, but simple it is not.

I use Eclipse all the time, but for new programmers I always recommend NetBeans because it is simple to use and easy to start working with.