Autocomplete and wrap following statement?
已回答
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?
请先登录再写评论。
Looks like you would need these features implemented:
https://youtrack.jetbrains.com/issue/IDEA-122461
https://youtrack.jetbrains.com/issue/IDEA-122443
I'm sure more people are wishing this existed too! Sad to see so few votes on the one of them