Add quick fixes for newly introduced diagnostics
This commit is contained in:
@@ -113,6 +113,11 @@ public class QuickFixRegistrar {
|
||||
QuickFixes.factories.put(ILLEGAL_MODIFIER, removeModifierFactory);
|
||||
QuickFixes.factories.put(REPEATED_MODIFIER, removeModifierFactory);
|
||||
|
||||
JetSingleIntentionActionFactory removeInnerModifierFactory =
|
||||
RemoveModifierFix.createRemoveModifierFromListOwnerFactory(INNER_KEYWORD);
|
||||
QuickFixes.factories.put(INNER_CLASS_IN_TRAIT, removeInnerModifierFactory);
|
||||
QuickFixes.factories.put(INNER_CLASS_IN_OBJECT, removeInnerModifierFactory);
|
||||
|
||||
JetSingleIntentionActionFactory changeToBackingFieldFactory = ChangeToBackingFieldFix.createFactory();
|
||||
QuickFixes.factories.put(INITIALIZATION_USING_BACKING_FIELD_CUSTOM_SETTER, changeToBackingFieldFactory);
|
||||
QuickFixes.factories.put(INITIALIZATION_USING_BACKING_FIELD_OPEN_SETTER, changeToBackingFieldFactory);
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove 'inner' modifier" "true"
|
||||
trait A {
|
||||
class B
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove 'inner' modifier" "true"
|
||||
trait A {
|
||||
inne<caret>r class B
|
||||
}
|
||||
@@ -2825,6 +2825,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beforeRemoveInnerForClassInTrait.kt")
|
||||
public void testRemoveInnerForClassInTrait() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/beforeRemoveInnerForClassInTrait.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("beforeRemoveRedundantModifier1.kt")
|
||||
public void testRemoveRedundantModifier1() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/beforeRemoveRedundantModifier1.kt");
|
||||
|
||||
Reference in New Issue
Block a user