Java 如何在 Intellij IDEA 中显示方法参数提示?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38734111/
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
How to show method parameters hint in Intellij IDEA?
提问by guo
采纳答案by guo
Got the final answer.
得到了最终答案。
Just Ctrl+Pin Windows/Linux
在 Windows/Linux 中只是Ctrl+P
or ?+Pin macOS.
或?+P在 macOS 中。
回答by popalka
This tooltip appears on mouse over events.
此工具提示出现在鼠标悬停事件上。
Workaround with keyboard: Try to use quick documentation pop-up CTRL+Q .
使用键盘的解决方法:尝试使用快速文档弹出窗口 CTRL+Q 。
回答by Pavel
Default shortcut to show parameter info in IDEA is ctrl+P.
在 IDEA 中显示参数信息的默认快捷方式是ctrl+ P。
Here is a sheet from JetBrains with this and other useful keyboard shortcuts: https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
这是来自 JetBrains 的工作表,其中包含这个和其他有用的键盘快捷键:https: //resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
回答by Anju Prasad
To view the method parameters
查看方法参数
- Place the caret anywhere within the call of the desired method or function.
- Choose View | Parameter Info on the main menu or press Ctrl+P.
- 将插入符号放置在所需方法或函数调用内的任何位置。
- 选择查看 | 主菜单上的参数信息或按Ctrl+ P。
To configure the behavior of the view parameter information functionality
配置视图参数信息功能的行为
- Open the IDE Settings and click Code Completion below the Editor node.
In the Parameter info section, define the following options:
To have a complete method or function signature shown rather than a list of required types, select the Show full signatures check box. Make sure to include the required third-party libraries in the project source path. Otherwise, names of the parameters will not be displayed.
To have the list of parameter types for the called method or function shown automatically after a certain delay, select the Auto pop-up (in ms) check box and specify the time period in milliseconds.
- 打开 IDE Settings 并单击 Editor 节点下方的 Code Completion。
在参数信息部分,定义以下选项:
要显示完整的方法或函数签名而不是所需类型的列表,请选中显示完整签名复选框。确保在项目源路径中包含所需的第三方库。否则,将不显示参数名称。
要在特定延迟后自动显示被调用方法或函数的参数类型列表,请选中“自动弹出(以毫秒为单位)”复选框并以毫秒为单位指定时间段。
回答by Matt Klein
If you have non-standard bindings (or want to change what this is bound to), then look here:
如果您有非标准绑定(或想要更改绑定的内容),请查看此处:
Settings > Keymap > Main menu > View > Tool Windows > Parameter Info
Settings > Keymap > Main menu > View > Tool Windows > Parameter Info
And see what the binding is and/or change it to what you want.
并查看绑定是什么和/或将其更改为您想要的。