Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/outline/browser/outline.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
7
import type { IView } from '../../../common/views.js';
8
9
export const enum OutlineSortOrder {
10
ByPosition,
11
ByName,
12
ByKind
13
}
14
15
export interface IOutlineViewState {
16
followCursor: boolean;
17
filterOnType: boolean;
18
sortBy: OutlineSortOrder;
19
}
20
21
export namespace IOutlinePane {
22
export const Id = 'outline';
23
}
24
25
export interface IOutlinePane extends IView {
26
outlineViewState: IOutlineViewState;
27
collapseAll(): void;
28
expandAll(): void;
29
}
30
31
// --- context keys
32
33
export const ctxFollowsCursor = new RawContextKey<boolean>('outlineFollowsCursor', false);
34
export const ctxFilterOnType = new RawContextKey<boolean>('outlineFiltersOnType', false);
35
export const ctxSortMode = new RawContextKey<OutlineSortOrder>('outlineSortMode', OutlineSortOrder.ByPosition);
36
export const ctxAllCollapsed = new RawContextKey<boolean>('outlineAllCollapsed', false);
37
export const ctxFocused = new RawContextKey<boolean>('outlineFocused', true);
38
39