void (@NotNull PsiFile file) { if (LOG.isDebugEnabled()) { LOG.debug("Code cleanup: searching for problems in file " + file); } progressIndicator.setText(AbstractLayoutCodeProcessor.getPresentablePath(getProject(), file)); progressIndicator.setFraction((double)++myCount / fileCount); if (isBinary(file)) return; List<LocalInspectionToolWrapper> lTools = new ArrayList<>(); for (Tools tools : inspectionTools) { InspectionToolWrapper<?, ?> tool = tools.getEnabledTool(file, includeDoNotShow); if (tool != null && profile instanceof InspectionProfileImpl profileImpl) { @NotNull Set<InspectionToolWrapper<?, ?>> other = new HashSet<>(); profileImpl.collectDependentInspections(tool, other, getProject()); for (InspectionToolWrapper<?, ?> wrapper : other) { if (wrapper instanceof LocalInspectionToolWrapper) { lTools.add((LocalInspectionToolWrapper)wrapper); wrapper.initialize(GlobalInspectionContextImpl.this); } } } if (tool instanceof GlobalInspectionToolWrapper) { tool = ((GlobalInspectionToolWrapper)tool).getSharedLocalInspectionToolWrapper(); } if (tool != null) { lTools.add((LocalInspectionToolWrapper)tool); tool.initialize(GlobalInspectionContextImpl.this); } } if (!lTools.isEmpty()) { InspectionProfileWrapper.runWithCustomInspectionWrapper(file, p -> new InspectionProfileWrapper(profile, ((InspectionProfileImpl)p).getProfileManager()), () -> findProblemsInFile(file, lTools, range, searchScope, descriptors, files, shouldApplyFix)); } }