Previously, netbeans 5.5 was used, and the shortcut key is space. However, after the Simplified Chinese version of netbeans 6.0 is released recently, version 6.0 will be upgraded. After entering the abbreviation, I did not expand it by space. At first I thought, "isn't it difficult for netbeans 6.0 to remove such a good function ?".
After a while, it was found that in netbeans 6.0, the default expansion key is tab, and it is easy to replace it with spaces.
Go to "tools -- options -- editor -- code template", select space in the bottom expanded template, and save the settings.
Haha, the familiar abbreviation expanded the shortcut key again ~
Abbreviations for java files in the source code editor
Abbreviations |
Extension |
ab |
abstract |
bo |
boolean |
br |
break |
ca |
catch { |
cl |
class |
cn |
continue |
df |
default; |
dowhile |
do { ${cursor} } while (${condition}); |
En |
Enumeration |
eq |
equals |
Ex |
Exception |
ex |
extends |
fa |
false |
fi |
final |
fl |
float |
forc |
for (Iterator it = collection.iterator(); it.hasNext();) { Object elem = (Object) it.next(); } |
fore |
for (Iterator it = collection.iterator(); it.hasNext();) { Object elem = (Object) it.next(); } |
fori |
for (int i = 0; i < ${arr array}.length; i++) { ${cursor} } |
fy |
finally |
ie |
interface |
if |
if (${condition}) { ${cursor} } else { } |
im |
implements |
iof |
instanceof |
ir |
import |
le |
length |
newo |
Object name = new Object(args); |
Ob |
Object |
pe |
protected |
pr |
private |
PSF(OrPSF) |
private static final |
Psfb(OrPsfb) |
private static final boolean |
Psfi(OrPsfi) |
private static final int |
Psfs(OrPsfs) |
private static final String |
pst |
printStackTrace(); |
psvm |
public static void main(String[] args) { ${cursor} } |
pu |
public |
re |
return |
serr |
System.err.println (" |
sout |
System.out.println (" |
St |
String |
st |
static |
sw |
switch ( |
sy |
synchronized |
tds |
Thread.dumpStack(); |
th |
throws |
trycatch |
try { ${cursor} }catch (Exception e) { } |
tw |
throw |
twn |
throw new |
wh |
While ( |
whilei |
while (it.hasNext()) { Object elem = (Object) it.next(); ${cursor} } |