| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/summary/format.dart'; | 5 import 'package:analyzer/src/summary/format.dart'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Create a [PrelinkedLibraryBuilder] corresponding to the given | 8 * Create a [PrelinkedLibraryBuilder] corresponding to the given |
| 9 * [definingUnit], which should be the defining compilation unit for a library. | 9 * [definingUnit], which should be the defining compilation unit for a library. |
| 10 * Compilation units referenced by the defining compilation unit via `part` | 10 * Compilation units referenced by the defining compilation unit via `part` |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 return result; | 86 return result; |
| 87 } | 87 } |
| 88 | 88 |
| 89 const NameFilter._({this.shownNames, this.hiddenNames}); | 89 const NameFilter._({this.shownNames, this.hiddenNames}); |
| 90 | 90 |
| 91 /** | 91 /** |
| 92 * Determine if the given [name] is accepted by this [NameFilter]. | 92 * Determine if the given [name] is accepted by this [NameFilter]. |
| 93 */ | 93 */ |
| 94 bool accepts(String name) { | 94 bool accepts(String name) { |
| 95 if (name.endsWith('=')) { |
| 96 name = name.substring(0, name.length - 1); |
| 97 } |
| 95 if (shownNames != null) { | 98 if (shownNames != null) { |
| 96 return shownNames.contains(name); | 99 return shownNames.contains(name); |
| 97 } else { | 100 } else { |
| 98 return !hiddenNames.contains(name); | 101 return !hiddenNames.contains(name); |
| 99 } | 102 } |
| 100 } | 103 } |
| 101 | 104 |
| 102 /** | 105 /** |
| 103 * Produce a new [NameFilter] by combining this [NameFilter] with another | 106 * Produce a new [NameFilter] by combining this [NameFilter] with another |
| 104 * one. The new [NameFilter] will only accept names that would be accepted | 107 * one. The new [NameFilter] will only accept names that would be accepted |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 * [sourceUri] is also relative. | 494 * [sourceUri] is also relative. |
| 492 */ | 495 */ |
| 493 String resolveUri(String sourceUri, String relativeUri) { | 496 String resolveUri(String sourceUri, String relativeUri) { |
| 494 if (sourceUri == null) { | 497 if (sourceUri == null) { |
| 495 return relativeUri; | 498 return relativeUri; |
| 496 } else { | 499 } else { |
| 497 return Uri.parse(sourceUri).resolve(relativeUri).toString(); | 500 return Uri.parse(sourceUri).resolve(relativeUri).toString(); |
| 498 } | 501 } |
| 499 } | 502 } |
| 500 } | 503 } |
| OLD | NEW |