MathJax

SyntaxHighlighter

Highlight

Custom CSS

Friday, March 16, 2007

More Eclipse IDE Configuration

Here are several Eclipse 3.2 configuration and usage tips that have made my life easier.

Hide JAR files in the project

In the Java Perspective -> Package Explorer -> Icon to the left of close, choose Filters from the context menu. Check *.resources, Libraries from external, Libraries in project. Type *.jar into the Name filter patterns text field. This will ignore any JAR files in the project so they don't clutter your view.

Open Type, Open Resource, and GoToFile

Ctrl + Shift + T will open a search box that will match the Java class you type in, as you type. For example, to open MyClassName.java, type MyClass and the search will be refined as you type. The same is done for resources with Ctrl + Shift + R. GoToFile (site down at the moment) will also do fuzzy searches. For example, typing "MCN" will match MyClassName.java.

Show implementors

If you select an interface or abstract method, and press Ctrl + T, you can see all implementors of that method.

Autocomplete Getters/Setters

Everybody knows you can Right Click on a source file -> Source -> Generate Getters and Setters... to do just that, but if you type "get" and then Ctrl + Space, Eclipse will offer to implement a getter for you. The same works for setters if you type "set" and Ctrl + Space.

Increase memory

Open up eclipse.ini, located in your eclipse home directory. You'll see some configuration that looks like this:

-vmargs
-Xms40m
-Xmx256m

I have these changed to allow at least 256mb and at most 512mb of ram for eclipse:

-vmargs
-Xms256m
-Xmx512m

Plugins

I also grab the following plugins for development. These are rather well known, but if you don't know what they do, the names are pretty obvious. I develop in a lot of different languages, so I use plugins that aren't specific for Java development:
TestNG, Subclipse, CSSEditor, PHPEclipse, RadRails, M2Eclipse, SpringIDE

There are a couple of other plugins for Eclipse that others like to use, but I don't:
Sysdeo, Amateras

I like to run tomcat from the command line with the "run" option and see the output in a separate terminal, and I felt Amateras was too buggy last time I used it. As of this writing, Aptana is available with RadRails and provides similar functionality.
Post a Comment