content assist should prepare an option to complete based on extractors of a type
The current code completion feature is unable to complete semantically. For example if one types
and type CTRL+SPACE on cursor position (symbol |), content assist is activated but it doesn't show assists based on the type of the list. In this example it would be nice if something like this could be completed:
where [a] and [b] are markers to give the symbols better names and | is the cursor position after typing enter.
This could be realized in the content assist window where an option is shown to use the extractors of a type.
object Test extends App {
val xs = List("a" -> 1, "b" -> 2, "c" -> 3)
xs.map|
}
and type CTRL+SPACE on cursor position (symbol |), content assist is activated but it doesn't show assists based on the type of the list. In this example it would be nice if something like this could be completed:
object Test extends App {
val xs = List("a" -> 1, "b" -> 2, "c" -> 3)
xs.map{case ([a], [b]) => |}
}
where [a] and [b] are markers to give the symbols better names and | is the cursor position after typing enter.
This could be realized in the content assist window where an option is shown to use the extractors of a type.
Leave a comment
on 2012-10-02 00:43 *
By Iulian Dragos
+1. Very cool idea.
on 2015-03-13 15:15 *
By Simon Schäfer
Version changed from 2.0.2-final-29 to 4.0.0
Milestone changed from Enhancements to -none-