Search in sources :

Example 46 with AnalysisScope

use of com.intellij.analysis.AnalysisScope in project intellij-community by JetBrains.

the class GlobalInspectionContextBase method cleanupElements.

public static void cleanupElements(@NotNull final Project project, @Nullable final Runnable runnable, final List<SmartPsiElementPointer<PsiElement>> elements) {
    Runnable cleanupRunnable = () -> {
        final List<PsiElement> psiElements = new ArrayList<>();
        for (SmartPsiElementPointer<PsiElement> element : elements) {
            PsiElement psiElement = element.getElement();
            if (psiElement != null && psiElement.isPhysical()) {
                psiElements.add(psiElement);
            }
        }
        if (psiElements.isEmpty()) {
            return;
        }
        GlobalInspectionContextBase globalContext = (GlobalInspectionContextBase) InspectionManager.getInstance(project).createNewGlobalContext(false);
        final InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getCurrentProfile();
        AnalysisScope analysisScope = new AnalysisScope(new LocalSearchScope(psiElements.toArray(new PsiElement[psiElements.size()])), project);
        globalContext.codeCleanup(analysisScope, profile, null, runnable, true);
    };
    Application application = ApplicationManager.getApplication();
    if (application.isWriteAccessAllowed() && !application.isUnitTestMode()) {
        application.invokeLater(cleanupRunnable);
    } else {
        cleanupRunnable.run();
    }
}
Also used : AnalysisScope(com.intellij.analysis.AnalysisScope) LocalSearchScope(com.intellij.psi.search.LocalSearchScope) Application(com.intellij.openapi.application.Application)

Example 47 with AnalysisScope

use of com.intellij.analysis.AnalysisScope 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 48 with AnalysisScope

use of com.intellij.analysis.AnalysisScope in project intellij-community by JetBrains.

the class ViewOfflineResultsAction method showOfflineView.

@NotNull
public static InspectionResultsView showOfflineView(@NotNull Project project, @NotNull Map<String, Map<String, Set<OfflineProblemDescriptor>>> resMap, @NotNull InspectionProfileImpl inspectionProfile, @NotNull String title) {
    final AnalysisScope scope = new AnalysisScope(project);
    final InspectionManagerEx managerEx = (InspectionManagerEx) InspectionManager.getInstance(project);
    final GlobalInspectionContextImpl context = managerEx.createNewGlobalContext(false);
    context.setExternalProfile(inspectionProfile);
    context.setCurrentScope(scope);
    context.initializeTools(new ArrayList<>(), new ArrayList<>(), new ArrayList<>());
    final InspectionResultsView view = new InspectionResultsView(context, new OfflineInspectionRVContentProvider(resMap, project));
    ((RefManagerImpl) context.getRefManager()).startOfflineView();
    context.addView(view, title, true);
    view.update();
    return view;
}
Also used : AnalysisScope(com.intellij.analysis.AnalysisScope) GlobalInspectionContextImpl(com.intellij.codeInspection.ex.GlobalInspectionContextImpl) OfflineInspectionRVContentProvider(com.intellij.codeInspection.offlineViewer.OfflineInspectionRVContentProvider) RefManagerImpl(com.intellij.codeInspection.reference.RefManagerImpl) InspectionManagerEx(com.intellij.codeInspection.ex.InspectionManagerEx) InspectionResultsView(com.intellij.codeInspection.ui.InspectionResultsView) NotNull(org.jetbrains.annotations.NotNull)

Example 49 with AnalysisScope

use of com.intellij.analysis.AnalysisScope in project intellij-community by JetBrains.

the class UnusedDeclarationInspectionBase method runInspection.

