@NotNull
  private List<LocalInspectionToolWrapper> getInspectionTools(@NotNull InspectionProfileWrapper profile) {
    List<InspectionToolWrapper<?, ?>> toolWrappers = profile.getInspectionProfile().getInspectionTools(getFile());

    if (LOG.isDebugEnabled()) {
      // this triggers heavy class loading of all inspections, do not run if DEBUG not enabled
      InspectionProfileWrapper.checkInspectionsDuplicates(toolWrappers);
    }

    List<LocalInspectionToolWrapper> enabled = new ArrayList<>();
    Set<String> projectTypes = ProjectTypeService.getProjectTypeIds(myProject);
    boolean isTests = ApplicationManager.getApplication().isUnitTestMode();

    for (InspectionToolWrapper<?, ?> toolWrapper : toolWrappers) {
      ProgressManager.checkCanceled();

      if (!isTests && !toolWrapper.isApplicable(projectTypes)) continue;

      HighlightDisplayKey key = toolWrapper.getDisplayKey();
      if (!profile.isToolEnabled(key, getFile())) continue;
      if (HighlightDisplayLevel.DO_NOT_SHOW.equals(profile.getErrorLevel(key, getFile()))) continue;
      LocalInspectionToolWrapper wrapper;
      if (toolWrapper instanceof LocalInspectionToolWrapper local) {
        wrapper = local;
      }
      else {
        wrapper = ((GlobalInspectionToolWrapper)toolWrapper).getSharedLocalInspectionToolWrapper();
        if (wrapper == null) continue;
      }
      String language = wrapper.getLanguage();
      if (language != null && Language.findLanguageByID(language) == null) {
        continue; // filter out at least unknown languages
      }

      if (myIgnoreSuppressed
          && wrapper.isApplicable(getFile().getLanguage())
          && wrapper.getTool().isSuppressedFor(getFile())) {
        // inspections that do not match file language are excluded later in InspectionRunner.inspect
        continue;
      }

      enabled.add(wrapper);
    }
    return enabled;
  }
@NotNull
  private List<LocalInspectionToolWrapper> getInspectionTools(@NotNull InspectionProfileWrapper profile)