zen coding can use all live templates indepentent of shortcut
authorEugene Kudelevsky <Eugene.Kudelevsky@jetbrains.com>
Sat, 10 Apr 2010 15:55:09 +0000 (19:55 +0400)
committerEugene Kudelevsky <Eugene.Kudelevsky@jetbrains.com>
Sat, 10 Apr 2010 16:44:16 +0000 (20:44 +0400)
platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java

index f9bba4097140d2797c97db6a75f341788d255cab..d137ce89ba0331afe3f6b3e1fbf94ff3904a7f21 100644 (file)
@@ -164,7 +164,13 @@ public class CustomTemplateCallback {
 
   private static List<TemplateImpl> getMatchingTemplates(@NotNull String templateKey) {
     TemplateSettings settings = TemplateSettings.getInstance();
-    return settings.collectMatchingCandidates(templateKey, settings.getDefaultShortcutChar(), false);
+    List<TemplateImpl> candidates = new ArrayList<TemplateImpl>();
+    for (TemplateImpl template : settings.getTemplates(templateKey)) {
+      if (!template.isDeactivated() && !template.isSelectionTemplate()) {
+        candidates.add(template);
+      }
+    }
+    return candidates;
   }
 
   @NotNull