| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:analyzer/dart/element/element.dart'; | 5 import 'package:analyzer/dart/element/element.dart'; |
| 6 import 'package:analyzer/dart/element/type.dart'; | 6 import 'package:analyzer/dart/element/type.dart'; |
| 7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
| 8 import 'package:analyzer/src/generated/utilities_dart.dart'; | 8 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 9 import 'package:analyzer_plugin/protocol/protocol_common.dart' | 9 import 'package:analyzer_plugin/protocol/protocol_common.dart' |
| 10 hide Element, ElementKind; | 10 hide Element, ElementKind; |
| 11 import 'package:analyzer_plugin/src/utilities/documentation.dart'; | 11 import 'package:analyzer_plugin/src/utilities/documentation.dart'; |
| 12 import 'package:analyzer_plugin/utilities/analyzer_converter.dart'; | 12 import 'package:analyzer_plugin/utilities/analyzer_converter.dart'; |
| 13 import 'package:analyzer_plugin/utilities/completion/relevance.dart'; | 13 import 'package:analyzer_plugin/utilities/completion/relevance.dart'; |
| 14 import 'package:analyzer_plugin/utilities/completion/suggestion_builder.dart'; | 14 import 'package:analyzer_plugin/utilities/completion/suggestion_builder.dart'; |
| 15 import 'package:front_end/src/base/source.dart' show Source; | 15 import 'package:analyzer/src/generated/source.dart' show Source, UriKind; |
| 16 import 'package:front_end/src/base/uri_kind.dart'; | |
| 17 | 16 |
| 18 /** | 17 /** |
| 19 * An object used to build code completion suggestions for Dart code. | 18 * An object used to build code completion suggestions for Dart code. |
| 20 */ | 19 */ |
| 21 class SuggestionBuilderImpl implements SuggestionBuilder { | 20 class SuggestionBuilderImpl implements SuggestionBuilder { |
| 22 /** | 21 /** |
| 23 * The resource provider used to access the file system. | 22 * The resource provider used to access the file system. |
| 24 */ | 23 */ |
| 25 final ResourceProvider resourceProvider; | 24 final ResourceProvider resourceProvider; |
| 26 | 25 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } else if (element is VariableElement) { | 183 } else if (element is VariableElement) { |
| 185 DartType type = element.type; | 184 DartType type = element.type; |
| 186 return type != null ? type.displayName : 'dynamic'; | 185 return type != null ? type.displayName : 'dynamic'; |
| 187 } else if (element is FunctionTypeAliasElement) { | 186 } else if (element is FunctionTypeAliasElement) { |
| 188 return element.returnType.toString(); | 187 return element.returnType.toString(); |
| 189 } else { | 188 } else { |
| 190 return null; | 189 return null; |
| 191 } | 190 } |
| 192 } | 191 } |
| 193 } | 192 } |
| OLD | NEW |