Switch between method or constructor parameters

Answered

Simply put, is there a shortcut that allows one to switch between method or constructor parameters back and forth?

For instance, let us say we have a void method foo that accepts three integers: x, y, and z.

So, a call to such a method would look like so: foo(10, 20, 30);

If my blinking cursor (the one that looks like a vertical, elongated capital i) was on the first 10, how could I 'tab over' to the next parameter (the 20) or 'tab backwards' from the 20 to the 10?

0
8 comments

Ctrl+P (View | Parameter Info) and Tab/Shift+Tab.

See also https://youtrack.jetbrains.com/issue/IDEA-185398.

0

Hmm... As the linked issue states, the it doesn't switch between parameters. (Also, I am using the Mac version, which uses Command + P. My bad for not mentioning this.)

0

Additionally, changing the next and previous parameters in Keymap doesn't work either.

0

The issue is about not working in the method declaration parameters, it works fine in the method call parameters and it's stated in the issue.

0

For some reason, it does not work in method call parameters for me if values are already there.

0

A change in the keymap fixed it. Command + Tab on Mac was conflicting with this. Is there a way to not have to do two shortcuts to tab between parameters?

0

No, request is welcome at https://youtrack.jetbrains.com/issues/IDEA if you have better suggestions that will not conflict with other actions.

0

Please sign in to leave a comment.