Search in sources :

Example 1 with RefManagerImpl

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

the class LocalDescriptorsUtil method addProblemDescriptors.

static void addProblemDescriptors(@NotNull List<ProblemDescriptor> descriptors, boolean filterSuppressed, @NotNull GlobalInspectionContext context, @Nullable LocalInspectionTool tool, @NotNull TripleFunction<LocalInspectionTool, PsiElement, GlobalInspectionContext, RefElement> getProblemElementFunction, @NotNull InspectionToolPresentation dpi) {
    if (descriptors.isEmpty())
        return;
    Map<RefElement, List<ProblemDescriptor>> problems = new HashMap<>();
    final RefManagerImpl refManager = (RefManagerImpl) context.getRefManager();
    for (ProblemDescriptor descriptor : descriptors) {
        final PsiElement element = descriptor.getPsiElement();
        if (element == null)
            continue;
        if (filterSuppressed) {
            String alternativeId;
            String id;
            if (refManager.isDeclarationsFound() && (context.isSuppressed(element, id = tool.getID()) || (alternativeId = tool.getAlternativeID()) != null && !alternativeId.equals(id) && context.isSuppressed(element, alternativeId))) {
                continue;
            }
            if (SuppressionUtil.inspectionResultSuppressed(element, tool))
                continue;
        }
        RefElement refElement = getProblemElementFunction.fun(tool, element, context);
        List<ProblemDescriptor> elementProblems = problems.get(refElement);
        if (elementProblems == null) {
            elementProblems = new ArrayList<>();
            problems.put(refElement, elementProblems);
        }
        elementProblems.add(descriptor);
    }
    for (Map.Entry<RefElement, List<ProblemDescriptor>> entry : problems.entrySet()) {
        final List<ProblemDescriptor> problemDescriptors = entry.getValue();
        RefElement refElement = entry.getKey();
        CommonProblemDescriptor[] descriptions = problemDescriptors.toArray(new CommonProblemDescriptor[problemDescriptors.size()]);
        dpi.addProblemElement(refElement, filterSuppressed, descriptions);
    }
}
Also used : HashMap(java.util.HashMap) RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) RefElement(com.intellij.codeInspection.reference.RefElement) ArrayList(java.util.ArrayList) List(java.util.List) HashMap(java.util.HashMap) Map(java.util.Map) PsiElement(com.intellij.psi.PsiElement)

Example 2 with RefManagerImpl

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

the class InspectionEngine method runInspectionOnFile.

