void (@NotNull AnActionEvent e) { PostfixTemplateEditor editor = provider.createEditor(null); if (editor != null) { PostfixEditTemplateDialog dialog = new PostfixEditTemplateDialog(PostfixTemplatesCheckboxTree.this, editor, providerName, null); if (dialog.showAndGet()) { String templateKey = dialog.getTemplateName(); String templateId = PostfixTemplatesUtils.generateTemplateId(templateKey, provider); PostfixTemplate createdTemplate = editor.createTemplate(templateId, templateKey); PostfixTemplateCheckedTreeNode createdNode = new PostfixTemplateCheckedTreeNode(createdTemplate, provider, true); DefaultMutableTreeNode languageNode = findOrCreateLanguageNode(entry.getValue()); languageNode.add(createdNode); myModel.nodeStructureChanged(languageNode); TreeUtil.selectNode(PostfixTemplatesCheckboxTree.this, createdNode); } } }