Document (@NotNull CharSequence text, boolean acceptsSlashR, boolean allowUpdatesWithoutWriteAction) { DocumentEx document = new DocumentImpl(text, acceptsSlashR, allowUpdatesWithoutWriteAction); myEditorEventMulticaster.registerDocument(document); return document; }