void (Editor editor, @Nullable TemplateContext templateContext) { SyntaxHighlighter highlighter = null; if (templateContext != null) { for(TemplateContextType type: TemplateManagerImpl.getAllContextTypes()) { if (templateContext.isEnabled(type)) { highlighter = type.createHighlighter(); if (highlighter != null) break; } } } setHighlighter((EditorEx)editor, highlighter); }