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.sorter.common; |
| 6 |
5 import 'dart:async'; | 7 import 'dart:async'; |
6 | 8 |
7 import 'package:analysis_server/src/protocol_server.dart' as protocol; | 9 import 'package:analysis_server/src/protocol_server.dart' as protocol; |
8 import 'package:analysis_server/src/protocol_server.dart' | 10 import 'package:analysis_server/src/protocol_server.dart' |
9 show CompletionSuggestion, CompletionSuggestionKind; | 11 show CompletionSuggestion, CompletionSuggestionKind; |
10 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; | 12 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; |
11 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 13 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
12 import 'package:analysis_server/src/services/completion/dart/contribution_sorter
.dart'; | 14 import 'package:analysis_server/src/services/completion/dart/contribution_sorter
.dart'; |
13 import 'package:analyzer/dart/ast/ast.dart'; | 15 import 'package:analyzer/dart/ast/ast.dart'; |
14 import 'package:analyzer/dart/ast/visitor.dart'; | 16 import 'package:analyzer/dart/ast/visitor.dart'; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 DartType visitNode(AstNode node) { | 118 DartType visitNode(AstNode node) { |
117 return null; | 119 return null; |
118 } | 120 } |
119 | 121 |
120 DartType visitPrefixedIdentifier(PrefixedIdentifier node) => | 122 DartType visitPrefixedIdentifier(PrefixedIdentifier node) => |
121 node.identifier == entity ? node.prefix?.bestType : null; | 123 node.identifier == entity ? node.prefix?.bestType : null; |
122 | 124 |
123 DartType visitPropertyAccess(PropertyAccess node) => | 125 DartType visitPropertyAccess(PropertyAccess node) => |
124 node.propertyName == entity ? node.realTarget?.bestType : null; | 126 node.propertyName == entity ? node.realTarget?.bestType : null; |
125 } | 127 } |
OLD | NEW |