@Nullable
  public static XExpression toXExpression(@Nullable TextWithImports text) {
    if (text != null && !text.getText().isEmpty()) {
      FileType fileType = text.getFileType();
      return new XExpressionImpl(text.getText(),
                                 fileType == null ? null : LanguageUtil.getFileTypeLanguage(fileType),
                                 StringUtil.nullize(text.getImports()),
                                 getMode(text.getKind()));
    }
    return null;
  }
@Nullable
  public static XExpression toXExpression(@Nullable TextWithImports text)