Oct 26
Eclipse 3.3 Quick Fix / Quick Assist Cheat Sheets
I used to be an IntelliJ IDEA user, but have migrated over to Eclipse. One of the things that I initially missed in Eclipse was the availability of the “light bulb” tips to do quick refactors and code optimizations. I have recently discovered that Eclipse has many of the same fixes, but they aren’t advertised as well.
Eclipse differentiates between two types of “quick” tips.
“Quick Fixes” are used when something is actually broken, and Eclipse can provide one (or more) solutions for you, which it can apply to your code. I was able to find a handy list of all the available fixes on the Eclipse site:
http://help.eclipse.org/help33/topic/org.eclipse.jdt.doc.user/concepts/cquickfix.htm
These are great, and I have found that with most basic Java development issues, there’s an appropriate quick fix to solve the issue.
“Quick Assists” are minor refactorings that Eclipse can perform on your behalf. This was the IDEA feature that I missed most when coming over to Eclipse. Here’s the reference list:
http://help.eclipse.org/help33/topic/org.eclipse.jdt.doc.user/concepts/cquickassists.htm
One difference (IIRC) is that Eclipse doesn’t determine which quick assists may be appropriate given your current cursor position – it requires that you select an expression or block in order to figure out which quick assists are relevant.
For those keyboard junkies like myself, a couple notes may be helpful. I remapped (IMO horrible) default key shortcut for Quick Fix and Quick Assist (Ctrl+1) to Ctrl+Enter. This makes it much easier to activate these quick changes without hand gyrations (especially on a laptop keyboard).
Second little helpful tidbit is Alt+Shift+Up (try pressing this repeatedly) to select increasingly higher-scoped compilation units (you kind of have to see this to know how it works).
Hopefully this helps you get something more out of Eclipse, especially if you use it every day!
Similar Posts:
- Quick Tip: Convert an Eclipse “General” Project to a Java Project
- Problems Installing Glassfish Plugin in Eclipse 3.3?
- FYI: Eclipse 3.4 (“Ganymede”) + Hibernate IDE = NoClassDefFoundError
- Quick Tip: When Eclipse just won’t clean up the Tomcat Working Directory
- FYI: Spring IDE 2.0.2 is broken on Eclipse 3.3/Java 6


