Settings button

When working in Eclipse or RAD, I immediately start modifying my environment. Here are some of the changes that I make that might improve your day, please feel free to share you own!

Stop the Servers tab from taking over!

Whenever server state changes (e.g. from Stopped to Starting, to Started, to Republish, etc), the Servers tab automatically shoves its way onto your screen because it wants you to know it did something. Great! But if you’re like me, you immediately dismiss it and now you’re a little distracted and a little annoyed. Here’s how to turn it off!

From within Eclipse’s / RAD’s preferences, click Server. Then uncheck “Show Servers view when server state changes.”

2015-03-30 23_31_39-Preferences

Stop the Console tab from taking over!

Now that we stopped the Servers tab, let’s do the same thing for Console! Output is constantly written to the console, and I typically look at it when I want it, and otherwise don’t care. So, go to preferences, expand Run/Debug, and click Console. Then uncheck “Show when program writes to standard out,” and “Show when program writes to standard error.”

2015-03-30 23_31_46-Preferences

Where did my Console output go? And why can’t I scroll up?!

The Console view defaults to limiting its output. This may make it easier to work with, but has the nasty side-effect of dropping important content when you have large stack traces, or multiple stack traces. To turn it off, go to the Console preferences (from above) and uncheck “Limit console output”.

Makes your static imports work in autocomplete! (e.g. JUnit, Mockito, etc.)

UNIT TESTING! Ok, ok, let’s calm down a little. If you write a lot of tests, and you use JUnit, Mockito, EasyMock, etc., or if you happen to use a library that leverages static imports, you are probably tired of manually adding them to your imports list. But, _you don’t have to! _Go to the preferences, expand Java, then Editor, then Content Assist and click Favorites. Then, click “New Type” and type in org.junit.Assert. Eclipse will add org.junit.Assert.* to the favorites list, and now when you are writing your unit tests you can start typing assertEq, hit Control + Space, and it will autocomplete the static import and add it to your class!

2015-03-30 23_36_04-Preferences

Other, more personal editor settings.

These settings are definitely up to personal preference, but in case you want to give them a try here are some other changes I make:

Use Spaces, not Tabs

You should be using Spaces and never tabs**! **_I’m kidding!!! _Since I have no interest in arguing my personal preferences, here is how you make the change in case you want to: open preferences, expand General, expand Editors, and click Text Editors. Then, check “Insert spaces for tabs” (or don’t).

2015-03-30 23_31_07-Preferences

Auto format and auto organize imports on save

Why should I have to worry about constantly re-indenting my code, fixing it up, etc.? My time is better spent doing other things, you know like writing code instead of styling it. So, I set my formatter preferences, then go to preferences, expand Java, then Editor, then click Save Actions. Then I check “Perform the selected actions on save,” “Format source code,” and “Organize imports.” My personal feeling towards this is you will feel much more free if you make the change, if you can live with the formatter settings you choose. Give it a try!

2015-03-30 23_31_24-Preferences

What changes do you make?