getOrCreateAnalysisContext method

AnalysisContextCollection getOrCreateAnalysisContext()

Phase 4 / summary-refactoring-plan: expose the primary analysis context so downstream stages (notably generateProxies in proxy_generator.dart) can reuse it instead of building a second summary-loaded AnalysisContextCollectionImpl per project.

Lazily initializes the context on first access, matching _getAnalysisContext's behavior. Returns the same instance on every call so summary bundles are loaded exactly once.

Implementation

AnalysisContextCollection getOrCreateAnalysisContext() =>
    _getAnalysisContext();