QuickFix for USELESS_HIDDEN_IMPORT.
This commit is contained in:
committed by
Andrey Breslav
parent
6cd8779126
commit
8fad23691f
@@ -125,7 +125,9 @@ public class QuickFixes {
|
||||
JetIntentionActionFactory unresolvedReferenceFactory = ImportClassAndFunFix.createFactory();
|
||||
factories.put(UNRESOLVED_REFERENCE, unresolvedReferenceFactory);
|
||||
|
||||
factories.put(USELESS_SIMPLE_IMPORT, RemoveImportFix.createFactory());
|
||||
JetIntentionActionFactory removeImportFixFactory = RemoveImportFix.createFactory();
|
||||
factories.put(USELESS_SIMPLE_IMPORT, removeImportFixFactory);
|
||||
factories.put(USELESS_HIDDEN_IMPORT, removeImportFixFactory);
|
||||
|
||||
factories.put(SUPERTYPE_NOT_INITIALIZED_DEFAULT, ChangeToConstructorInvocationFix.createFactory());
|
||||
factories.put(FUNCTION_CALL_EXPECTED, ChangeToFunctionInvocationFix.createFactory());
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove useless import for 'jet.List'" "true"
|
||||
import jet.Double
|
||||
|
||||
class List {}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Remove useless import for 'jet.List'" "true"
|
||||
import jet.Double
|
||||
import jet.List<caret>
|
||||
|
||||
class List {}
|
||||
@@ -726,6 +726,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/quickfix/uselessImports"), Pattern.compile("^before(\\w+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("beforeRemoveUselessHiddenImport.kt")
|
||||
public void testRemoveUselessHiddenImport() throws Exception {
|
||||
doTest("idea/testData/quickfix/uselessImports/beforeRemoveUselessHiddenImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("beforeRemoveUselessImport.kt")
|
||||
public void testRemoveUselessImport() throws Exception {
|
||||
doTest("idea/testData/quickfix/uselessImports/beforeRemoveUselessImport.kt");
|
||||
|
||||
Reference in New Issue
Block a user