PsiElement (PsiElement context) { PsiStatement statement = PsiTreeUtil.getParentOfType(context, PsiStatement.class, false); return statement != null && JavaLanguage.INSTANCE.equals(statement.getLanguage()) ? statement : null; }