void (@NotNull final AnActionEvent e) { GuiEditor editor = FormEditingUtil.getActiveEditor(e.getDataContext()); if (editor == null) { e.getPresentation().setVisible(false); return; } final VirtualFile file = editor.getFile(); e.getPresentation().setVisible( FileDocumentManager.getInstance().getDocument(file) != null && FileTypeRegistry.getInstance().isFileOfType(file, GuiFormFileType.INSTANCE) ); }