Greg's Eclipse

Wednesday, November 30, 2005

Handy little shortcuts

I ran into a handy little shortcut key in Eclipse 3.1.1 yesterday. Type CTRL-SHIFT-L to open a popup displaying all of Eclipse's key bindings.

Here's a couple of other handy ones I use all the time:

While in a Java editor, type CTRL-O to open a popup outline. Type CTRL-O again to also display all inherited methods.

Also in a Java editor, place your cursor on a class name or variable. Type CTRL-T to view a popup hierarchy of the selected item. Press it again to toggle between the supertype and subtype view.

Tuesday, November 22, 2005

LogWatcher

Here's a great little plugin that allows you to monitor log files. The plugin provides a multi-tabbed view for tracking multiple log files. You can configure the watchers for refresh rate, amount of file displayed, and content filters.

You can get LogWatcher at http://graysky.sourceforge.net/. Works fine in Eclipse 3.1.1.

Wednesday, November 16, 2005

JadClipse

Have you ever been digging into code and been stopped dead by the dreaded class editor that shows nothing but method signatures? Have you ever had to invoke a method and been told that it takes three Strings called arg0, arg1, and arg2? If so Jadclipse may be the plugin for you.

First of all, a disclaimer. I’m not sure what the legality is of decompiling code, so I leave it up to you to make sure that you are not breaking any laws by decompiling classes.

Now that that’s out of the way, back to the plugin. JadClipse provides an alternate editor for working with .class files that have no source. When you open classes in the JadClipse editor, it automatically decompiles the class and displays the source. The decompiling options can even be configured in the Preferences dialog, so you can choose how you like to see your code.

There are a couple of things that Jadclipse doesn’t do. First, it doesn’t let you save the decompiled code. This means that if you want to decompile and modify the code right inside of Eclipse, you’re out of luck. The other thing to bear in mind is that when you step through the code while debugging, you may or may not have lines that are synched up with the debugger (i.e. you might not be stepping over what you think you are stepping over).

The first thing you need to do is to install Jad. Download the latest Jad release from http://www.kpdus.com/jad.html. Open the zip file and copy the executable to somewhere on your path (I put it in my Windows system32 directory). To test that Jad is accessible on your path, open up a command prompt (or shell) and type “jad”. If Jad is accessible, you will see the usage displayed.

Second, download and install the JadClipse plugin. You can get it from here: http://sourceforge.net/projects/jadclipse/. For Eclipse 3.1.x, use jadclipse_3.1.0. Copy the JadClipse JAR to your Eclipse plugins folder. Shut down Eclipse if it’s already running and open it back up.

In the workbench menu, select Window ( Preferences. Expand the Java category and select JadClipse. From these pages, you can change the settings to control how JadClipse generates the code. You can also change the location of the jad executable (you shouldn’t have to if you followed the above steps to put it in your path), or the location of the JadClipse temp directory.

Thursday, November 10, 2005

Welcome

Here's a place for me to keep links, articles and anything I find related to Eclipse.