void () { if (topElementIsSelected()) { goUp(); return; } AbstractTreeNode<?> node = getSelectedNode(); if (node == null) { return; } if (node.getChildren().isEmpty()) { if (!shouldDrillDownOnEmptyElement(node)) { navigateSelectedElement(); return; } } if (myBuilder == null) { return; } updateHistory(false); myBuilder.drillDown(); updateHistory(true); }