RadComponent (TreePath path) { if (path != null) { final DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent(); LOG.assertTrue(node != null); final Object userObject = node.getUserObject(); if (userObject instanceof ComponentPtrDescriptor descriptor) { final ComponentPtr ptr = descriptor.getElement(); if (ptr != null && ptr.isValid()) { final RadComponent component = ptr.getComponent(); LOG.assertTrue(component != null); return component; } } } return null; }