private int buildItemChain(Object element){
  if (element == null)   return 0;
  ITreeContentProvider contentProvider=(ITreeContentProvider)getContentProvider();
  Object parent=contentProvider.getParent(element);
  int index=buildItemChain(parent);
  BreadcrumbItem item;
  if (index < fBreadcrumbItems.size()) {
    item=(BreadcrumbItem)fBreadcrumbItems.get(index);
    if (item.getData() != null)     unmapElement(item.getData());
  }
 else {
    item=createItem();
    fBreadcrumbItems.add(item);
  }
  if (equals(element,item.getData())) {
    update(element,null);
  }
 else {
    item.setData(element);
    item.refresh();
  }
  if (parent == null) {
    item.setDetailsVisible(false);
  }
  mapElement(element,item);
  return index + 1;
}

private int buildItemChain ( Object element ) { if ( element == null ) return 0 ; ITreeContentProvider contentProvider = ( ITreeContentProvider ) getContentProvider ( ) ; Object parent = contentProvider . getParent ( element ) ; int index = buildItemChain ( parent ) ; BreadcrumbItem item ; if ( index < fBreadcrumbItems . size ( ) ) { item = ( BreadcrumbItem ) fBreadcrumbItems . get ( index ) ; if ( item . getData ( ) != null ) unmapElement ( item . getData ( ) ) ; } else { item = createItem ( ) ; fBreadcrumbItems . add ( item ) ; } if ( equals ( element , item . getData ( ) ) ) { update ( element , null ) ; } else { item . setData ( element ) ; item . refresh ( ) ; } if ( parent == null ) { item . setDetailsVisible ( false ) ; } mapElement ( element , item ) ; return index + 1 ; }
generates the parent chain of the given element .
