deprecated inspection: skip import statements (IDEA-91767)

This commit is contained in:
anna
2012-09-19 10:23:46 +02:00
parent 94362f8765
commit 03c66e9976
5 changed files with 16 additions and 0 deletions
@@ -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();
}