private static @NotNull Document createDocument(@Nullable Project project,
                                                  @NotNull String content,
                                                  @Nullable FileType fileType,
                                                  @NotNull @NonNls @SystemIndependent String lightFilePath,
                                                  boolean readOnly) {
    Document document = createPsiDocument(project, content, fileType, lightFilePath, readOnly);
    if (document == null) {
      document = EditorFactory.getInstance().createDocument(content);
      document.setReadOnly(readOnly);
    }
    return document;
  }
private static @NotNull Document createDocument(@Nullable Project project,
                                                  @NotNull String content,
                                                  @Nullable FileType fileType,
                                                  @NotNull @NonNls @SystemIndependent String lightFilePath,
                                                  boolean readOnly)