boolean (@NotNull PsiElement element, ProcessingContext context) { PsiElement e = element.getParent(); while ((e = e.getNextSibling()) != null) { if (e instanceof PsiExpression && !(e instanceof PsiEmptyExpressionImpl)) return false; } return true; }