public static Document createDocument(final String s, final Project project) {
    if (ApplicationManager.getApplication().isUnitTestMode() || project.isDefault()) {
      return new DocumentImpl(s);
    }
    else {
      return JavaReferenceEditorUtil.createTypeDocument(s, project);
    }
  }
public static Document createDocument(final String s, final Project project)