Autocomplete and wrap following statement?

Answered

Hello!

Say, I have the following code:

foo.getBar();

Now, I want to wrap that, e.g. pass bar's return value into

baz.setBar();

I start writing (| is the cursor):

baz.|foo.getBar();

At this point, I hit Ctrl+Space to get autocomplete up. Now, if I do autocomplete, I'll end up with

baz.setBar();foo.getBar();

when instead I wanted

baz.setBar(foo.getBar());

Is there a way to make IntelliJ do the later (just like Eclipse)?

If not, can you define your own postfix completion templates?

1
2 comments
Avatar
Permanently deleted user

I'm sure more people are wishing this existed too! Sad to see so few votes on the one of them

0

Please sign in to leave a comment.