| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of client_live_nav; |
| 6 |
| 5 /** | 7 /** |
| 6 * [SearchText] represent the search field text. The text is viewed in three | 8 * [SearchText] represent the search field text. The text is viewed in three |
| 7 * ways: [text] holds the original search text, used for performing | 9 * ways: [text] holds the original search text, used for performing |
| 8 * case-sensitive matches, [lowerCase] holds the lower-case search text, used | 10 * case-sensitive matches, [lowerCase] holds the lower-case search text, used |
| 9 * for performing case-insenstive matches, [camelCase] holds a camel-case | 11 * for performing case-insenstive matches, [camelCase] holds a camel-case |
| 10 * interpretation of the search text, used to order matches in camel-case. | 12 * interpretation of the search text, used to order matches in camel-case. |
| 11 */ | 13 */ |
| 12 class SearchText { | 14 class SearchText { |
| 13 final String text; | 15 final String text; |
| 14 final String lowerCase; | 16 final String lowerCase; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // Sort type alphabetically. | 217 // Sort type alphabetically. |
| 216 // TODO(4805): Use [:type.compareToIgnoreCase] when supported. | 218 // TODO(4805): Use [:type.compareToIgnoreCase] when supported. |
| 217 result = a.type.toLowerCase().compareTo(b.type.toLowerCase()); | 219 result = a.type.toLowerCase().compareTo(b.type.toLowerCase()); |
| 218 if (result != 0) return result; | 220 if (result != 0) return result; |
| 219 } | 221 } |
| 220 | 222 |
| 221 // Sort match alphabetically. | 223 // Sort match alphabetically. |
| 222 // TODO(4805): Use [:text.compareToIgnoreCase] when supported. | 224 // TODO(4805): Use [:text.compareToIgnoreCase] when supported. |
| 223 return a.match.text.toLowerCase().compareTo(b.match.text.toLowerCase()); | 225 return a.match.text.toLowerCase().compareTo(b.match.text.toLowerCase()); |
| 224 } | 226 } |
| OLD | NEW |