Hello to everyone,
I'm trying to develop a plugin to help me do my work better.
The plugin is a kind of version control plugin for some custom type sources. The sources are Java Script and some custom SQL type. These sources along with the history and version information resides in a database. I managed so far to create a new ToolWindow containing a tree view with my sources (categories->aplications->sources).
My problem for the moment is that I can't figure out how I can open these "files" in the editor. Let say for example using the plain text editor or the JS editor. I quoted "files" because they are not really local file system files. Those items in my tree come from a database.
I have tried creating my VirtualFile implementation and use it like this:
StarlimsVirtualFile starlimsVirtualFile = new StarlimsVirtualFile(item);
but I get an exeption:
java.lang.IllegalArgumentException: file is not valid: com.starlims.idea.StarlimsVirtualFile@12ae739
I'm using Idea 6.0.4(build 6148) for this plugin development.
Please, somebody help me!