JBIterable<Object> () { if (!isValid()) { return JBIterable.empty(); } JTree tree = myStructureViewComponent.getTree(); return JBIterable.of(tree.getSelectionModel().getSelectionPaths()) .map(TreeUtil::getLastUserObject); }