public synchronized void listenToProjRoot(){
  List<String> dirsAdded=new ArrayList<String>();
  String relativePath=null;
  FileObject fo=this.projRoot;
  FileChangeListener weakFcl=FileUtil.weakFileChangeListener(this,fo);
  fo.addFileChangeListener(weakFcl);
  FileObject parent=null;
  FileObject child=null;
  for (  List<String> path : paths) {
    parent=fo;
    for (    String pathElem : path) {
      child=parent.getFileObject(pathElem);
      if (child != null) {
        relativePath=FileUtil.getRelativePath(fo,child);
        if (!dirsAdded.contains(relativePath)) {
          dirsAdded.add(relativePath);
          weakFcl=FileUtil.weakFileChangeListener(this,child);
          child.addFileChangeListener(weakFcl);
          parent=child;
        }
      }
 else {
        break;
      }
    }
  }
}

public synchronized void listenToProjRoot ( ) { List < String > dirsAdded = new ArrayList < String > ( ) ; String relativePath = null ; FileObject fo = this . projRoot ; FileChangeListener weakFcl = FileUtil . weakFileChangeListener ( this , fo ) ; fo . addFileChangeListener ( weakFcl ) ; FileObject parent = null ; FileObject child = null ; for ( List < String > path : paths ) { parent = fo ; for ( String pathElem : path ) { child = parent . getFileObject ( pathElem ) ; if ( child != null ) { relativePath = FileUtil . getRelativePath ( fo , child ) ; if ( ! dirsAdded . contains ( relativePath ) ) { dirsAdded . add ( relativePath ) ; weakFcl = FileUtil . weakFileChangeListener ( this , child ) ; child . addFileChangeListener ( weakFcl ) ; parent = child ; } } else { break ; } } } }
listen to all the folders from projectroot , build upto any existing addons dirs .
