我的函数输入是什么意思? [英] What's this box around my function input?

查看:112
本文介绍了我的函数输入是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我编写一个自动完成的函数调用并开始输入内容时,将在输入周围绘制一个黑色矩形,如下所示:

Whenever I write an auto-completed function call and start typing something, a black rectangle is drawn around the input, like below:

为什么eclipse这样做,我该怎么做关闭?我看过不同的编辑器设置,但我没有发现任何描述这种行为的内容。

Why does eclipse do this and how can I turn it off? I've looked the different editor settings but I haven't found anything that describes this behavior.

推荐答案

这被称为占位符。保持插入符号之间的类方法和类体之间的任何地方,并键入 public ,然后按 Ctrl + 空格,然后选择 public_method 选项。那么你会得到一个如下所示的模板:

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:

这里 return_type 覆盖了矩形,并突出显示,这意味着您可以将返回类型键入为void,int等将出现在此矩形框中。

Here return_type is covered with rectangle and highlighted this means you can type the return type as void, int etc and this will appear in this rectangle box.

使用 TAB 键遍历下一个占位符,即名称也覆盖矩形框。输入返回类型后按 TAB 键,您将跳转到下一个占位符(即名称)。

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).

您可以按 Shift + TAB 键返回上一个占位符。绿色插入符号表示占位符的结尾。

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).

检查模板语法 public_method 模板在这里 Windows> ;首选项> Java>编辑者>模板

Check the template grammar for public_method template here Windows > Preferences > Java > Editors > Templates

它看起来像

public ${return_type} ${name}(${}) {
    ${cursor}
}

您可以编辑这个。如果您删除 $ {cursor} ,则绿色插入符将不会出现,等等。

You can edit this. If you remove ${cursor} then green colour caret will not appear and so on.

您可以通过


  1. 删除模板(不推荐)

  2. 编辑模板语法

  3. 或者只需按输入键(推荐)

  1. Deleting template(Not recommended)
  2. Editing template grammer
  3. Or just by pressing Enter key(Recommended)


    还要检查 static_final 模板的语法。在这里,您将获得下拉菜单以及矩形框。

Also check the grammar of static_final template. Here you will get the drop down menu along with rectangular box.

这篇关于我的函数输入是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