How do I detect Intellij or Android stdio file modifications 'real' realtime?

不打扰是莪最后的温柔 提交于 2019-12-11 07:32:51

问题


I am writing a plugin for intellij idea.

How do I detect Intellij or Android stdio file modifications realtime?

Solution 1:BulkFileListener

But it works after pressing Ctrl+S. When a character was added or deleted without ctrl+s, it cannot report this event.

Solution 2: TypedActionHandler

But it only works for adding characters. When a character or a line was deleted, it cannot report this event.

The above two are not what I want.

Any other advices?


回答1:


To get notifications about changes in all documents, you can use EditorFactory.getEventMulticaster().addDocumentListener().



来源:https://stackoverflow.com/questions/41500001/how-do-i-detect-intellij-or-android-stdio-file-modifications-real-realtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!