简体   繁体   English

Intellij的方法参数完成快捷方式?

[英]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.

相关问题 Intellij代码完成,显示方法/构造函数参数类型和变量名称 - Intellij code completion, showing method/constructor parameter types and variable names 如何修复IntelliJ IDEA方法参数自动完成? - How to fix IntelliJ IDEA method parameter auto-completion? 在 IntelliJ 中,是否有一种快捷方式可以获取我已经输入的变量作为我想要输入的方法中的参数? - In IntelliJ, is there a shortcut to get variable I've already typed to be a parameter in a method I want to type? 可以配置IntelliJ以在不使用快捷方式的情况下调用SmartType代码完成? - Possible to configure IntelliJ to invoke SmartType code completion without using a shortcut? 使用键盘快捷键重新排列IntelliJ中的方法参数 - Rearrange method parameters in IntelliJ with keyboard shortcut Intellij IDEA转到上一个方法快捷方式 - Intellij IDEA go to previous method shortcut Eclipse键盘快捷键,用于将参数传递给方法 - Eclipse keyboard shortcut for passing a parameter to a method Eclipse快捷方式将变量名称声明为方法参数 - Eclipse shortcut to declare a variable name as method parameter IntelliJ Idea:用于像Eclipse中那样创建方法的代码完成 - IntelliJ Idea: code completion for creating method like in Eclipse intellij快捷方式 - 如何折叠所有javadocs +方法实现 - intellij shortcut - how to fold all javadocs + method implementations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM