UNPKG

sussudio

Version:

An unofficial VS Code Internal API

19 lines (18 loc) 820 B
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Action } from "../../../common/actions.mjs"; import * as nls from "../../../../nls.mjs"; export class CollapseAllAction extends Action { viewer; constructor(viewer, enabled) { super('vs.tree.collapse', nls.localize('collapse all', "Collapse All"), 'collapse-all', enabled); this.viewer = viewer; } async run() { this.viewer.collapseAll(); this.viewer.setSelection([]); this.viewer.setFocus([]); } }