Philip Jacob

Eclipse Goodie

· Philip Jacob

I’m using this little Eclipse goodie every day since I discovered it earlier in the week. It’s a common occurrence that you have a java.util.Collection object reference and want to iterate over it. Check this out:

Eclipse auto-complete for iteration

In Eclipse, after the object ref was assigned to list, I hit ctrl-space and found a wonderful addition to the menu (iterate over collection) that sets up my code with a for() loop and populates everything for me.

Try it. You’ll use it all the time.