| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:analyzer/src/generated/utilities_general.dart'; | 5 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 6 import 'package:path/path.dart' as path; | 6 import 'package:path/path.dart' as path; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Information about the root directory associated with an analysis context. | 9 * Information about the root directory associated with an analysis context. |
| 10 * | 10 * |
| 11 * Clients may not extend, implement or mix-in this class. | 11 * Clients may not extend, implement or mix-in this class. |
| 12 */ | 12 */ |
| 13 class ContextRoot { | 13 class ContextRoot { |
| 14 /** | 14 /** |
| 15 * The absolute path of the root directory containing the files to be | 15 * The absolute path of the root directory containing the files to be |
| 16 * analyzed. | 16 * analyzed. |
| 17 */ | 17 */ |
| 18 final String root; | 18 final String root; |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * A list of the absolute paths of files and directories within the root | 21 * A list of the absolute paths of files and directories within the root |
| 22 * directory that should not be analyzed. | 22 * directory that should not be analyzed. |
| 23 */ | 23 */ |
| 24 final List<String> exclude; | 24 final List<String> exclude; |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * An informative value for the file path that the analysis options were read |
| 28 * from. This value can be `null` if there is no analysis options file or if |
| 29 * the location of the file has not yet been discovered. |
| 30 */ |
| 31 String optionsFilePath; |
| 32 |
| 33 /** |
| 27 * Initialize a newly created context root. | 34 * Initialize a newly created context root. |
| 28 */ | 35 */ |
| 29 ContextRoot(this.root, this.exclude); | 36 ContextRoot(this.root, this.exclude); |
| 30 | 37 |
| 31 @override | 38 @override |
| 32 int get hashCode { | 39 int get hashCode { |
| 33 int hash = 0; | 40 int hash = 0; |
| 34 hash = JenkinsSmiHash.combine(hash, root.hashCode); | 41 hash = JenkinsSmiHash.combine(hash, root.hashCode); |
| 35 hash = JenkinsSmiHash.combine(hash, exclude.hashCode); | 42 hash = JenkinsSmiHash.combine(hash, exclude.hashCode); |
| 36 return JenkinsSmiHash.finish(hash); | 43 return JenkinsSmiHash.finish(hash); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 return false; | 85 return false; |
| 79 } | 86 } |
| 80 for (int i = 0; i < listA.length; i++) { | 87 for (int i = 0; i < listA.length; i++) { |
| 81 if (!itemEqual(listA[i], listB[i])) { | 88 if (!itemEqual(listA[i], listB[i])) { |
| 82 return false; | 89 return false; |
| 83 } | 90 } |
| 84 } | 91 } |
| 85 return true; | 92 return true; |
| 86 } | 93 } |
| 87 } | 94 } |
| OLD | NEW |