private static void loadAdditionalRoots( Element rootModelComponent, final String rootsTagName, final JpsUrlList result) { final Element roots = rootModelComponent.getChild(rootsTagName); for (Element root : JDOMUtil.getChildren(roots, ROOT_TAG)) { result.addUrl(root.getAttributeValue(URL_ATTRIBUTE)); } }
private static void saveAdditionalRoots( Element rootModelComponent, final String rootsTagName, final JpsUrlList list) { List<String> urls = list.getUrls(); if (!urls.isEmpty()) { Element roots = new Element(rootsTagName); for (String url : urls) { roots.addContent(new Element(ROOT_TAG).setAttribute(URL_ATTRIBUTE, url)); } rootModelComponent.addContent(roots); } }