void (@NotNull ASTNode child) { PsiElement element = child.getPsi(); if (element instanceof GrExpression || element instanceof GrNamedArgument) { ASTNode prev = TreeUtil.skipElementsBack(child.getTreePrev(), TokenSets.WHITE_SPACES_OR_COMMENTS); if (prev != null && prev.getElementType() == GroovyTokenTypes.mCOMMA) { final ASTNode pprev = prev.getTreePrev(); if (pprev != null && PsiImplUtil.isWhiteSpaceOrNls(pprev)) { super.deleteChildInternal(pprev); } super.deleteChildInternal(prev); } else { ASTNode next = TreeUtil.skipElements(child.getTreeNext(), TokenSets.WHITE_SPACES_OR_COMMENTS); if (next != null && next.getElementType() == GroovyTokenTypes.mCOMMA) { final ASTNode nnext = next.getTreeNext(); if (nnext != null && PsiImplUtil.isWhiteSpaceOrNls(nnext)) { super.deleteChildInternal(nnext); } super.deleteChildInternal(next); } } } super.deleteChildInternal(child); }