void () { final int currentChildrenCount = myNode.getChildCount(); if (myShownChildrenCount != currentChildrenCount) { myLinks.removeAll(); myLinks.add(Box.createVerticalStrut(JBUIScale.scale(10))); for (int i = 0; i < currentChildrenCount; i++) { final InspectionTreeNode child = myNode.getChildAt(i); final LinkLabel link = new LinkLabel(child.getPresentableText(), null) { @Override public void doClick() { myTree.selectNode(child); } }; link.setBorder(JBUI.Borders.empty(1, 17, 3, 1)); myLinks.add(link); } myShownChildrenCount = currentChildrenCount; } }