void (DebuggerTreeNodeImpl debuggerTreeNode) { if (pathToThread.isEmpty()) { if (debuggerTreeNode.getDescriptor() instanceof ThreadDescriptorImpl && ((ThreadDescriptorImpl)debuggerTreeNode.getDescriptor()).getThreadReference() == thread) { removeListener(); final TreePath treePath = new TreePath(debuggerTreeNode.getPath()); setSelectionPath(treePath); if (expand && !isExpanded(treePath)) { expandPath(treePath); } } } else { if (debuggerTreeNode.getDescriptor() instanceof ThreadGroupDescriptorImpl && ((ThreadGroupDescriptorImpl)debuggerTreeNode.getDescriptor()).getThreadGroupReference() == pathToThread.get(0)) { pathToThread.remove(0); expandPath(new TreePath(debuggerTreeNode.getPath())); } } }