mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Support more variants with switch expressions in '.switch' template (IDEA-204010)
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
void f(char x) {
|
||||
System.out.println(x.switch<caret>);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
void f(char x) {
|
||||
System.out.println(switch (x) {
|
||||
<caret>
|
||||
});
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
String f(char x) {
|
||||
return x.switch<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
String f(char x) {
|
||||
return switch (x) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
void f(short x) {
|
||||
System.out.println(1 + x.switch<caret>);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
void f(short x) {
|
||||
System.out.println(switch (1 + x) {
|
||||
<caret>
|
||||
});
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
String f(short x) {
|
||||
return 1 + x.switch<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
String f(short x) {
|
||||
return switch (1 + x) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user