DocumentContent (@NotNull String text, boolean respectLineSeparators) { FileType fileType = guessFileType(); String lightFilePath = constructLightFilePath(); TextContent textContent = TextContent.fromText(text, respectLineSeparators); Document document = createDocument(project, textContent.text, fileType, lightFilePath, readOnly); return build(document, textContent); }