private @NotNull List<TreeNode> selectedNodes() {
    ThreadingAssertions.assertEventDispatchThread();
    TreePath[] selectionPaths = myTree.getSelectionPaths();
    return selectionPaths == null ? Collections.emptyList() : ContainerUtil.mapNotNull(selectionPaths, p-> ObjectUtils.tryCast(p.getLastPathComponent(), TreeNode.class));
  }
private @NotNull List<TreeNode> selectedNodes()