possibility to collect templates independent of shortcut
authorEugene Kudelevsky <Eugene.Kudelevsky@jetbrains.com>
Mon, 12 Apr 2010 17:42:09 +0000 (21:42 +0400)
committerEugene Kudelevsky <Eugene.Kudelevsky@jetbrains.com>
Mon, 12 Apr 2010 17:42:09 +0000 (21:42 +0400)
platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateSettings.java

index a1f72df86d463ebd0f9fb66ab90a227561e08836..2d340bec8c15a09999c5d5106628e0c1c3c7d41e 100644 (file)
@@ -673,14 +673,14 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
     return mySchemesManager.getAllSchemes();
   }
 
-  public List<TemplateImpl> collectMatchingCandidates(String key, char shortcutChar, boolean hasArgument) {
+  public List<TemplateImpl> collectMatchingCandidates(String key, Character shortcutChar, boolean hasArgument) {
     final Collection<TemplateImpl> templates = getTemplates(key);
     List<TemplateImpl> candidates = new ArrayList<TemplateImpl>();
     for (TemplateImpl template : templates) {
       if (template.isDeactivated()) {
         continue;
       }
-      if (getShortcutChar(template) != shortcutChar) {
+      if (shortcutChar != null && getShortcutChar(template) != shortcutChar) {
         continue;
       }
       if (template.isSelectionTemplate()) {