Element () { Element element = new Element("state"); ProductivityFeaturesRegistry registry = ProductivityFeaturesRegistry.getInstance(); if (registry != null) { Set<String> ids = registry.getFeatureIds(); for (String id: ids) { Element featureElement = new Element(FEATURE_TAG); featureElement.setAttribute(ATT_ID, id); FeatureDescriptor descriptor = registry.getFeatureDescriptor(id); descriptor.writeStatistics(featureElement); element.addContent(featureElement); } } Element statsTag = new Element(COMPLETION_STATS_TAG); XmlSerializer.serializeInto(myCompletionStats, statsTag); element.addContent(statsTag); Element fstatsTag = new Element(FIXES_STATS_TAG); XmlSerializer.serializeInto(myFixesStats, fstatsTag); element.addContent(fstatsTag); element.setAttribute(ATT_FIRST_RUN, String.valueOf(getFirstRunTime())); element.setAttribute(ATT_HAVE_BEEN_SHOWN, String.valueOf(HAVE_BEEN_SHOWN)); element.setAttribute(ATT_SHOW_IN_OTHER, String.valueOf(SHOW_IN_OTHER_PROGRESS)); element.setAttribute(ATT_SHOW_IN_COMPILATION, String.valueOf(SHOW_IN_COMPILATION_PROGRESS)); return element; }