AbstractVcs (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return null; VcsKey key = e.getData(VcsDataKeys.VCS); if (key == null) return null; return findVcsByKey(project, key); }