From f6a0f212db857bb8d32423f16b977b17101046af Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 16 Oct 2009 19:08:51 +0400 Subject: [PATCH] use correct context when copying template which has just been modified (IDEADEV-40881) --- .../intellij/codeInsight/template/impl/TemplateListPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateListPanel.java b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateListPanel.java index ba3c7d5d291e..77b4f3d931b7 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateListPanel.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateListPanel.java @@ -532,8 +532,8 @@ class TemplateListPanel extends JPanel { TemplateImpl orTemplate = getTemplate(selected); LOG.assertTrue(orTemplate != null); TemplateImpl template = orTemplate.copy(); - myTemplateOptions.put(getKey(template), template.createOptions()); - myTemplateContext.put(getKey(template), template.createContext()); + myTemplateOptions.put(getKey(template), getOptions(orTemplate)); + myTemplateContext.put(getKey(template), getContext(orTemplate)); EditTemplateDialog dialog = new EditTemplateDialog(this, CodeInsightBundle.message("dialog.copy.live.template.title"), template, getTemplateGroups(), (String)myExpandByCombo.getSelectedItem(), getOptions(template), getContext(template)); dialog.show();