@codingame/monaco-vscode-scm-service-override 11.1.2 → 12.0.1
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
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
3
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
5
|
import { DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
6
|
import './media/scm.css.js';
|
|
6
7
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
7
|
-
import {
|
|
8
|
+
import { getActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
8
9
|
import { MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
9
10
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
10
11
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -15,9 +16,9 @@ import { ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.s
|
|
|
15
16
|
function actionEquals(a, b) {
|
|
16
17
|
return a.id === b.id;
|
|
17
18
|
}
|
|
18
|
-
const repositoryMenuDisposables = (
|
|
19
|
+
const repositoryMenuDisposables = ( new DisposableStore());
|
|
19
20
|
MenuRegistry.onDidChangeMenu(e => {
|
|
20
|
-
if ((
|
|
21
|
+
if (( e.has(MenuId.SCMTitle))) {
|
|
21
22
|
repositoryMenuDisposables.clear();
|
|
22
23
|
for (const menuItem of MenuRegistry.getMenuItems(MenuId.SCMTitle)) {
|
|
23
24
|
repositoryMenuDisposables.add(MenuRegistry.appendMenuItem(MenuId.SCMSourceControlInline, menuItem));
|
|
@@ -30,18 +31,16 @@ let SCMTitleMenu = class SCMTitleMenu {
|
|
|
30
31
|
constructor(menuService, contextKeyService) {
|
|
31
32
|
this._actions = [];
|
|
32
33
|
this._secondaryActions = [];
|
|
33
|
-
this._onDidChangeTitle = (
|
|
34
|
+
this._onDidChangeTitle = ( new Emitter());
|
|
34
35
|
this.onDidChangeTitle = this._onDidChangeTitle.event;
|
|
35
|
-
this.disposables = (
|
|
36
|
+
this.disposables = ( new DisposableStore());
|
|
36
37
|
this.menu = menuService.createMenu(MenuId.SCMTitle, contextKeyService);
|
|
37
38
|
this.disposables.add(this.menu);
|
|
38
39
|
this.menu.onDidChange(this.updateTitleActions, this, this.disposables);
|
|
39
40
|
this.updateTitleActions();
|
|
40
41
|
}
|
|
41
42
|
updateTitleActions() {
|
|
42
|
-
const primary =
|
|
43
|
-
const secondary = [];
|
|
44
|
-
createAndFillInActionBarActions(this.menu, { shouldForwardArgs: true }, { primary, secondary });
|
|
43
|
+
const { primary, secondary } = getActionBarActions(this.menu.getActions({ shouldForwardArgs: true }));
|
|
45
44
|
if (equals(primary, this._actions, actionEquals) && equals(secondary, this._secondaryActions, actionEquals)) {
|
|
46
45
|
return;
|
|
47
46
|
}
|
|
@@ -53,10 +52,10 @@ let SCMTitleMenu = class SCMTitleMenu {
|
|
|
53
52
|
this.disposables.dispose();
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
|
-
SCMTitleMenu = (
|
|
57
|
-
(
|
|
58
|
-
(
|
|
59
|
-
], SCMTitleMenu))
|
|
55
|
+
SCMTitleMenu = ( __decorate([
|
|
56
|
+
( __param(0, IMenuService)),
|
|
57
|
+
( __param(1, IContextKeyService))
|
|
58
|
+
], SCMTitleMenu));
|
|
60
59
|
class SCMMenusItem {
|
|
61
60
|
get resourceGroupMenu() {
|
|
62
61
|
if (!this._resourceGroupMenu) {
|
|
@@ -82,7 +81,7 @@ class SCMMenusItem {
|
|
|
82
81
|
return this.genericResourceMenu;
|
|
83
82
|
}
|
|
84
83
|
if (!this.contextualResourceMenus) {
|
|
85
|
-
this.contextualResourceMenus = (
|
|
84
|
+
this.contextualResourceMenus = ( new Map());
|
|
86
85
|
}
|
|
87
86
|
let item = this.contextualResourceMenus.get(resource.contextValue);
|
|
88
87
|
if (!item) {
|
|
@@ -102,7 +101,7 @@ class SCMMenusItem {
|
|
|
102
101
|
this._resourceFolderMenu?.dispose();
|
|
103
102
|
this.genericResourceMenu?.dispose();
|
|
104
103
|
if (this.contextualResourceMenus) {
|
|
105
|
-
dispose((
|
|
104
|
+
dispose(( this.contextualResourceMenus.values()));
|
|
106
105
|
this.contextualResourceMenus.clear();
|
|
107
106
|
this.contextualResourceMenus = undefined;
|
|
108
107
|
}
|
|
@@ -119,14 +118,14 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
119
118
|
constructor(provider, contextKeyService, instantiationService, menuService) {
|
|
120
119
|
this.provider = provider;
|
|
121
120
|
this.menuService = menuService;
|
|
122
|
-
this.resourceGroupMenusItems = (
|
|
123
|
-
this.disposables = (
|
|
121
|
+
this.resourceGroupMenusItems = ( new Map());
|
|
122
|
+
this.disposables = ( new DisposableStore());
|
|
124
123
|
this.contextKeyService = contextKeyService.createOverlay([
|
|
125
124
|
['scmProvider', provider.contextValue],
|
|
126
125
|
['scmProviderRootUri', provider.rootUri?.toString()],
|
|
127
126
|
['scmProviderHasRootUri', !!provider.rootUri],
|
|
128
127
|
]);
|
|
129
|
-
const serviceCollection = (
|
|
128
|
+
const serviceCollection = ( new ServiceCollection([IContextKeyService, this.contextKeyService]));
|
|
130
129
|
instantiationService = instantiationService.createChild(serviceCollection, this.disposables);
|
|
131
130
|
this.titleMenu = instantiationService.createInstance(SCMTitleMenu);
|
|
132
131
|
this.disposables.add(this.titleMenu);
|
|
@@ -151,13 +150,13 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
151
150
|
['scmResourceGroup', group.id],
|
|
152
151
|
['multiDiffEditorEnableViewChanges', group.multiDiffEditorEnableViewChanges],
|
|
153
152
|
]);
|
|
154
|
-
result = (
|
|
153
|
+
result = ( new SCMMenusItem(contextKeyService, this.menuService));
|
|
155
154
|
this.resourceGroupMenusItems.set(group, result);
|
|
156
155
|
}
|
|
157
156
|
return result;
|
|
158
157
|
}
|
|
159
158
|
onDidChangeResourceGroups() {
|
|
160
|
-
for (const resourceGroup of (
|
|
159
|
+
for (const resourceGroup of ( this.resourceGroupMenusItems.keys())) {
|
|
161
160
|
if (!this.provider.groups.includes(resourceGroup)) {
|
|
162
161
|
this.resourceGroupMenusItems.get(resourceGroup)?.dispose();
|
|
163
162
|
this.resourceGroupMenusItems.delete(resourceGroup);
|
|
@@ -169,16 +168,16 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
169
168
|
this.resourceGroupMenusItems.forEach(item => item.dispose());
|
|
170
169
|
}
|
|
171
170
|
};
|
|
172
|
-
SCMRepositoryMenus = (
|
|
173
|
-
(
|
|
174
|
-
(
|
|
175
|
-
(
|
|
176
|
-
], SCMRepositoryMenus))
|
|
171
|
+
SCMRepositoryMenus = ( __decorate([
|
|
172
|
+
( __param(1, IContextKeyService)),
|
|
173
|
+
( __param(2, IInstantiationService)),
|
|
174
|
+
( __param(3, IMenuService))
|
|
175
|
+
], SCMRepositoryMenus));
|
|
177
176
|
let SCMMenus = class SCMMenus {
|
|
178
177
|
constructor(scmService, instantiationService) {
|
|
179
178
|
this.instantiationService = instantiationService;
|
|
180
|
-
this.disposables = (
|
|
181
|
-
this.menus = (
|
|
179
|
+
this.disposables = ( new DisposableStore());
|
|
180
|
+
this.menus = ( new Map());
|
|
182
181
|
this.titleMenu = instantiationService.createInstance(SCMTitleMenu);
|
|
183
182
|
scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables);
|
|
184
183
|
}
|
|
@@ -204,12 +203,12 @@ let SCMMenus = class SCMMenus {
|
|
|
204
203
|
this.disposables.dispose();
|
|
205
204
|
}
|
|
206
205
|
};
|
|
207
|
-
SCMMenus = (
|
|
208
|
-
(
|
|
209
|
-
(
|
|
210
|
-
], SCMMenus))
|
|
206
|
+
SCMMenus = ( __decorate([
|
|
207
|
+
( __param(0, ISCMService)),
|
|
208
|
+
( __param(1, IInstantiationService))
|
|
209
|
+
], SCMMenus));
|
|
211
210
|
MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
|
|
212
|
-
title: ( localize(
|
|
211
|
+
title: ( localize(8434, "Share")),
|
|
213
212
|
submenu: MenuId.SCMResourceContextShare,
|
|
214
213
|
group: '45_share',
|
|
215
214
|
order: 3,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|