void (@NotNull AnActionEvent e) { final VirtualFile[] files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); final Project project = e.getData(CommonDataKeys.PROJECT); if (files != null && project != null) { final SchemaType type = getInputType(project, files); e.getPresentation().setEnabled(type != null); if (type == SchemaType.XML) { e.getPresentation().setText(RelaxngBundle.message("relaxng.convert-schema.action.title.xml-files", files.length)); } else { e.getPresentation().setText(RelaxngBundle.message("relaxng.convert-schema.action.title.non-xml")); } } else { e.getPresentation().setEnabled(false); } }