src/vs/workbench/services/views/browser/viewDescriptorService.ts/ViewDescriptorService/getOrRegisterViewContainerModel
class ViewDescriptorService:	private getOrRegisterViewContainerModel(viewContainer: ViewContainer): ViewContainerModel {
		let viewContainerModel = this.viewContainerModels.get(viewContainer)?.viewContainerModel;

		if (!viewContainerModel) {
			const disposables = new DisposableStore();
			viewContainerModel = disposables.add(this.instantiationService.createInstance(ViewContainerModel, viewContainer));

			this.onDidChangeActiveViews({ added: viewContainerModel.activeViewDescriptors, removed: [] });
			viewContainerModel.onDidChangeActiveViewDescriptors(changed => this.onDidChangeActiveViews(changed), this, disposables);

			this.onDidChangeVisibleViews({ added: [...viewContainerModel.visibleViewDescriptors], removed: [] });
			viewContainerModel.onDidAddVisibleViewDescriptors(added => this.onDidChangeVisibleViews({ added: added.map(({ viewDescriptor }) => viewDescriptor), removed: [] }), this, disposables);
			viewContainerModel.onDidRemoveVisibleViewDescriptors(removed => this.onDidChangeVisibleViews({ added: [], removed: removed.map(({ viewDescriptor }) => viewDescriptor) }), this, disposables);

			this.registerViewsVisibilityActions(viewContainerModel);
			disposables.add(Event.any(
				viewContainerModel.onDidChangeActiveViewDescriptors,
				viewContainerModel.onDidAddVisibleViewDescriptors,
				viewContainerModel.onDidRemoveVisibleViewDescriptors,
				viewContainerModel.onDidMoveVisibleViewDescriptors
			)(e => this.registerViewsVisibilityActions(viewContainerModel!)));
			disposables.add(toDisposable(() => {
				this.viewsVisibilityActionDisposables.get(viewContainer)?.dispose();
				this.viewsVisibilityActionDisposables.delete(viewContainer);
			}));

			disposables.add(this.registerResetViewContainerAction(viewContainer));

			this.viewContainerModels.set(viewContainer, { viewContainerModel: viewContainerModel, disposable: disposables });

			// Register all views that were statically registered to this container
			// Potentially, this is registering something that was handled by another container
			// addViews() handles this by filtering views that are already registered
			this.onDidRegisterViews([{ views: this.viewsRegistry.getViews(viewContainer), viewContainer }]);

			// Add views that were registered prior to this view container
			const viewsToRegister = this.getViewsByContainer(viewContainer).filter(view => this.getDefaultContainerById(view.id) !== viewContainer);
			if (viewsToRegister.length) {
				this.addViews(viewContainer, viewsToRegister);
				this.contextKeyService.bufferChangeEvents(() => {
					viewsToRegister.forEach(viewDescriptor => this.getOrCreateMovableViewContextKey(viewDescriptor).set(!!viewDescriptor.canMoveView));
				});
			}
		}

		return viewContainerModel;
	}