Hook file opening and saving event

Hi, everybody

Is there any way do sth after file opening and before file saving?
I found that old solutions didn't work any more. For example, addFileDocumentSynchronizationVetoer method can't be found in FileDocumentManager.

Thanks a lot

3 comments

FileDocumentSynchronizationVetoer is now an extension point. Note that you have full Git history for the IntelliJ IDEA Community Edition, so if you want to know what happened to a particular API, you can always look at the history of the file in question and see what was changed and why.

0

Thanks, Dmitry. I add an extension, and FileDocumentSynchronizationVetoer.maySaveDocument works.

However, FileDocumentSynchronizationVetoer.mayReloadFileContent seems not able to hook the open event. Is there any way to do it?

0

What exactly are you trying to accomplish?

0

Please sign in to leave a comment.