String () { PsiManager manager = PsiManager.getInstance(myProject); for (int idx = 0; idx < myFields.length; idx++) { if (myCheckedMarks[idx]) { String name; if (isToEncapsulateGet()) { name = myGetterNames[idx]; if (!PsiNameHelper.getInstance(manager.getProject()).isIdentifier(name)) { return RefactoringMessageUtil.getIncorrectIdentifierMessage(name); } } if (!myFinalMarks[idx] && isToEncapsulateSet()) { name = mySetterNames[idx]; if (!PsiNameHelper.getInstance(manager.getProject()).isIdentifier(name)) { return RefactoringMessageUtil.getIncorrectIdentifierMessage(name); } } } } return null; }