void () { String name = expression.getReferenceName(); if (myEnumConstant) { final PsiSwitchLabelStatementBase switchStatement = PsiTreeUtil.getParentOfType(expression, PsiSwitchLabelStatementBase.class); if (switchStatement != null && name != null) { MutationUtils.replaceExpression(name, expression); return; } } final boolean replaceWithGetEnumValue = myEnumConstant && !alreadyMigratedToEnum(); final String link = replaceWithGetEnumValue ? "." + GenerateMembersUtil.suggestGetterName("value", expression.getType(), expression.getProject()) + "()" : ""; MutationUtils.replaceExpression(delegateClass + '.' + name + link, expression); }