void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE); SelectBranchPopup.show(project, file, (p, configuration, url, revision) -> { ElementWithBranchComparer comparer = file.isDirectory() ? new DirectoryWithBranchComparer(project, file, url, revision) : new FileWithBranchComparer(project, file, url, revision); comparer.run(); }, message("compare.with.branch.popup.title")); }