ProcessingItem[] (@NotNull CompileContext context, ProcessingItem @NotNull [] items) { context.getProgressIndicator().setText(myValidator.getProgressIndicatorText()); Map<Class<?>, LocalInspectionTool> allTools = getInspectionToolMap(context.getProject(), myProfileManager); List<LocalInspectionTool> inspections = new ArrayList<>(); for (Class<? extends LocalInspectionTool> aClass : myValidator.getInspectionToolClasses(context)) { LocalInspectionTool tool = allTools.get(aClass); if (tool != null) { inspections.add(tool); } } List<ProcessingItem> processedItems = new ArrayList<>(); for (int i = 0; i < items.length; i++) { MyValidatorProcessingItem item = (MyValidatorProcessingItem)items[i]; context.getProgressIndicator().checkCanceled(); context.getProgressIndicator().setFraction((double)i / items.length); try { ourCompilationThreads.set(Boolean.TRUE); if (checkFile(inspections, item, context)) { processedItems.add(item); } } finally { ourCompilationThreads.set(Boolean.FALSE); } } return processedItems.toArray(ProcessingItem.EMPTY_ARRAY); }