Changeset 763

Show
Ignore:
Timestamp:
10/29/11 14:54:58 (7 months ago)
Author:
mgalloy
Message:

Filtering warnings for visible items; fix for ticket #74.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/doc_system__define.pro

    r758 r763  
    585585  directories = self.directories->get(/all, count=ndirectories) 
    586586  for i = 0L, ndirectories - 1L do (directories[i])->fillLinks 
     587   
     588  ; filter warnings to only show visible items 
     589   
     590  ntodos = self.todos->count() 
     591  if (ntodos gt 0L) then begin 
     592    todo_filter = bytarr(ntodos) 
     593    for t = 0L, ntodos - 1L do begin 
     594      todo_item = self.todos->get(position=t) 
     595      todo_filter[t] = todo_item->isVisible() 
     596    endfor 
     597    delete_indices = where(todo_filter eq 0L, n_delete) 
     598    if (n_delete gt 0L) then begin 
     599      self.todos->remove, position=delete_indices 
     600    endif 
     601  endif 
     602 
     603  nbugs = self.bugs->count() 
     604  if (nbugs gt 0L) then begin 
     605    bug_filter = bytarr(nbugs) 
     606    for t = 0L, nbugs - 1L do begin 
     607      bug_item = self.bugs->get(position=t) 
     608      bug_filter[t] = bug_item->isVisible() 
     609    endfor 
     610    delete_indices = where(bug_filter eq 0L, n_delete) 
     611    if (n_delete gt 0L) then begin 
     612      self.bugs->remove, position=delete_indices 
     613    endif 
     614  endif 
     615 
     616  nundocumented = self.undocumented->count() 
     617  if (nundocumented gt 0L) then begin 
     618    undocumented_filter = bytarr(nundocumented) 
     619    for t = 0L, nundocumented - 1L do begin 
     620      undocumented_item = self.undocumented->get(position=t) 
     621      undocumented_filter[t] = undocumented_item->isVisible() 
     622    endfor 
     623    delete_indices = where(undocumented_filter eq 0L, n_delete) 
     624    if (n_delete gt 0L) then begin 
     625      self.undocumented->remove, position=delete_indices 
     626    endif 
     627  endif 
     628 
     629   
     630  nobsolete = self.obsolete->count() 
     631  if (nobsolete gt 0L) then begin 
     632    obsolete_filter = bytarr(nobsolete) 
     633    for t = 0L, nobsolete - 1L do begin 
     634      obsolete_item = self.obsolete->get(position=t) 
     635      obsolete_filter[t] = obsolete_item->isVisible() 
     636    endfor 
     637    delete_indices = where(obsolete_filter eq 0L, n_delete) 
     638    if (n_delete gt 0L) then begin 
     639      self.obsolete->remove, position=delete_indices 
     640    endif 
     641  endif 
     642 
     643  ncomplexRoutines = self.complexRoutines->count() 
     644  if (ncomplexRoutines gt 0L) then begin 
     645    complexRoutines_filter = bytarr(ncomplexRoutines) 
     646    for t = 0L, ncomplexRoutines - 1L do begin 
     647      complexRoutines_item = self.complexRoutines->get(position=t) 
     648      complexRoutines_filter[t] = complexRoutines_item->isVisible() 
     649    endfor 
     650    delete_indices = where(complexRoutines_filter eq 0L, n_delete) 
     651    if (n_delete gt 0L) then begin 
     652      self.complexRoutines->remove, position=delete_indices 
     653    endif 
     654  endif   
    587655end 
    588656