void (String s1, String s2, FileType fileType) { offset = s1.length(); doc = new DocumentImpl(s1 + s2); editor = (EditorEx)EditorFactory.getInstance().createEditor(doc); SyntaxHighlighter syntaxHighlighter = SyntaxHighlighterFactory.getSyntaxHighlighter(fileType, null, null); assert syntaxHighlighter != null; highlighter = new LexerEditorHighlighter(syntaxHighlighter, EditorColorsManager.getInstance().getGlobalScheme()); editor.setHighlighter(highlighter); }