void (@NotNull AnActionEvent e) { if (currentTab == null) { e.getPresentation().setEnabled(false); return; } final FileTemplate selectedItem = getSelectedTemplate(); e.getPresentation().setEnabled(selectedItem instanceof BundledFileTemplate && !selectedItem.isDefault()); }