Search in sources :

Example 26 with UnusedDeclarationInspection

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

the class LightAdvHighlightingJdk8Test method testUsedMethodsByMethodReferences.

public void testUsedMethodsByMethodReferences() {
    enableInspectionTool(new UnusedDeclarationInspection());
    doTest(true, true);
}
Also used : UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Example 27 with UnusedDeclarationInspection

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

the class LightAdvHighlightingJdk9Test method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    enableInspectionTools(new UnusedDeclarationInspection(), new UncheckedWarningLocalInspection(), new RedundantCastInspection(), new JavaDocReferenceInspection());
    setLanguageLevel(LanguageLevel.JDK_1_9);
    IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_9, getModule(), getTestRootDisposable());
}
Also used : JavaDocReferenceInspection(com.intellij.codeInspection.javaDoc.JavaDocReferenceInspection) RedundantCastInspection(com.intellij.codeInspection.redundantCast.RedundantCastInspection) UncheckedWarningLocalInspection(com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspection) UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Example 28 with UnusedDeclarationInspection

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

the class UnusedSymbolLocalTest method setUp.

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

Example 29 with UnusedDeclarationInspection

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

the class ChangeSignatureGestureTest method doTest.

private void doTest(final Runnable run) {
    myFixture.configureByFile("/refactoring/changeSignatureGesture/" + getTestName(false) + ".java");
    myFixture.enableInspections(new UnusedDeclarationInspection());
    CommandProcessor.getInstance().executeCommand(myFixture.getProject(), () -> new InplaceChangeSignature(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile().findElementAt(myFixture.getCaretOffset())), ChangeSignatureHandler.REFACTORING_NAME, null);
    run.run();
    myFixture.launchAction(ContainerUtil.findInstance(myFixture.getAvailableIntentions(), ApplyChangeSignatureAction.class));
    myFixture.checkResultByFile("/refactoring/changeSignatureGesture/" + getTestName(false) + "_after.java");
}
Also used : ApplyChangeSignatureAction(com.intellij.refactoring.changeSignature.inplace.ApplyChangeSignatureAction) InplaceChangeSignature(com.intellij.refactoring.changeSignature.inplace.InplaceChangeSignature) UnusedDeclarationInspection(com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)

Example 30 with UnusedDeclarationInspection

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

the class Suppress15InspectionsTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    enableInspectionTools(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