Header (@NotNull String name) { Header child = PsiTreeUtil.findChildOfType(getFirstChild(), Header.class); while (child != null) { if (name.equals(child.getName())) { return child; } child = PsiTreeUtil.getNextSiblingOfType(child, Header.class); } return null; }