Index: vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java diff -c vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java:1.207.2.9 vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java:1.219 *** vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java:1.207.2.9 Mon Apr 7 08:55:35 2003 --- vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Wed Apr 9 05:08:51 2003 *************** *** 3319,3328 **** * and its content should be refreshed. */ public void checkForModifications(String path) { //System.out.println("checkForModifications("+path+")"); ! Enumeration enum = existingFileObjects(this.findResource(path)); while(enum.hasMoreElements()) { FileObject fo = (FileObject) enum.nextElement(); String name = fo.getPackageNameExt('/', '.'); //System.out.println("refreshResource("+name+")"); refreshResource(name, true); --- 3319,3346 ---- * and its content should be refreshed. */ public void checkForModifications(String path) { + checkForModifications(path, true, true, true); + } + + /** + * Should be called when the modification in a file or folder is expected + * and its content should be refreshed. + */ + public void checkForModifications(String path, final boolean recursively, + boolean refreshData, boolean refreshFolders) { //System.out.println("checkForModifications("+path+")"); ! FileObject first = this.findResource(path); ! Enumeration enum = existingFileObjects(first); while(enum.hasMoreElements()) { FileObject fo = (FileObject) enum.nextElement(); + if (!(fo.isData() && refreshData || fo.isFolder() && refreshFolders)) { + continue; + } + if (!recursively) { + if (!first.equals(fo.getParent())) { + if (!first.equals(fo)) break; + } + } String name = fo.getPackageNameExt('/', '.'); //System.out.println("refreshResource("+name+")"); refreshResource(name, true); Index: vcscore/src/org/netbeans/modules/vcscore/caching/VcsCache.java diff -c vcscore/src/org/netbeans/modules/vcscore/caching/VcsCache.java:1.56 vcscore/src/org/netbeans/modules/vcscore/caching/VcsCache.java:1.58 *** vcscore/src/org/netbeans/modules/vcscore/caching/VcsCache.java:1.56 Thu Feb 27 15:43:01 2003 --- vcscore/src/org/netbeans/modules/vcscore/caching/VcsCache.java Wed Apr 9 04:59:46 2003 *************** *** 417,423 **** parentDir = getDir(parentFile.getAbsolutePath()); } CacheDir initDir = null; ! if (parentDir == null) parentDir = lookupCacheDir(parentFile, false); if (parentDir == null) { //System.out.println("initCacheDir ("+toInit+") without parent."); //D.deb("initCacheDir", "is without Parent"); --- 417,425 ---- parentDir = getDir(parentFile.getAbsolutePath()); } CacheDir initDir = null; ! if (parentDir == null && parentFile != null) { ! parentDir = lookupCacheDir(parentFile, false); ! } if (parentDir == null) { //System.out.println("initCacheDir ("+toInit+") without parent."); //D.deb("initCacheDir", "is without Parent"); *************** *** 514,519 **** --- 516,523 ---- if (fo != null) { //System.out.println("heyDoRefreshDir("+path+") REFRESH CALLED."); fo.refresh(); + // Also check the existing data in this folder for external modification. + fsystem.checkForModifications(fo.getPath(), false, true, false); } } }