void (@NotNull PsiElement element, @NotNull Set<PsiElement> result) { PsiElement parent = element.getParent(); while (parent instanceof GrIfStatement) { result.add(parent); parent = parent.getParent(); } }