netbeans喜欢在eclipse中输入快捷键代码

时间:2013-07-01 04:29:01

标签: java eclipse

netbeans喜欢在eclipse中输入快捷键代码 例如psvm按tab获取public static void main  sout适用于System.out.println();

https://netbeans.org/project_downloads/www/shortcuts.pdf请参阅第2页。

我正在寻找的这种捷径。

3 个答案:

答案 0 :(得分:0)

键入sysout,然后按ctrl +space

答案 1 :(得分:0)

这种快捷方式在eclipse中被称为代码模板(在您的问题中,您可以通过pdf的外观看待Netbeans)。 这是常见的

“sysout”+ ctrl + space - > System.out.println()
“syserr”+ ctrl + space - > System.err.println()
“systrace”+ ctrl + space ---> System.out.println("OwnerClass.CurrentMethod()") ...基本上将当前方法打印到标准输出。

如果您在任何时候忘记它们,只需键入sys并点击ctrl + space,您将在自动完成菜单中获取这些内容,如下所示: enter image description here

另请查看针对其他常用代码模板System.out.println()除外)此问题的这个非常棒的问题:Useful Eclipse Java Code Templates

创建自己的快捷方式How to add shortcut keys for java code in eclipse; Effective Eclipse: Don't write the code, generate it

Other eclipse shortcuts

答案 2 :(得分:0)

正如其他人提到的System.out.println()的捷径是键入sysout并按ctrl +空格键。

但是你可以使用eclipse中的其他有用的快捷方式。你可以通过去eclipse->来检查它们。点击帮助 - >关键助手。