EditorHighlighter (PsiFile psiFile, Document document) { VirtualFile file = psiFile.getVirtualFile(); EditorHighlighter highlighter = myFile2Highlighter.get(file); if (highlighter == null) { highlighter = HighlighterFactory.createHighlighter(UsageTreeColorsScheme.getInstance().getScheme(), file.getName(), myProject); highlighter.setText(document.getCharsSequence()); myFile2Highlighter.put(file, highlighter); } return highlighter; }