Modifying files in CheckinHandlers

I've got a CheckinHandler which modifies commited files via the PSI tree in it's beforeCheckin method. Everything seems to work correctly, except that the file modification appears to occur after checkin occurs. Modification occurs in a write action, wrapped in a CommandProcessor.executeCommand call. Is there something obvious I'm missing? Maybe some sort of "commit the psi tree to the physical file" command?

--Dave Griffith

2 comments
Comment actions Permalink

FileDocumentManager.saveDocument() should do the trick: psi to document synchronisation is synchronous, but flushing documents to disk is done at some discrete points, and this method forces this flush.

0
Comment actions Permalink

Works. Thanks, Eugene.

--Dave Griffith

0

Please sign in to leave a comment.