EditorEx () { if (StringUtil.isEmpty(getPreviewText())) return null; EditorFactory editorFactory = EditorFactory.getInstance(); Document editorDocument = editorFactory.createDocument(""); EditorEx editor = (EditorEx)editorFactory.createEditor(editorDocument); fillEditorSettings(editor.getSettings()); myLastDocumentModificationStamp = editor.getDocument().getModificationStamp(); return editor; }