Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] SourceModuleInfoCache

Hi,

I have a question regarding the fix 'apanchenk' has produced at
11/06/08 10:57 in SourceModuleInfoCache:

There's a condition that was added before removal of ISourceModule from cache:

if (isContentChanged(delta) || isWorkingCopy(delta)) {
    SourceModuleInfoCache.this.remove((ISourceModule) element);
}

Is this was done intentionally? Since I have the situation now when
all our Unit Tests fail...
This is because we are creating and removing a temporary file between
tests in such a manner:

@After
public void cleanTestFile() { // executes after each test
   if (testFile != null) {
      testFile.delete(true, null);
      testFile = null;
   }
}

public void createFile(String data) { // executes by each test
   testFile = testProject.getFile("test.php");
   testFile.create(new ByteArrayInputStream(data.getBytes()), true, null);
   project.refreshLocal(IResource.DEPTH_INFINITE, null);
   project.build(IncrementalProjectBuilder.FULL_BUILD,
DLTKCore.BUILDER_ID, null, null);
}

The content is changed, but the ISourceModule cache is not updated.

Please advice.

Thanks!

-- 
Michael


Back to the top