void (@NotNull VirtualFile fileToRefresh) { synchronized (myFilesToRefresh) { if (myFilesToRefresh.add(fileToRefresh)) { myUpdateProblemAlarm.cancelAllRequests(); myUpdateProblemAlarm.addRequest(() -> { if (!myProject.isOpen()) return; Set<VirtualFile> filesToRefresh; synchronized (myFilesToRefresh) { filesToRefresh = new HashSet<>(myFilesToRefresh); } final DefaultMutableTreeNode rootNode = getRootNode(); if (rootNode != null) { updateNodesContaining(filesToRefresh, rootNode); } synchronized (myFilesToRefresh) { myFilesToRefresh.removeAll(filesToRefresh); } }, 200, ModalityState.nonModal()); } } }