@Override
public void runInspection(@NotNull final AnalysisScope scope, @NotNull InspectionManager manager, @NotNull final GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) {
    globalContext.getRefManager().iterate(new RefJavaVisitor() {

        @Override
        public void visitElement(@NotNull final RefEntity refEntity) {
            if (refEntity instanceof RefElementImpl) {
                final RefElementImpl refElement = (RefElementImpl) refEntity;
                if (!refElement.isSuspicious())
                    return;
                PsiFile file = refElement.getContainingFile();
                if (file == null)
                    return;
                final boolean isSuppressed = refElement.isSuppressed(getShortName(), ALTERNATIVE_ID);
                if (isSuppressed || !((GlobalInspectionContextBase) globalContext).isToCheckFile(file, UnusedDeclarationInspectionBase.this)) {
                    if (isSuppressed || !scope.contains(file)) {
                        getEntryPointsManager(globalContext).addEntryPoint(refElement, false);
                    }
                }
            }
        }
    });
    if (isAddNonJavaUsedEnabled()) {
        checkForReachableRefs(globalContext);
        final StrictUnreferencedFilter strictUnreferencedFilter = new StrictUnreferencedFilter(this, globalContext);
        ProgressManager.getInstance().runProcess(new Runnable() {

            @Override
            public void run() {
                final RefManager refManager = globalContext.getRefManager();
                final PsiSearchHelper helper = PsiSearchHelper.SERVICE.getInstance(refManager.getProject());
                refManager.iterate(new RefJavaVisitor() {

                    @Override
                    public void visitElement(@NotNull final RefEntity refEntity) {
                        if (refEntity instanceof RefClass && strictUnreferencedFilter.accepts((RefClass) refEntity)) {
                            findExternalClassReferences((RefClass) refEntity);
                        } else if (refEntity instanceof RefMethod) {
                            RefMethod refMethod = (RefMethod) refEntity;
                            if (refMethod.isConstructor() && strictUnreferencedFilter.accepts(refMethod)) {
                                findExternalClassReferences(refMethod.getOwnerClass());
                            }
                        }
                    }

                    private void findExternalClassReferences(final RefClass refElement) {
                        final PsiClass psiClass = refElement.getElement();
                        String qualifiedName = psiClass != null ? psiClass.getQualifiedName() : null;
                        if (qualifiedName != null) {
                            final GlobalSearchScope projectScope = GlobalSearchScope.projectScope(globalContext.getProject());
                            final PsiNonJavaFileReferenceProcessor processor = (file, startOffset, endOffset) -> {
                                getEntryPointsManager(globalContext).addEntryPoint(refElement, false);
                                return false;
                            };
                            final DelegatingGlobalSearchScope globalSearchScope = new DelegatingGlobalSearchScope(projectScope) {

                                @Override
                                public boolean contains(@NotNull VirtualFile file) {
                                    return file.getFileType() != JavaFileType.INSTANCE && super.contains(file);
                                }
                            };
                            if (helper.processUsagesInNonJavaFiles(qualifiedName, processor, globalSearchScope)) {
                                final PsiReference reference = ReferencesSearch.search(psiClass, globalSearchScope).findFirst();
                                if (reference != null) {
                                    getEntryPointsManager(globalContext).addEntryPoint(refElement, false);
                                    for (PsiMethod method : psiClass.getMethods()) {
                                        final RefElement refMethod = refManager.getReference(method);
                                        if (refMethod != null) {
                                            getEntryPointsManager(globalContext).addEntryPoint(refMethod, false);
                                        }
                                    }
                                }
                            }
                        }
                    }
                });
            }
        }, null);
    }
    myProcessedSuspicious = new HashSet<>();
    myPhase = 1;
}
Also used : GroupNames(com.intellij.codeInsight.daemon.GroupNames) PsiClassImplUtil(com.intellij.psi.impl.PsiClassImplUtil) java.util(java.util) JobDescriptor(com.intellij.codeInspection.ex.JobDescriptor) VirtualFile(com.intellij.openapi.vfs.VirtualFile) HashMap(com.intellij.util.containers.HashMap) ToolExtensionPoints(com.intellij.ToolExtensionPoints) InvalidDataException(com.intellij.openapi.util.InvalidDataException) ContainerUtil(com.intellij.util.containers.ContainerUtil) UnusedSymbolLocalInspectionBase(com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspectionBase) DelegatingGlobalSearchScope(com.intellij.psi.search.DelegatingGlobalSearchScope) Project(com.intellij.openapi.project.Project) com.intellij.codeInspection.reference(com.intellij.codeInspection.reference) Logger(com.intellij.openapi.diagnostic.Logger) RefFilter(com.intellij.codeInspection.util.RefFilter) Extensions(com.intellij.openapi.extensions.Extensions) ProgressManager(com.intellij.openapi.progress.ProgressManager) ReferencesSearch(com.intellij.psi.search.searches.ReferencesSearch) PsiSearchHelper(com.intellij.psi.search.PsiSearchHelper) ExtensionPoint(com.intellij.openapi.extensions.ExtensionPoint) AnalysisScope(com.intellij.analysis.AnalysisScope) HighlightInfoType(com.intellij.codeInsight.daemon.impl.HighlightInfoType) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) com.intellij.codeInspection(com.intellij.codeInspection) JavaFileType(com.intellij.ide.highlighter.JavaFileType) PsiNonJavaFileReferenceProcessor(com.intellij.psi.search.PsiNonJavaFileReferenceProcessor) TestOnly(org.jetbrains.annotations.TestOnly) Nullable(org.jetbrains.annotations.Nullable) EntryPointsManager(com.intellij.codeInspection.ex.EntryPointsManager) PsiMethodUtil(com.intellij.psi.util.PsiMethodUtil) ApplicationManager(com.intellij.openapi.application.ApplicationManager) GlobalInspectionContextBase(com.intellij.codeInspection.ex.GlobalInspectionContextBase) HighlightUtilBase(com.intellij.codeInsight.daemon.impl.analysis.HighlightUtilBase) com.intellij.psi(com.intellij.psi) WriteExternalException(com.intellij.openapi.util.WriteExternalException) NotNull(org.jetbrains.annotations.NotNull) Element(org.jdom.Element) VirtualFile(com.intellij.openapi.vfs.VirtualFile) PsiNonJavaFileReferenceProcessor(com.intellij.psi.search.PsiNonJavaFileReferenceProcessor) NotNull(org.jetbrains.annotations.NotNull) PsiSearchHelper(com.intellij.psi.search.PsiSearchHelper) DelegatingGlobalSearchScope(com.intellij.psi.search.DelegatingGlobalSearchScope) GlobalSearchScope(com.intellij.psi.search.GlobalSearchScope) DelegatingGlobalSearchScope(com.intellij.psi.search.DelegatingGlobalSearchScope)

