void (Element element) { matchOptions.writeExternal(element); element.setAttribute(REFORMAT_ATTR_NAME,String.valueOf(myToReformatAccordingToStyle)); element.setAttribute(SHORTEN_FQN_ATTR_NAME,String.valueOf(toShortenFQN)); if (myToUseStaticImport) { element.setAttribute(USE_STATIC_IMPORT_ATTR_NAME, String.valueOf(true)); } element.setAttribute(REPLACEMENT_ATTR_NAME,replacement); final Set<String> nameSet = getUsedVariableNames(); for (final ReplacementVariableDefinition variableDefinition : variableDefs.values()) { if (!nameSet.contains(variableDefinition.getName())) { continue; } final Element infoElement = new Element(VARIABLE_DEFINITION_TAG_NAME); element.addContent(infoElement); variableDefinition.writeExternal(infoElement); } }