@NotNull
public static List<ProblemDescriptor> runInspectionOnFile(@NotNull final PsiFile file, @NotNull InspectionToolWrapper toolWrapper, @NotNull final GlobalInspectionContext inspectionContext) {
    final InspectionManager inspectionManager = InspectionManager.getInstance(file.getProject());
    toolWrapper.initialize(inspectionContext);
    RefManagerImpl refManager = (RefManagerImpl) inspectionContext.getRefManager();
    refManager.inspectionReadActionStarted();
    try {
        if (toolWrapper instanceof LocalInspectionToolWrapper) {
            return inspect(Collections.singletonList((LocalInspectionToolWrapper) toolWrapper), file, inspectionManager, new EmptyProgressIndicator());
        }
        if (toolWrapper instanceof GlobalInspectionToolWrapper) {
            final GlobalInspectionTool globalTool = ((GlobalInspectionToolWrapper) toolWrapper).getTool();
            final List<ProblemDescriptor> descriptors = new ArrayList<>();
            if (globalTool instanceof GlobalSimpleInspectionTool) {
                GlobalSimpleInspectionTool simpleTool = (GlobalSimpleInspectionTool) globalTool;
                ProblemsHolder problemsHolder = new ProblemsHolder(inspectionManager, file, false);
                ProblemDescriptionsProcessor collectProcessor = new ProblemDescriptionsProcessor() {

                    @Nullable
                    @Override
                    public CommonProblemDescriptor[] getDescriptions(@NotNull RefEntity refEntity) {
                        return descriptors.toArray(new CommonProblemDescriptor[descriptors.size()]);
                    }

                    @Override
                    public void ignoreElement(@NotNull RefEntity refEntity) {
                        throw new RuntimeException();
                    }

                    @Override
                    public void addProblemElement(@Nullable RefEntity refEntity, @NotNull CommonProblemDescriptor... commonProblemDescriptors) {
                        if (!(refEntity instanceof RefElement))
                            return;
                        PsiElement element = ((RefElement) refEntity).getElement();
                        convertToProblemDescriptors(element, commonProblemDescriptors, descriptors);
                    }

                    @Override
                    public RefEntity getElement(@NotNull CommonProblemDescriptor descriptor) {
                        throw new RuntimeException();
                    }
                };
                simpleTool.checkFile(file, inspectionManager, problemsHolder, inspectionContext, collectProcessor);
                return descriptors;
            }
            RefElement fileRef = refManager.getReference(file);
            final AnalysisScope scope = new AnalysisScope(file);
            assert fileRef != null;
            fileRef.accept(new RefVisitor() {

                @Override
                public void visitElement(@NotNull RefEntity elem) {
                    CommonProblemDescriptor[] elemDescriptors = globalTool.checkElement(elem, scope, inspectionManager, inspectionContext);
                    if (elemDescriptors != null) {
                        convertToProblemDescriptors(file, elemDescriptors, descriptors);
                    }
                    for (RefEntity child : elem.getChildren()) {
                        child.accept(this);
                    }
                }
            });
            return descriptors;
        }
    } finally {
        refManager.inspectionReadActionFinished();
        toolWrapper.cleanup(file.getProject());
        inspectionContext.cleanup();
    }
    return Collections.emptyList();
}
Also used : GlobalInspectionToolWrapper(com.intellij.codeInspection.ex.GlobalInspectionToolWrapper) EmptyProgressIndicator(com.intellij.openapi.progress.EmptyProgressIndicator) RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) NotNull(org.jetbrains.annotations.NotNull) RefElement(com.intellij.codeInspection.reference.RefElement) AnalysisScope(com.intellij.analysis.AnalysisScope) RefVisitor(com.intellij.codeInspection.reference.RefVisitor) RefEntity(com.intellij.codeInspection.reference.RefEntity) LocalInspectionToolWrapper(com.intellij.codeInspection.ex.LocalInspectionToolWrapper) Nullable(org.jetbrains.annotations.Nullable) NotNull(org.jetbrains.annotations.NotNull)

Example 3 with RefManagerImpl

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

the class GlobalInspectionToolWrapper method initialize.

@Override
public void initialize(@NotNull GlobalInspectionContext context) {
    super.initialize(context);
    RefManagerImpl refManager = (RefManagerImpl) context.getRefManager();
    final RefGraphAnnotator annotator = getTool().getAnnotator(refManager);
    if (annotator != null) {
        refManager.registerGraphAnnotator(annotator);
    }
    getTool().initialize(context);
}
Also used : RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) RefGraphAnnotator(com.intellij.codeInspection.reference.RefGraphAnnotator)

Example 4 with RefManagerImpl

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

the class GlobalInspectionContextImpl method runTools.

