OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.dart.suggestion.builder; | |
6 | |
7 import 'package:analysis_server/src/ide_options.dart'; | 5 import 'package:analysis_server/src/ide_options.dart'; |
8 import 'package:analysis_server/src/protocol_server.dart' as protocol; | 6 import 'package:analysis_server/src/protocol_server.dart' as protocol; |
9 import 'package:analysis_server/src/protocol_server.dart' | 7 import 'package:analysis_server/src/protocol_server.dart' |
10 hide Element, ElementKind; | 8 hide Element, ElementKind; |
11 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
12 import 'package:analysis_server/src/services/completion/dart/utilities.dart'; | 10 import 'package:analysis_server/src/services/completion/dart/utilities.dart'; |
13 import 'package:analysis_server/src/utilities/documentation.dart'; | 11 import 'package:analysis_server/src/utilities/documentation.dart'; |
14 import 'package:analyzer/dart/element/element.dart'; | 12 import 'package:analyzer/dart/element/element.dart'; |
15 import 'package:analyzer/dart/element/type.dart'; | 13 import 'package:analyzer/dart/element/type.dart'; |
16 import 'package:analyzer/dart/element/visitor.dart'; | 14 import 'package:analyzer/dart/element/visitor.dart'; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 @override | 283 @override |
286 visitTopLevelVariableElement(TopLevelVariableElement element) { | 284 visitTopLevelVariableElement(TopLevelVariableElement element) { |
287 if (!typesOnly) { | 285 if (!typesOnly) { |
288 int relevance = element.library == containingLibrary | 286 int relevance = element.library == containingLibrary |
289 ? DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE | 287 ? DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE |
290 : DART_RELEVANCE_DEFAULT; | 288 : DART_RELEVANCE_DEFAULT; |
291 addSuggestion(element, options, relevance: relevance); | 289 addSuggestion(element, options, relevance: relevance); |
292 } | 290 } |
293 } | 291 } |
294 } | 292 } |
OLD | NEW |