void (TreeSelectionEvent e) { if (myFrozen) return; mySelectionNodes = new ArrayList<>(); TreePath[] paths = myTree.getSelectionPaths(); if (paths != null) { for (TreePath path : paths) { mySelectionNodes.add(getLastNode(path)); } } }