I am using Eclipse Helios. I am wondering if there is anyway to add the main()
method quickly in Eclipse?
To get System. out. println() line in eclipse without typing the whole line type sysout and press Ctrl + space.
To get public static void main(String[] args) line in eclipse without typing the whole line type main and press Ctrl + space then, you will get the option for the main method select it.
To enable the Content Assist window to open automatically, go to the Content Assist Preferences page, accessed from Window | Preferences | PHP | Editor | Content Assist and mark the 'Enable auto-activation' checkbox.
Type
main
then your content assist shortcut key.
You can also add a main method from the class creation wizard. There's a checkbox to have it put in a main method for you. – rfreak
This is just main and Ctrl+Space.
Or
type ma and then press ctrl+space
Or
type m and then press ctrl+space.
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