Result () { final Project project = lookup.getProject(); ApplicationManager.getApplication().invokeLater(() -> { if (project.isDisposed()) return; final PostfixTemplatesConfigurable configurable = new PostfixTemplatesConfigurable(); ShowSettingsUtil.getInstance().editConfigurable(project, configurable, () -> { PostfixTemplatesCheckboxTree templatesTree = configurable.getTemplatesTree(); if (templatesTree != null) { templatesTree.selectTemplate(template, templateLookupElement.getProvider()); } }); }); return Result.HIDE_LOOKUP; }