void (@NotNull Project p, @NotNull IdeaGateway gw, @NotNull AnActionEvent e) { VirtualFile f = Objects.requireNonNull(getFile(e)); HistoryDialog frame = f.isDirectory() ? new DirectoryHistoryDialog(p, gw, f) : new FileHistoryDialog(p, gw, f); frame.show(); }