void (ModPsiUpdater updater, GrConditionalExpression condExp, String conditionExpText, String newExp) { int caretOffset = conditionExpText.length() + 2; // after operation sign GrExpression expressionFromText = GroovyPsiElementFactory.getInstance(condExp.getProject()) .createExpressionFromText(newExp, condExp .getContext()); expressionFromText = (GrExpression)condExp.replace(expressionFromText); updater.moveTo(expressionFromText.getTextOffset() + caretOffset); // just past operation sign }