use of com.intellij.codeInspection.ex.LocalInspectionToolWrapper in project intellij-community by JetBrains.
the class RedundantSuppressTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myInspectionToolWrappers = new InspectionToolWrapper[] { new LocalInspectionToolWrapper(new JavaDocReferenceInspection()), new LocalInspectionToolWrapper(new I18nInspection()), new LocalInspectionToolWrapper(new RawUseOfParameterizedTypeInspection()), new GlobalInspectionToolWrapper(new EmptyMethodInspection()), new GlobalInspectionToolWrapper(new UnusedDeclarationInspection()) };
myWrapper = new GlobalInspectionToolWrapper(new RedundantSuppressInspection() {
@NotNull
@Override
protected InspectionToolWrapper[] getInspectionTools(PsiElement psiElement, @NotNull InspectionManager manager) {
return myInspectionToolWrappers;
}
});
}
use of com.intellij.codeInspection.ex.LocalInspectionToolWrapper in project intellij-community by JetBrains.
the class TestOnlyInspectionTest method doTest.
private void doTest() {
TestOnlyInspection i = new TestOnlyInspection();
doTest("testOnly/" + getTestName(true), new LocalInspectionToolWrapper(i), "java 1.5");
}
use of com.intellij.codeInspection.ex.LocalInspectionToolWrapper in project intellij-community by JetBrains.
the class JavaDocInspectionTest method testPackageInfo.
public void testPackageInfo() {
JavaDocLocalInspection inspection = new JavaDocLocalInspection();
inspection.IGNORE_DEPRECATED = true;
inspection.setPackageOption("public", "@author");
myFixture.testInspection("packageInfo", new LocalInspectionToolWrapper(inspection));
}
use of com.intellij.codeInspection.ex.LocalInspectionToolWrapper in project intellij-community by JetBrains.
the class UnnecessaryParenthesesInspectionTest method test.
public void test() throws Exception {
final UnnecessaryParenthesesInspection inspection = new UnnecessaryParenthesesInspection();
inspection.ignoreParenthesesOnConditionals = true;
final LanguageLevelProjectExtension levelProjectExtension = LanguageLevelProjectExtension.getInstance(getProject());
final LanguageLevel level = levelProjectExtension.getLanguageLevel();
try {
levelProjectExtension.setLanguageLevel(LanguageLevel.JDK_1_8);
doTest("com/siyeh/igtest/style/unnecessary_parentheses", new LocalInspectionToolWrapper(inspection), "java 1.8");
} finally {
levelProjectExtension.setLanguageLevel(level);
}
}
use of com.intellij.codeInspection.ex.LocalInspectionToolWrapper in project intellij-community by JetBrains.
the class InterfaceNeverImplementedInspectionTest method test.
public void test() throws Exception {
final LanguageLevelProjectExtension levelProjectExtension = LanguageLevelProjectExtension.getInstance(getProject());
final LanguageLevel level = levelProjectExtension.getLanguageLevel();
try {
levelProjectExtension.setLanguageLevel(LanguageLevel.JDK_1_8);
doTest("com/siyeh/igtest/inheritance/interface_never_implemented", new LocalInspectionToolWrapper(new InterfaceNeverImplementedInspection()), "java 1.8");
} finally {
levelProjectExtension.setLanguageLevel(level);
}
}
Aggregations