Search in sources :

Example 1 with OfflineInspectionRVContentProvider

use of com.intellij.codeInspection.offlineViewer.OfflineInspectionRVContentProvider 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)

Aggregations

AnalysisScope (com.intellij.analysis.AnalysisScope)1 GlobalInspectionContextImpl (com.intellij.codeInspection.ex.GlobalInspectionContextImpl)1 InspectionManagerEx (com.intellij.codeInspection.ex.InspectionManagerEx)1 OfflineInspectionRVContentProvider (com.intellij.codeInspection.offlineViewer.OfflineInspectionRVContentProvider)1 RefManagerImpl (com.intellij.codeInspection.reference.RefManagerImpl)1 InspectionResultsView (com.intellij.codeInspection.ui.InspectionResultsView)1 NotNull (org.jetbrains.annotations.NotNull)1