| OLD | NEW |
| 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.arglist; | 5 library services.completion.computer.dart.arglist; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol_server.dart' | 9 import 'package:analysis_server/src/protocol_server.dart' |
| 10 hide Element, ElementKind; | 10 hide Element, ElementKind; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 @override | 48 @override |
| 49 _ArgListSuggestionBuilder visitArgumentList(ArgumentList node) { | 49 _ArgListSuggestionBuilder visitArgumentList(ArgumentList node) { |
| 50 Token leftParen = node.leftParenthesis; | 50 Token leftParen = node.leftParenthesis; |
| 51 if (leftParen != null && request.offset > leftParen.offset) { | 51 if (leftParen != null && request.offset > leftParen.offset) { |
| 52 AstNode parent = node.parent; | 52 AstNode parent = node.parent; |
| 53 if (parent is MethodInvocation) { | 53 if (parent is MethodInvocation) { |
| 54 SimpleIdentifier selector = parent.methodName; | 54 SimpleIdentifier selector = parent.methodName; |
| 55 if (selector != null) { | 55 if (selector != null) { |
| 56 String name = selector.name; | 56 String name = selector.name; |
| 57 if (name != null && name.length > 0) { | 57 if (name != null && name.length > 0) { |
| 58 if (parent.period == null) { | 58 if (parent.operator == null) { |
| 59 /* | 59 /* |
| 60 * If a local declaration is found, then return null | 60 * If a local declaration is found, then return null |
| 61 * indicating that suggestions were added | 61 * indicating that suggestions were added |
| 62 * and no further action is necessary | 62 * and no further action is necessary |
| 63 */ | 63 */ |
| 64 if (new _LocalDeclarationFinder(request, request.offset, name) | 64 if (new _LocalDeclarationFinder(request, request.offset, name) |
| 65 .visit(node)) { | 65 .visit(node)) { |
| 66 return null; | 66 return null; |
| 67 } | 67 } |
| 68 } else { | 68 } else { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 if (id != null) { | 192 if (id != null) { |
| 193 String name = id.name; | 193 String name = id.name; |
| 194 if (name != null && name.length > 0) { | 194 if (name != null && name.length > 0) { |
| 195 return name; | 195 return name; |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 return 'dynamic'; | 199 return 'dynamic'; |
| 200 } | 200 } |
| 201 } | 201 } |
| OLD | NEW |