每当我编写自动完成的函数调用并开始输入内容时,就会在输入周围绘制一个黑色矩形,如下所示:
为什么 eclipse 会这样做以及如何将其关闭?我查看了不同的编辑器设置,但没有找到任何描述此行为的内容。
This is called place holder. Keep caret anywhere in between the class methods and inside the class body and type public and press Ctrl + Space and select public_method option. Then you will get a template looks like this:
Here 返回类型被矩形覆盖并突出显示,这意味着您可以输入 void、int 等返回类型,这将出现在该矩形框中。
Use TAB key to traverse next place holders i.e name is also covered with rectangle box. After typing the return type when you press TAB key you will jump to next place holder(i.e name).
You can go back to the previous place holder by pressing Shift + TAB key. Green color caret represent the end of place holders.
While you are in any place holder if you press Enter key you will be directly taken to the end of the place holder(i.e green caret).
检查模板语法公共方法模板在这里Windows > Preferences > Java > Editors > Templates
它看起来像
public ${return_type} ${name}(${}) {
${cursor}
}
您可以编辑此内容。如果您删除${光标}那么绿色插入符号就不会出现等等。
您可以通过以下方式关闭
- 删除模板(不推荐)
- 编辑模板语法
- Or just by pressing Enter key(Recommended)
还要检查语法静态最终模板。在这里您将获得下拉菜单以及矩形框。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)