PsiStatement (PsiElement context) { final PsiElement prevStatement = PsiTreeUtil.skipWhitespacesAndCommentsBackward(context); if (!(prevStatement instanceof PsiStatement)) { return null; } return (PsiStatement)prevStatement; }