Listener for file changes.
Hi,
Can I have a ChangeListener (or maybe some other listener) to know whether a change was made outside of IntelliJ or via explicit editing from IntelliJ?
Is it possible to define listener for Save action in IntelliJ?
Thanks
Devang Shah
请先登录再写评论。
Catching save events:
File system listener:
Hi,
In SettingsSavingComponent, can I know which file(s) have been saved? Is it that all files open in the editor will be saved even if no contents are changed? I dont want to use VirtualFileSystem.addVirtualFileListener(VirtualFileListener).
Thanks
Devang Shah
Hello Dewang,
Well, addVirtualFileListener() is actually the correct API to use for this
purpose. With SettingsSavingComponent, you only know that some kind of a
save operation is being processed.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitry,
I know that some file has changed. Can I manually save the contents of this file to the file system? Or can I have a listener that gets invoked after the file has been changed only from IDE, besider VirtualFileListener?
Hello Dewang,
I still don't understand completely what exactly you need. But if you need
to save a modified document to the file system, you need to use FileDocumentManager.saveDocument().
Also you can refer to http://www.jetbrains.net/confluence/display/IDEADEV/IntelliJIDEA6.0ArchitecturalOverview
to get more information on the basic concepts of IntelliJ IDEA architecture.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"