public static void writeExternal(@NotNull ShelvedChangeList shelvedChangeList, @NotNull Element element,
                                   @Nullable PathMacroSubstitutor pathMacroSubstitutor) {
    if (shelvedChangeList.myPath != null) {
      String pathString = collapsePath(shelvedChangeList.myPath.toString().replace(File.separatorChar, '/'), pathMacroSubstitutor);
      writeField(element, PATH_FIELD_NAME, pathString);
    }
    writeField(element, DESCRIPTION_FIELD_NAME, shelvedChangeList.DESCRIPTION);
    element.setAttribute(NAME_ATTRIBUTE, shelvedChangeList.getName());
    element.setAttribute(ATTRIBUTE_DATE, Long.toString(shelvedChangeList.myDate.getTime()));
    element.setAttribute(ATTRIBUTE_RECYCLED_CHANGELIST, Boolean.toString(shelvedChangeList.isRecycled()));
    if (shelvedChangeList.isMarkedToDelete()) {
      element.setAttribute(ATTRIBUTE_TOBE_DELETED_CHANGELIST, "true");
    }
    if (shelvedChangeList.isDeleted()) {
      element.setAttribute(ATTRIBUTE_DELETED_CHANGELIST, "true");
    }
    for (ShelvedBinaryFile file : shelvedChangeList.getBinaryFiles()) {
      Element child = new Element(ELEMENT_BINARY);
      file.writeExternal(child, pathMacroSubstitutor);
      element.addContent(child);
    }
  }
public static void writeExternal(@NotNull ShelvedChangeList shelvedChangeList, @NotNull Element element,
                                   @Nullable PathMacroSubstitutor pathMacroSubstitutor)