Search in sources :

Example 1 with LocalInspectionTool

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

the class SpellCheckingEditorCustomization method init.

@SuppressWarnings({ "unchecked" })
private static boolean init() {
    // It's assumed that default spell checking inspection settings are just fine for processing all types of data.
    // Please perform corresponding settings tuning if that assumption is broken at future.
    Class<LocalInspectionTool>[] inspectionClasses = (Class<LocalInspectionTool>[]) new Class<?>[] { SpellCheckingInspection.class };
    for (Class<LocalInspectionTool> inspectionClass : inspectionClasses) {
        try {
            LocalInspectionTool tool = inspectionClass.newInstance();
            SPELL_CHECK_TOOLS.put(tool.getShortName(), new LocalInspectionToolWrapper(tool));
        } catch (Throwable e) {
            return false;
        }
    }
    return true;
}
Also used : LocalInspectionTool(com.intellij.codeInspection.LocalInspectionTool) LocalInspectionToolWrapper(com.intellij.codeInspection.ex.LocalInspectionToolWrapper)

Example 2 with LocalInspectionTool

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

the class PythonInspectionsTest method testPyNestedDecoratorsInspection.

public void testPyNestedDecoratorsInspection() {
    LocalInspectionTool inspection = new PyNestedDecoratorsInspection();
    doTest(getTestName(false), inspection);
}
Also used : LocalInspectionTool(com.intellij.codeInspection.LocalInspectionTool)

Example 3 with LocalInspectionTool

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

the class PythonInspectionsTest method testPyTrailingSemicolonInspection.

public void testPyTrailingSemicolonInspection() {
    LocalInspectionTool inspection = new PyTrailingSemicolonInspection();
    doTest(getTestName(false), inspection);
}
Also used : LocalInspectionTool(com.intellij.codeInspection.LocalInspectionTool)

Example 4 with LocalInspectionTool

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

the class PythonInspectionsTest method testPyMethodFirstArgAssignmentInspection.

public void testPyMethodFirstArgAssignmentInspection() {
    LocalInspectionTool inspection = new PyMethodFirstArgAssignmentInspection();
    doTest(getTestName(false), inspection);
}
Also used : LocalInspectionTool(com.intellij.codeInspection.LocalInspectionTool)

Example 5 with LocalInspectionTool

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

the class PythonInspectionsTest method testPyComparisonWithNoneInspection.

public void testPyComparisonWithNoneInspection() {
    LocalInspectionTool inspection = new PyComparisonWithNoneInspection();
    doTest(getTestName(false), inspection);
}
Also used : LocalInspectionTool(com.intellij.codeInspection.LocalInspectionTool)

Aggregations

LocalInspectionTool (com.intellij.codeInspection.LocalInspectionTool)29 NotNull (org.jetbrains.annotations.NotNull)11 ProblemsHolder (com.intellij.codeInspection.ProblemsHolder)4 HighlightDisplayLevel (com.intellij.codeHighlighting.HighlightDisplayLevel)3 LocalInspectionToolWrapper (com.intellij.codeInspection.ex.LocalInspectionToolWrapper)3 Project (com.intellij.openapi.project.Project)3 IOException (java.io.IOException)3 HighlightDisplayKey (com.intellij.codeInsight.daemon.HighlightDisplayKey)2 LocalInspectionToolSession (com.intellij.codeInspection.LocalInspectionToolSession)2 InspectionProfileImpl (com.intellij.codeInspection.ex.InspectionProfileImpl)2 InspectionToolWrapper (com.intellij.codeInspection.ex.InspectionToolWrapper)2 JavaLanguage (com.intellij.lang.java.JavaLanguage)2 PsiElementVisitor (com.intellij.psi.PsiElementVisitor)2 File (java.io.File)2 Language (org.intellij.lang.annotations.Language)2 Nls (org.jetbrains.annotations.Nls)2 NonNls (org.jetbrains.annotations.NonNls)2 com.intellij.codeHighlighting (com.intellij.codeHighlighting)1 EditorInfo (com.intellij.codeInsight.EditorInfo)1 CompletionContributor (com.intellij.codeInsight.completion.CompletionContributor)1