void (final TemplateImpl template, String shortcut, Map<TemplateOptionalProcessor, Boolean> options, TemplateContext context) { myCurrentTemplateEditor = new LiveTemplateSettingsEditor(template, shortcut, options, context, () -> { DefaultMutableTreeNode node = getNode(getSingleSelectedIndex()); if (node != null) { ((DefaultTreeModel)myTree.getModel()).nodeChanged(node); TemplateSettings.getInstance().setLastSelectedTemplate(template.getGroupName(), template.getKey()); } }); for (Component component : myDetailsPanel.getComponents()) { if (component instanceof LiveTemplateSettingsEditor) { myDetailsPanel.remove(component); } } myDetailsPanel.add(myCurrentTemplateEditor, TEMPLATE_SETTINGS); }