public void remove ( QPath rootPath ) { for ( int i = items . size ( ) - 1 ; i >= 0 ; i -- ) { ItemState item = items . get ( i ) ; QPath qPath = item . getData ( ) . getQPath ( ) ; if ( qPath . isDescendantOf ( rootPath ) || item . getAncestorToSave ( ) . isDescendantOf ( rootPath ) || item . getAncestorToSave ( ) . equals ( rootPath ) || qPath . equals ( rootPath ) ) { if ( item . isNode ( ) ) { removeNode ( item , i ) ; } else { removeProperty ( item , i ) ; } } } }
Removes the item at the rootPath and all descendants from the log