@Override
protected void runTools(@NotNull final AnalysisScope scope, boolean runGlobalToolsOnly, boolean isOfflineInspections) {
    final ProgressIndicator progressIndicator = ProgressIndicatorProvider.getGlobalProgressIndicator();
    if (progressIndicator == null) {
        throw new IncorrectOperationException("Must be run under progress");
    }
    if (!isOfflineInspections && ApplicationManager.getApplication().isDispatchThread()) {
        throw new IncorrectOperationException("Must not start inspections from within EDT");
    }
    if (ApplicationManager.getApplication().isWriteAccessAllowed()) {
        throw new IncorrectOperationException("Must not start inspections from within write action");
    }
    // in offline inspection application we don't care about global read action
    if (!isOfflineInspections && ApplicationManager.getApplication().isReadAccessAllowed()) {
        throw new IncorrectOperationException("Must not start inspections from within global read action");
    }
    final InspectionManager inspectionManager = InspectionManager.getInstance(getProject());
    ((RefManagerImpl) getRefManager()).initializeAnnotators();
    final List<Tools> globalTools = new ArrayList<>();
    final List<Tools> localTools = new ArrayList<>();
    final List<Tools> globalSimpleTools = new ArrayList<>();
    initializeTools(globalTools, localTools, globalSimpleTools);
    appendPairedInspectionsForUnfairTools(globalTools, globalSimpleTools, localTools);
    runGlobalTools(scope, inspectionManager, globalTools, isOfflineInspections);
    if (runGlobalToolsOnly || localTools.isEmpty() && globalSimpleTools.isEmpty())
        return;
    SearchScope searchScope = ReadAction.compute(scope::toSearchScope);
    final Set<VirtualFile> localScopeFiles = searchScope instanceof LocalSearchScope ? new THashSet<>() : null;
    for (Tools tools : globalSimpleTools) {
        GlobalInspectionToolWrapper toolWrapper = (GlobalInspectionToolWrapper) tools.getTool();
        GlobalSimpleInspectionTool tool = (GlobalSimpleInspectionTool) toolWrapper.getTool();
        tool.inspectionStarted(inspectionManager, this, getPresentation(toolWrapper));
    }
    final boolean headlessEnvironment = ApplicationManager.getApplication().isHeadlessEnvironment();
    final Map<String, InspectionToolWrapper> map = getInspectionWrappersMap(localTools);
    final BlockingQueue<PsiFile> filesToInspect = new ArrayBlockingQueue<>(1000);
    // use original progress indicator here since we don't want it to cancel on write action start
    ProgressIndicator iteratingIndicator = new SensitiveProgressWrapper(progressIndicator);
    Future<?> future = startIterateScopeInBackground(scope, localScopeFiles, headlessEnvironment, filesToInspect, iteratingIndicator);
    Processor<PsiFile> processor = file -> {
        ProgressManager.checkCanceled();
        if (!ApplicationManagerEx.getApplicationEx().tryRunReadAction(() -> {
            if (!file.isValid()) {
                return;
            }
            LOG.assertTrue(scope.contains(file.getVirtualFile()), file.getName());
            inspectFile(file, inspectionManager, localTools, globalSimpleTools, map);
        })) {
            throw new ProcessCanceledException();
        }
        boolean includeDoNotShow = includeDoNotShow(getCurrentProfile());
        Stream.concat(getWrappersFromTools(localTools, file, includeDoNotShow).stream(), getWrappersFromTools(globalSimpleTools, file, includeDoNotShow).stream()).filter(wrapper -> wrapper.getTool() instanceof ExternalAnnotatorBatchInspection).forEach(wrapper -> {
            ProblemDescriptor[] descriptors = ((ExternalAnnotatorBatchInspection) wrapper.getTool()).checkFile(file, this, inspectionManager);
            InspectionToolPresentation toolPresentation = getPresentation(wrapper);
            ReadAction.run(() -> LocalDescriptorsUtil.addProblemDescriptors(Arrays.asList(descriptors), false, this, null, CONVERT, toolPresentation));
        });
        return true;
    };
    try {
        final Queue<PsiFile> filesFailedToInspect = new LinkedBlockingQueue<>();
        while (true) {
            Disposable disposable = Disposer.newDisposable();
            ProgressIndicator wrapper = new SensitiveProgressWrapper(progressIndicator);
            wrapper.start();
            ProgressIndicatorUtils.forceWriteActionPriority(wrapper, disposable);
            try {
                // use wrapper here to cancel early when write action start but do not affect the original indicator
                ((JobLauncherImpl) JobLauncher.getInstance()).processQueue(filesToInspect, filesFailedToInspect, wrapper, TOMBSTONE, processor);
                break;
            } catch (ProcessCanceledException ignored) {
                progressIndicator.checkCanceled();
                // go on with the write and then resume processing the rest of the queue
                assert !ApplicationManager.getApplication().isReadAccessAllowed();
                assert !ApplicationManager.getApplication().isDispatchThread();
                // wait for write action to complete
                ApplicationManager.getApplication().runReadAction(EmptyRunnable.getInstance());
            } finally {
                Disposer.dispose(disposable);
            }
        }
    } finally {
        // tell file scanning thread to stop
        iteratingIndicator.cancel();
        // let file scanning thread a chance to put TOMBSTONE and complete
        filesToInspect.clear();
        try {
            future.get(30, TimeUnit.SECONDS);
        } catch (Exception e) {
            LOG.error("Thread dump: \n" + ThreadDumper.dumpThreadsToString(), e);
        }
    }
    progressIndicator.checkCanceled();
    for (Tools tools : globalSimpleTools) {
        GlobalInspectionToolWrapper toolWrapper = (GlobalInspectionToolWrapper) tools.getTool();
        GlobalSimpleInspectionTool tool = (GlobalSimpleInspectionTool) toolWrapper.getTool();
        ProblemDescriptionsProcessor problemDescriptionProcessor = getProblemDescriptionProcessor(toolWrapper, map);
        tool.inspectionFinished(inspectionManager, this, problemDescriptionProcessor);
    }
    addProblemsToView(globalSimpleTools);
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) InjectedLanguageManager(com.intellij.lang.injection.InjectedLanguageManager) com.intellij.openapi.util(com.intellij.openapi.util) UIUtil(com.intellij.util.ui.UIUtil) ToolWindowManager(com.intellij.openapi.wm.ToolWindowManager) MessageType(com.intellij.openapi.ui.MessageType) ToggleAction(com.intellij.openapi.actionSystem.ToggleAction) VirtualFile(com.intellij.openapi.vfs.VirtualFile) HashMap(com.intellij.util.containers.HashMap) Document(com.intellij.openapi.editor.Document) HashSet(com.intellij.util.containers.HashSet) DefaultInspectionToolPresentation(com.intellij.codeInspection.ui.DefaultInspectionToolPresentation) THashSet(gnu.trove.THashSet) TripleFunction(com.intellij.util.TripleFunction) com.intellij.openapi.application(com.intellij.openapi.application) ProjectUtilCore(com.intellij.openapi.project.ProjectUtilCore) ProblemHighlightFilter(com.intellij.codeInsight.daemon.ProblemHighlightFilter) FileIndex(com.intellij.openapi.roots.FileIndex) PsiTreeUtil(com.intellij.psi.util.PsiTreeUtil) FileUtil(com.intellij.openapi.util.io.FileUtil) Logger(com.intellij.openapi.diagnostic.Logger) ProjectRootManager(com.intellij.openapi.roots.ProjectRootManager) InspectionToolPresentation(com.intellij.codeInspection.ui.InspectionToolPresentation) FileModificationService(com.intellij.codeInsight.FileModificationService) com.intellij.openapi.progress(com.intellij.openapi.progress) RefElement(com.intellij.codeInspection.reference.RefElement) IncorrectOperationException(com.intellij.util.IncorrectOperationException) IndexNotReadyException(com.intellij.openapi.project.IndexNotReadyException) PathMacroManager(com.intellij.openapi.components.PathMacroManager) java.util.concurrent(java.util.concurrent) InspectionResultsView(com.intellij.codeInspection.ui.InspectionResultsView) ProjectUtil(com.intellij.openapi.project.ProjectUtil) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) Stream(java.util.stream.Stream) PsiUtilCore(com.intellij.psi.util.PsiUtilCore) Processor(com.intellij.util.Processor) com.intellij.psi(com.intellij.psi) NotNull(org.jetbrains.annotations.NotNull) JobLauncherImpl(com.intellij.concurrency.JobLauncherImpl) com.intellij.ui.content(com.intellij.ui.content) java.util(java.util) LocalInspectionsPass(com.intellij.codeInsight.daemon.impl.LocalInspectionsPass) CharsetToolkit(com.intellij.openapi.vfs.CharsetToolkit) CleanupInspectionIntention(com.intellij.codeInspection.actions.CleanupInspectionIntention) PerformAnalysisInBackgroundOption(com.intellij.analysis.PerformAnalysisInBackgroundOption) JobLauncher(com.intellij.concurrency.JobLauncher) GlobalInspectionContextExtension(com.intellij.codeInspection.lang.GlobalInspectionContextExtension) SensitiveProgressWrapper(com.intellij.concurrency.SensitiveProgressWrapper) NonNls(org.jetbrains.annotations.NonNls) ProgressIndicatorUtils(com.intellij.openapi.progress.util.ProgressIndicatorUtils) SearchScope(com.intellij.psi.search.SearchScope) ContainerUtil(com.intellij.util.containers.ContainerUtil) Constructor(java.lang.reflect.Constructor) ThreadDumper(com.intellij.diagnostic.ThreadDumper) LocalSearchScope(com.intellij.psi.search.LocalSearchScope) NamedScope(com.intellij.psi.search.scope.packageSet.NamedScope) CoreProgressManager(com.intellij.openapi.progress.impl.CoreProgressManager) ProblemGroup(com.intellij.lang.annotation.ProblemGroup) NotificationGroup(com.intellij.notification.NotificationGroup) ToolWindowId(com.intellij.openapi.wm.ToolWindowId) Project(com.intellij.openapi.project.Project) OutputStreamWriter(java.io.OutputStreamWriter) RefVisitor(com.intellij.codeInspection.reference.RefVisitor) RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) StringUtil(com.intellij.openapi.util.text.StringUtil) HighlightInfoProcessor(com.intellij.codeInsight.daemon.impl.HighlightInfoProcessor) AnalysisScope(com.intellij.analysis.AnalysisScope) FileOutputStream(java.io.FileOutputStream) ConcurrencyUtil(com.intellij.util.ConcurrencyUtil) IOException(java.io.IOException) com.intellij.codeInspection(com.intellij.codeInspection) AnalysisUIOptions(com.intellij.analysis.AnalysisUIOptions) GuiUtils(com.intellij.ui.GuiUtils) InspectionTreeState(com.intellij.codeInspection.ui.InspectionTreeState) Disposable(com.intellij.openapi.Disposable) File(java.io.File) ApplicationManagerEx(com.intellij.openapi.application.ex.ApplicationManagerEx) Element(org.jdom.Element) RefEntity(com.intellij.codeInspection.reference.RefEntity) DefaultInspectionToolPresentation(com.intellij.codeInspection.ui.DefaultInspectionToolPresentation) InspectionToolPresentation(com.intellij.codeInspection.ui.InspectionToolPresentation) RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) LocalSearchScope(com.intellij.psi.search.LocalSearchScope) Disposable(com.intellij.openapi.Disposable) JobLauncherImpl(com.intellij.concurrency.JobLauncherImpl) IncorrectOperationException(com.intellij.util.IncorrectOperationException) IndexNotReadyException(com.intellij.openapi.project.IndexNotReadyException) IOException(java.io.IOException) SearchScope(com.intellij.psi.search.SearchScope) LocalSearchScope(com.intellij.psi.search.LocalSearchScope) SensitiveProgressWrapper(com.intellij.concurrency.SensitiveProgressWrapper) IncorrectOperationException(com.intellij.util.IncorrectOperationException)

