void (boolean focusKey, boolean forceReload) { int selected = getSingleSelectedIndex(); CardLayout layout = (CardLayout)myDetailsPanel.getLayout(); if (selected < 0 || getTemplate(selected) == null) { showEmptyCard(); } else { TemplateImpl newTemplate = getTemplate(selected); if (myCurrentTemplateEditor == null || forceReload || myCurrentTemplateEditor.getTemplate() != newTemplate) { if (myCurrentTemplateEditor != null) { myCurrentTemplateEditor.dispose(); } createTemplateEditor(newTemplate, myExpandByDefaultPanel.getSelectedString(), getTemplateOptions(newTemplate), getTemplateContext(newTemplate)); myCurrentTemplateEditor.resetUi(); if (focusKey) { myCurrentTemplateEditor.focusKey(); } } layout.show(myDetailsPanel, TEMPLATE_SETTINGS); } }