private void addParentComments(List<? extends IEndlessAdaptable> loadedItems,Comment commentInContext,List<IEndlessAdaptable> displayedComments){
  int depth=commentInContext.getDepth();
  if (depth == 0)   return;
  --depth;
  int commentPosition=loadedItems.indexOf(commentInContext);
  for (int i=commentPosition - 1; i >= 0; --i) {
    Comment c=(Comment)loadedItems.get(i);
    if (c.getDepth() == depth) {
      displayedComments.add(c);
      --depth;
      if (commentInContext.getDepth() - depth > MAX_PARENT_DEPTH || depth < 0)       break;
    }
  }
}

private void addParentComments ( List < ? extends IEndlessAdaptable > loadedItems , Comment commentInContext , List < IEndlessAdaptable > displayedComments ) { int depth = commentInContext . getDepth ( ) ; if ( depth == 0 ) return ; -- depth ; int commentPosition = loadedItems . indexOf ( commentInContext ) ; for ( int i = commentPosition - 1 ; i >= 0 ; -- i ) { Comment c = ( Comment ) loadedItems . get ( i ) ; if ( c . getDepth ( ) == depth ) { displayedComments . add ( c ) ; -- depth ; if ( commentInContext . getDepth ( ) - depth > MAX_PARENT_DEPTH || depth < 0 ) break ; } } }
adds all parent comments to this fragment .
