updateFileContexts method
Inform the analyzer that the provided filePaths have been updated.
This will trigger a re-analysis of the files and return true if the updated files should trigger a code generation.
Implementation
Future<bool> updateFileContexts(Set<String> filePaths) async {
await _refreshContextForFiles(filePaths);
var oldDefinitionsLength = _futureCallDefinitions.length;
await analyze(
collector: CodeGenerationCollector(),
analyzedModels: _cachedAnalyzedModels,
);
if (_futureCallDefinitions.length != oldDefinitionsLength) {
return true;
}
return filePaths.any((e) => _isFutureCallFile(File(e)));
}