I had a look at: Eclipse-Shortcuts, but I found nothing for generating a constructor.
Whats the shortcut for generating a standard constructor?
To generate constructor(s) from a superclass, just press Alt+Shift+S, C (or alternatively select Source > Generate Constructor from Superclass… from the application menu). A dialog pops up allowing you to select the constructor(s) you'd like to create.
Generate a constructor Alternatively, you can press Ctrl+Shift+A , start typing the command name in the popup, and then choose it there. In the Generate popup, select Constructor. In the Generate dialog that appears, select type members that should be initialized in the new constructor.
Search – Eclipse Shortcuts CTRL SHIFT G – Search for current cursor positioned word reference in workspace. CTRL H – Java search in workspace.
Type the first letter of your class, then press Ctrl+Space, Eclipse will list suggestions within a combobox. The topmost suggestion is the default constructor. Press Enter, it will be done. (I'm using Eclipse Juno and it works.)
Alt+Shift+s and then o opens the Generate Constructor using Fields
dialog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With