@Override
  public PsiElement add(@NotNull PsiElement element) throws IncorrectOperationException {
    //hack for inserting references from java code
    if (element instanceof GrCodeReferenceElement || element instanceof PsiJavaCodeReferenceElement) {
      IElementType keywordType = getKeywordType();
      if (keywordType == null) return super.add(element);
      if (findChildByType(keywordType) == null) {
        getNode().getTreeParent().addLeaf(TokenType.WHITE_SPACE, " ", getNode());
        getNode().addLeaf(keywordType, keywordType.toString(), null);
      }
      else if (findChildByClass(GrCodeReferenceElement.class) != null) {
        PsiElement lastChild = getLastChild();
        lastChild = PsiUtil.skipWhitespacesAndComments(lastChild, false);
        if (!lastChild.getNode().getElementType().equals(GroovyTokenTypes.mCOMMA)) {
          getNode().addLeaf(GroovyTokenTypes.mCOMMA, ",", null);
        }
      }
    }
    return super.add(element);
  }
@Override
  public PsiElement add(@NotNull PsiElement element)