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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart

Issue 982983003: remove type suggestion when interpolation completion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/imported_computer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.completion.dart.cache; 5 library services.completion.dart.cache;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analysis_server/src/protocol_server.dart' 10 import 'package:analysis_server/src/protocol_server.dart'
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 CompletionSuggestion suggestion = 298 CompletionSuggestion suggestion =
299 createSuggestion(element, relevance: relevance); 299 createSuggestion(element, relevance: relevance);
300 300
301 if (element is ExecutableElement) { 301 if (element is ExecutableElement) {
302 DartType returnType = element.returnType; 302 DartType returnType = element.returnType;
303 if (returnType != null && returnType.isVoid) { 303 if (returnType != null && returnType.isVoid) {
304 importedVoidReturnSuggestions.add(suggestion); 304 importedVoidReturnSuggestions.add(suggestion);
305 } else { 305 } else {
306 otherImportedSuggestions.add(suggestion); 306 otherImportedSuggestions.add(suggestion);
307 } 307 }
308 } else if (element is FunctionTypeAliasElement) {
309 importedTypeSuggestions.add(suggestion);
308 } else if (element is ClassElement) { 310 } else if (element is ClassElement) {
309 importedTypeSuggestions.add(suggestion); 311 importedTypeSuggestions.add(suggestion);
310 _addConstructorSuggestions(element, relevance); 312 _addConstructorSuggestions(element, relevance);
311 } else { 313 } else {
312 otherImportedSuggestions.add(suggestion); 314 otherImportedSuggestions.add(suggestion);
313 } 315 }
314 _importedCompletions.add(suggestion.completion); 316 _importedCompletions.add(suggestion.completion);
315 } 317 }
316 318
317 /** 319 /**
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 @override 378 @override
377 void visitFunctionTypeAliasElement(FunctionTypeAliasElement element) { 379 void visitFunctionTypeAliasElement(FunctionTypeAliasElement element) {
378 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT); 380 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT);
379 } 381 }
380 382
381 @override 383 @override
382 void visitTopLevelVariableElement(TopLevelVariableElement element) { 384 void visitTopLevelVariableElement(TopLevelVariableElement element) {
383 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT); 385 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT);
384 } 386 }
385 } 387 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/imported_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698