private void collapseUpFromLastParent(final TreePath newPath){
  TreePath currentParent=m_lastParent;
  while (currentParent != null && !currentParent.isDescendant(newPath) && !stayExpandedContainsDescendantOf(currentParent)) {
    m_tree.collapsePath(currentParent);
    currentParent=currentParent.getParentPath();
  }
}

private void collapseUpFromLastParent ( final TreePath newPath ) { TreePath currentParent = m_lastParent ; while ( currentParent != null && ! currentParent . isDescendant ( newPath ) && ! stayExpandedContainsDescendantOf ( currentParent ) ) { m_tree . collapsePath ( currentParent ) ; currentParent = currentParent . getParentPath ( ) ; } }
collapses parents of last path if it is not in the list of expanded path until the new path is a descendant
