TreeElement (@NotNull TreeElement start) { TreeElement cur = start; while (cur.getCachedLength() < 0) { TreeElement child = cur.getFirstChildNode(); if (child == null) { break; } cur = child; } return cur; }