| 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 import 'package:analyzer/src/summary/name_filter.dart'; | 6 import 'package:analyzer/src/summary/name_filter.dart'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Create a [LinkedLibraryBuilder] corresponding to the given | 9 * Create a [LinkedLibraryBuilder] corresponding to the given |
| 10 * [definingUnit], which should be the defining compilation unit for a library. | 10 * [definingUnit], which should be the defining compilation unit for a library. |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 for (int unitNum = 0; unitNum < unitUris.length; unitNum++) { | 186 for (int unitNum = 0; unitNum < unitUris.length; unitNum++) { |
| 187 String unitUri = unitUris[unitNum]; | 187 String unitUri = unitUris[unitNum]; |
| 188 UnlinkedPublicNamespace importedNamespace = getImportCached(unitUri); | 188 UnlinkedPublicNamespace importedNamespace = getImportCached(unitUri); |
| 189 if (importedNamespace == null) { | 189 if (importedNamespace == null) { |
| 190 continue; | 190 continue; |
| 191 } | 191 } |
| 192 for (UnlinkedPublicName name in importedNamespace.names) { | 192 for (UnlinkedPublicName name in importedNamespace.names) { |
| 193 aggregated.putIfAbsent(name.name, () { | 193 aggregated.putIfAbsent(name.name, () { |
| 194 if (name.kind == ReferenceKind.classOrEnum) { | 194 if (name.kind == ReferenceKind.classOrEnum) { |
| 195 Map<String, _Meaning> namespace = <String, _Meaning>{}; | 195 Map<String, _Meaning> namespace = <String, _Meaning>{}; |
| 196 name.executables.forEach((executable) { | 196 name.constMembers.forEach((executable) { |
| 197 namespace[executable.name] = new _Meaning(unitNum, | 197 namespace[executable.name] = new _Meaning(unitNum, |
| 198 executable.kind, dependency, executable.numTypeParameters); | 198 executable.kind, dependency, executable.numTypeParameters); |
| 199 }); | 199 }); |
| 200 return new _ClassMeaning( | 200 return new _ClassMeaning( |
| 201 unitNum, dependency, name.numTypeParameters, namespace); | 201 unitNum, dependency, name.numTypeParameters, namespace); |
| 202 } | 202 } |
| 203 return new _Meaning( | 203 return new _Meaning( |
| 204 unitNum, name.kind, dependency, name.numTypeParameters); | 204 unitNum, name.kind, dependency, name.numTypeParameters); |
| 205 }); | 205 }); |
| 206 } | 206 } |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 * [sourceUri] is also relative. | 476 * [sourceUri] is also relative. |
| 477 */ | 477 */ |
| 478 String resolveUri(String sourceUri, String relativeUri) { | 478 String resolveUri(String sourceUri, String relativeUri) { |
| 479 if (sourceUri == null) { | 479 if (sourceUri == null) { |
| 480 return relativeUri; | 480 return relativeUri; |
| 481 } else { | 481 } else { |
| 482 return Uri.parse(sourceUri).resolve(relativeUri).toString(); | 482 return Uri.parse(sourceUri).resolve(relativeUri).toString(); |
| 483 } | 483 } |
| 484 } | 484 } |
| 485 } | 485 } |
| OLD | NEW |