generateGetEntriesResponse method
Create a 'kythe.getEntries' response for the file specified by the given
request
. If any of the contributors throws an exception, also create a
non-fatal 'plugin.error' notification.
Implementation
GeneratorResult<KytheGetKytheEntriesResult> generateGetEntriesResponse(
EntryRequest request) {
var notifications = <Notification>[];
var collector = EntryCollectorImpl();
for (var contributor in contributors) {
try {
contributor.computeEntries(request, collector);
} catch (exception, stackTrace) {
notifications.add(PluginErrorParams(
false, exception.toString(), stackTrace.toString())
.toNotification());
}
}
var result = KytheGetKytheEntriesResult(collector.entries, collector.files);
return GeneratorResult(result, notifications);
}