EditorHighlighter (boolean forceEmpty) { if (!forceEmpty) { CharSequence text = myEditor.getDocument().getImmutableCharSequence(); EditorHighlighter highlighter = DiffUtil.initEditorHighlighter(myProject, myContent, text); if (highlighter != null) { return highlighter; } } return DiffUtil.createEmptyEditorHighlighter(); }