NetBeans 6.0中的缩写展开快捷键

来源:互联网 发布:淘宝充值平台 编辑:程序博客网 时间:2024/06/13 21:28
 之前用的一直是NetBeans 5.5,其中的快捷键是空格。但是最近NetBeans 6.0简体中文版出来之后,就升级用6.0的版本。发现输入缩写之后按空格居然不展开了,开始还想“难不成NetBeans 6.0把这么一个好的功能给去掉了?”。

      鼓捣了一会,才发现在NetBeans 6.0里,默认的展开键是Tab,要换成空格其实也很好办。

     进入“工具——选项——编辑器——代码模板”,在最下面的展开模板中选择Space,然后保存即可。

     哈哈,原本熟悉的缩写展开快捷键又回来了~

源代码编辑器中用于 Java 文件的缩写

缩写

扩展

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 (或 Psf
private static final
psfb (或 Psfb
private static final boolean
psfi (或 Psfi
private static final int
psfs (或 Psfs
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}
}
 

原创粉丝点击