void (@NotNull AnActionEvent e) { Map<TemplateImpl, DefaultMutableTreeNode> templates = getSelectedTemplates(); TemplateContext context = new TemplateContext(); Pair<JPanel, CheckboxTree> pair = LiveTemplateSettingsEditor.createPopupContextPanel(EmptyRunnable.INSTANCE, context); DialogBuilder builder = new DialogBuilder(TemplateListPanel.this); builder.setCenterPanel(pair.first); builder.setPreferredFocusComponent(pair.second); builder.setTitle(CodeInsightBundle.message("dialog.title.change.context.type.for.selected.templates")); int result = builder.show(); if (result == DialogWrapper.OK_EXIT_CODE) { for (TemplateImpl template : templates.keySet()) { myTemplateContext.put(template, context); } } updateTemplateDetails(false, true); myTree.repaint(); }