void (@NotNull Element element) { element.setAttribute(ELEMENT_VERSION, "2"); final Element name = new Element(ELEMENT_NAME); name.setAttribute(ATTRIBUTE_VALUE, myName); element.addContent(name); if (mySdkType != null) { final Element sdkType = new Element(ELEMENT_TYPE); sdkType.setAttribute(ATTRIBUTE_VALUE, mySdkType.getName()); element.addContent(sdkType); } if (myVersionString != null) { final Element version = new Element(ELEMENT_VERSION); version.setAttribute(ATTRIBUTE_VALUE, myVersionString); element.addContent(version); } final Element home = new Element(ELEMENT_HOMEPATH); home.setAttribute(ATTRIBUTE_VALUE, myHomePath); element.addContent(home); Element roots = new Element(ELEMENT_ROOTS); myRoots.writeExternal(roots); element.addContent(roots); Element additional = new Element(ELEMENT_ADDITIONAL); if (myAdditionalData != null) { LOG.assertTrue(mySdkType != null); mySdkType.saveAdditionalData(myAdditionalData, additional); } element.addContent(additional); }