Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/contrib/stickyScroll/browser/stickyScrollElement.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 { URI } from '../../../../base/common/uri.js';
7
8
export class StickyRange {
9
constructor(
10
public readonly startLineNumber: number,
11
public readonly endLineNumber: number
12
) { }
13
}
14
15
export class StickyElement {
16
17
constructor(
18
/**
19
* Range of line numbers spanned by the current scope
20
*/
21
public readonly range: StickyRange | undefined,
22
/**
23
* Must be sorted by start line number
24
*/
25
public readonly children: StickyElement[],
26
/**
27
* Parent sticky outline element
28
*/
29
public readonly parent: StickyElement | undefined
30
) {
31
}
32
}
33
34
export class StickyModel {
35
constructor(
36
readonly uri: URI,
37
readonly version: number,
38
readonly element: StickyElement | undefined,
39
readonly outlineProviderId: string | undefined
40
) { }
41
}
42
43