Files from remote VirtualFileSystem not showing in Project View

I'm trying to write a plugin to edit and manage files from a legacy platform where the source files are stored in a remote server instead fo the developer's local machine.  I created a new VirtualFileSystem that knows how to communicate with this platform and build out the VirtualFile hierarchy for the source files on this system.  I then built a ModuleBuilder that lets you create a new Module for editing these files. This ModuleBuilder adds a new content root using a url that has the protocol of my custom VirtualFileSystem.  Problem is, I can't get any of these VirtualFiles to display in the Project View.  Here's what I'm doing in my ModuleBuilder:


public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
     // the protocol for my VFS is 'ecl'

     final ContentEntry contentRoot = rootModel.addContentEntry("ecl://devserver");
     contentRoot.addSourceFolder("ecl://devserver/src");
}

I verified that it is asking my VFS for the root and source folders, and I am returning what I think are valid VirtualFiles matching our remote structure, but nothing shows up in the Project View tree. When the project first opens, it does display 'devserver' in the navigation bar at the top for a short time, but fairly quickly changes back to the project / module name.  I think my ModuleBuilder is ok, because I changed it to load a new content root / source folder using the LocalFileSystem.findFileByPath(...) and that does show up in the Project View.  That must mean I'm doing something wrong with my VirtualFilesSystem / VirtualFile implementations.

My VirtualFileSystem extends DeprecatedVirtualFileSystem, and my VirtualFiles extend directly from VirtualFile.

Anyone run into similar issues trying to get VirtualFiles that don't exist on the local files system to display in the Project View and have any ideas / pointers as to where I should look?

Thanks in advance,
-Jason

Please sign in to leave a comment.