mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
treat annotation types and enums as normal classes and not as un-configured entry points (IDEA-157144)
This commit is contained in:
+2
-2
@@ -340,7 +340,7 @@ public class RefJavaManagerImpl extends RefJavaManager {
|
||||
getEntryPointsManager().addEntryPoint(refElement, false);
|
||||
}
|
||||
|
||||
if (psiElement instanceof PsiClass) {
|
||||
/*if (psiElement instanceof PsiClass) {
|
||||
PsiClass psiClass = (PsiClass)psiElement;
|
||||
|
||||
EntryPointsManager entryPointsManager = getEntryPointsManager();
|
||||
@@ -353,7 +353,7 @@ public class RefJavaManagerImpl extends RefJavaManager {
|
||||
else if (psiClass.isEnum()) {
|
||||
entryPointsManager.addEntryPoint(refElement, false);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private static void appendPackageElement(final Element element, final String packageName) {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>5</line>
|
||||
<description>Method is never used.</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>2</line>
|
||||
<description>Field has no usages.</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>2</line>
|
||||
<description>Field has no usages.</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
public enum MyEnum {
|
||||
A, B;
|
||||
}
|
||||
@@ -143,6 +143,11 @@ public class UnusedDeclarationTest extends InspectionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testUnusedEnum() {
|
||||
LanguageLevelProjectExtension.getInstance(getJavaFacade().getProject()).setLanguageLevel(LanguageLevel.JDK_1_5);
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testJunitEntryPoint() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user