@@ -1112,6 +1112,7 @@ class Library extends ModelElement {
11121112 .where ((element) => element is ClassElement && ! element.isEnum));
11131113
11141114 _classes = types.where (isPublic).map ((e) {
1115+ if (e.name == 'ExportedClass' ) _getOriginalPublicContainingLibrary (e);
11151116 if (e.library != this ._library &&
11161117 _exportedNamespace.definedNames.values.contains (e) &&
11171118 package._libraryElements.contains (e.library)) {
@@ -1124,6 +1125,26 @@ class Library extends ModelElement {
11241125 return _classes;
11251126 }
11261127
1128+ void _getOriginalPublicContainingLibrary (Element e) {
1129+ // _library.exportedLibraries.forEach((lib) {
1130+ // if (lib.publicNamespace.definedNames.isNotEmpty &&
1131+ // lib.publicNamespace.definedNames.values.contains(e)) {
1132+ // print("YYYY ${lib.name} has ${e.name}");
1133+ // }
1134+ // var ns = new NamespaceBuilder().createExportNamespaceForLibrary(lib);
1135+ // var ns2 = new NamespaceBuilder().createPublicNamespaceForLibrary(lib);
1136+ // print("XXX ${lib.name} public namespace: [" +
1137+ // lib.publicNamespace.definedNames.keys.join(', ') +
1138+ // "] and export ns [${ns.definedNames.keys.join(', ')}] " +
1139+ // " and total public namespace is [${ns2.definedNames.keys.join(', ')}]");
1140+ // });
1141+ _library.exports.forEach ((export) {
1142+ print (
1143+ "XXX ${_library .name } has export ${export .exportedLibrary .name } ${package ._libraryElements .contains (export .exportedLibrary )} with NS "
1144+ '${new NamespaceBuilder ().createExportNamespaceForDirective (export ).definedNames .keys .join (', ' )}' );
1145+ });
1146+ }
1147+
11271148 LibraryElement get _library => (element as LibraryElement );
11281149
11291150 Class getClassByName (String name) {
0 commit comments