Code Snippets in NetBeans
Just found out how to use Code Snippets in Java. A pretty basic feature which I found useful so thought I would share.
This basically saves you time when typing the same command regularlly. If you don't completely understand, just try it out and see what you think. I wish I had found it years ago!
To complete;
This basically saves you time when typing the same command regularlly. If you don't completely understand, just try it out and see what you think. I wish I had found it years ago!
To complete;
- Open NetBeans
- Click Tools, Options
- Click Editor button
- Click Code Templates Tab
- Click New
- Type in Abbreviation and press OK. Example 'So'
- Within Expanded Text, type in the code you want to display when you type the abbreviation. An example may be System.out.println("");
- To change the way the code is inserted into the java document, click the drop down box for Expand Template and select whatever you want. I just left it on default, Tab.
- Go back to your Java document and type the abbreviation followed by Tab.
Have Fun
Ace mate, cheers!
ReplyDelete