void deleteChildInternal(final @NotNull ASTNode child) {
    if (child.getElementType() instanceof IXmlAttributeElementType) {
      try {
        deleteChildInternalSuper(child);
      }
      catch (IncorrectOperationException e) {
        LOG.error(e);
      }
    }
    else {
      final ASTNode treePrev = child.getTreePrev();
      final ASTNode treeNext = child.getTreeNext();
      deleteChildInternalSuper(child);
      if (treePrev != null &&
          treeNext != null &&
          treePrev.getElementType() == XmlElementType.XML_TEXT &&
          treeNext.getElementType() == XmlElementType.XML_TEXT &&
          !TreeUtil.containsOuterLanguageElements(treePrev) &&
          !TreeUtil.containsOuterLanguageElements(treeNext)) {
        final XmlText prevText = (XmlText)treePrev.getPsi();
        final XmlText nextText = (XmlText)treeNext.getPsi();

        final String newValue = prevText.getValue() + nextText.getValue();

        // merging two XmlText-s should be done in one transaction to preserve smart pointers
        ChangeUtil.prepareAndRunChangeAction(destinationTreeChange -> {
          PsiElement anchor = prevText.getPrevSibling();
          prevText.delete();
          nextText.delete();
          XmlText text = (XmlText)myTag.addAfter(XmlElementFactory.getInstance(myTag.getProject()).createDisplayText("x"), anchor);
          text.setValue(newValue);
        }, (TreeElement)myTag.getNode());
      }
    }
  }
void deleteChildInternal(final @NotNull ASTNode child)