void () { final String xml = myProject == null ? PropertiesComponent.getInstance().getValue(myHistoryId) : PropertiesComponent.getInstance(myProject).getValue(myHistoryId); myWeights.clear(); if (xml == null) return; try { final DocumentBuilder db = JavaXmlDocumentKt.createDocumentBuilder(); final InputSource is = new InputSource(); is.setCharacterStream(new StringReader(xml)); Document doc = db.parse(is); NodeList nodes = doc.getElementsByTagName("map"); if (nodes.getLength() == 1) { final NodeList map = nodes.item(0).getChildNodes(); for (int i = 0; i < map.getLength(); i++) { final Node item = map.item(i); final NodeList list = item.getChildNodes(); final Element key = (Element)list.item(0); final Element value = (Element)list.item(1); myWeights.put(key.getTextContent(), Long.valueOf(value.getTextContent())); } } } catch (Exception e) {// } }