void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); AntBuildFileBase selected = event.getUpdateSession() .compute(this, "getBuildFile", ActionUpdateThread.EDT, () -> myAntExplorer.getSelectedFile()); presentation.setEnabled(selected != null && selected.exists()); }