mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
IDEA-275893 [extract method]: align selection for switch statement rules
GitOrigin-RevId: 00c58a19d98bdc99b95cd228b1cc2fa746e9d301
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6101375b0b
commit
3d9770213b
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
public class Test1 {
|
||||
void test(){
|
||||
String s = "sample";
|
||||
switch (s) {
|
||||
<selection>case "one" -> {
|
||||
System.out.println("one");
|
||||
System.out.println("two");
|
||||
}
|
||||
default -> System.out.println();</selection>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
public class Test1 {
|
||||
void test(){
|
||||
String s = "sample";
|
||||
switch (s) {
|
||||
<selection>case "one" -> {
|
||||
System.out.println("one");
|
||||
System.out.println("two");
|
||||
}</selection>
|
||||
default -> System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package test;
|
||||
|
||||
public class Test1 {
|
||||
void test(){
|
||||
String s = "sample";
|
||||
switch (s) {
|
||||
case "one" -> extracted();
|
||||
default -> System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
private void extracted() {
|
||||
System.out.println("one");
|
||||
System.out.println("two");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user