How can I change document content when user is saving/open a document?

Hi there.
I'm writing a plugin and now I need to listener file saving/opening event. And, I want to change the content that written to file system or read to editor.

Any advice?
Thanks a lot.
Charlie Jiang

1 comment
Comment actions Permalink

See com.intellij.openapi.fileEditor.FileDocumentManagerListener and its usages in IDEA CE codebase. I'm not sure how easy it's to change the contents at file loading/saving though.

0

Please sign in to leave a comment.