mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 21:43:33 +07:00
CountingLoop: support decreasing loops
Fixes IDEA-190412 Unroll loop action: support decreasing loops
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// "Unroll loop" "true"
|
||||
class Test {
|
||||
void test() {
|
||||
System.out.println("Hi!" + 10);
|
||||
System.out.println("Hi!" + 9);
|
||||
System.out.println("Hi!" + 8);
|
||||
System.out.println("Hi!" + 7);
|
||||
System.out.println("Hi!" + 6);
|
||||
System.out.println("Hi!" + 5);
|
||||
System.out.println("Hi!" + 4);
|
||||
System.out.println("Hi!" + 3);
|
||||
System.out.println("Hi!" + 2);
|
||||
System.out.println("Hi!" + 1);
|
||||
System.out.println("Hi!" + 0);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Unroll loop" "true"
|
||||
class Test {
|
||||
void test() {
|
||||
fo<caret>r (int i = 0; i < 10; i++ // line comment
|
||||
fo<caret>r (int i = 0; i != 10; i++ // line comment
|
||||
) {
|
||||
System.out.println("Hi!" + i);
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Unroll loop" "true"
|
||||
class Test {
|
||||
void test() {
|
||||
fo<caret>r (int i = 10; 0 <= i; --i) {
|
||||
System.out.println("Hi!" + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Unroll loop" "false"
|
||||
class Test {
|
||||
void test() {
|
||||
fo<caret>r (int i = 10; i <= 0; --i) {
|
||||
System.out.println("Hi!" + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user