Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method Parameter Completion Shortcut for Intellij?

When calling the method TestMethod, Intellij pops up a helpful message showing what the expected parameter should be (e.g. String test).

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?

Method

like image 610
EdgeCase Avatar asked Aug 26 '26 02:08

EdgeCase


1 Answers

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"

like image 107
Daniel Kaplan Avatar answered Aug 27 '26 15:08

Daniel Kaplan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!