Java IntelliJ 显示有关用法的方法参数提示 - 如何禁用它

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40866202/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 22:57:57  来源:igfitidea点击:

IntelliJ shows method parameter hints on usage - How to disable it

javaintellij-idea

提问by G.S

I am new to IntelliJ and recently updated to IntelliJ-2016.3.
In the editor for Java code, it shows the method signature upon usage. How do I disable this feature?

我是IntelliJ 的新手,最近更新到IntelliJ-2016.3
在 Java 代码的编辑器中,它显示了使用时的方法签名。如何禁用此功能?

Here's an example of a method's signature and its call site: enter image description here

以下是方法签名及其调用站点的示例: 在此处输入图片说明

Method call:
enter image description here

方法调用:
在此处输入图片说明

This behavior was not there in 2016.1.4 version. I am seeing this after update.
Any help is appreciated!

这种行为在 2016.1.4 版本中不存在。更新后看到这个
任何帮助表示赞赏!

采纳答案by another

Right click on the hint, then on Disable:

右键单击提示,然后单击Disable

enter image description here

在此处输入图片说明

回答by G.S

From the what's new page:

最新消息页面

Parameter hints

The editor now shows parameter hints for literals and nulls used as method arguments. These hints make code much more readable.

If you find hints redundant for a certain method, you can tell the IDE not to show hints for this method. To disable hints completely, uncheck Settings → Editor → General → Appearance → Show parameter name hints.

参数提示

编辑器现在显示用作方法参数的文字和空值的参数提示。这些提示使代码更具可读性。

如果您发现某个方法的提示是多余的,您可以告诉 IDE 不要显示此方法的提示。要完全禁用提示,请取消选中设置 → 编辑器 → 常规 → 外观 → 显示参数名称提示。

(emphasis is mine)

(重点是我的)

回答by agilob

Untick the bottom option Show parameter name hints

取消底部选项 Show parameter name hints

Show parameter name hints

显示参数名称提示

回答by wired00

I find it helpful to use a shortcut such as P + shift + commandto toggle parameter type hinting as needed. I don't want it disabled entirely.

我发现使用快捷方式很有帮助,例如根据P + shift + command需要切换参数类型提示。我不希望它完全禁用。

  1. open preferences
  2. click Keymap
  3. filter by parameter
  4. double click on Toggle parameter name hints
  5. enter key combination ie, P + shift + command
  6. Apply and Ok
  7. Now the key combo will toggle hints for you.
  1. 打开偏好
  2. 单击键盘映射
  3. 过滤 parameter
  4. 双击 Toggle parameter name hints
  5. 输入组合键,即 P + shift + command
  6. 申请并确定
  7. 现在按键组合将为您切换提示。

enter image description here

在此处输入图片说明

回答by Alex Styl

Others have already answered this, but here is a way of finding it without jumping into menus.

其他人已经回答了这个问题,但这里有一种无需跳入菜单即可找到它的方法。

Try hitting ? + Shift + Aon Mac and type the Show parameter name hintsinto the search bar.

尝试? + Shift + A在 Mac 上点击并Show parameter name hints在搜索栏中输入。

Show parameter appears when searching from the Action/Option name search bar

Show parameter appears when searching from the Action/Option name search bar