void (Project project, @NotNull IdeaGateway gw, @NotNull LocalHistoryFacade vcs) { List<RecentChange> cc = vcs.getRecentChanges(gw.createTransientRootEntry()); String title = LocalHistoryBundle.message("recent.changes.popup.title"); if (cc.isEmpty()) { Messages.showInfoMessage(project, LocalHistoryBundle.message("recent.changes.to.changes"), title); return; } JBPopupFactory.getInstance().createPopupChooserBuilder(cc) .setSelectionMode(ListSelectionModel.SINGLE_SELECTION) .setRenderer(new RecentChangesListCellRenderer()) .setTitle(title) .setItemChosenCallback(change -> new RecentChangeDialog(project, gw, change).show()) .createPopup() .showCenteredInCurrentWindow(project); }