Search in sources :

Example 1 with RedundantCastInspection

use of com.intellij.codeInspection.redundantCast.RedundantCastInspection in project intellij-community by JetBrains.

the class RedundantCast15Test method doTest.

private void doTest() throws Exception {
    final LocalInspectionToolWrapper toolWrapper = new LocalInspectionToolWrapper(new RedundantCastInspection());
    doTest("redundantCast/generics/" + getTestName(false), toolWrapper, "java 1.5");
}
Also used : RedundantCastInspection(com.intellij.codeInspection.redundantCast.RedundantCastInspection) LocalInspectionToolWrapper(com.intellij.codeInspection.ex.LocalInspectionToolWrapper)

Example 2 with RedundantCastInspection

use of com.intellij.codeInspection.redundantCast.RedundantCastInspection in project intellij-community by JetBrains.

the class RedundantCast15Test method testIgnore.

public void testIgnore() throws Exception {
    final RedundantCastInspection castInspection = new RedundantCastInspection();
    castInspection.IGNORE_ANNOTATED_METHODS = true;
    castInspection.IGNORE_SUSPICIOUS_METHOD_CALLS = true;
    final LocalInspectionToolWrapper tool = new LocalInspectionToolWrapper(castInspection);
    doTest("redundantCast/generics/" + getTestName(false), tool, "java 1.5");
}
Also used : RedundantCastInspection(com.intellij.codeInspection.redundantCast.RedundantCastInspection) LocalInspectionToolWrapper(com.intellij.codeInspection.ex.LocalInspectionToolWrapper)

Example 3 with RedundantCastInspection

use of com.intellij.codeInspection.redundantCast.RedundantCastInspection in project intellij-community by JetBrains.

the class LightAdvHighlightingFixtureTest method testSuppressedInGenerated.

public void testSuppressedInGenerated() throws Exception {
    myFixture.addClass("package javax.annotation; public @interface Generated {}");
    final RedundantCastInspection inspection = new RedundantCastInspection();
    try {
        myFixture.enableInspections(inspection);
        myFixture.configureByFile(getTestName(false) + ".java");
        myFixture.checkHighlighting();
    } finally {
        myFixture.disableInspections(inspection);
    }
}
Also used : RedundantCastInspection(com.intellij.codeInspection.redundantCast.RedundantCastInspection)

Example 4 with RedundantCastInspection

use of com.intellij.codeInspection.redundantCast.RedundantCastInspection in project intellij-community by JetBrains.

the class LightAdvHighlightingJdk6Test method setUp.

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

Example 5 with RedundantCastInspection

use of com.intellij.codeInspection.redundantCast.RedundantCastInspection in project intellij-community by JetBrains.

the class LightAdvHighlightingJdk7Test method setUp.

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

Aggregations

RedundantCastInspection (com.intellij.codeInspection.redundantCast.RedundantCastInspection)6 UnusedDeclarationInspection (com.intellij.codeInspection.deadCode.UnusedDeclarationInspection)3 UncheckedWarningLocalInspection (com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspection)3 JavacQuirksInspection (com.intellij.codeInspection.compiler.JavacQuirksInspection)2 LocalInspectionToolWrapper (com.intellij.codeInspection.ex.LocalInspectionToolWrapper)2 JavaDocReferenceInspection (com.intellij.codeInspection.javaDoc.JavaDocReferenceInspection)1