Autocomplete function return value [message #698774] |
Wed, 20 July 2011 08:06  |
Eclipse User |
|
|
|
Hello,
let's say that I invoked Content Assist (Ctrl+Space) on some object.
I scroll through list of methods and choose some which returns a value.
the following code appears in my source editor:
object.someFunctionReturningValue();
However if function returns some complicated value with many generics, I would be convenient if eclipse could read function signature and automatically generate field to which function return value is assigned,
ie I would like the following code to appear in my code editor:
Map<Long,List<String>> field = object.someFunctionReturningValue
Is there any way how to achieve this?
Thank you
|
|
|
Re: Autocomplete function return value [message #698896 is a reply to message #698774] |
Wed, 20 July 2011 12:39   |
Eclipse User |
|
|
|
On 7/20/2011 1:36 PM, Mike Dundee wrote:
> object.someFunctionReturningValue();
After you finish typing this, press Ctrl+1 (you may have to move the
caret before the ;) and then use 'Assign statement to new local
variable' or 'Assign statement to new field'.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02657 seconds