DocumentContent (@Nullable Project project, @NotNull DocumentContent content, @NotNull TextRange range) { Document document = content.getDocument(); if (document instanceof DocumentImpl && ((DocumentImpl)document).acceptsSlashR()) { LOG.warn("Create immutable fragment content - can't handle CR"); return new ImmutableDocumentFragmentContent(content, range); } return new DocumentFragmentContent(project, content, range); }