initializePackageGraph method

Future<void> initializePackageGraph()

Call after all libraries are added.


Future<void> initializePackageGraph() async {
  allLibrariesAdded = true;
  // From here on in, we might find special objects.  Initialize the
  // specialClasses handler so when we find them, they get added.
  specialClasses = SpecialClasses();
  // Go through docs of every ModelElement in package to pre-build the macros
  // index.
  await Future.wait(precacheLocalDocs());
  _localDocumentationBuilt = true;

  // Scan all model elements to insure that interceptor and other special
  // objects are found.
  // Emit warnings for any local package that has no libraries.
  // After the allModelElements traversal to be sure that all packages
  // are picked up.
  for (var package in documentedPackages) {
    for (var library in package.libraries) {
    if (package.isLocal && !package.hasPublicLibraries) {
  allImplementorsAdded = true;
  allExtensionsAdded = true;

  // We should have found all special classes by now.