Faster way (keyboard shortcuts?) to use quick fixes in Eclipse?

Eclipse

Eclipse Problem Overview


I often use the Eclipse feature (Galileo) of suggested error corrections to automatically create code stubs or to refactor things. For example, I would write a method that calls other methods which don't exist yet, then move the mouse over the error message and click on "create method". Or, change this to the class name and choose "add static modifier" from the quick fixes.

I think this is very convenient because it lets me stay in one place in my code and sort of "remotely" wire up what's not currently visible on my screen. What I think is annoying though, is that I have to leave the keyboard, hover my mouse over the error symbol, wait for the tooltip to pop up, and click on the option (doing that, I sometimes move the mouse a little over the edge and the tooltip goes away again - very annoying).

Am I missing a faster method here? I can't seem to find a keyboard shortcut, but then I have overlooked stuff from the huge preference dialog before.

Eclipse Solutions


Solution 1 - Eclipse

Ctrl+1 : Quick Fix.
(Cmd+1 on Mac)

Just put your cursor on the part you suspect you can perform an action (correction, refactoring, ...) and hit the Quick Fix shortcut. The same popup will be displayed, and you can select the right option with the up and down keys.

Europa spell

That, combined with Ctrl+3 (Quick Access) gives you most of eclipse features at your fingertips ;)

See also:

Solution 2 - Eclipse

As an additional tip, a specific type of quick fix I use all the time has a dedicated shortcut:

Alt+Shift+J: Add Javadoc comment stub for current method.

Solution 3 - Eclipse

After using ctrl+1 like mentioned in the top answer, press ctrl + enter to apply the selected fix all to problems of the same category.

Solution 4 - Eclipse

In general, keyboard shortcuts in IDEs (and code tools in general) are coming from a user principle that holds that the more your hands/fingers can remain poised over the keyboard (as in the f-j centered "touch typist" position), the more productive you can become. This is probably why the use of the number keypad is not encouraged, or other keys, less common to the most basic layout keyboard, are not used. Many hold that useful keyboard shortcuts should be easily reachable from this position.

One thing I will say about eclipse keyboard shortcuts is that if you use a popular Windows presentation utility called Zoom-it, you need to turn that off when using eclipse. There are several show-stopper conflicts between the two, such as Ctrl-1 and Ctrl-3.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHanno FietzView Question on Stackoverflow
Solution 1 - EclipseVonCView Answer on Stackoverflow
Solution 2 - EclipseGodsmithView Answer on Stackoverflow
Solution 3 - EclipseJanac MeenaView Answer on Stackoverflow
Solution 4 - EclipsecostarecView Answer on Stackoverflow