void (@NotNull ProgressIndicator indicator) { LOG.debug("Refresh task started"); indicator.setIndeterminate(true); DataPack dataPack = myCurrentDataPack; while (true) { List<RefreshRequest> requests = mySingleTaskController.popRequests(); Collection<VirtualFile> rootsToRefresh = getRootsToRefresh(requests); LOG.debug("Requests: " + requests + ". roots to refresh: " + rootsToRefresh); if (rootsToRefresh.isEmpty()) { mySingleTaskController.taskCompleted(dataPack); break; } try { dataPack = doRefresh(rootsToRefresh); } catch (ProcessCanceledException e) { mySingleTaskController.taskCompleted(null); throw e; } } }