Example 5 with RefManagerImpl

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

the class GlobalInspectionContextImpl method cleanup.

private void cleanup(@NotNull final AnalysisScope scope, @NotNull InspectionProfile profile, @Nullable final Runnable postRunnable, @Nullable final String commandName) {
    setCurrentScope(scope);
    final int fileCount = scope.getFileCount();
    final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
    final SearchScope searchScope = ReadAction.compute(scope::toSearchScope);
    final TextRange range;
    if (searchScope instanceof LocalSearchScope) {
        final PsiElement[] elements = ((LocalSearchScope) searchScope).getScope();
        range = elements.length == 1 ? ReadAction.compute(elements[0]::getTextRange) : null;
    } else {
        range = null;
    }
    final Iterable<Tools> inspectionTools = ContainerUtil.filter(profile.getAllEnabledInspectionTools(getProject()), tools -> {
        assert tools != null;
        return tools.getTool().getTool() instanceof CleanupLocalInspectionTool;
    });
    boolean includeDoNotShow = includeDoNotShow(profile);
    final RefManagerImpl refManager = (RefManagerImpl) getRefManager();
    refManager.inspectionReadActionStarted();
    List<ProblemDescriptor> descriptors = new ArrayList<>();
    Set<PsiFile> files = new HashSet<>();
    try {
        scope.accept(new PsiElementVisitor() {

            private int myCount;

            @Override
            public void visitFile(PsiFile file) {
                if (progressIndicator != null) {
                    progressIndicator.setFraction((double) ++myCount / fileCount);
                }
                if (isBinary(file))
                    return;
                final List<LocalInspectionToolWrapper> lTools = new ArrayList<>();
                for (final Tools tools : inspectionTools) {
                    final InspectionToolWrapper tool = tools.getEnabledTool(file, includeDoNotShow);
                    if (tool instanceof LocalInspectionToolWrapper) {
                        lTools.add((LocalInspectionToolWrapper) tool);
                        tool.initialize(GlobalInspectionContextImpl.this);
                    }
                }
                if (!lTools.isEmpty()) {
                    try {
                        final LocalInspectionsPass pass = new LocalInspectionsPass(file, PsiDocumentManager.getInstance(getProject()).getDocument(file), range != null ? range.getStartOffset() : 0, range != null ? range.getEndOffset() : file.getTextLength(), LocalInspectionsPass.EMPTY_PRIORITY_RANGE, true, HighlightInfoProcessor.getEmpty());
                        Runnable runnable = () -> pass.doInspectInBatch(GlobalInspectionContextImpl.this, InspectionManager.getInstance(getProject()), lTools);
                        ApplicationManager.getApplication().runReadAction(runnable);
                        final Set<ProblemDescriptor> localDescriptors = new TreeSet<>(CommonProblemDescriptor.DESCRIPTOR_COMPARATOR);
                        for (LocalInspectionToolWrapper tool : lTools) {
                            InspectionToolPresentation toolPresentation = getPresentation(tool);
                            for (CommonProblemDescriptor descriptor : toolPresentation.getProblemDescriptors()) {
                                if (descriptor instanceof ProblemDescriptor) {
                                    localDescriptors.add((ProblemDescriptor) descriptor);
                                }
                            }
                        }
                        if (searchScope instanceof LocalSearchScope) {
                            for (Iterator<ProblemDescriptor> iterator = localDescriptors.iterator(); iterator.hasNext(); ) {
                                final ProblemDescriptor descriptor = iterator.next();
                                final TextRange infoRange = descriptor instanceof ProblemDescriptorBase ? ((ProblemDescriptorBase) descriptor).getTextRange() : null;
                                if (infoRange != null && !((LocalSearchScope) searchScope).containsRange(file, infoRange)) {
                                    iterator.remove();
                                }
                            }
                        }
                        if (!localDescriptors.isEmpty()) {
                            descriptors.addAll(localDescriptors);
                            files.add(file);
                        }
                    } finally {
                        myPresentationMap.clear();
                    }
                }
            }
        });
    } finally {
        refManager.inspectionReadActionFinished();
    }
    if (files.isEmpty()) {
        GuiUtils.invokeLaterIfNeeded(() -> {
            if (commandName != null) {
                NOTIFICATION_GROUP.createNotification(InspectionsBundle.message("inspection.no.problems.message", scope.getFileCount(), scope.getDisplayName()), MessageType.INFO).notify(getProject());
            }
            if (postRunnable != null) {
                postRunnable.run();
            }
        }, ModalityState.defaultModalityState());
        return;
    }
    Runnable runnable = () -> {
        if (!FileModificationService.getInstance().preparePsiElementsForWrite(files))
            return;
        CleanupInspectionIntention.applyFixesNoSort(getProject(), "Code Cleanup", descriptors, null);
        if (postRunnable != null) {
            postRunnable.run();
        }
    };
    TransactionGuard.submitTransaction(getProject(), runnable);
}
Also used : DefaultInspectionToolPresentation(com.intellij.codeInspection.ui.DefaultInspectionToolPresentation) InspectionToolPresentation(com.intellij.codeInspection.ui.InspectionToolPresentation) HashSet(com.intellij.util.containers.HashSet) THashSet(gnu.trove.THashSet) RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) LocalInspectionsPass(com.intellij.codeInsight.daemon.impl.LocalInspectionsPass) HashSet(com.intellij.util.containers.HashSet) THashSet(gnu.trove.THashSet) LocalSearchScope(com.intellij.psi.search.LocalSearchScope) SearchScope(com.intellij.psi.search.SearchScope) LocalSearchScope(com.intellij.psi.search.LocalSearchScope)

