Mount Custom File System/Open Projects
"Graeme" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
I am developing a NB Platform application that will run in a VDI environment with a clean workstation image on each login. I therefore need to avoid using the local file system.
I first tried the zeroadmin project in contrib and that worked great for the system-filesystem. It allowed me to load/save NB configuration data remotely but it does not solve the problem of the master-filesystem (which seems to default to the local-file-system).
I would like users to access shared resources using a remote file system.
I developed a RESTful web service to provide access to a remote directory and a custom file system (extends AbstractFileSystem) as a quick proof of concept.
I was able to open a remote project with the following code:
Code:
FileSystem fs = new MyRemoteFileSystem();
FileObject root = fs.getRoot();
FolderObject projectdir = fs.getFileObject(“ProjectA”);
Project p = FileOwnerQuery.getOwner(projectDir);
Project[] projects = { p };
OpenProjects.getDefault().open(projects, false);
The Projects tab displayed my custom project/files correctly and I was able to open/edit/save files (all remotely). I was able to use MultiFileSystem to combine two remote file systems - NB is awesome!
I would like my users to be able to open remote projects with the File/Open dialog and that is where I am now stuck!
Using google I found references to AutoMountProvider, MountSupport and FileSystemProvider – these sounded like they might solve my problem but unfortunately they seem to have been removed and may never have been public. Anyone know why they were removed?
Does anyone know of a way to mount file systems into the master file system or even replace the master file system completely with my own implementation? For example I can replace the system-filesystem with “-Dorg.netbeans.core.systemfilesystem.custom=” is there a masterfs equivalent?
Thanks
-Graeme