void () { @NonNls StringBuilder buf = new StringBuilder("<map>"); for (Object key : myWeights.keySet()) { if (key != null) { final Long value = myWeights.get(key); if (value != null) { buf.append("<element>") .append("<key>").append(key).append("</key>") .append("<value>").append(value).append("</value>") .append("</element>"); } } } final String xml = buf.append("</map>").toString(); if (myProject == null) { PropertiesComponent.getInstance().setValue(myHistoryId, xml); } else { PropertiesComponent.getInstance(myProject).setValue(myHistoryId, xml); } }