private FileList findProject(IResource r, int transferType){
//System.out.println("Base::findProject()");
IProject p = r.getProject();
FileList fl = null;
// project is null? return null, most probable reason is that resource is a workbench
if(p == null) return null;
// loop through the projects you got, look for a match
for(int a=0;a<m_fileList.size();a++){
fl = (FileList)m_fileList.get(a);
if(p == fl.getProject()){
//System.out.println("Base::findProject(), found FileList, returning it");
// found one, return it
return fl;
}
}
//System.out.println("Base::findProject(), couldnt find FileList, create a new one");
// didnt find one, create a new one, add it, return it
fl = new FileList(p);
fl.init(transferType);
//System.out.println("Base::findProject(), FileList initialised ok");
m_fileList.add(fl);
return fl;
}