Example 50 with AnalysisScope

use of com.intellij.analysis.AnalysisScope in project intellij-community by JetBrains.

the class MagicConstantInspection method processValuesFlownTo.

private static boolean processValuesFlownTo(@NotNull final PsiExpression argument, @NotNull PsiElement scope, @NotNull PsiManager manager, @NotNull final Processor<PsiExpression> processor) {
    SliceAnalysisParams params = new SliceAnalysisParams();
    params.dataFlowToThis = true;
    params.scope = new AnalysisScope(new LocalSearchScope(scope), manager.getProject());
    SliceRootNode rootNode = new SliceRootNode(manager.getProject(), new DuplicateMap(), LanguageSlicing.getProvider(argument).createRootUsage(argument, params));
    Collection<? extends AbstractTreeNode> children = rootNode.getChildren().iterator().next().getChildren();
    for (AbstractTreeNode child : children) {
        SliceUsage usage = (SliceUsage) child.getValue();
        PsiElement element = usage.getElement();
        if (element instanceof PsiExpression && !processor.process((PsiExpression) element))
            return false;
    }
    return !children.isEmpty();
}
Also used : AnalysisScope(com.intellij.analysis.AnalysisScope) LocalSearchScope(com.intellij.psi.search.LocalSearchScope) AbstractTreeNode(com.intellij.ide.util.treeView.AbstractTreeNode)

Aggregations

AnalysisScope (com.intellij.analysis.AnalysisScope)56 Module (com.intellij.openapi.module.Module)14 VirtualFile (com.intellij.openapi.vfs.VirtualFile)13 JavaAnalysisScope (com.intellij.analysis.JavaAnalysisScope)12 Project (com.intellij.openapi.project.Project)12 NotNull (org.jetbrains.annotations.NotNull)10 PsiPackage (com.intellij.psi.PsiPackage)8 File (java.io.File)8 CyclicDependenciesBuilder (com.intellij.cyclicDependencies.CyclicDependenciesBuilder)7 PsiElement (com.intellij.psi.PsiElement)6 LocalSearchScope (com.intellij.psi.search.LocalSearchScope)6 Nullable (org.jetbrains.annotations.Nullable)6 AnalysisUIOptions (com.intellij.analysis.AnalysisUIOptions)5 BaseAnalysisActionDialog (com.intellij.analysis.BaseAnalysisActionDialog)5 PsiFile (com.intellij.psi.PsiFile)4 SearchScope (com.intellij.psi.search.SearchScope)4 HashMap (com.intellij.util.containers.HashMap)4 LintDriver (com.android.tools.lint.client.api.LintDriver)3 LintRequest (com.android.tools.lint.client.api.LintRequest)3 Issue (com.android.tools.lint.detector.api.Issue)3