Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] Buffer Syncronization After IFile.setContents()

All,

Something changed in the last week which is causing an interesting issue in our automated unit tests.

We use IFile.setContents() to update the content of a Ruby file, and then run various tests which access the ISourceModule for that file.

This was all happily working and everything stayed in sync, until I updated our code to use the latest sources from CVS HEAD as of yesterday.

Now, ISourceModule.getSource() still reports the old contents of the file, even after all the events have fired and the index is ready. Also, calling ISourceModule.makeConsistent() doesn't help, because ISourceModule.isConsistent() returns true causing it to return without doing anything.

I've temporarily worked around the issue by calling ISourceModule.close() then ISourceModule.open() after changing the file contents.

However, I'm guessing this is really just exposing a bigger issue. In general, shouldn't ISourceModules detect when the underlying IFile changes outside of the scope of DLTK, and update themselves accordingly?

Thank You,
Shelby Sanders


Back to the top