| 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.search_engine; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 | 6 |
| 9 import 'package:analyzer/dart/element/element.dart'; | 7 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/source.dart'; | 8 import 'package:analyzer/src/generated/source.dart'; |
| 11 | 9 |
| 12 /** | 10 /** |
| 13 * Instances of the enum [MatchKind] represent the kind of reference that was | 11 * Instances of the enum [MatchKind] represent the kind of reference that was |
| 14 * found when a match represents a reference to an element. | 12 * found when a match represents a reference to an element. |
| 15 */ | 13 */ |
| 16 class MatchKind { | 14 class MatchKind { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 /** | 155 /** |
| 158 * Return elements of [matches] which has not-null elements. | 156 * Return elements of [matches] which has not-null elements. |
| 159 * | 157 * |
| 160 * When [SearchMatch.element] is not `null` we cache its value, so it cannot | 158 * When [SearchMatch.element] is not `null` we cache its value, so it cannot |
| 161 * become `null` later. | 159 * become `null` later. |
| 162 */ | 160 */ |
| 163 static List<SearchMatch> withNotNullElement(List<SearchMatch> matches) { | 161 static List<SearchMatch> withNotNullElement(List<SearchMatch> matches) { |
| 164 return matches.where((match) => match.element != null).toList(); | 162 return matches.where((match) => match.element != null).toList(); |
| 165 } | 163 } |
| 166 } | 164 } |
| OLD | NEW |