ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART));
}
//
// Create and populate the library element.
//
LibraryElementImpl libraryElement = new LibraryElementImpl(
analysisContext.getContextFor(librarySource),
libraryNameNode);
libraryElement.setDefiningCompilationUnit(definingCompilationUnitElement);
if (entryPoint != null) {
libraryElement.setEntryPoint(entryPoint);
}
int sourcedUnitCount = sourcedCompilationUnits.size();
libraryElement.setParts(sourcedCompilationUnits.toArray(new CompilationUnitElementImpl[sourcedUnitCount]));
for (Directive directive : directivesToResolve) {
directive.setElement(libraryElement);
}
library.setLibraryElement(libraryElement);
if (sourcedUnitCount > 0) {