New Intention Action: Replace a call to forEach function with for loop.

Replaces an expression of form x.forEach { … } with for (a in x) { … }.
This commit is contained in:
Pradyoth Kukkapalli
2014-04-07 11:47:58 -04:00
committed by Mikhael Bogdanov
parent bd056d037f
commit dbb28c571b
26 changed files with 330 additions and 2 deletions
@@ -0,0 +1,5 @@
fun foo() {
for (a in x) {
a.bar()
}
}
@@ -0,0 +1,3 @@
fun foo() {
<spot>x.forEach { a -> a.bar() }</spot>
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention converts a call to the "forEach" function into a for each loop expression.
</body>
</html>