-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsourceControl.d.ts
More file actions
85 lines (73 loc) · 2.11 KB
/
sourceControl.d.ts
File metadata and controls
85 lines (73 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { Event } from "../../base/event";
export interface SourceControl {
readonly id: string;
readonly label: string;
readonly rootUri?: string;
readonly inputBox: SourceControlInputBox;
count?: number;
commandActions: SourceControlCommandAction[] | undefined;
actionButton: SourceControlActionButton | undefined;
readonly selected: boolean;
createResourceGroup(id: string, label: string): SourceControlResourceGroup;
readonly onDidChangeSelection: Event<boolean>;
dispose(): void;
}
export interface SourceControlInputBox {
value: string;
readonly onDidChange: Event<string>;
placeholder: string;
enabled: boolean;
visible: boolean;
}
export interface SourceControlResourceGroup {
readonly id: string;
label: string;
hideWhenEmpty?: boolean;
resourceStates: SourceControlResourceState[];
dispose(): void;
}
export interface SourceControlResourceState {
readonly resourceUri: string;
decorations?: SourceControlResourceDecorations;
command?: SourceControlCommandAction;
}
export interface SourceControlResourceDecorations {
icon?: string;
strikeThrough?: boolean;
}
export interface SourceControlActionButton {
command: SourceControlCommandAction;
secondaryCommands?: SourceControlCommandAction[][];
enabled: boolean;
}
export interface SourceControlCommandAction {
id: string;
title: string;
arguments?: unknown[];
}
export interface SourceControlProgess {
show(): void;
hide(): void;
}
export interface SourceControlViewWelcomeContent {
readonly content: string;
when(): boolean | 'default';
}
export interface SourceControlViewContainer {
registerViewWelcomeContent(viewContent: SourceControlViewWelcomeContent): any;
updateViews(): void;
getProgress(): SourceControlProgess;
}
export interface SourceControlMenuContext {
scmProvider?: string;
scmProviderRootUri?: string;
scmProviderHasRoorUri?: boolean;
scmResourceGroup?: string;
}
export interface SourceControlMenuItem {
command: SourceControlCommandAction;
group?: 'navigation' | string;
submenu?: boolean;
enablement?: () => boolean;
when?: (context: SourceControlMenuContext) => boolean;
}