[英]Method Parameter Completion Shortcut for Intellij?
When calling the method TestMethod, Intellij pops up a helpful message showing what the expected parameter should be (eg String test). 在调用方法TestMethod时,Intellij弹出一条有用的消息,显示预期参数应该是什么(例如字符串测试)。
Is there a shortcut by which I can get Intellij to pre-fill that with the suggestion, since it already pretty much knows what should be in the method call? 是否有一条捷径可以让Intellij预先填写建议,因为它已经非常知道方法调用应该是什么?
Yes, under certain conditions : 是的,在某些条件下 :
package com.sandbox;
import java.io.IOException;
public class Sandbox {
public static void main(String[] args) throws IOException {
String s = "";
passString();
}
public static void passString(String foo) {
}
}
See this code? 看到这段代码? If you type
passString()
then put your cursor between the parenthesis, you press ctrl + shift + space , it will fill that parameter with "s" 如果你键入
passString()
然后把光标放在括号之间,你按ctrl + shift + space ,它将用“s”填充该参数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.