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

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

Issue 639133003: import directive suggestion fix (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/test/services/completion/completion_test_util.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.computer.dart.local; 5 library services.completion.computer.dart.local;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element,
10 ElementKind; 10 ElementKind;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 visitNode(node); 198 visitNode(node);
199 } 199 }
200 200
201 @override 201 @override
202 visitMethodDeclaration(MethodDeclaration node) { 202 visitMethodDeclaration(MethodDeclaration node) {
203 _addParamListSuggestions(node.parameters); 203 _addParamListSuggestions(node.parameters);
204 visitNode(node); 204 visitNode(node);
205 } 205 }
206 206
207 @override 207 @override
208 visitNamespaceDirective(NamespaceDirective node) {
209 // No suggestions
210 }
211
212 @override
208 visitNode(AstNode node) { 213 visitNode(AstNode node) {
209 node.parent.accept(this); 214 node.parent.accept(this);
210 } 215 }
211 216
212 @override 217 @override
213 visitPrefixedIdentifier(PrefixedIdentifier node) { 218 visitPrefixedIdentifier(PrefixedIdentifier node) {
214 // InvocationComputer adds suggestions for prefixed elements 219 // InvocationComputer adds suggestions for prefixed elements
215 // but this computer adds suggestions for the prefix itself 220 // but this computer adds suggestions for the prefix itself
216 SimpleIdentifier prefix = node.prefix; 221 SimpleIdentifier prefix = node.prefix;
217 if (prefix == null || request.offset <= prefix.end) { 222 if (prefix == null || request.offset <= prefix.end) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 if (name == null || name.length <= 0) { 481 if (name == null || name.length <= 0) {
477 return DYNAMIC; 482 return DYNAMIC;
478 } 483 }
479 TypeArgumentList typeArgs = type.typeArguments; 484 TypeArgumentList typeArgs = type.typeArguments;
480 if (typeArgs != null) { 485 if (typeArgs != null) {
481 //TODO (danrubel) include type arguments 486 //TODO (danrubel) include type arguments
482 } 487 }
483 return name; 488 return name;
484 } 489 }
485 } 490 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698