Aggregations

RefManagerImpl (com.intellij.codeInspection.reference.RefManagerImpl)10 AnalysisScope (com.intellij.analysis.AnalysisScope)3 RefElement (com.intellij.codeInspection.reference.RefElement)3 DefaultInspectionToolPresentation (com.intellij.codeInspection.ui.DefaultInspectionToolPresentation)3 InspectionToolPresentation (com.intellij.codeInspection.ui.InspectionToolPresentation)3 Project (com.intellij.openapi.project.Project)3 THashSet (gnu.trove.THashSet)3 NotNull (org.jetbrains.annotations.NotNull)3 LocalInspectionsPass (com.intellij.codeInsight.daemon.impl.LocalInspectionsPass)2 GlobalInspectionContextExtension (com.intellij.codeInspection.lang.GlobalInspectionContextExtension)2 RefEntity (com.intellij.codeInspection.reference.RefEntity)2 RefVisitor (com.intellij.codeInspection.reference.RefVisitor)2 InspectionResultsView (com.intellij.codeInspection.ui.InspectionResultsView)2 IndexNotReadyException (com.intellij.openapi.project.IndexNotReadyException)2 LocalSearchScope (com.intellij.psi.search.LocalSearchScope)2 SearchScope (com.intellij.psi.search.SearchScope)2 HashSet (com.intellij.util.containers.HashSet)2 AnalysisUIOptions (com.intellij.analysis.AnalysisUIOptions)1 PerformAnalysisInBackgroundOption (com.intellij.analysis.PerformAnalysisInBackgroundOption)1 FileModificationService (com.intellij.codeInsight.FileModificationService)1