mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Support switch expressions in '.switch' template (IDEA-204010)
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void f(byte x) {
|
||||
String s;
|
||||
s = x.switch<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Foo {
|
||||
void f(byte x) {
|
||||
String s;
|
||||
s = switch (x) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
void f(byte x) {
|
||||
String s = x.switch<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
void f(byte x) {
|
||||
String s = switch (x) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void m() {
|
||||
int i;
|
||||
i = 42 + 42.switch<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Foo {
|
||||
void m() {
|
||||
int i;
|
||||
i = switch (42 + 42) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
void m() {
|
||||
int i = 42 + 42.switch<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
void m() {
|
||||
int i = switch (42 + 42) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public enum Foo {
|
||||
A, B, C;
|
||||
|
||||
void f() {
|
||||
Foo foo;
|
||||
foo = Foo.values()[0].switch<caret>
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public enum Foo {
|
||||
A, B, C;
|
||||
|
||||
void f() {
|
||||
Foo foo;
|
||||
foo = switch (Foo.values()[0]) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public enum Foo {
|
||||
A, B, C;
|
||||
|
||||
void f() {
|
||||
Foo foo = Foo.values()[0].switch<caret>
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
public enum Foo {
|
||||
A, B, C;
|
||||
|
||||
void f() {
|
||||
Foo foo = switch (Foo.values()[0]) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
int f(int x) {
|
||||
int i;
|
||||
i *= x.switch<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Foo {
|
||||
int f(int x) {
|
||||
int i;
|
||||
i *= switch (x) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
int f(int x) {
|
||||
int i = x.switch<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
int f(int x) {
|
||||
int i = switch (x) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void f() {
|
||||
String s;
|
||||
s += "abc".switch<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Foo {
|
||||
void f() {
|
||||
String s;
|
||||
s += switch ("abc") {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
void f() {
|
||||
String s = "abc".switch<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
void f() {
|
||||
String s = switch ("abc") {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user