Editor (final @NotNull Document document, final Project project, final @NotNull FileType fileType, final boolean isViewer) { EditorEx editor = createEditor(document, isViewer, project, EditorKind.UNTYPED); editor.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(project, fileType)); return editor; }