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

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

Issue 1127643003: suggest only superclass elements for "super." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 7 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/suggestion_builder.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.contributor.dart.invocation; 5 library services.completion.contributor.dart.invocation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
10 import 'package:analysis_server/src/services/completion/local_declaration_visito r.dart'; 10 import 'package:analysis_server/src/services/completion/local_declaration_visito r.dart';
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 node = (node as PropertyAccess).realTarget; 66 node = (node as PropertyAccess).realTarget;
67 } 67 }
68 if (node is Identifier) { 68 if (node is Identifier) {
69 Element elem = node.bestElement; 69 Element elem = node.bestElement;
70 if (elem is ClassElement || elem is PrefixElement) { 70 if (elem is ClassElement || elem is PrefixElement) {
71 elem.accept(new _PrefixedIdentifierSuggestionBuilder(request)); 71 elem.accept(new _PrefixedIdentifierSuggestionBuilder(request));
72 return new Future.value(true); 72 return new Future.value(true);
73 } 73 }
74 } 74 }
75 if (node is Expression) { 75 if (node is Expression) {
76 InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType); 76 InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType,
77 isSuper: node is SuperExpression);
77 return new Future.value(true); 78 return new Future.value(true);
78 } 79 }
79 return new Future.value(false); 80 return new Future.value(false);
80 } 81 }
81 } 82 }
82 83
83 /** 84 /**
84 * A suggestion builder for 'this.' constructor arguments. 85 * A suggestion builder for 'this.' constructor arguments.
85 */ 86 */
86 class _FieldFormalSuggestionBuilder implements SuggestionBuilder { 87 class _FieldFormalSuggestionBuilder implements SuggestionBuilder {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 426 }
426 return new Future.value(false); 427 return new Future.value(false);
427 } 428 }
428 429
429 @override 430 @override
430 Future<bool> visitVariableElement(VariableElement element) { 431 Future<bool> visitVariableElement(VariableElement element) {
431 InterfaceTypeSuggestionBuilder.suggestionsFor(request, element.type); 432 InterfaceTypeSuggestionBuilder.suggestionsFor(request, element.type);
432 return new Future.value(true); 433 return new Future.value(true);
433 } 434 }
434 } 435 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698