Files loose icons after a remount

"Jonah, Jim" <[email protected]> Wed, 2 Mar 2005 16:17:00 -0500
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <8D81DA9D264CD311A60C0008C75D553B1B8BAF48@cwus-dtw-pri02.compuware.com>
Hi,

I'm using the JavaCvs module and have added a command that our product
needs. Due to the way our product works I needed to unmount a
JavaCVSFilesystem (after running CvsUpdate on the filesystem), do some work
on the files (cleanup some proprietary XML files that cvs has marked as
needing merges), remount the same filesystem when done, and call CvsRefresh
on it. I have this working. 

However, sometimes after the remount the icons for our files have
disappeared. Any thoughts on why the filesystem would loose the reference to
the icons?

The gist of code is:

... remountFS(FileSystem fs, ....){

  Repository repository = Repository.getDefault();
  //handle the case of the mounting a filesystem already mounted, error
checking, etc.

  //finally
  // for CommandLineVcsFileSystem we need create profile related .xml file
in \system\Projects\Default\system\Mount (bz 20128)
            if (fs instanceof CommandLineVcsFileSystem) {
                CommandLineVcsFileSystem clfs = (CommandLineVcsFileSystem)
fs;
                FileObject testfo =
Repository.getDefault().getDefaultFileSystem().findResource("Mount"); //
NOI18N
                DataFolder df = DataFolder.findFolder(testfo);
                DataObject obj  = clfs.createInstanceDataObject(df);
                obj.writeReplace();
            }
    repository.addFileSystem(fs);
    fs.refresh(false);
  }


Are there events that should be fired after I remount the filesystem?

Note: some of the file contents may have changed while the filesystem was
"unmounted", files may be added and/or removed as well. Also, after this
method is finished I do call CvsRefresh starting at the root of the
filesystem.

thoughts?

-- Jim

-----------------       
Franklin Roosevelt, in his second Inaugural Address, told a rain-soaked
crowd, "The test of our progress is not whether we add more to the abundance
of those who have much; it is whether we provide enough for those who have
too little."




The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.