@codingame/monaco-vscode-scm-service-override 4.5.1 → 5.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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +39 -47
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +35 -34
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +189 -288
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +28 -29
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +2 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +513 -568
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +15 -18
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +14 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/util.js +4 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +118 -0
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +1 -1
|
@@ -21,7 +21,9 @@ import { getActionViewItemProvider, collectContextMenuActions } from './util.js'
|
|
|
21
21
|
import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
22
22
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
23
23
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
24
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
24
25
|
|
|
26
|
+
const _moduleId = "vs/workbench/contrib/scm/browser/scmRepositoriesViewPane";
|
|
25
27
|
class ListDelegate {
|
|
26
28
|
getHeight() {
|
|
27
29
|
return 22;
|
|
@@ -31,10 +33,10 @@ class ListDelegate {
|
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
34
|
-
constructor(options, scmViewService, keybindingService, contextMenuService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, telemetryService) {
|
|
35
|
-
super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
36
|
+
constructor(options, scmViewService, keybindingService, contextMenuService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, telemetryService, hoverService) {
|
|
37
|
+
super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
36
38
|
this.scmViewService = scmViewService;
|
|
37
|
-
this.disposables = ( new DisposableStore());
|
|
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 = ( new ListDelegate());
|
|
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], {
|
|
@@ -60,11 +62,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
60
62
|
return r.provider.label;
|
|
61
63
|
},
|
|
62
64
|
getWidgetAriaLabel() {
|
|
63
|
-
return ( localizeWithPath(
|
|
64
|
-
'vs/workbench/contrib/scm/browser/scmRepositoriesViewPane',
|
|
65
|
-
'scm',
|
|
66
|
-
"Source Control Repositories"
|
|
67
|
-
));
|
|
65
|
+
return ( localizeWithPath(_moduleId, 0, "Source Control Repositories"));
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
});
|
|
@@ -113,9 +111,9 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
113
111
|
const menus = this.scmViewService.menus.getRepositoryMenus(provider);
|
|
114
112
|
const menu = menus.repositoryContextMenu;
|
|
115
113
|
const actions = collectContextMenuActions(menu);
|
|
116
|
-
const actionRunner = this._register(( new RepositoryActionRunner(() => {
|
|
114
|
+
const actionRunner = this._register(( (new RepositoryActionRunner(() => {
|
|
117
115
|
return this.list.getSelectedElements();
|
|
118
|
-
})));
|
|
116
|
+
}))));
|
|
119
117
|
actionRunner.onWillRun(() => this.list.domFocus());
|
|
120
118
|
this.contextMenuService.showContextMenu({
|
|
121
119
|
actionRunner,
|
|
@@ -133,17 +131,17 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
133
131
|
}
|
|
134
132
|
updateListSelection() {
|
|
135
133
|
const oldSelection = this.list.getSelection();
|
|
136
|
-
const oldSet = ( new Set((
|
|
137
|
-
const set = ( new Set(this.scmViewService.visibleRepositories));
|
|
138
|
-
const added = ( new Set(Iterable.filter(set, r => !( oldSet.has(r)))));
|
|
139
|
-
const removed = ( new Set(Iterable.filter(oldSet, r => !( set.has(r)))));
|
|
134
|
+
const oldSet = ( (new Set( (Iterable.map(oldSelection, i => this.list.element(i))))));
|
|
135
|
+
const set = ( (new Set(this.scmViewService.visibleRepositories)));
|
|
136
|
+
const added = ( (new Set(Iterable.filter(set, r => !( (oldSet.has(r)))))));
|
|
137
|
+
const removed = ( (new Set(Iterable.filter(oldSet, r => !( (set.has(r)))))));
|
|
140
138
|
if (added.size === 0 && removed.size === 0) {
|
|
141
139
|
return;
|
|
142
140
|
}
|
|
143
141
|
const selection = oldSelection
|
|
144
|
-
.filter(i => !( removed.has(this.list.element(i))));
|
|
142
|
+
.filter(i => !( (removed.has(this.list.element(i)))));
|
|
145
143
|
for (let i = 0; i < this.list.length; i++) {
|
|
146
|
-
if (( added.has(this.list.element(i)))) {
|
|
144
|
+
if (( (added.has(this.list.element(i))))) {
|
|
147
145
|
selection.push(i);
|
|
148
146
|
}
|
|
149
147
|
}
|
|
@@ -158,17 +156,18 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
158
156
|
super.dispose();
|
|
159
157
|
}
|
|
160
158
|
};
|
|
161
|
-
SCMRepositoriesViewPane = ( __decorate([
|
|
162
|
-
( __param(1, ISCMViewService)),
|
|
163
|
-
( __param(2, IKeybindingService)),
|
|
164
|
-
( __param(3, IContextMenuService)),
|
|
165
|
-
( __param(4, IInstantiationService)),
|
|
166
|
-
( __param(5, IViewDescriptorService)),
|
|
167
|
-
( __param(6, IContextKeyService)),
|
|
168
|
-
( __param(7, IConfigurationService)),
|
|
169
|
-
( __param(8, IOpenerService)),
|
|
170
|
-
( __param(9, IThemeService)),
|
|
171
|
-
( __param(10, ITelemetryService))
|
|
172
|
-
|
|
159
|
+
SCMRepositoriesViewPane = ( (__decorate([
|
|
160
|
+
( (__param(1, ISCMViewService))),
|
|
161
|
+
( (__param(2, IKeybindingService))),
|
|
162
|
+
( (__param(3, IContextMenuService))),
|
|
163
|
+
( (__param(4, IInstantiationService))),
|
|
164
|
+
( (__param(5, IViewDescriptorService))),
|
|
165
|
+
( (__param(6, IContextKeyService))),
|
|
166
|
+
( (__param(7, IConfigurationService))),
|
|
167
|
+
( (__param(8, IOpenerService))),
|
|
168
|
+
( (__param(9, IThemeService))),
|
|
169
|
+
( (__param(10, ITelemetryService))),
|
|
170
|
+
( (__param(11, IHoverService)))
|
|
171
|
+
], SCMRepositoriesViewPane)));
|
|
173
172
|
|
|
174
173
|
export { SCMRepositoriesViewPane };
|
|
@@ -62,6 +62,7 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
62
62
|
this.contextKeyService,
|
|
63
63
|
this.contextMenuService,
|
|
64
64
|
this.keybindingService,
|
|
65
|
+
this.commandService,
|
|
65
66
|
this.telemetryService
|
|
66
67
|
));
|
|
67
68
|
const countContainer = append(provider, $('.count'));
|
|
@@ -114,7 +115,7 @@ let RepositoryRenderer = class RepositoryRenderer {
|
|
|
114
115
|
templateData.toolBar.context = repository.provider;
|
|
115
116
|
}
|
|
116
117
|
renderCompressedElements() {
|
|
117
|
-
throw new Error('Should never happen since node is incompressible');
|
|
118
|
+
throw ( new Error('Should never happen since node is incompressible'));
|
|
118
119
|
}
|
|
119
120
|
disposeElement(group, index, template) {
|
|
120
121
|
template.elementDisposables.clear();
|