Bug 398633 - [content assist] Better proposals for higher-order functions
Summary: [content assist] Better proposals for higher-order functions
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.4.0   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 409115
Blocks: 409580
  Show dependency tree
 
Reported: 2013-01-21 09:25 EST by Sven Efftinge CLA
Modified: 2013-05-31 08:43 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2013-01-21 09:25:11 EST
If the last argument is a functional type, the proposal should add a lambda after the regular method call. If it's a lambda with one argument the sugar variant with implicit 'it' should be used. Otherwise the parameter names of the function declaration should be used.

Example:

  myCollection.map[<CURSOR>]

instead of 

  myCollection.map(<CURSOR>)

and

  myCollection.fold(seed)[p1, p2| <CURSOR>]

instead of 

  myCollection.fold(<CURSOR>)

The latter should only be done if we are able to support linked-editing here. We might just do the first half for now and do the rest later.
Comment 1 Jan Koehnlein CLA 2013-02-28 11:43:33 EST
Fix pushed to MASTER. 

We should come back to this one if we have linked editing with multiple regions for content assist and apply it ot the individual parameters.
Comment 2 Jan Koehnlein CLA 2013-05-27 04:17:00 EDT
Linked editing for content assist not in Kepler.