Clean up

Cleaning up your code gets easier with Eclipse 3.2. Select a Java element. Any element. It works on classes, packages, and projects (intuitively, the element selected determines the scope of the clean up). Select “Source > Clean Up…” from the context menu. Here’s what you’ll see.

You’re presented with a bunch of options to clean up a variety of sins. I know that I’ve been going through a period where I’ve not been consistent in my use of blocks for if and for statements. This feature can fix this inconsistency by either adding them when they’re missing or removing them when they’re unnecessary: it depends on how the options are configured.

It does lots of things. Take a look.

It occurred to me to see if the feature might be scriptable with Eclipse Monkey. I’m spending a day with Ward next week; maybe we’ll try and sort this out…

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Clean up

  1. Pingback: Tasnim Elphinstone

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s