Filter the .nbintdb file. This database file should not be seen by the user.
This is an additional fix to issue #33474.
1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Fri May 09 14:18:24 2003 +0000
1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Mon May 12 15:37:43 2003 +0000
1.3 @@ -405,6 +405,8 @@
1.4 private transient VersioningFileSystem versioningSystem = null;
1.5
1.6 private transient AbstractFileSystem.List vcsList = null;
1.7 +
1.8 + private transient LocalFilenameFilter localFilenameFilter = null;
1.9
1.10 /** The refresh request instead of the standard refreshing. */
1.11 private transient VcsRefreshRequest refresher = new VcsRefreshRequest (this, 0, this);
1.12 @@ -1486,6 +1488,7 @@
1.13 */
1.14 protected void init() {
1.15 D.deb ("init()"); // NOI18N
1.16 + localFilenameFilter = new LocalFilenameFilter();
1.17 if (tempFiles == null) tempFiles = new Vector();
1.18 unimportantFiles = Collections.synchronizedSet(new HashSet());
1.19 //cache = new VcsFSCache(this/*, createNewCacheDir ()*/);
1.20 @@ -2987,7 +2990,8 @@
1.21 String[] getLocalFiles(String name) {
1.22 File dir = new File(getRootDirectory(), name);
1.23 if (dir == null || !dir.exists() || !dir.canRead()) return new String[0];
1.24 - String files[] = dir.list(getLocalFileFilter());
1.25 + localFilenameFilter.setOptionalFilter(getLocalFileFilter());
1.26 + String files[] = dir.list(localFilenameFilter);
1.27 return files;
1.28 }
1.29
1.30 @@ -4614,6 +4618,32 @@
1.31 }
1.32
1.33 }
1.34 +
1.35 + private class LocalFilenameFilter extends Object implements FilenameFilter {
1.36 +
1.37 + private final boolean ignoreCase;
1.38 + private FilenameFilter optionalFilter;
1.39 +
1.40 + public LocalFilenameFilter() {
1.41 + ignoreCase = Utilities.isWindows();
1.42 + }
1.43 +
1.44 + public void setOptionalFilter(FilenameFilter optionalFilter) {
1.45 + this.optionalFilter = optionalFilter;
1.46 + }
1.47 +
1.48 + public boolean accept(File dir, String name) {
1.49 + if (ignoreCase && IntegritySupportMaintainer.DB_FILE_NAME.equalsIgnoreCase(name) ||
1.50 + !ignoreCase && IntegritySupportMaintainer.DB_FILE_NAME.equals(name)) {
1.51 + return false;
1.52 + } else if (optionalFilter != null) {
1.53 + return optionalFilter.accept(dir, name);
1.54 + } else {
1.55 + return true;
1.56 + }
1.57 + }
1.58 +
1.59 + }
1.60
1.61 public String getBundleProperty(String s) {
1.62 return g(s);
2.1 --- a/vcscore/src/org/netbeans/modules/vcscore/objectintegrity/IntegritySupportMaintainer.java Fri May 09 14:18:24 2003 +0000
2.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/objectintegrity/IntegritySupportMaintainer.java Mon May 12 15:37:43 2003 +0000
2.3 @@ -48,9 +48,9 @@
2.4 implements PropertyChangeListener,
2.5 VetoableChangeListener,
2.6 Runnable {
2.7 + public static final String DB_FILE_NAME = ".nbintdb"; // NOI18N
2.8 private static Map VOISMap = new WeakHashMap();
2.9 private static final int SAVER_SCHEDULE_TIME = 500;
2.10 - private static final String DB_FILE_NAME = ".nbintdb"; // NOI18N
2.11
2.12 private FileSystem fileSystem;
2.13 private VcsOISActivator objectIntegrityActivator;