@codingame/monaco-vscode-scm-service-override 11.1.2 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -1
- package/index.js +22 -1
- package/package.json +24 -7
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +34 -32
- package/vscode/src/vs/workbench/contrib/scm/browser/diff.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/diff.js +93 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +31 -32
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +153 -187
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +245 -217
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +31 -29
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +4 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +185 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +365 -336
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +17 -16
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +13 -13
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +9 -6
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.js +4 -2
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +13 -11
- package/scm.js +0 -17
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
2
|
+
import { ISCMViewService } from "vscode/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
3
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
import { IContextMenuService } from "vscode/vscode/vs/platform/contextview/browser/contextView.service";
|
|
5
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
6
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
7
|
+
import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
|
|
8
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
9
|
+
import { IViewDescriptorService } from "vscode/vscode/vs/workbench/common/views.service";
|
|
10
|
+
import { IOpenerService } from "vscode/vscode/vs/platform/opener/common/opener.service";
|
|
11
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
12
|
+
import { IHoverService } from "vscode/vscode/vs/platform/hover/browser/hover.service";
|
|
13
|
+
export declare class SCMRepositoriesViewPane extends ViewPane {
|
|
14
|
+
protected scmViewService: ISCMViewService;
|
|
15
|
+
private list;
|
|
16
|
+
private readonly disposables;
|
|
17
|
+
constructor(options: IViewPaneOptions, scmViewService: ISCMViewService, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, instantiationService: IInstantiationService, viewDescriptorService: IViewDescriptorService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, openerService: IOpenerService, themeService: IThemeService, telemetryService: ITelemetryService, hoverService: IHoverService);
|
|
18
|
+
protected renderBody(container: HTMLElement): void;
|
|
19
|
+
private onDidChangeRepositories;
|
|
20
|
+
focus(): void;
|
|
21
|
+
protected layoutBody(height: number, width: number): void;
|
|
22
|
+
private updateBodySize;
|
|
23
|
+
private onListContextMenu;
|
|
24
|
+
private onListSelectionChange;
|
|
25
|
+
private updateListSelection;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import './media/scm.css.js';
|
|
3
4
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
4
5
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
5
|
-
import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
6
|
+
import { ViewPane } from '@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
6
7
|
import { append, $ } from 'vscode/vscode/vs/base/browser/dom';
|
|
7
8
|
import { ISCMViewService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
8
9
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -16,7 +17,8 @@ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.
|
|
|
16
17
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
17
18
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
18
19
|
import { RepositoryRenderer, RepositoryActionRunner } from './scmRepositoryRenderer.js';
|
|
19
|
-
import { getActionViewItemProvider, collectContextMenuActions } from 'vscode/vscode/vs/workbench/contrib/scm/browser/util';
|
|
20
|
+
import { getActionViewItemProvider, collectContextMenuActions } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
21
|
+
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
20
22
|
import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
21
23
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
22
24
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
@@ -34,7 +36,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
34
36
|
constructor(options, scmViewService, keybindingService, contextMenuService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, telemetryService, hoverService) {
|
|
35
37
|
super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
36
38
|
this.scmViewService = scmViewService;
|
|
37
|
-
this.disposables = (
|
|
39
|
+
this.disposables = ( new DisposableStore());
|
|
38
40
|
}
|
|
39
41
|
renderBody(container) {
|
|
40
42
|
super.renderBody(container);
|
|
@@ -46,7 +48,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
46
48
|
};
|
|
47
49
|
this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.providerCountBadge'), this.disposables)(updateProviderCountVisibility));
|
|
48
50
|
updateProviderCountVisibility();
|
|
49
|
-
const delegate = (
|
|
51
|
+
const delegate = ( new ListDelegate());
|
|
50
52
|
const renderer = this.instantiationService.createInstance(RepositoryRenderer, MenuId.SCMSourceControlInline, getActionViewItemProvider(this.instantiationService));
|
|
51
53
|
const identityProvider = { getId: (r) => r.provider.id };
|
|
52
54
|
this.list = this.instantiationService.createInstance(WorkbenchList, `SCM Main`, listContainer, delegate, [renderer], {
|
|
@@ -58,7 +60,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
58
60
|
return r.provider.label;
|
|
59
61
|
},
|
|
60
62
|
getWidgetAriaLabel() {
|
|
61
|
-
return
|
|
63
|
+
return localize(8546, "Source Control Repositories");
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
});
|
|
@@ -67,7 +69,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
67
69
|
this._register(this.list.onContextMenu(this.onListContextMenu, this));
|
|
68
70
|
this._register(this.scmViewService.onDidChangeRepositories(this.onDidChangeRepositories, this));
|
|
69
71
|
this._register(this.scmViewService.onDidChangeVisibleRepositories(this.updateListSelection, this));
|
|
70
|
-
if (this.orientation ===
|
|
72
|
+
if (this.orientation === Orientation.VERTICAL) {
|
|
71
73
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
72
74
|
if (e.affectsConfiguration('scm.repositories.visible')) {
|
|
73
75
|
this.updateBodySize();
|
|
@@ -90,7 +92,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
90
92
|
this.list.layout(height, width);
|
|
91
93
|
}
|
|
92
94
|
updateBodySize() {
|
|
93
|
-
if (this.orientation ===
|
|
95
|
+
if (this.orientation === Orientation.HORIZONTAL) {
|
|
94
96
|
return;
|
|
95
97
|
}
|
|
96
98
|
const visibleCount = this.configurationService.getValue('scm.repositories.visible');
|
|
@@ -107,9 +109,9 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
107
109
|
const menus = this.scmViewService.menus.getRepositoryMenus(provider);
|
|
108
110
|
const menu = menus.repositoryContextMenu;
|
|
109
111
|
const actions = collectContextMenuActions(menu);
|
|
110
|
-
const actionRunner = this._register((
|
|
112
|
+
const actionRunner = this._register(( new RepositoryActionRunner(() => {
|
|
111
113
|
return this.list.getSelectedElements();
|
|
112
|
-
})))
|
|
114
|
+
})));
|
|
113
115
|
actionRunner.onWillRun(() => this.list.domFocus());
|
|
114
116
|
this.contextMenuService.showContextMenu({
|
|
115
117
|
actionRunner,
|
|
@@ -127,17 +129,17 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
127
129
|
}
|
|
128
130
|
updateListSelection() {
|
|
129
131
|
const oldSelection = this.list.getSelection();
|
|
130
|
-
const oldSet = (
|
|
131
|
-
const set = (
|
|
132
|
-
const added = (
|
|
133
|
-
const removed = (
|
|
132
|
+
const oldSet = ( new Set(( Iterable.map(oldSelection, i => this.list.element(i)))));
|
|
133
|
+
const set = ( new Set(this.scmViewService.visibleRepositories));
|
|
134
|
+
const added = ( new Set(Iterable.filter(set, r => !( oldSet.has(r)))));
|
|
135
|
+
const removed = ( new Set(Iterable.filter(oldSet, r => !( set.has(r)))));
|
|
134
136
|
if (added.size === 0 && removed.size === 0) {
|
|
135
137
|
return;
|
|
136
138
|
}
|
|
137
139
|
const selection = oldSelection
|
|
138
|
-
.filter(i => !(
|
|
140
|
+
.filter(i => !( removed.has(this.list.element(i))));
|
|
139
141
|
for (let i = 0; i < this.list.length; i++) {
|
|
140
|
-
if ((
|
|
142
|
+
if (( added.has(this.list.element(i)))) {
|
|
141
143
|
selection.push(i);
|
|
142
144
|
}
|
|
143
145
|
}
|
|
@@ -152,18 +154,18 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
152
154
|
super.dispose();
|
|
153
155
|
}
|
|
154
156
|
};
|
|
155
|
-
SCMRepositoriesViewPane = (
|
|
156
|
-
(
|
|
157
|
-
(
|
|
158
|
-
(
|
|
159
|
-
(
|
|
160
|
-
(
|
|
161
|
-
(
|
|
162
|
-
(
|
|
163
|
-
(
|
|
164
|
-
(
|
|
165
|
-
(
|
|
166
|
-
(
|
|
167
|
-
], SCMRepositoriesViewPane))
|
|
157
|
+
SCMRepositoriesViewPane = ( __decorate([
|
|
158
|
+
( __param(1, ISCMViewService)),
|
|
159
|
+
( __param(2, IKeybindingService)),
|
|
160
|
+
( __param(3, IContextMenuService)),
|
|
161
|
+
( __param(4, IInstantiationService)),
|
|
162
|
+
( __param(5, IViewDescriptorService)),
|
|
163
|
+
( __param(6, IContextKeyService)),
|
|
164
|
+
( __param(7, IConfigurationService)),
|
|
165
|
+
( __param(8, IOpenerService)),
|
|
166
|
+
( __param(9, IThemeService)),
|
|
167
|
+
( __param(10, ITelemetryService)),
|
|
168
|
+
( __param(11, IHoverService))
|
|
169
|
+
], SCMRepositoriesViewPane));
|
|
168
170
|
|
|
169
171
|
export { SCMRepositoriesViewPane };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IDisposable, DisposableStore } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ISCMProvider, ISCMRepository } from "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm";
|
|
3
|
+
import { ISCMViewService } from "vscode/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
4
|
+
import { CountBadge } from "vscode/vscode/vs/base/browser/ui/countBadge/countBadge";
|
|
5
|
+
import { IContextMenuService } from "vscode/vscode/vs/platform/contextview/browser/contextView.service";
|
|
6
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
7
|
+
import { ActionRunner, IAction } from "vscode/vscode/vs/base/common/actions";
|
|
8
|
+
import { ITreeNode } from "vscode/vscode/vs/base/browser/ui/tree/tree";
|
|
9
|
+
import { ICompressibleTreeRenderer } from "vscode/vscode/vs/base/browser/ui/tree/objectTree";
|
|
10
|
+
import { FuzzyScore } from "vscode/vscode/vs/base/common/filters";
|
|
11
|
+
import { IListRenderer } from "vscode/vscode/vs/base/browser/ui/list/list";
|
|
12
|
+
import { IActionViewItemProvider } from "vscode/vscode/vs/base/browser/ui/actionbar/actionbar";
|
|
13
|
+
import { WorkbenchToolBar } from "vscode/vscode/vs/platform/actions/browser/toolbar";
|
|
14
|
+
import { MenuId } from "vscode/vscode/vs/platform/actions/common/actions";
|
|
15
|
+
import { IMenuService } from "vscode/vscode/vs/platform/actions/common/actions.service";
|
|
16
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
17
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
18
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
19
|
+
import { IManagedHover } from "vscode/vscode/vs/base/browser/ui/hover/hover";
|
|
20
|
+
import { IHoverService } from "vscode/vscode/vs/platform/hover/browser/hover.service";
|
|
21
|
+
export declare class RepositoryActionRunner extends ActionRunner {
|
|
22
|
+
private readonly getSelectedRepositories;
|
|
23
|
+
constructor(getSelectedRepositories: () => ISCMRepository[]);
|
|
24
|
+
protected runAction(action: IAction, context: ISCMProvider): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
interface RepositoryTemplate {
|
|
27
|
+
readonly label: HTMLElement;
|
|
28
|
+
readonly labelCustomHover: IManagedHover;
|
|
29
|
+
readonly name: HTMLElement;
|
|
30
|
+
readonly description: HTMLElement;
|
|
31
|
+
readonly countContainer: HTMLElement;
|
|
32
|
+
readonly count: CountBadge;
|
|
33
|
+
readonly toolBar: WorkbenchToolBar;
|
|
34
|
+
readonly elementDisposables: DisposableStore;
|
|
35
|
+
readonly templateDisposable: IDisposable;
|
|
36
|
+
}
|
|
37
|
+
export declare class RepositoryRenderer implements ICompressibleTreeRenderer<ISCMRepository, FuzzyScore, RepositoryTemplate>, IListRenderer<ISCMRepository, RepositoryTemplate> {
|
|
38
|
+
private readonly toolbarMenuId;
|
|
39
|
+
private readonly actionViewItemProvider;
|
|
40
|
+
private commandService;
|
|
41
|
+
private contextKeyService;
|
|
42
|
+
private contextMenuService;
|
|
43
|
+
private hoverService;
|
|
44
|
+
private keybindingService;
|
|
45
|
+
private menuService;
|
|
46
|
+
private scmViewService;
|
|
47
|
+
private telemetryService;
|
|
48
|
+
static readonly TEMPLATE_ID = "repository";
|
|
49
|
+
get templateId(): string;
|
|
50
|
+
constructor(toolbarMenuId: MenuId, actionViewItemProvider: IActionViewItemProvider, commandService: ICommandService, contextKeyService: IContextKeyService, contextMenuService: IContextMenuService, hoverService: IHoverService, keybindingService: IKeybindingService, menuService: IMenuService, scmViewService: ISCMViewService, telemetryService: ITelemetryService);
|
|
51
|
+
renderTemplate(container: HTMLElement): RepositoryTemplate;
|
|
52
|
+
renderElement(arg: ISCMRepository | ITreeNode<ISCMRepository, FuzzyScore>, index: number, templateData: RepositoryTemplate, height: number | undefined): void;
|
|
53
|
+
renderCompressedElements(): void;
|
|
54
|
+
disposeElement(group: ISCMRepository | ITreeNode<ISCMRepository, FuzzyScore>, index: number, template: RepositoryTemplate): void;
|
|
55
|
+
disposeTemplate(templateData: RepositoryTemplate): void;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import './media/scm.css.js';
|
|
3
4
|
import { combinedDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
@@ -13,7 +14,7 @@ import { CountBadge } from 'vscode/vscode/vs/base/browser/ui/countBadge/countBad
|
|
|
13
14
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
14
15
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
15
16
|
import { ActionRunner } from 'vscode/vscode/vs/base/common/actions';
|
|
16
|
-
import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from 'vscode/vscode/vs/workbench/contrib/scm/browser/util';
|
|
17
|
+
import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
17
18
|
import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
18
19
|
import { WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
19
20
|
import { MenuItemAction, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
@@ -126,6 +127,7 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
126
127
|
disposeTemplate(templateData) {
|
|
127
128
|
templateData.elementDisposables.dispose();
|
|
128
129
|
templateData.templateDisposable.dispose();
|
|
130
|
+
templateData.count.dispose();
|
|
129
131
|
}
|
|
130
132
|
};
|
|
131
133
|
RepositoryRenderer = RepositoryRenderer_1 = ( __decorate([
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
4
|
+
import { ISCMResourceGroup, ISCMResource, ISCMRepository, ISCMInput, ISCMActionButton, ISCMActionButtonDescriptor } from "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm";
|
|
5
|
+
import { ISCMViewService } from "vscode/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
6
|
+
import { ISCMService } from "vscode/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
7
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
8
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { IContextMenuService } from "vscode/vscode/vs/platform/contextview/browser/contextView.service";
|
|
10
|
+
import { RawContextKey } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
|
|
11
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
12
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
13
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
14
|
+
import { IMenuService } from "vscode/vscode/vs/platform/actions/common/actions.service";
|
|
15
|
+
import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
|
|
16
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
17
|
+
import { ITreeNode, ITreeSorter } from "vscode/vscode/vs/base/browser/ui/tree/tree";
|
|
18
|
+
import { IResourceNode } from "@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common/vscode/vs/base/common/resourceTree";
|
|
19
|
+
import { ICompressibleTreeRenderer, ICompressibleKeyboardNavigationLabelProvider } from "vscode/vscode/vs/base/browser/ui/tree/objectTree";
|
|
20
|
+
import { FuzzyScore } from "vscode/vscode/vs/base/common/filters";
|
|
21
|
+
import { IViewDescriptorService } from "vscode/vscode/vs/workbench/common/views.service";
|
|
22
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
23
|
+
import { IOpenerService } from "vscode/vscode/vs/platform/opener/common/opener.service";
|
|
24
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
25
|
+
import { IListAccessibilityProvider } from "vscode/vscode/vs/base/browser/ui/list/listWidget";
|
|
26
|
+
import { ILabelService } from "vscode/vscode/vs/platform/label/common/label.service";
|
|
27
|
+
import { INotificationService } from "vscode/vscode/vs/platform/notification/common/notification.service";
|
|
28
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
29
|
+
import { IHoverService } from "vscode/vscode/vs/platform/hover/browser/hover.service";
|
|
30
|
+
type TreeElement = ISCMRepository | ISCMInput | ISCMActionButton | ISCMResourceGroup | ISCMResource | IResourceNode<ISCMResource, ISCMResourceGroup>;
|
|
31
|
+
interface ActionButtonTemplate {
|
|
32
|
+
readonly actionButton: SCMActionButton;
|
|
33
|
+
disposable: IDisposable;
|
|
34
|
+
readonly templateDisposable: IDisposable;
|
|
35
|
+
}
|
|
36
|
+
export declare class ActionButtonRenderer implements ICompressibleTreeRenderer<ISCMActionButton, FuzzyScore, ActionButtonTemplate> {
|
|
37
|
+
private commandService;
|
|
38
|
+
private contextMenuService;
|
|
39
|
+
private notificationService;
|
|
40
|
+
static readonly DEFAULT_HEIGHT = 30;
|
|
41
|
+
static readonly TEMPLATE_ID = "actionButton";
|
|
42
|
+
get templateId(): string;
|
|
43
|
+
private actionButtons;
|
|
44
|
+
constructor(commandService: ICommandService, contextMenuService: IContextMenuService, notificationService: INotificationService);
|
|
45
|
+
renderTemplate(container: HTMLElement): ActionButtonTemplate;
|
|
46
|
+
renderElement(node: ITreeNode<ISCMActionButton, FuzzyScore>, index: number, templateData: ActionButtonTemplate, height: number | undefined): void;
|
|
47
|
+
renderCompressedElements(): void;
|
|
48
|
+
focusActionButton(actionButton: ISCMActionButton): void;
|
|
49
|
+
disposeElement(node: ITreeNode<ISCMActionButton, FuzzyScore>, index: number, template: ActionButtonTemplate): void;
|
|
50
|
+
disposeTemplate(templateData: ActionButtonTemplate): void;
|
|
51
|
+
}
|
|
52
|
+
export declare class SCMTreeSorter implements ITreeSorter<TreeElement> {
|
|
53
|
+
private readonly viewMode;
|
|
54
|
+
private readonly viewSortKey;
|
|
55
|
+
constructor(viewMode: () => ViewMode, viewSortKey: () => ViewSortKey);
|
|
56
|
+
compare(one: TreeElement, other: TreeElement): number;
|
|
57
|
+
}
|
|
58
|
+
export declare class SCMTreeKeyboardNavigationLabelProvider implements ICompressibleKeyboardNavigationLabelProvider<TreeElement> {
|
|
59
|
+
private viewMode;
|
|
60
|
+
private readonly labelService;
|
|
61
|
+
constructor(viewMode: () => ViewMode, labelService: ILabelService);
|
|
62
|
+
getKeyboardNavigationLabel(element: TreeElement): {
|
|
63
|
+
toString(): string;
|
|
64
|
+
} | {
|
|
65
|
+
toString(): string;
|
|
66
|
+
}[] | undefined;
|
|
67
|
+
getCompressedNodeKeyboardNavigationLabel(elements: TreeElement[]): {
|
|
68
|
+
toString(): string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
}
|
|
71
|
+
export declare class SCMAccessibilityProvider implements IListAccessibilityProvider<TreeElement> {
|
|
72
|
+
private readonly labelService;
|
|
73
|
+
constructor(labelService: ILabelService);
|
|
74
|
+
getWidgetAriaLabel(): string;
|
|
75
|
+
getAriaLabel(element: TreeElement): string;
|
|
76
|
+
}
|
|
77
|
+
declare enum ViewMode {
|
|
78
|
+
List = "list",
|
|
79
|
+
Tree = "tree"
|
|
80
|
+
}
|
|
81
|
+
declare enum ViewSortKey {
|
|
82
|
+
Path = "path",
|
|
83
|
+
Name = "name",
|
|
84
|
+
Status = "status"
|
|
85
|
+
}
|
|
86
|
+
export declare const ContextKeys: {
|
|
87
|
+
SCMViewMode: RawContextKey<ViewMode>;
|
|
88
|
+
SCMViewSortKey: RawContextKey<ViewSortKey>;
|
|
89
|
+
SCMViewAreAllRepositoriesCollapsed: RawContextKey<boolean>;
|
|
90
|
+
SCMViewIsAnyRepositoryCollapsible: RawContextKey<boolean>;
|
|
91
|
+
SCMProvider: RawContextKey<string | undefined>;
|
|
92
|
+
SCMProviderRootUri: RawContextKey<string | undefined>;
|
|
93
|
+
SCMProviderHasRootUri: RawContextKey<boolean>;
|
|
94
|
+
SCMHistoryItemCount: RawContextKey<number>;
|
|
95
|
+
SCMCurrentHistoryItemRefHasRemote: RawContextKey<boolean>;
|
|
96
|
+
SCMCurrentHistoryItemRefInFilter: RawContextKey<boolean>;
|
|
97
|
+
RepositoryCount: RawContextKey<number>;
|
|
98
|
+
RepositoryVisibilityCount: RawContextKey<number>;
|
|
99
|
+
RepositoryVisibility(repository: ISCMRepository): RawContextKey<boolean>;
|
|
100
|
+
};
|
|
101
|
+
export declare class SCMViewPane extends ViewPane {
|
|
102
|
+
private readonly commandService;
|
|
103
|
+
private readonly editorService;
|
|
104
|
+
private readonly menuService;
|
|
105
|
+
private readonly scmService;
|
|
106
|
+
private readonly scmViewService;
|
|
107
|
+
private readonly storageService;
|
|
108
|
+
private readonly uriIdentityService;
|
|
109
|
+
private _onDidLayout;
|
|
110
|
+
private layoutCache;
|
|
111
|
+
private treeScrollTop;
|
|
112
|
+
private treeContainer;
|
|
113
|
+
private tree;
|
|
114
|
+
private listLabels;
|
|
115
|
+
private inputRenderer;
|
|
116
|
+
private actionButtonRenderer;
|
|
117
|
+
private _viewMode;
|
|
118
|
+
get viewMode(): ViewMode;
|
|
119
|
+
set viewMode(mode: ViewMode);
|
|
120
|
+
private readonly _onDidChangeViewMode;
|
|
121
|
+
readonly onDidChangeViewMode: Event<ViewMode>;
|
|
122
|
+
private _viewSortKey;
|
|
123
|
+
get viewSortKey(): ViewSortKey;
|
|
124
|
+
set viewSortKey(sortKey: ViewSortKey);
|
|
125
|
+
private readonly _onDidChangeViewSortKey;
|
|
126
|
+
readonly onDidChangeViewSortKey: Event<ViewSortKey>;
|
|
127
|
+
private readonly items;
|
|
128
|
+
private readonly visibilityDisposables;
|
|
129
|
+
private readonly treeOperationSequencer;
|
|
130
|
+
private readonly revealResourceThrottler;
|
|
131
|
+
private readonly updateChildrenThrottler;
|
|
132
|
+
private viewModeContextKey;
|
|
133
|
+
private viewSortKeyContextKey;
|
|
134
|
+
private areAllRepositoriesCollapsedContextKey;
|
|
135
|
+
private isAnyRepositoryCollapsibleContextKey;
|
|
136
|
+
private scmProviderContextKey;
|
|
137
|
+
private scmProviderRootUriContextKey;
|
|
138
|
+
private scmProviderHasRootUriContextKey;
|
|
139
|
+
private readonly disposables;
|
|
140
|
+
constructor(options: IViewPaneOptions, commandService: ICommandService, editorService: IEditorService, menuService: IMenuService, scmService: ISCMService, scmViewService: ISCMViewService, storageService: IStorageService, uriIdentityService: IUriIdentityService, keybindingService: IKeybindingService, themeService: IThemeService, contextMenuService: IContextMenuService, instantiationService: IInstantiationService, viewDescriptorService: IViewDescriptorService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, openerService: IOpenerService, telemetryService: ITelemetryService, hoverService: IHoverService);
|
|
141
|
+
protected layoutBody(height?: number | undefined, width?: number | undefined): void;
|
|
142
|
+
protected renderBody(container: HTMLElement): void;
|
|
143
|
+
private createTree;
|
|
144
|
+
private open;
|
|
145
|
+
private onDidActiveEditorChange;
|
|
146
|
+
private onDidChangeVisibleRepositories;
|
|
147
|
+
private onListContextMenu;
|
|
148
|
+
private getSelectedRepositories;
|
|
149
|
+
private getSelectedResources;
|
|
150
|
+
private getViewMode;
|
|
151
|
+
private getViewSortKey;
|
|
152
|
+
private loadTreeViewState;
|
|
153
|
+
private storeTreeViewState;
|
|
154
|
+
private updateChildren;
|
|
155
|
+
private updateIndentStyles;
|
|
156
|
+
private updateScmProviderContextKeys;
|
|
157
|
+
private updateRepositoryCollapseAllContextKeys;
|
|
158
|
+
collapseAllRepositories(): void;
|
|
159
|
+
expandAllRepositories(): void;
|
|
160
|
+
focusPreviousInput(): void;
|
|
161
|
+
focusNextInput(): void;
|
|
162
|
+
private focusInput;
|
|
163
|
+
focusPreviousResourceGroup(): void;
|
|
164
|
+
focusNextResourceGroup(): void;
|
|
165
|
+
private focusResourceGroup;
|
|
166
|
+
shouldShowWelcome(): boolean;
|
|
167
|
+
getActionsContext(): unknown;
|
|
168
|
+
focus(): void;
|
|
169
|
+
dispose(): void;
|
|
170
|
+
}
|
|
171
|
+
export declare class SCMActionButton implements IDisposable {
|
|
172
|
+
private readonly container;
|
|
173
|
+
private readonly contextMenuService;
|
|
174
|
+
private readonly commandService;
|
|
175
|
+
private readonly notificationService;
|
|
176
|
+
private button;
|
|
177
|
+
private readonly disposables;
|
|
178
|
+
constructor(container: HTMLElement, contextMenuService: IContextMenuService, commandService: ICommandService, notificationService: INotificationService);
|
|
179
|
+
dispose(): void;
|
|
180
|
+
setButton(button: ISCMActionButtonDescriptor | undefined): void;
|
|
181
|
+
focus(): void;
|
|
182
|
+
private clear;
|
|
183
|
+
private executeCommand;
|
|
184
|
+
}
|
|
185
|
+
export {};
|