4 Replies Last post: Feb 19, 2012 3:01 PM by Dennis Haupt  
Thomas Vultura Newbie 61 posts since
Feb 12, 2010
Currently Being Moderated

Feb 16, 2012 2:39 PM

Search method completion by return type

Often I invoke the completion list to view all available methods (on an object) and am looking for a particular return type. It would be great if I could somehow filter down the list by return type. Currently I can only begin typing (more letters) and filter by method name.

 

I don't exactly how it should be invoked, but I consider this a highly useful feature. It's similar to the smart completion where you only get suggestions that match the expected type of the current expression. But with my suggestion you have more controll and it works even if there is no expected type.

Alexander Podkhalyuzin JetBrains 1,099 posts since
Jun 7, 2008
Currently Being Moderated
Feb 16, 2012 3:32 PM in response to: Thomas Vultura
Re: Search method completion by return type

I don't know how it can be implemented, my vision is something like Alt+Enter intention action on method lookup to filter lookups by this lookup return type, however I'm not sure is it possible in current completion API. You can create a ticket, maybe somebody finally will do it, but I can't promise more.

 

Best regards,

Alexander Podkhalyuzin.

Alexander Podkhalyuzin JetBrains 1,099 posts since
Jun 7, 2008
Currently Being Moderated
Feb 16, 2012 7:02 PM in response to: Thomas Vultura
Re: Search method completion by return type

You can do it for both Java and Scala. If somebody does it for Java (or possibly gives better resolution, why it's impossible to do), then I'll do the same for Scala.

 

Best regards,

Alexander Podkhalyuzin.

Dennis  Haupt Apprentice 715 posts since
Jan 19, 2004
Currently Being Moderated
Feb 19, 2012 3:01 PM in response to: Thomas Vultura
Re: Search method completion by return type

i am faking this feature for years now:

 

Type x = obj.*invoke smart completion*

More Like This

  • Retrieving data ...