protected int calculateOffsetToInsertClosingBraceInsideElement(PsiElement element) {
    return element.getTextRange().getEndOffset();
  }
protected int calculateOffsetToInsertClosingBraceInsideElement(PsiElement element)