void (@NotNull ASTNode child) { PsiElement psi = child.getPsi(); if (psi instanceof GrCodeReferenceElement) { GrCodeReferenceElement[] refs = getReferenceElementsGroovy(); if (refs.length == 1) { PsiElement keyword = getKeyword(); LOG.assertTrue(keyword != null); keyword.delete(); } else { boolean forward = refs[0] == psi; PsiElement comma = forward ? PsiUtil.skipWhitespacesAndComments(psi.getNextSibling(), true, true) : PsiUtil.skipWhitespacesAndComments(psi.getPrevSibling(), false, true); if (comma != null && comma.getNode().getElementType() == GroovyTokenTypes.mCOMMA) { comma.delete(); } } } super.deleteChildInternal(child); }