void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); VcsRepositoryManager manager = VcsRepositoryManager.getInstance(project); Collection<Repository> repositories = e.getData(CommonDataKeys.EDITOR) != null ? ContainerUtil.emptyList() : collectRepositories(manager, e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY)); Repository selectedRepo = DvcsUtil.guessRepositoryForOperation(project, e.getDataContext()); new VcsPushDialog(project, DvcsUtil.sortRepositories(repositories), selectedRepo).show(); }