| 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.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 bool isDeprecated = _isDeprecated(fieldDecl) || _isDeprecated(varDecl); | 108 bool isDeprecated = _isDeprecated(fieldDecl) || _isDeprecated(varDecl); |
| 109 CompletionSuggestion suggestion = _addSuggestion( | 109 CompletionSuggestion suggestion = _addSuggestion( |
| 110 varDecl.name, | 110 varDecl.name, |
| 111 fieldDecl.fields.type, | 111 fieldDecl.fields.type, |
| 112 fieldDecl.parent, | 112 fieldDecl.parent, |
| 113 isDeprecated); | 113 isDeprecated); |
| 114 if (suggestion != null) { | 114 if (suggestion != null) { |
| 115 suggestion.element = _createElement( | 115 suggestion.element = _createElement( |
| 116 protocol.ElementKind.GETTER, | 116 protocol.ElementKind.GETTER, |
| 117 varDecl.name, | 117 varDecl.name, |
| 118 '()', | 118 null, |
| 119 fieldDecl.fields.type, | 119 fieldDecl.fields.type, |
| 120 false, | 120 false, |
| 121 isDeprecated); | 121 isDeprecated); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| 125 @override | 125 @override |
| 126 void declaredFunction(FunctionDeclaration declaration) { | 126 void declaredFunction(FunctionDeclaration declaration) { |
| 127 if (typesOnly) { | 127 if (typesOnly) { |
| 128 return; | 128 return; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 if (name == null || name.length <= 0) { | 376 if (name == null || name.length <= 0) { |
| 377 return DYNAMIC; | 377 return DYNAMIC; |
| 378 } | 378 } |
| 379 TypeArgumentList typeArgs = type.typeArguments; | 379 TypeArgumentList typeArgs = type.typeArguments; |
| 380 if (typeArgs != null) { | 380 if (typeArgs != null) { |
| 381 //TODO (danrubel) include type arguments | 381 //TODO (danrubel) include type arguments |
| 382 } | 382 } |
| 383 return name; | 383 return name; |
| 384 } | 384 } |
| 385 } | 385 } |
| OLD | NEW |