FileEditor (@NotNull Document document, @NotNull EditorConfigPreviewFile previewFile) { Editor previewEditor = EditorFactory.getInstance().createEditor(document, myProject); if (previewEditor instanceof EditorEx) { EditorHighlighter highlighter = EditorHighlighterFactory.getInstance().createEditorHighlighter(myProject, previewFile); ((EditorEx)previewEditor).setHighlighter(highlighter); } return new EditorConfigPreviewFileEditor(previewEditor, previewFile); }