src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts/BulkEditPane/toggleGrouping
class BulkEditPane:	toggleGrouping() {
		const input = this._tree.getInput();
		if (input) {

			// (1) capture view state
			let oldViewState = this._tree.getViewState();
			this._treeViewStates.set(this._treeDataSource.groupByFile, oldViewState);

			// (2) toggle and update
			this._treeDataSource.groupByFile = !this._treeDataSource.groupByFile;
			this._setTreeInput(input);

			// (3) remember preference
			this._storageService.store(BulkEditPane._memGroupByFile, this._treeDataSource.groupByFile, StorageScope.GLOBAL, StorageTarget.USER);
			this._ctxGroupByFile.set(this._treeDataSource.groupByFile);
		}
	}