void (@Nullable MyInspectionTreeNode node) { myCurrentDetails = node != null ? myToolDetails.computeIfAbsent(node.getKey(), key -> createDetails(node)) : null; myDetailsPanel.setContent(myCurrentDetails != null ? myCurrentDetails.createComponent() : null); myDetailsPanel.repaint(); }