Quickfix for INACCESSIBLE_BACKING_FIELD
This commit is contained in:
committed by
Evgeny Gerashchenko
parent
8b4fac7665
commit
4209430fe6
@@ -122,6 +122,7 @@ public class QuickFixes {
|
|||||||
JetIntentionActionFactory changeToPropertyNameFactory = ChangeToPropertyNameFix.createFactory();
|
JetIntentionActionFactory changeToPropertyNameFactory = ChangeToPropertyNameFix.createFactory();
|
||||||
factories.put(NO_BACKING_FIELD_ABSTRACT_PROPERTY, changeToPropertyNameFactory);
|
factories.put(NO_BACKING_FIELD_ABSTRACT_PROPERTY, changeToPropertyNameFactory);
|
||||||
factories.put(NO_BACKING_FIELD_CUSTOM_ACCESSORS, changeToPropertyNameFactory);
|
factories.put(NO_BACKING_FIELD_CUSTOM_ACCESSORS, changeToPropertyNameFactory);
|
||||||
|
factories.put(INACCESSIBLE_BACKING_FIELD, changeToPropertyNameFactory);
|
||||||
|
|
||||||
JetIntentionActionFactory unresolvedReferenceFactory = ImportClassAndFunFix.createFactory();
|
JetIntentionActionFactory unresolvedReferenceFactory = ImportClassAndFunFix.createFactory();
|
||||||
factories.put(UNRESOLVED_REFERENCE, unresolvedReferenceFactory);
|
factories.put(UNRESOLVED_REFERENCE, unresolvedReferenceFactory);
|
||||||
@@ -157,7 +158,6 @@ public class QuickFixes {
|
|||||||
|
|
||||||
actions.put(UNSAFE_CALL, ExclExclCallFix.introduceExclExclCall());
|
actions.put(UNSAFE_CALL, ExclExclCallFix.introduceExclExclCall());
|
||||||
actions.put(UNNECESSARY_NOT_NULL_ASSERTION, ExclExclCallFix.removeExclExclCall());
|
actions.put(UNNECESSARY_NOT_NULL_ASSERTION, ExclExclCallFix.removeExclExclCall());
|
||||||
factories.put(UNSAFE_INFIX_CALL, ReplaceInfixCallFix.createFactory());
|
|
||||||
|
|
||||||
JetIntentionActionFactory removeProtectedModifierFactory = RemoveModifierFix.createRemoveModifierFromListOwnerFactory(PROTECTED_KEYWORD);
|
JetIntentionActionFactory removeProtectedModifierFactory = RemoveModifierFix.createRemoveModifierFromListOwnerFactory(PROTECTED_KEYWORD);
|
||||||
factories.put(PACKAGE_MEMBER_CANNOT_BE_PROTECTED, removeProtectedModifierFactory);
|
factories.put(PACKAGE_MEMBER_CANNOT_BE_PROTECTED, removeProtectedModifierFactory);
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// "Change '$a' to 'a'" "true"
|
||||||
|
val a = 5
|
||||||
|
class A {
|
||||||
|
val b = <caret>a
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// "Change '$a' to 'a'" "true"
|
||||||
|
package foo
|
||||||
|
val a = 5
|
||||||
|
class A {
|
||||||
|
val b = foo.<caret>a
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
// "Change '$a' to 'a'" "true"
|
||||||
|
val a = 5
|
||||||
|
class A {
|
||||||
|
val b = <caret>$a
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// "Change '$a' to 'a'" "true"
|
||||||
|
package foo
|
||||||
|
val a = 5
|
||||||
|
class A {
|
||||||
|
val b = foo.<caret>$a
|
||||||
|
}
|
||||||
@@ -860,6 +860,16 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
|||||||
doTest("idea/testData/quickfix/variables/changeToPropertyName/beforeCustomAccessors.kt");
|
doTest("idea/testData/quickfix/variables/changeToPropertyName/beforeCustomAccessors.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("beforeInaccessibleBackingField.kt")
|
||||||
|
public void testInaccessibleBackingField() throws Exception {
|
||||||
|
doTest("idea/testData/quickfix/variables/changeToPropertyName/beforeInaccessibleBackingField.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("beforeInaccessibleBackingFieldQualified.kt")
|
||||||
|
public void testInaccessibleBackingFieldQualified() throws Exception {
|
||||||
|
doTest("idea/testData/quickfix/variables/changeToPropertyName/beforeInaccessibleBackingFieldQualified.kt");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test innerSuite() {
|
public static Test innerSuite() {
|
||||||
|
|||||||
Reference in New Issue
Block a user