Is it possible to replace the default filesystem implementation or extend it?
In the Eclipse RCP app I’m trying to port we used EFS to provide a filesystem that fetches files from multiple registered servers, the provided files could then be used as regular files in the application (and the plugins we used). We also have another app that retrieves files from a database. In short provide files that are not from the local filesystem. Anything similar in Theia?
[original thread by Hanksha]
How should it work from UI perspective? Should users see them in the explorer next to the default filesystem or it is completely another view? Do you need the default file system at all?
The user doesn’t need to see the local filesystem, only the files from the remote servers.
The main reason why we did it that way in the original application is that the other language plugins like for Java, Groovy, JSON etc. would still work (so we could use the editors) which needed the same file API. So I’m wondering if that applies to the language supports via LSP as well?
if you want to have language support the easiest would be to stick with
file scheme indeed. Otherwise you will need to teach each language server your own scheme.
If you don’t need the default filesystem, then you can reimplement
FileSystem on the backend. URIs should have
file scheme for smooth LSP support.
So for LSP support the files need to exists in the local filesystem?
It is really specific to concrete language servers, some can support special schemas allowing in memory resources
If I was to replace the
FileSystem implementation, how do I do that?
in the backend extension entry module:
@anton-kosyakov Turns out I just had to provide an implementation of
ResourceResolver for my custom URI in the frontend extension and it worked. All code editors are working! (no LSP but it’s not a problem)