Search code examples
eclipseeclipse-jdt

Auto generate variable for return value of method


I often find myself in a situation like this Selection for List, 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

  • 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.