Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Autocomplete function return value
Autocomplete function return value [message #1765015] Mon, 05 June 2017 13:17 Go to next message
Eclipse UserFriend
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 #1765201 is a reply to message #1765015] Wed, 07 June 2017 09:37 Go to previous message
Eclipse UserFriend
I hope that you can write the field name...

Write this:
field = object.someFunctionReturningValue();

Eclipse will sign the field field as an error. Press Ctrl + , to find it, then F2 and Enter to accept the Create local variable sudgestion.
Previous Topic:ejc failing to build with StackOverflowError
Next Topic:data flow analysis using the JDT infrastructure
Goto Forum:
  


Current Time: Thu Jul 17 13:34:54 EDT 2025

Powered by FUDForum. Page generated in 0.06702 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top