Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2499693002: Fixes for URI and Object completions with the new driver. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 81a95de9ac82a29631043cc499e056889357e262..f18e7675ddd0b14aa0aec549acb808e62a7134d9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -514,6 +514,7 @@ class AnalysisDriver {
// Return the result, full or partial.
_logger.writeln('Computed new analysis result.');
return new AnalysisResult(
+ _sourceFactory,
file.path,
file.uri,
withUnit ? file.content : null,
@@ -670,8 +671,8 @@ class AnalysisDriver {
error.message,
error.correction))
.toList();
- return new AnalysisResult(file.path, file.uri, null, file.contentHash,
- file.lineInfo, null, errors);
+ return new AnalysisResult(_sourceFactory, file.path, file.uri, null,
+ file.contentHash, file.lineInfo, null, errors);
}
return null;
}
@@ -953,6 +954,11 @@ class AnalysisDriverScheduler {
*/
class AnalysisResult {
/**
+ * The [SourceFactory] with which the file was analyzed.
+ */
+ final SourceFactory sourceFactory;
+
+ /**
* The path of the analysed file, absolute and normalized.
*/
final String path;
@@ -989,8 +995,8 @@ class AnalysisResult {
*/
final List<AnalysisError> errors;
- AnalysisResult(this.path, this.uri, this.content, this.contentHash,
- this.lineInfo, this.unit, this.errors);
+ AnalysisResult(this.sourceFactory, this.path, this.uri, this.content,
+ this.contentHash, this.lineInfo, this.unit, this.errors);
}
/**
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698