Element () { Element element = new Element("state"); for (Sdk jdk : mySdks) { if (jdk instanceof ProjectJdkImpl) { Element e = new Element(ELEMENT_JDK); ((ProjectJdkImpl)jdk).writeExternal(e); element.addContent(e); } } return element; }