Lines 28-33
Link Here
|
28 |
import org.openide.filesystems.FileSystem; |
28 |
import org.openide.filesystems.FileSystem; |
29 |
import org.openide.filesystems.FileSystemCapability; |
29 |
import org.openide.filesystems.FileSystemCapability; |
30 |
import org.openide.filesystems.FileObject; |
30 |
import org.openide.filesystems.FileObject; |
|
|
31 |
import org.openide.filesystems.Repository; |
31 |
import org.openide.loaders.DataObject; |
32 |
import org.openide.loaders.DataObject; |
32 |
import org.openide.loaders.DataObjectNotFoundException; |
33 |
import org.openide.loaders.DataObjectNotFoundException; |
33 |
|
34 |
|
Lines 547-587
Link Here
|
547 |
// in 4.0 projects branch. |
548 |
// in 4.0 projects branch. |
548 |
fss = FileSystemCapability.COMPILE.fileSystems(); |
549 |
fss = FileSystemCapability.COMPILE.fileSystems(); |
549 |
} |
550 |
} |
|
|
551 |
FileSystem defaultFS = Repository.getDefault().getDefaultFileSystem(); |
550 |
while (fss.hasMoreElements()) { |
552 |
while (fss.hasMoreElements()) { |
551 |
FileSystem fs = (FileSystem)fss.nextElement(); |
553 |
FileSystem fs = (FileSystem)fss.nextElement(); |
552 |
if (fs.isReadOnly()) |
554 |
if (fs.isReadOnly() || fs == defaultFS) |
553 |
continue; |
555 |
continue; |
554 |
refresh(fs.getRoot()); |
556 |
fs.refresh(false); |
555 |
} |
557 |
} |
556 |
} |
|
|
557 |
|
558 |
void refresh(FileObject dir) { |
559 |
FileObject[] oldCh = dir.getChildren(); |
560 |
dir.refresh(); |
561 |
FileObject[] newCh = dir.getChildren(); |
562 |
Collection c = new HashSet(Arrays.asList(newCh)); |
563 |
c.retainAll(Arrays.asList(oldCh)); |
564 |
|
565 |
Collection subs = new LinkedList(); |
566 |
for (Iterator it = c.iterator(); it.hasNext(); ) { |
567 |
FileObject f = (FileObject)it.next(); |
568 |
if (f.isFolder()) |
569 |
subs.add(f); |
570 |
else if ("class".equals(f.getExt())) |
571 |
f.refresh(); |
572 |
} |
573 |
for (Iterator it = subs.iterator(); it.hasNext(); ) |
574 |
refresh((FileObject)it.next()); |
575 |
} |
576 |
|
577 |
Set directories; |
578 |
|
579 |
void fillFolderList(JExternalCompiler[] comps) { |
580 |
Set dirs = new HashSet(comps.length); |
581 |
for (int i = 0; i < comps.length; i++) { |
582 |
dirs.add(comps[i].getFileObject0().getParent()); |
583 |
} |
584 |
directories = dirs; |
585 |
} |
558 |
} |
586 |
|
559 |
|
587 |
/** @return location of mmsgfile fo rfastjavac */ |
560 |
/** @return location of mmsgfile fo rfastjavac */ |