mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
deprecated inspection: skip import statements (IDEA-91767)
This commit is contained in:
@@ -241,6 +241,10 @@ public class DeprecationInspection extends BaseJavaLocalInspectionTool {
|
||||
}
|
||||
}
|
||||
|
||||
if (PsiTreeUtil.getParentOfType(elementToHighlight, PsiImportStatementBase.class) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String description = JavaErrorMessages.message("deprecated.symbol",
|
||||
HighlightMessageUtil.getSymbolName(refElement, PsiSubstitutor.EMPTY));
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems/>
|
||||
@@ -0,0 +1,3 @@
|
||||
import a.A;
|
||||
public class Test {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package a;
|
||||
@Deprecated
|
||||
public class A {}
|
||||
@@ -25,6 +25,10 @@ public class DeprecationInspectionTest extends InspectionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDeprecatedInImport() throws Exception{
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDeprecatedInner() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user