Closing parenthesis when autocompleting parameterless function

Hello,

When autocompleting a parameterless function in Java code, say toString() for example, then if I press ctrl+space, it autocompletes it to toString( without closing parenthesis.

This is so in IntelliJ 10.

I think that in the past, IntelliJ autocompleted this to become toString(), it automatically added the closing parenthesis because the function has no parameters.

Any idea why it stopped doing this? Is there a setting for this (I didn't seem to find it)?

Thanks!

3 comments

Settings (Ctrl+Alt+S) > IDE Settings > Editor > Smart Keys

Make sure "Insert pair bracket" at the top is selected.

0

That's actually different. That causes it to add a ) if you manually type a (, and the same for [ and {. I've never had that setting enabled (and don't really like to). And yet IntelliJ has always automatically added the closing ) when autocompleting a function name in the past, and now not anymore...

0

All I can tell you is then when I turn that setting off, and I auto complete .toString, I get toString( When I have it on, I get toString()

0

Please sign in to leave a comment.