[java-intentions] MoveMembersIntoClassFix: improve and revive property test

After implicit classes, out-of-class member is parsed. If it was mistakenly put out of the class, it may have many unrelated compilation errors. E.g. extra Override annotation, unresolved reference (to another member of the class), etc. These errors were masking the 'Move member to class' action, because its scope was larger (the whole method).
Now, we put 'feature not available' error specifically to the method/field name identifier, so it's almost always available. Also, action name is more friendly now, and JavaOutOfClassDefinitionPropertyTest is tuned: caret position and language level set correctly.

GitOrigin-RevId: 39917d11fb216be4db3f6fbc9e984ca7378f7302
This commit is contained in:
Tagir Valeev
2024-04-22 15:43:05 +02:00
committed by intellij-monorepo-bot
parent d057df2905
commit ee495db972
10 changed files with 39 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
// "Move members into class" "true-preview"
// "Move member into class" "true-preview"
class A {

View File

@@ -1,4 +1,4 @@
// "Move members into class" "true-preview"
// "Move member into class" "true-preview"
class A {

View File

@@ -1,4 +1,4 @@
// "Move members into class" "true-preview"
// "Move member into class" "true-preview"
int field<caret> = 12;

View File

@@ -1,4 +1,4 @@
// "Move members into class" "true-preview"
// "Move member into class" "true-preview"
void foo<caret>() {