A New Planet Created - planetnetbeans.org
I'm delighted to let you know that NetBeans has it's own planet:
http://www.planetnetbeans.org
Many thanks belong to Jack Catchpoole who has created it. If we've missed any NetBeans-related blogs please let us know.
NetBeans Quick Tip #6 - Abbreviations in Editor
NetBeans editor supports so called abbreviations. They can make you really productive, it's enough to type in psfs, press space and the IDE generates for you "public static final String". The full abbreviation list is in Help | Keyboard Shortcuts.
The nice thing is that you can add your own abbreviations. So whenever you find out you're writing something often, you can create an abbreviation and use it instead of typing (all programmers are lazy, aren't they?). An even nicer thing is that there are people willing to share their abbreviations - Michel Graciano from Brazil has sent me a list of his abbreviations. They're more advanced than the IDE offers by default, for instance, you can type in trc and the IDE generates:
try {
|
} catch (Exception e) {
}
The | mark denotes placement of cursor. I have added into the list one of my popular abbreviations - psvm, it generates:
public static void main(String[] args) {
|
}
You can download the XML file
here. Just copy it to your userdir in ~/.netbeans/4.1/config/Editors/text/x-java/abbreviations.xml. In case this file is already there it means you have already created some abbreviations and then you can just paste the tags from the xml file to add new abbreviations.
These are the contents of the abbreviations XML file:
| Abbreviation | Action |
|---|
| tr | try statement |
| elif | else if |
| for | for cycle |
| wh | while |
| sw | switch |
| trc | try catch |
| ed | editor fold |
| rn | return null |
| fy | finally |
| ca | catch |
| el | else |
| fore | foreach |
| t | this |
| nu | null |
| Do | double |
| forj | for cycle with j |
| to | todo |
| if | if clause |
| forit | for with iterator |
| psvm | main method |
Next time I will write about macros (Michel has also a great list of macros).