boolean (@NotNull CompileContext context) { final Project project = context.getProject(); try { final FileProcessingCompiler.ProcessingItem[] items = myCompiler.getProcessingItems(context); if (items.length == 0) { return true; } final List<FileProcessingCompiler.ProcessingItem> toProcess = new ArrayList<>(); final Ref<IOException> ex = new Ref<>(null); final FileProcessingCompilerStateCache cache = getCache(context); final boolean isMake = context.isMake(); DumbService.getInstance(project).runReadActionInSmartMode(() -> { try { for (FileProcessingCompiler.ProcessingItem item : items) { final VirtualFile file = item.getFile(); final String url = file.getUrl(); if (isMake && cache.getTimestamp(url) == file.getTimeStamp()) { final ValidityState state = cache.getExtState(url); final ValidityState itemState = item.getValidityState(); if (state != null ? state.equalsTo(itemState) : itemState == null) { continue; } } toProcess.add(item); } } catch (IOException e) { ex.set(e); } }); IOException exception = ex.get(); if (exception != null) { throw exception; } if (toProcess.isEmpty()) { return true; } final FileProcessingCompiler.ProcessingItem[] array = toProcess.toArray(FileProcessingCompiler.ProcessingItem.EMPTY_ARRAY); final FileProcessingCompiler.ProcessingItem[] processed = myCompiler.process(context, array); if (processed.length == 0) { return true; } CompilerUtil.runInContext(context, JavaCompilerBundle.message("progress.updating.caches"), () -> { final List<VirtualFile> vFiles = new ArrayList<>(processed.length); final List<Pair<FileProcessingCompiler.ProcessingItem, ValidityState>> toUpdate = new ArrayList<>(processed.length); ApplicationManager.getApplication().runReadAction(() -> { for (FileProcessingCompiler.ProcessingItem item : processed) { vFiles.add(item.getFile()); toUpdate.add(Pair.create(item, item.getValidityState())); } }); LocalFileSystem.getInstance().refreshFiles(vFiles); for (Pair<FileProcessingCompiler.ProcessingItem, ValidityState> pair : toUpdate) { cache.update(pair.getFirst().getFile(), pair.getSecond()); } }); } catch (Throwable e) { context.addMessage(CompilerMessageCategory.ERROR, e.getMessage(), null, -1, -1); LOG.info(e); } return true; }