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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.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
Index: pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
index 7b9935384685799efecf07717207beabd6271ed0..802beae8e8ee756bde1f5e9df20cd8e1a9c9fa4f 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
@@ -77,8 +77,7 @@ class _UriSuggestionBuilder extends SimpleAstVisitor {
}
}
}
- }
- else if (offset == start && offset == end) {
+ } else if (offset == start && offset == end) {
String data = request.source.contents.data;
if (end == data.length) {
String ch = data[end - 1];
@@ -112,7 +111,7 @@ class _UriSuggestionBuilder extends SimpleAstVisitor {
void _addDartSuggestions() {
_addSuggestion('dart:');
- SourceFactory factory = request.context.sourceFactory;
+ SourceFactory factory = request.sourceFactory;
for (SdkLibrary lib in factory.dartSdk.sdkLibraries) {
if (!lib.isInternal && !lib.isImplementation) {
if (!lib.shortName.startsWith('dart:_')) {
@@ -192,7 +191,7 @@ class _UriSuggestionBuilder extends SimpleAstVisitor {
}
void _addPackageSuggestions(String partial) {
- SourceFactory factory = request.context.sourceFactory;
+ SourceFactory factory = request.sourceFactory;
Map<String, List<Folder>> packageMap = factory.packageMap;
if (packageMap != null) {
_addSuggestion('package:');

Powered by Google App Engine
This is Rietveld 408576698