diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java b/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java index 697c00a27035..2b6cca6ae37f 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/CustomTemplateCallback.java @@ -15,7 +15,6 @@ */ package com.intellij.codeInsight.template; -import com.intellij.codeInsight.template.impl.TemplateContext; import com.intellij.codeInsight.template.impl.TemplateImpl; import com.intellij.codeInsight.template.impl.TemplateManagerImpl; import com.intellij.codeInsight.template.impl.TemplateSettings; @@ -76,31 +75,31 @@ public class CustomTemplateCallback { } @Nullable - public TemplateImpl findApplicableTemplate(@NotNull String key, TemplateContextType... contextTypes) { - List templates = findApplicableTemplates(key, contextTypes); + public TemplateImpl findApplicableTemplate(@NotNull String key) { + List templates = findApplicableTemplates(key); return templates.size() > 0 ? templates.get(0) : null; } @NotNull - public List findApplicableTemplates(String key, TemplateContextType... contextTypes) { + public List findApplicableTemplates(String key) { List templates = getMatchingTemplates(key); - templates = filterApplicableCandidates(templates, contextTypes); + templates = filterApplicableCandidates(templates); return templates; } - private List filterApplicableCandidates(Collection candidates, TemplateContextType... contextTypes) { + private List filterApplicableCandidates(Collection candidates) { List result = new ArrayList(); for (TemplateImpl candidate : candidates) { if (TemplateManagerImpl.isApplicable(myFile, myOffset > 0 ? myOffset - 1 : myOffset, candidate)) { result.add(candidate); } - TemplateContext context = candidate.getTemplateContext(); + /*TemplateContext context = candidate.getTemplateContext(); for (TemplateContextType contextType : contextTypes) { if (context.isEnabled(contextType)) { result.add(candidate); break; } - } + }*/ } return result; } diff --git a/xml/impl/resources/liveTemplates/zen_html.xml b/xml/impl/resources/liveTemplates/zen_html.xml index 97584af43ad1..16191af32e4e 100644 --- a/xml/impl/resources/liveTemplates/zen_html.xml +++ b/xml/impl/resources/liveTemplates/zen_html.xml @@ -6,7 +6,6 @@