void (TreeSelectionEvent e) { TreePath[] paths = getSelectionPaths(); if (paths == null) { onComponentsChanged(Collections.emptyList()); return; } List<List<PropertyBean>> clickInfos = ContainerUtil.mapNotNull(paths, path -> { Object node = path.getLastPathComponent(); if (node instanceof ComponentNode) { if (((ComponentNode)node).getUserObject() instanceof List<?>) { //it's renderer and we present it as ComponentNode instead of outdated ClickInfoNode //noinspection unchecked return (List<PropertyBean>)((ComponentNode)node).getUserObject(); } } //if (node instanceof ClickInfoNode) return ((ClickInfoNode)node).getInfo(); return null; }); if (!clickInfos.isEmpty()) { onClickInfoChanged(clickInfos.get(0)); return; } List<Component> components = ContainerUtil.mapNotNull(paths, path -> { Object node = path.getLastPathComponent(); if (node instanceof ComponentNode) return ((ComponentNode)node).getComponent(); return null; }); onComponentsChanged(components); }