void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); GitVcs.runInBackground(new Task.Backgroundable(project, GitBundle.message("fetching"), true) { GitFetchResult result; @Override public void run(@NotNull ProgressIndicator indicator) { result = fetchSupport(project).fetchAllRemotes(getRepositories(project)); } @Override public void onFinished() { if (result != null) { onFetchFinished(project, result); } } }); }