void (@NotNull PsiElement element, @NotNull ActionContext context, @NotNull ModPsiUpdater updater) { GrForStatement forStatement = PsiTreeUtil.getParentOfType(element, GrForStatement.class); if (forStatement == null) return; GrForClause clause = forStatement.getClause(); if (clause instanceof GrForInClause) { GrForStatement stubFor = (GrForStatement)GroovyPsiElementFactory.getInstance(context.project()).createStatementFromText("for (x in y){}"); PsiElement newDelimiter = ((GrForInClause)stubFor.getClause()).getDelimiter(); PsiElement delimiter = ((GrForInClause)clause).getDelimiter(); delimiter.replace(newDelimiter); } }