private void addBlockListener(OBlock block,Tracker tracker){
  List<Tracker> trackers=_blocks.get(block);
  if (trackers == null) {
    trackers=new ArrayList<Tracker>();
    trackers.add(tracker);
    _blocks.put(block,trackers);
    block.addPropertyChangeListener(this);
    if (log.isDebugEnabled())     log.debug("\taddPropertyChangeListener for block {}",block.getDisplayName());
  }
 else {
    if (trackers.isEmpty()) {
      block.addPropertyChangeListener(this);
      if (log.isDebugEnabled())       log.debug("\taddPropertyChangeListener for block {}",block.getDisplayName());
    }
 else {
      if (log.isDebugEnabled())       log.debug("\tassumed block {} already has listener" + block.getDisplayName());
    }
    if (!trackers.contains(tracker)) {
      trackers.add(tracker);
    }
  }
}

private void addBlockListener ( OBlock block , Tracker tracker ) { List < Tracker > trackers = _blocks . get ( block ) ; if ( trackers == null ) { trackers = new ArrayList < Tracker > ( ) ; trackers . add ( tracker ) ; _blocks . put ( block , trackers ) ; block . addPropertyChangeListener ( this ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "\taddPropertyChangeListener for block {}" , block . getDisplayName ( ) ) ; } else { if ( trackers . isEmpty ( ) ) { block . addPropertyChangeListener ( this ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "\taddPropertyChangeListener for block {}" , block . getDisplayName ( ) ) ; } else { if ( log . isDebugEnabled ( ) ) log . debug ( "\tassumed block {} already has listener" + block . getDisplayName ( ) ) ; } if ( ! trackers . contains ( tracker ) ) { trackers . add ( tracker ) ; } } }
adds listener to a block when a tracker enters .
