InspectionResultsView (@NotNull Project project, @Nullable String profileName, @NotNull Map<String, Map<String, Set<OfflineProblemDescriptor>>> resMap, @NotNull @NlsContexts.TabTitle String title) { InspectionProfileImpl profile; if (profileName != null) { profile = InspectionProjectProfileManager.getInstance(project).getProfile(profileName, false); if (profile == null) { profile = InspectionProfileManager.getInstance().getProfile(profileName, false); } } else { profile = null; } final InspectionProfileImpl inspectionProfile = new InspectionProfileImpl(profileName != null ? profileName : "Server Side") { @NotNull @Override public HighlightDisplayLevel getErrorLevel(@NotNull final HighlightDisplayKey key, PsiElement element) { return InspectionProfileManager.getInstance().getCurrentProfile().getErrorLevel(key, element); } }; if (profile != null) { inspectionProfile.copyFrom(profile); } for (Tools tool : inspectionProfile.getAllEnabledInspectionTools(project)) { String id = tool.getShortName(); if (!resMap.containsKey(id)) { ((ToolsImpl)tool).setEnabled(false); } } for (String id : resMap.keySet()) { if (inspectionProfile.getToolsOrNull(id, project) != null) { inspectionProfile.enableTool(id, project); } } return showOfflineView(project, resMap, inspectionProfile, title); }