void (String projectPath) { if (!projectsPaths.contains(projectPath)) return; connection.disconnect(); if (gradleProjectsToRefreshCount.decrementAndGet() == 0) { ApplicationManager.getApplication().invokeLater(() -> promise.setResult(null)); } }