Java 在代码中使用函数时的 Eclipse 参数对话框/提示
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23426902/
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
Eclipse parameter dialog/hint when using functions in code
提问by krzakov
By default In Eclipse when you use a function or create objects it helps with parameters like this:
默认情况下,在 Eclipse 中,当您使用函数或创建对象时,它有助于使用如下参数:
But once it's done, it'll never show up again. Is there any way to call this parameter helper on code that's already written when I point the cursor on the method?
但是一旦完成,它就再也不会出现了。当我将光标指向方法时,有没有办法在已经编写的代码上调用这个参数助手?
The Image I uploaded only appears while writing code.
我上传的图片只在编写代码时出现。
采纳答案by ThommyCZ
Ctrl + Shift + Space will do the trick. It is named Context information in Key preferences.
Ctrl + Shift + Space 可以解决问题。它在 Key 首选项中被命名为上下文信息。
回答by E-Riz
Place the cursor just inside the left parenthesis and press Ctrl+Space(Command+Spaceon Mac) again; Eclipse will show Content Assistagain.
将光标放在左括号内,然后再次按Ctrl+ Space(在 Mac 上为Command+ Space);Eclipse 将再次显示Content Assist。
回答by Chandrayya G K
You can't get place holders again once they disappeared. But you can get content assist help as said by @E-Riz
一旦它们消失,您就无法再次获得占位符。但是您可以获得@E-Riz所说的内容辅助帮助
Check this answer What is Eclipse shortcut key to turn on feature that allows when pressing TAB key, for cursor to go to expected position?and also this What's this box around my function input?
检查这个答案什么是 Eclipse 快捷键打开功能,当按下 TAB 键时允许光标转到预期位置?还有这个我的函数输入周围的这个框是什么?
回答by Ad Infinitum
When the mouse cursor is in the paranthesis, click Ctrl+Space. It will pop up menu (content assist). If you enter it, it will show the context information as it was at the beginning.
当鼠标光标在括号中时,单击Ctrl+ Space。它将弹出菜单(内容辅助)。如果您输入它,它将显示与开始时一样的上下文信息。
回答by ??? ????? ????????
i was looking for the same shortcut and didn't find it ; now i'm using *ctrl+Arrows to move between words *alt+shift+arrows to select the world and replace it
我正在寻找相同的快捷方式,但没有找到;现在我使用 *ctrl+Arrows 在单词之间移动 *alt+shift+arrows 来选择世界并替换它
回答by HRJ
JDT-Codeminingis a new project (as of Aug 2018) that supports parameter hints, along with many other features, such as:
JDT-Codemining是一个新项目(截至 2018 年 8 月),它支持参数提示以及许多其他功能,例如:
General
Show references
Show implementations
Show method parameter names
Show method parameter types
Show end statement
JUnit
Show JUnit status
Show JUnit run
Show JUnit debug
Debugging
Show variable values inline while debugging