Feature will be realised by the newly implemented Postfix code completion, check the link for the update site or the above mentioned google plus post for more information.
Auto generate variable for return value of method
-
05-10-2022 - |
Question
I often find myself in a situation like this , and I find it really annoying, that I have to change the method by hand to something like
List<MPartSashContainerElement> list = sps.getChildren()
Is there any way, that on this very point shown in the picture, I can have the first part of the above assignment automatically added, such that
sps.[CTRL+SPACE - selection on getChildren()] may directly lead to the upper expression?
UPDATE
This became part of a bachelor thesis on postfix code completion, and the feature is right underway. If you want to know more check Google Plus announcement or the Postfix Template Implementation.
Solution 2
OTHER TIPS
No. You can finish writing sps.getChildren(), then with the cursor in the getChildren selector, use Ctrl+1 to assign the result to a new local. There's no way to tell when you're "done" and ready to have the left-hand side of the expression inserted--you could be calling something on the result of getChildren(), after all.