How to add a new file into project stucture?

This might be a dummy question.
I wrote an simple plugin to generate some new files based on some templates. But when I tried to reflect the changes in the virtual file system, an exception always popup and said change can only be made throught a write action...
Can any1 help?

2 comments
Comment actions Permalink

Not sure if you're talking about this, but did you take a look at
Application.runWriteAction()?

tc master wrote:

This might be a dummy question.
I wrote an simple plugin to generate some new files based on some templates. But when I tried to reflect the changes in the virtual file system, an exception always popup and said change can only be made throught a write action...
Can any1 help?


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Hello tc,

tm> I wrote an simple plugin to generate some new files based on some
tm> templates. But when I tried to reflect the changes in the virtual
tm> file system, an exception always popup and said change can only be
tm> made throught a write action...

After file system changes call VirtualFileSystem.refresh in Application.runWriteAction

--
Alexey Efimov, Java Developer
Tops BI


0

Please sign in to leave a comment.