void (final @NotNull PyUserNodeRenderer renderer, Element parent) { final Element rendererElement = new Element(RENDERER_TAG); JDOMExternalizerUtil.writeField(rendererElement, NAME, renderer.getName()); JDOMExternalizerUtil.writeField(rendererElement, IS_ENABLED, String.valueOf(renderer.isEnabled())); JDOMExternalizerUtil.writeField(rendererElement, TO_TYPE, renderer.getToType()); JDOMExternalizerUtil.writeField(rendererElement, TYPE_CANONICAL_IMPORT_PATH, renderer.getTypeCanonicalImportPath()); JDOMExternalizerUtil.writeField(rendererElement, TYPE_QUALIFIED_NAME, renderer.getTypeQualifiedName()); JDOMExternalizerUtil.writeField(rendererElement, TYPE_SOURCE_FILE, renderer.getTypeSourceFile()); final Element valueRendererElement = new Element(VALUE_RENDERER_TAG); final PyUserNodeRenderer.PyNodeValueRenderer valueRenderer = renderer.getValueRenderer(); JDOMExternalizerUtil.writeField(valueRendererElement, IS_DEFAULT, String.valueOf(valueRenderer.isDefault())); JDOMExternalizerUtil.writeField(valueRendererElement, EXPRESSION, valueRenderer.getExpression()); rendererElement.addContent(valueRendererElement); final Element childrenRendererElement = new Element(CHILDREN_RENDERER_TAG); final PyUserNodeRenderer.PyNodeChildrenRenderer childrenRenderer = renderer.getChildrenRenderer(); JDOMExternalizerUtil.writeField(childrenRendererElement, IS_DEFAULT, String.valueOf(childrenRenderer.isDefault())); JDOMExternalizerUtil.writeField( childrenRendererElement, APPEND_DEFAULT_CHILDREN, String.valueOf(childrenRenderer.getAppendDefaultChildren()) ); for (PyUserNodeRenderer.ChildInfo child : childrenRenderer.getChildren()) { final Element childElement = new Element(CHILD_TAG); JDOMExternalizerUtil.writeField(childElement, EXPRESSION, child.getExpression()); childrenRendererElement.addContent(childElement); } rendererElement.addContent(childrenRendererElement); parent.addContent(rendererElement); }