Add quickfix for PACKAGE_MEMBER_CANNOT_BE_PROTECTED
This commit is contained in:
committed by
Andrey Breslav
parent
b52036c549
commit
324a39d10b
@@ -151,6 +151,9 @@ public class QuickFixes {
|
||||
actions.put(UNSAFE_CALL, ExclExclCallFix.introduceExclExclCall());
|
||||
actions.put(UNNECESSARY_NOT_NULL_ASSERTION, ExclExclCallFix.removeExclExclCall());
|
||||
|
||||
JetIntentionActionFactory removeProtectedModifierFactory = RemoveModifierFix.createRemoveModifierFromListOwnerFactory(PROTECTED_KEYWORD);
|
||||
factories.put(PACKAGE_MEMBER_CANNOT_BE_PROTECTED, removeProtectedModifierFactory);
|
||||
|
||||
actions.put(PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE, new SpecifyTypeExplicitlyFix());
|
||||
|
||||
factories.put(ELSE_MISPLACED_IN_WHEN, MoveWhenElseBranchFix.createFactory());
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove 'protected' modifier" "true"
|
||||
package test
|
||||
|
||||
val a: Int = 0
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove 'protected' modifier" "true"
|
||||
package test
|
||||
|
||||
<caret>protected val a: Int = 0
|
||||
@@ -433,6 +433,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
doTest("idea/testData/quickfix/modifiers/beforeOpenModifierInEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("beforePackageMemberCannotBeProtected.kt")
|
||||
public void testPackageMemberCannotBeProtected() throws Exception {
|
||||
doTest("idea/testData/quickfix/modifiers/beforePackageMemberCannotBeProtected.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("beforeRemoveIncompatibleModifier.kt")
|
||||
public void testRemoveIncompatibleModifier() throws Exception {
|
||||
doTest("idea/testData/quickfix/modifiers/beforeRemoveIncompatibleModifier.kt");
|
||||
|
||||
Reference in New Issue
Block a user