Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

eclipse

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.

like image 495
Hanno Fietz Avatar asked Oct 08 '09 10:10

Hanno Fietz


People also ask

How do I enable keyboard shortcuts in Eclipse?

Display and Edit the Current Keyboard Shortcuts To see the current key configuration and its keyboard shortcuts, choose the Eclipse > Preferences menu command to open the Eclipse workbench Preferences. Select the General > Editor > Keys page.


1 Answers

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:

  • Eclipse Tip: Shortcut to Quick Fix
  • My Favorite Eclipse Shortcut: Quick Fix
  • Eclipse hotkeys: eclipse shortcuts gold mine.
like image 171
VonC Avatar answered Oct 07 '22 12:10

VonC