| 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.dart.cache; | 5 library services.completion.dart.cache; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/protocol_server.dart' | 10 import 'package:analysis_server/src/protocol_server.dart' |
| 11 hide Element, ElementKind; | 11 hide Element, ElementKind; |
| 12 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; | 12 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; |
| 13 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 13 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 14 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; | 14 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; |
| 15 import 'package:analysis_server/src/services/search/search_engine.dart'; | 15 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 16 import 'package:analyzer/src/generated/ast.dart'; | 16 import 'package:analyzer/src/generated/ast.dart'; |
| 17 import 'package:analyzer/src/generated/element.dart'; | 17 import 'package:analyzer/src/generated/element.dart'; |
| 18 import 'package:analyzer/src/generated/engine.dart'; | 18 import 'package:analyzer/src/generated/engine.dart'; |
| 19 import 'package:analyzer/src/generated/resolver.dart'; | 19 import 'package:analyzer/src/generated/resolver.dart'; |
| 20 import 'package:analyzer/src/generated/source.dart'; | 20 import 'package:analyzer/src/generated/source.dart'; |
| 21 import 'package:analyzer/src/generated/sdk.dart'; | |
| 22 | 21 |
| 23 /** | 22 /** |
| 24 * The `DartCompletionCache` contains cached information from a prior code | 23 * The `DartCompletionCache` contains cached information from a prior code |
| 25 * completion operation. | 24 * completion operation. |
| 26 */ | 25 */ |
| 27 class DartCompletionCache extends CompletionCache { | 26 class DartCompletionCache extends CompletionCache { |
| 28 | 27 |
| 29 /** | 28 /** |
| 30 * A hash of the import directives | 29 * A hash of the import directives |
| 31 * or `null` if nothing has been cached. | 30 * or `null` if nothing has been cached. |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 @override | 398 @override |
| 400 void visitFunctionTypeAliasElement(FunctionTypeAliasElement element) { | 399 void visitFunctionTypeAliasElement(FunctionTypeAliasElement element) { |
| 401 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT); | 400 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT); |
| 402 } | 401 } |
| 403 | 402 |
| 404 @override | 403 @override |
| 405 void visitTopLevelVariableElement(TopLevelVariableElement element) { | 404 void visitTopLevelVariableElement(TopLevelVariableElement element) { |
| 406 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT); | 405 cache._addSuggestion(element, DART_RELEVANCE_DEFAULT); |
| 407 } | 406 } |
| 408 } | 407 } |
| OLD | NEW |