VFS integration question Follow
hi,
can anybody provide a starting guide for creating a plugin that provides a own VFS implementation (e.g. a FTP browser). From what i understand, i need to register the impl. as application component.
but how do i let it show up in the project view? i.e. how do i inject the 'root' file for my protocol?
thanks for any hints.
regards, toby
Please sign in to leave a comment.
Hello Tobias,
The project view displays the PSI structure of the project rather than the
VFS, so there's quite a lot more work to do besides implementing VFS if you
want to show your content in project view. The starting point for modifying
the ProjectView structure is the TreeStructureProvider interface.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
cool, thanks so far.
i managed to add a new PSI element to the project view.
in order to populate the VirtualFiles, i implement the TreeStructureProvider.getData() and check for DataConstants.VIRTUAL_FILE. Is this the way to do?
if i need several 'FTP sites' in the view, the virtual file system would not do, since there can only be one per application, right? or would i use the qualified urls as virtual file paths?
what would be the best place to configure (i.e. add/remove) FTP sites that should show up in the project view? could i add them as "Project Source Roots" somehow?
is there as suitable example plugin that does something similar?
thanks for your help.
cool, thanks so far.
i managed to add a new PSI element to the project view.
in order to populate the VirtualFiles, i implement the TreeStructureProvider.getData() and check for DataConstants.VIRTUAL_FILE. Is this the way to do?
if i need several 'FTP sites' in the view, the virtual file system would not do, since there can only be one per application, right? or would i use the qualified urls as virtual file paths?
what would be the best place to configure (i.e. add/remove) FTP sites that should show up in the project view? could i add them as "Project Source Roots" somehow?
is there as suitable example plugin that does something similar?
thanks for your help.
Hello Tobias,
No. This only provides data for actions invoked on your node. To populate
the tree, you need to add child nodes to the node that you add from your
TreeStructureProvider.
Yes, you should use qualified URLs.
You should probably create a Configurable that will be shown in the Settings
dialog. Project source roots are directories where the source code of the
project is located, which is completely different from what you need.
I'm not aware of any such plugins.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
thanks. i think i got it now.
regards, toby