@Nullable
  private static CommonProblemDescriptor createDescriptor(@Nullable RefEntity element,
                                                          @NotNull OfflineProblemDescriptor offlineDescriptor,
                                                          @NotNull InspectionToolWrapper<?,?> toolWrapper,
                                                          @NotNull InspectionToolPresentation presentation) {
    Project project = presentation.getContext().getProject();
    if (toolWrapper instanceof GlobalInspectionToolWrapper) {
      LocalInspectionToolWrapper localTool = ((GlobalInspectionToolWrapper)toolWrapper).getSharedLocalInspectionToolWrapper();
      if (localTool != null) {
        CommonProblemDescriptor descriptor = createDescriptor(element, offlineDescriptor, localTool, presentation);
        if (descriptor != null) {
          return descriptor;
        }
      }
      return createRerunGlobalToolDescriptor((GlobalInspectionToolWrapper)toolWrapper, element, offlineDescriptor, project);
    }
    if (Registry.is("offline.inspections.results.verify") &&
        toolWrapper instanceof LocalInspectionToolWrapper && !(toolWrapper.getTool() instanceof UnfairLocalInspectionTool)) {
      if (element instanceof RefElement) {
        PsiElement psiElement = ((RefElement)element).getPsiElement();
        if (psiElement != null) {
          return ProgressManager.getInstance().runProcess(
            () -> runLocalTool(psiElement,
                               offlineDescriptor,
                               (LocalInspectionToolWrapper)toolWrapper,
                               presentation.getContext()), new DaemonProgressIndicator());
        }
        return null;
      }
    }

    CommonProblemDescriptor descriptor = createProblemDescriptorFromOfflineDescriptor(element,
                                                                                      offlineDescriptor,
                                                                                      QuickFix.EMPTY_ARRAY,
                                                                                      project);
    QuickFix<?>[] quickFixes = getFixes(descriptor, element, presentation, offlineDescriptor.getHints());
    if (quickFixes != null) {
      descriptor = createProblemDescriptorFromOfflineDescriptor(element,
                                                                offlineDescriptor,
                                                                quickFixes,
                                                                project);
    }
    return descriptor;
  }
@Nullable
  private static CommonProblemDescriptor createDescriptor(@Nullable RefEntity element,
                                                          @NotNull OfflineProblemDescriptor offlineDescriptor,
                                                          @NotNull InspectionToolWrapper<?,?> toolWrapper,
                                                          @NotNull InspectionToolPresentation presentation)