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;
}
Aggregations