PsiElement (PsiElement place) { place = getPhysicalElement(place); PsiElement anchorStatement = CommonJavaRefactoringUtil.getParentStatement(place, false); if (anchorStatement == null) { PsiField field = PsiTreeUtil.getParentOfType(place, PsiField.class, true, PsiStatement.class); if (field != null && !(field instanceof PsiEnumConstant)) { PsiExpression initializer = field.getInitializer(); // Could be also an annotation argument if (PsiTreeUtil.isAncestor(initializer, place, false)) { anchorStatement = initializer; } } } return anchorStatement; }