[java][switch completion] IDEA-271902 Fix the completion tail in case labels

Eliminate the insertion handler for JavaPsiClassReferenceElement because it might be confusing to the users not to be able to set the variable name themselves.

In addition to that the patch also reverts the test data that was changed earlier because it was a perfectly fine piece of code and should not have been modified in the first place

GitOrigin-RevId: 7046e638ed8f4c1cae72aca600fdfd06eaa3a502
This commit is contained in:
Nikita Eshkeev
2021-07-12 19:10:45 +00:00
committed by intellij-monorepo-bot
parent 00ac31059d
commit be5828b0ce
11 changed files with 55 additions and 74 deletions

View File

@@ -0,0 +1,9 @@
class Main {
private static final int LEVEL = 0;
int f(Object o) {
return switch(o) {
case LEVE<caret>
}
}
}

View File

@@ -0,0 +1,9 @@
class Main {
private static final int LEVEL = 0;
int f(Object o) {
return switch(o) {
case LEVEL -> <caret>
}
}
}

View File

@@ -0,0 +1,9 @@
class Main {
private static final int LEVEL = 0;
void f(Object o) {
switch(o) {
case LEVE<caret>
}
}
}

View File

@@ -0,0 +1,9 @@
class Main {
private static final int LEVEL = 0;
void f(Object o) {
switch(o) {
case LEVEL:<caret>
}
}
}

View File

@@ -2,7 +2,7 @@
class Main {
int f(Object o) {
return switch(o) {
case Integer integer -> <caret>
case Integer<caret>
}
}
}

View File

@@ -2,7 +2,7 @@
class Main {
void f(Object o) {
switch(o) {
case Integer integer:<caret>
case Integer<caret>
}
}
}