src/vs/workbench/services/views/common/viewContainerModel.ts/ViewContainerModel/updateVisibility
class ViewContainerModel:	private updateVisibility(viewDescriptors: { id: string, visible: boolean, size?: number }[]): void {
		const added: IAddedViewDescriptorRef[] = [];
		const removed: IViewDescriptorRef[] = [];

		for (const { id, visible, size } of viewDescriptors) {
			const foundViewDescriptor = this.findAndIgnoreIfNotFound(id);
			if (!foundViewDescriptor) {
				continue;
			}

			const { viewDescriptorItem, visibleIndex } = foundViewDescriptor;
			const viewDescriptor = viewDescriptorItem.viewDescriptor;

			if (!viewDescriptor.canToggleVisibility) {
				continue;
			}

			if (this.isViewDescriptorVisibleWhenActive(viewDescriptorItem) === visible) {
				continue;
			}

			if (viewDescriptor.workspace) {
				viewDescriptorItem.state.visibleWorkspace = visible;
			} else {
				viewDescriptorItem.state.visibleGlobal = visible;
			}

			if (typeof viewDescriptorItem.state.size === 'number') {
				viewDescriptorItem.state.size = size;
			}

			if (this.isViewDescriptorVisible(viewDescriptorItem) !== visible) {
				// do not add events if visibility is not changed
				continue;
			}

			if (visible) {
				added.push({ index: visibleIndex, viewDescriptor, size: viewDescriptorItem.state.size, collapsed: !!viewDescriptorItem.state.collapsed });
			} else {
				removed.push({ index: visibleIndex, viewDescriptor });
			}
		}

		if (added.length) {
			this.triggerOnDidAddVisibleViewDescriptors(added);
		}
		if (removed.length) {
			this._onDidRemoveVisibleViewDescriptors.fire(removed);
		}
	}