PsiElement (PsiExpression expr, PsiElement anchorElement) { PsiElement element = null; if (expr != null) { element = expr.getUserData(ElementToWorkOn.PARENT); if (element == null) element = expr; } if (element == null) element = anchorElement; return element; }