if (pythonNature != null) {
ICodeCompletionASTManager astManager = pythonNature.getAstManager();
if (astManager != null) {
IPath location = resource.getLocation();
astManager.rebuildModule(new File(location.toOSString()), document, resource.getProject(),
new NullProgressMonitor(), pythonNature);
}
}
}