Extract Function: Allow to select fragments which start with comment
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// NEXT_SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
<selection>// test
|
||||
println(a)
|
||||
if (a > 0) return a</selection>
|
||||
return -a
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// NEXT_SIBLING:
|
||||
fun b(a: Int): Boolean {
|
||||
// test
|
||||
println(a)
|
||||
if (a > 0) return true
|
||||
return false
|
||||
}
|
||||
|
||||
fun foo(a: Int): Int {
|
||||
if (b(a)) return a
|
||||
return -a
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// NEXT_SIBLING:
|
||||
fun foo(a: Int): Int {
|
||||
<selection>/*
|
||||
test
|
||||
*/
|
||||
println(a)
|
||||
if (a > 0) return a</selection>
|
||||
return -a
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// NEXT_SIBLING:
|
||||
fun b(a: Int): Boolean {
|
||||
/*
|
||||
test
|
||||
*/
|
||||
println(a)
|
||||
if (a > 0) return true
|
||||
return false
|
||||
}
|
||||
|
||||
fun foo(a: Int): Int {
|
||||
if (b(a)) return a
|
||||
return -a
|
||||
}
|
||||
Reference in New Issue
Block a user