@@ -0,0 +1,1131 @@
+package com.intellij.openapi.util;%0A%0Aimport org.jdom.Content;%0Aimport org.jdom.Document;%0Aimport org.jdom.Element;%0A%0A/**%0A * @author mike%0A */%0Apublic class JDOMBuilder %7B%0A  private JDOMBuilder() %7B%0A  %7D%0A%0A  public static Document document(Element rootElement) %7B%0A    return new Document(rootElement);%0A  %7D%0A%0A  public static Element tag(String name, Content...content) %7B%0A    final Element element = new Element(name);%0A    for (Content c : content) %7B%0A      if (c instanceof AttrContent) %7B%0A        AttrContent attrContent = (AttrContent)c;%0A        element.setAttribute(attrContent.myName, attrContent.myValue);%0A      %7D%0A      else %7B%0A        element.addContent(c);%0A      %7D%0A    %7D%0A%0A    return element;%0A  %7D%0A%0A  public static Content attr(final String name, final String value) %7B%0A    return new AttrContent(name, value);%0A  %7D%0A%0A  private static class AttrContent extends Content %7B%0A    private final String myName;%0A    private final String myValue;%0A%0A    public AttrContent(final String name, final String value) %7B%0A      myName = name;%0A      myValue = value;%0A    %7D%0A%0A    public String getValue() %7B%0A      throw new UnsupportedOperationException();%0A    %7D%0A  %7D%0A%7D%0A

test added