Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a shortcut key to Eclipse 3.2 Java plug-in to build the current project?

One of the few annoying things about the Eclipse Java plug-in is the absence of a keyboard shortcut to build the project associated with the current resource. Anyone know how to go about it?

like image 589
Simon Avatar asked Oct 03 '08 19:10

Simon


People also ask

How do I assign a shortcut key 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.

How do I add a shortcut key in Java?

You can add templates with: Window->Preferences->Java->Editor->Templates.

How do I enable function Keys in Eclipse?

The main preference page can be found under Window > Preferences > General > Keys (or faster: Press Ctrl+3, type Keys and press Enter). From here you can see all commands and assign/change their associated keyboard shortcuts.


3 Answers

In the Preferences dialog box, under the General section is a dialog box called "Keys". This lets you attach key bindings to many events, including Build Project.

like image 160
KeithL Avatar answered Oct 26 '22 08:10

KeithL


You can assign a keyboard binding to Build Project doing the following

  1. Open up the Keys preferences, Window> Preferences >General>Keys
  2. Filter by type Build Project
  3. Highlight the binding field.

You can then choose the binding you want

i.e. Ctrl+ALt+B, P,

like image 20
Craig Angus Avatar answered Oct 26 '22 09:10

Craig Angus


I believe Ctrl+B is already configured for this by default. Just need to have an edit window with focus.

like image 32
Robin Avatar answered Oct 26 '22 09:10

Robin