@Override
  public XmlElement insertAtOffset(final XmlElement element, final int displayOffset) throws IncorrectOperationException {
    if (element instanceof XmlText) {
      insertText(((XmlText)element).getValue(), displayOffset);
    }
    else {
      final XmlTag tag = getParentTag();
      assert tag != null;

      final XmlText rightPart = _splitText(displayOffset);
      if (rightPart != null) {
        tag.addBefore(element, rightPart);
      }
      else {
        tag.addAfter(element, this);
      }
    }

    return this;
  }
@Override
  public XmlElement insertAtOffset(final XmlElement element, final int displayOffset)