DocumentContent (@Nullable Project project, @NotNull String text, @Nullable DocumentContent referent) { if (referent == null) return create(text); return readOnlyDocumentContent(project) .contextByReferent(referent) .buildFromText(text, true); }