Node nextSibling = null;
if (lastProperty != null) {
nextSibling = lastProperty.getNextSibling();
}
FormatProcessorXML formatter = new FormatProcessorXML();
Element[] properties = new Element[missingProperties.size()];
for (int i = 0; i < missingProperties.size(); i++) {
properties[i] = ownerDocument.createElement(BeansSchemaConstants.ELEM_PROPERTY);
properties[i].setAttribute(BeansSchemaConstants.ATTR_NAME, missingProperties.get(i));
if (nextSibling != null) {
beanNode.insertBefore(properties[i], nextSibling);
}
else {
beanNode.appendChild(properties[i]);
}
}
formatter.formatNode(beanNode);
if (model != null) {
model.endRecording(this);
}
LinkedModeModel linkModel = new LinkedModeModel();
boolean hasPositions = false;
for (Element element : properties) {
formatter.formatNode(element);
if (element instanceof ElementImpl) {
ElementImpl elementImpl = (ElementImpl) element;
int nodeOffset = elementImpl.getStartEndOffset() - 1;
LinkedPositionGroup group = new LinkedPositionGroup();