Is there an API to check if a file opened in the editor was updated in terms of its content
已回答
I need an API to check if a file opened in the editor was changed (since it gets opened) in terms of its content
no matter whether it was saved or not. For example I open file with text a:
If I then type ab it must return true (= updated)
Or if I then type ab + ctrl+z it must return false (even if IDEA has already saved the file).
There is a getModificationStamp() in the VirtualFile, but it is updated only on save as well as Editor.isModified() call.
Is there a simple quick API to achieve that?
Is there a simple quick API to achieve that?
请先登录再写评论。
See com.intellij.openapi.fileEditor.FileDocumentManager#isFileModified
Unfortunately it works the same way as the mentioned APIs.