void (@NotNull AnActionEvent e) { VirtualFile[] files = getContextFiles(e, file -> OverrideFileTypeManager.getInstance().getFileValue(file) == null); boolean enabled = files.length != 0; Presentation presentation = e.getPresentation(); presentation.setDescription(enabled ? ActionsBundle.message("action.OverrideFileTypeAction.verbose.description", files[0].getName(), files.length - 1) : ActionsBundle.message("action.OverrideFileTypeAction.description")); presentation.setEnabledAndVisible(enabled); }