Search in sources :

Example 11 with UnusedDeclarationInspection

use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project intellij-community by JetBrains.

the class LightUnusedHighlightingFixtureTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myFixture.enableInspections(new UnusedDeclarationInspection(true));
    PlatformTestUtil.registerExtension(ImplicitUsageProvider.EP_NAME, new ImplicitUsageProvider() {

        @Override
        public boolean isImplicitUsage(PsiElement element) {
            return isImplicitWrite(element);
        }

        @Override
        public boolean isImplicitRead(PsiElement element) {
            return false;
        }

        @Override
        public boolean isImplicitWrite(PsiElement element) {
            return element instanceof PsiField && "implicitWrite".equals(((PsiNamedElement) element).getName());
        }
    }, getTestRootDisposable());
}
Also used : PsiField(com.intellij.psi.PsiField) UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection) PsiElement(com.intellij.psi.PsiElement)

Example 12 with UnusedDeclarationInspection

use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project intellij-community by JetBrains.

the class SuppressWarningsTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    enableInspectionTool(new UnusedDeclarationInspection());
}
Also used : UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Example 13 with UnusedDeclarationInspection

use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project intellij-community by JetBrains.

the class GenericsHighlightingTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    enableInspectionTool(new UnusedDeclarationInspection());
}
Also used : UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Example 14 with UnusedDeclarationInspection

use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project intellij-community by JetBrains.

the class LightAdvHighlightingTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUnusedDeclarationInspection = new UnusedDeclarationInspection(isUnusedInspectionRequired());
    enableInspectionTool(myUnusedDeclarationInspection);
    setLanguageLevel(LanguageLevel.JDK_1_4);
}
Also used : UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Example 15 with UnusedDeclarationInspection

use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project intellij-community by JetBrains.

the class FunctionalExpressionIncompleteHighlightingTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    enableInspectionTool(new UnusedDeclarationInspection());
}
Also used : UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Aggregations

UnusedDeclarationInspection (com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)39 RedundantCastInspection (com.intellij.codeInspection.redundantCast.RedundantCastInspection)3 UncheckedWarningLocalInspection (com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspection)3 VirtualFile (com.intellij.openapi.vfs.VirtualFile)3 PsiElement (com.intellij.psi.PsiElement)3 JavacQuirksInspection (com.intellij.codeInspection.compiler.JavacQuirksInspection)2 GlobalInspectionToolWrapper (com.intellij.codeInspection.ex.GlobalInspectionToolWrapper)2 JavaDocReferenceInspection (com.intellij.codeInspection.javaDoc.JavaDocReferenceInspection)2 NotNull (org.jetbrains.annotations.NotNull)2 HighlightDisplayKey (com.intellij.codeInsight.daemon.HighlightDisplayKey)1 InspectionEP (com.intellij.codeInspection.InspectionEP)1 UnusedDeclarationPresentation (com.intellij.codeInspection.deadCode.UnusedDeclarationPresentation)1 EmptyMethodInspection (com.intellij.codeInspection.emptyMethod.EmptyMethodInspection)1 InspectionToolWrapper (com.intellij.codeInspection.ex.InspectionToolWrapper)1 LocalInspectionToolWrapper (com.intellij.codeInspection.ex.LocalInspectionToolWrapper)1 I18nInspection (com.intellij.codeInspection.i18n.I18nInspection)1 EntryPoint (com.intellij.codeInspection.reference.EntryPoint)1 PsiField (com.intellij.psi.PsiField)1 CodeStyleSettings (com.intellij.psi.codeStyle.CodeStyleSettings)1 ApplyChangeSignatureAction (com.intellij.refactoring.changeSignature.inplace.ApplyChangeSignatureAction)1