@codingame/monaco-vscode-scm-service-override 4.5.0 → 4.5.2
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 +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +38 -46
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +35 -34
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +155 -287
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +24 -27
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +370 -501
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +15 -18
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +1 -1
- package/scm.d.ts +0 -5
|
@@ -102,46 +102,31 @@ import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
|
102
102
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
103
103
|
|
|
104
104
|
var ActionButtonRenderer_1, InputRenderer_1, ResourceGroupRenderer_1, ResourceRenderer_1, HistoryItemGroupRenderer_1, HistoryItemRenderer_1, HistoryItemChangeRenderer_1, SeparatorRenderer_1, SCMInputWidget_1;
|
|
105
|
+
const _moduleId = "vs/workbench/contrib/scm/browser/scmViewPane";
|
|
105
106
|
registerColor('scm.historyItemAdditionsForeground', {
|
|
106
107
|
dark: 'gitDecoration.addedResourceForeground',
|
|
107
108
|
light: 'gitDecoration.addedResourceForeground',
|
|
108
109
|
hcDark: 'gitDecoration.addedResourceForeground',
|
|
109
110
|
hcLight: 'gitDecoration.addedResourceForeground'
|
|
110
|
-
}, ( localizeWithPath(
|
|
111
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
112
|
-
'scm.historyItemAdditionsForeground',
|
|
113
|
-
"History item additions foreground color."
|
|
114
|
-
)));
|
|
111
|
+
}, ( localizeWithPath(_moduleId, 0, "History item additions foreground color.")));
|
|
115
112
|
registerColor('scm.historyItemDeletionsForeground', {
|
|
116
113
|
dark: 'gitDecoration.deletedResourceForeground',
|
|
117
114
|
light: 'gitDecoration.deletedResourceForeground',
|
|
118
115
|
hcDark: 'gitDecoration.deletedResourceForeground',
|
|
119
116
|
hcLight: 'gitDecoration.deletedResourceForeground'
|
|
120
|
-
}, ( localizeWithPath(
|
|
121
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
122
|
-
'scm.historyItemDeletionsForeground',
|
|
123
|
-
"History item deletions foreground color."
|
|
124
|
-
)));
|
|
117
|
+
}, ( localizeWithPath(_moduleId, 1, "History item deletions foreground color.")));
|
|
125
118
|
registerColor('scm.historyItemStatisticsBorder', {
|
|
126
|
-
dark: ( transparent(foreground, 0.2)),
|
|
127
|
-
light: ( transparent(foreground, 0.2)),
|
|
128
|
-
hcDark: ( transparent(foreground, 0.2)),
|
|
129
|
-
hcLight: ( transparent(foreground, 0.2))
|
|
130
|
-
}, ( localizeWithPath(
|
|
131
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
132
|
-
'scm.historyItemStatisticsBorder',
|
|
133
|
-
"History item statistics border color."
|
|
134
|
-
)));
|
|
119
|
+
dark: ( (transparent(foreground, 0.2))),
|
|
120
|
+
light: ( (transparent(foreground, 0.2))),
|
|
121
|
+
hcDark: ( (transparent(foreground, 0.2))),
|
|
122
|
+
hcLight: ( (transparent(foreground, 0.2)))
|
|
123
|
+
}, ( localizeWithPath(_moduleId, 2, "History item statistics border color.")));
|
|
135
124
|
registerColor('scm.historyItemSelectedStatisticsBorder', {
|
|
136
|
-
dark: ( transparent(listActiveSelectionForeground, 0.2)),
|
|
137
|
-
light: ( transparent(listActiveSelectionForeground, 0.2)),
|
|
138
|
-
hcDark: ( transparent(listActiveSelectionForeground, 0.2)),
|
|
139
|
-
hcLight: ( transparent(listActiveSelectionForeground, 0.2))
|
|
140
|
-
}, ( localizeWithPath(
|
|
141
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
142
|
-
'scm.historyItemSelectedStatisticsBorder',
|
|
143
|
-
"History item selected statistics border color."
|
|
144
|
-
)));
|
|
125
|
+
dark: ( (transparent(listActiveSelectionForeground, 0.2))),
|
|
126
|
+
light: ( (transparent(listActiveSelectionForeground, 0.2))),
|
|
127
|
+
hcDark: ( (transparent(listActiveSelectionForeground, 0.2))),
|
|
128
|
+
hcLight: ( (transparent(listActiveSelectionForeground, 0.2)))
|
|
129
|
+
}, ( localizeWithPath(_moduleId, 3, "History item selected statistics border color.")));
|
|
145
130
|
let ActionButtonRenderer = class ActionButtonRenderer {
|
|
146
131
|
static { ActionButtonRenderer_1 = this; }
|
|
147
132
|
static { this.DEFAULT_HEIGHT = 30; }
|
|
@@ -151,23 +136,23 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
151
136
|
this.commandService = commandService;
|
|
152
137
|
this.contextMenuService = contextMenuService;
|
|
153
138
|
this.notificationService = notificationService;
|
|
154
|
-
this.actionButtons = ( new Map());
|
|
139
|
+
this.actionButtons = ( (new Map()));
|
|
155
140
|
}
|
|
156
141
|
renderTemplate(container) {
|
|
157
142
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
|
|
158
143
|
container.parentElement.parentElement.classList.add('cursor-default', 'force-no-hover');
|
|
159
144
|
const buttonContainer = append(container, $('.button-container'));
|
|
160
|
-
const actionButton = ( new SCMActionButton(
|
|
145
|
+
const actionButton = ( (new SCMActionButton(
|
|
161
146
|
buttonContainer,
|
|
162
147
|
this.contextMenuService,
|
|
163
148
|
this.commandService,
|
|
164
149
|
this.notificationService
|
|
165
|
-
));
|
|
150
|
+
)));
|
|
166
151
|
return { actionButton, disposable: Disposable.None, templateDisposable: actionButton };
|
|
167
152
|
}
|
|
168
153
|
renderElement(node, index, templateData, height) {
|
|
169
154
|
templateData.disposable.dispose();
|
|
170
|
-
const disposables = ( new DisposableStore());
|
|
155
|
+
const disposables = ( (new DisposableStore()));
|
|
171
156
|
const actionButton = node.element;
|
|
172
157
|
templateData.actionButton.setButton(node.element.button);
|
|
173
158
|
const renderedActionButtons = this.actionButtons.get(actionButton) ?? [];
|
|
@@ -177,7 +162,7 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
177
162
|
const renderedActionButtons = this.actionButtons.get(actionButton) ?? [];
|
|
178
163
|
const renderedWidgetIndex = renderedActionButtons.findIndex(renderedActionButton => renderedActionButton === templateData.actionButton);
|
|
179
164
|
if (renderedWidgetIndex < 0) {
|
|
180
|
-
throw new Error('Disposing unknown action button');
|
|
165
|
+
throw ( (new Error('Disposing unknown action button')));
|
|
181
166
|
}
|
|
182
167
|
if (renderedActionButtons.length === 1) {
|
|
183
168
|
this.actionButtons.delete(actionButton);
|
|
@@ -190,7 +175,7 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
190
175
|
templateData.disposable = disposables;
|
|
191
176
|
}
|
|
192
177
|
renderCompressedElements() {
|
|
193
|
-
throw new Error('Should never happen since node is incompressible');
|
|
178
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
194
179
|
}
|
|
195
180
|
focusActionButton(actionButton) {
|
|
196
181
|
this.actionButtons.get(actionButton)?.forEach(renderedActionButton => renderedActionButton.focus());
|
|
@@ -203,18 +188,20 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
203
188
|
templateData.templateDisposable.dispose();
|
|
204
189
|
}
|
|
205
190
|
};
|
|
206
|
-
ActionButtonRenderer = ActionButtonRenderer_1 = ( __decorate([
|
|
207
|
-
( __param(0, ICommandService)),
|
|
208
|
-
( __param(1, IContextMenuService)),
|
|
209
|
-
( __param(2, INotificationService))
|
|
210
|
-
], ActionButtonRenderer));
|
|
191
|
+
ActionButtonRenderer = ActionButtonRenderer_1 = ( (__decorate([
|
|
192
|
+
( (__param(0, ICommandService))),
|
|
193
|
+
( (__param(1, IContextMenuService))),
|
|
194
|
+
( (__param(2, INotificationService)))
|
|
195
|
+
], ActionButtonRenderer)));
|
|
211
196
|
class SCMTreeDragAndDrop {
|
|
212
197
|
constructor(instantiationService) {
|
|
213
198
|
this.instantiationService = instantiationService;
|
|
214
199
|
}
|
|
215
200
|
getDragURI(element) {
|
|
216
201
|
if (isSCMResource(element)) {
|
|
217
|
-
return (
|
|
202
|
+
return (
|
|
203
|
+
(element.sourceUri.toString())
|
|
204
|
+
);
|
|
218
205
|
}
|
|
219
206
|
return null;
|
|
220
207
|
}
|
|
@@ -222,7 +209,7 @@ class SCMTreeDragAndDrop {
|
|
|
222
209
|
const items = SCMTreeDragAndDrop.getResourcesFromDragAndDropData(data);
|
|
223
210
|
if (originalEvent.dataTransfer && items?.length) {
|
|
224
211
|
this.instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, items, originalEvent));
|
|
225
|
-
const fileResources = ( items.filter(s => s.scheme === Schemas.file).map(r => r.fsPath));
|
|
212
|
+
const fileResources = ( (items.filter(s => s.scheme === Schemas.file).map(r => r.fsPath)));
|
|
226
213
|
if (fileResources.length) {
|
|
227
214
|
originalEvent.dataTransfer.setData(CodeDataTransfers.FILES, JSON.stringify(fileResources));
|
|
228
215
|
}
|
|
@@ -262,18 +249,18 @@ let InputRenderer = class InputRenderer {
|
|
|
262
249
|
this.overflowWidgetsDomNode = overflowWidgetsDomNode;
|
|
263
250
|
this.updateHeight = updateHeight;
|
|
264
251
|
this.instantiationService = instantiationService;
|
|
265
|
-
this.inputWidgets = ( new Map());
|
|
266
|
-
this.contentHeights = ( new WeakMap());
|
|
267
|
-
this.editorSelections = ( new WeakMap());
|
|
252
|
+
this.inputWidgets = ( (new Map()));
|
|
253
|
+
this.contentHeights = ( (new WeakMap()));
|
|
254
|
+
this.editorSelections = ( (new WeakMap()));
|
|
268
255
|
}
|
|
269
256
|
renderTemplate(container) {
|
|
270
257
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
|
|
271
258
|
container.parentElement.parentElement.classList.add('force-no-hover');
|
|
272
|
-
const templateDisposable = ( new DisposableStore());
|
|
259
|
+
const templateDisposable = ( (new DisposableStore()));
|
|
273
260
|
const inputElement = append(container, $('.scm-input'));
|
|
274
261
|
const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode);
|
|
275
262
|
templateDisposable.add(inputWidget);
|
|
276
|
-
return { inputWidget, inputWidgetHeight: InputRenderer_1.DEFAULT_HEIGHT, elementDisposables: ( new DisposableStore()), templateDisposable };
|
|
263
|
+
return { inputWidget, inputWidgetHeight: InputRenderer_1.DEFAULT_HEIGHT, elementDisposables: ( (new DisposableStore())), templateDisposable };
|
|
277
264
|
}
|
|
278
265
|
renderElement(node, index, templateData) {
|
|
279
266
|
const input = node.element;
|
|
@@ -285,7 +272,7 @@ let InputRenderer = class InputRenderer {
|
|
|
285
272
|
const renderedWidgets = this.inputWidgets.get(input) ?? [];
|
|
286
273
|
const renderedWidgetIndex = renderedWidgets.findIndex(renderedWidget => renderedWidget === templateData.inputWidget);
|
|
287
274
|
if (renderedWidgetIndex < 0) {
|
|
288
|
-
throw new Error('Disposing unknown input widget');
|
|
275
|
+
throw ( (new Error('Disposing unknown input widget')));
|
|
289
276
|
}
|
|
290
277
|
if (renderedWidgets.length === 1) {
|
|
291
278
|
this.inputWidgets.delete(input);
|
|
@@ -325,7 +312,7 @@ let InputRenderer = class InputRenderer {
|
|
|
325
312
|
layoutEditor();
|
|
326
313
|
}
|
|
327
314
|
renderCompressedElements() {
|
|
328
|
-
throw new Error('Should never happen since node is incompressible');
|
|
315
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
329
316
|
}
|
|
330
317
|
disposeElement(group, index, template) {
|
|
331
318
|
template.elementDisposables.clear();
|
|
@@ -357,9 +344,9 @@ let InputRenderer = class InputRenderer {
|
|
|
357
344
|
}
|
|
358
345
|
}
|
|
359
346
|
};
|
|
360
|
-
InputRenderer = InputRenderer_1 = ( __decorate([
|
|
361
|
-
( __param(3, IInstantiationService))
|
|
362
|
-
], InputRenderer));
|
|
347
|
+
InputRenderer = InputRenderer_1 = ( (__decorate([
|
|
348
|
+
( (__param(3, IInstantiationService)))
|
|
349
|
+
], InputRenderer)));
|
|
363
350
|
let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
364
351
|
static { ResourceGroupRenderer_1 = this; }
|
|
365
352
|
static { this.TEMPLATE_ID = 'resource group'; }
|
|
@@ -373,11 +360,11 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
|
373
360
|
const element = append(container, $('.resource-group'));
|
|
374
361
|
const name = append(element, $('.name'));
|
|
375
362
|
const actionsContainer = append(element, $('.actions'));
|
|
376
|
-
const actionBar = ( new ActionBar(actionsContainer, { actionViewItemProvider: this.actionViewItemProvider }));
|
|
363
|
+
const actionBar = ( (new ActionBar(actionsContainer, { actionViewItemProvider: this.actionViewItemProvider })));
|
|
377
364
|
const countContainer = append(element, $('.count'));
|
|
378
|
-
const count = ( new CountBadge(countContainer, {}, defaultCountBadgeStyles));
|
|
365
|
+
const count = ( (new CountBadge(countContainer, {}, defaultCountBadgeStyles)));
|
|
379
366
|
const disposables = combinedDisposable(actionBar);
|
|
380
|
-
return { name, count, actionBar, elementDisposables: ( new DisposableStore()), disposables };
|
|
367
|
+
return { name, count, actionBar, elementDisposables: ( (new DisposableStore())), disposables };
|
|
381
368
|
}
|
|
382
369
|
renderElement(node, index, template) {
|
|
383
370
|
const group = node.element;
|
|
@@ -389,7 +376,7 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
|
389
376
|
template.elementDisposables.add(connectPrimaryMenuToInlineActionBar(menus.getResourceGroupMenu(group), template.actionBar));
|
|
390
377
|
}
|
|
391
378
|
renderCompressedElements(node, index, templateData, height) {
|
|
392
|
-
throw new Error('Should never happen since node is incompressible');
|
|
379
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
393
380
|
}
|
|
394
381
|
disposeElement(group, index, template) {
|
|
395
382
|
template.elementDisposables.clear();
|
|
@@ -399,9 +386,9 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
|
399
386
|
template.disposables.dispose();
|
|
400
387
|
}
|
|
401
388
|
};
|
|
402
|
-
ResourceGroupRenderer = ResourceGroupRenderer_1 = ( __decorate([
|
|
403
|
-
( __param(1, ISCMViewService))
|
|
404
|
-
], ResourceGroupRenderer));
|
|
389
|
+
ResourceGroupRenderer = ResourceGroupRenderer_1 = ( (__decorate([
|
|
390
|
+
( (__param(1, ISCMViewService)))
|
|
391
|
+
], ResourceGroupRenderer)));
|
|
405
392
|
class RepositoryPaneActionRunner extends ActionRunner {
|
|
406
393
|
constructor(getSelectedResources) {
|
|
407
394
|
super();
|
|
@@ -412,9 +399,9 @@ class RepositoryPaneActionRunner extends ActionRunner {
|
|
|
412
399
|
return super.runAction(action, context);
|
|
413
400
|
}
|
|
414
401
|
const selection = this.getSelectedResources();
|
|
415
|
-
const contextIsSelected = ( selection.some(s => s === context));
|
|
402
|
+
const contextIsSelected = ( (selection.some(s => s === context)));
|
|
416
403
|
const actualContext = contextIsSelected ? selection : [context];
|
|
417
|
-
const args = flatten(( actualContext.map(e => ResourceTree.isResourceNode(e) ? ResourceTree.collect(e) : [e])));
|
|
404
|
+
const args = flatten(( (actualContext.map(e => ResourceTree.isResourceNode(e) ? ResourceTree.collect(e) : [e]))));
|
|
418
405
|
await action.run(...args);
|
|
419
406
|
}
|
|
420
407
|
}
|
|
@@ -430,8 +417,8 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
430
417
|
this.labelService = labelService;
|
|
431
418
|
this.scmViewService = scmViewService;
|
|
432
419
|
this.themeService = themeService;
|
|
433
|
-
this.disposables = ( new DisposableStore());
|
|
434
|
-
this.renderedResources = ( new Map());
|
|
420
|
+
this.disposables = ( (new DisposableStore()));
|
|
421
|
+
this.renderedResources = ( (new Map()));
|
|
435
422
|
themeService.onDidColorThemeChange(this.onDidColorThemeChange, this, this.disposables);
|
|
436
423
|
}
|
|
437
424
|
renderTemplate(container) {
|
|
@@ -439,14 +426,14 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
439
426
|
const name = append(element, $('.name'));
|
|
440
427
|
const fileLabel = this.labels.create(name, { supportDescriptionHighlights: true, supportHighlights: true });
|
|
441
428
|
const actionsContainer = append(fileLabel.element, $('.actions'));
|
|
442
|
-
const actionBar = ( new ActionBar(actionsContainer, {
|
|
429
|
+
const actionBar = ( (new ActionBar(actionsContainer, {
|
|
443
430
|
actionViewItemProvider: this.actionViewItemProvider,
|
|
444
431
|
actionRunner: this.actionRunner
|
|
445
|
-
}));
|
|
432
|
+
})));
|
|
446
433
|
const decorationIcon = append(element, $('.decoration-icon'));
|
|
447
|
-
const actionBarMenuListener = ( new MutableDisposable());
|
|
434
|
+
const actionBarMenuListener = ( (new MutableDisposable()));
|
|
448
435
|
const disposables = combinedDisposable(actionBar, fileLabel, actionBarMenuListener);
|
|
449
|
-
return { element, name, fileLabel, decorationIcon, actionBar, actionBarMenu: undefined, actionBarMenuListener, elementDisposables: ( new DisposableStore()), disposables };
|
|
436
|
+
return { element, name, fileLabel, decorationIcon, actionBar, actionBarMenu: undefined, actionBarMenuListener, elementDisposables: ( (new DisposableStore())), disposables };
|
|
450
437
|
}
|
|
451
438
|
renderElement(node, index, template) {
|
|
452
439
|
const resourceOrFolder = node.element;
|
|
@@ -493,7 +480,7 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
493
480
|
renderCompressedElements(node, index, template, height) {
|
|
494
481
|
const compressed = node.element;
|
|
495
482
|
const folder = compressed.elements[compressed.elements.length - 1];
|
|
496
|
-
const label = ( compressed.elements.map(e => e.name));
|
|
483
|
+
const label = ( (compressed.elements.map(e => e.name)));
|
|
497
484
|
const fileKind = FileKind.FOLDER;
|
|
498
485
|
const matches = createMatches(node.filterData);
|
|
499
486
|
template.fileLabel.setResource({ resource: folder.uri, name: label }, {
|
|
@@ -606,11 +593,11 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
606
593
|
this.disposables.dispose();
|
|
607
594
|
}
|
|
608
595
|
};
|
|
609
|
-
ResourceRenderer = ResourceRenderer_1 = ( __decorate([
|
|
610
|
-
( __param(4, ILabelService)),
|
|
611
|
-
( __param(5, ISCMViewService)),
|
|
612
|
-
( __param(6, IThemeService))
|
|
613
|
-
], ResourceRenderer));
|
|
596
|
+
ResourceRenderer = ResourceRenderer_1 = ( (__decorate([
|
|
597
|
+
( (__param(4, ILabelService))),
|
|
598
|
+
( (__param(5, ISCMViewService))),
|
|
599
|
+
( (__param(6, IThemeService)))
|
|
600
|
+
], ResourceRenderer)));
|
|
614
601
|
class HistoryItemGroupActionRunner extends ActionRunner {
|
|
615
602
|
runAction(action, context) {
|
|
616
603
|
if (!(action instanceof MenuItemAction)) {
|
|
@@ -635,10 +622,10 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
635
622
|
renderTemplate(container) {
|
|
636
623
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
|
|
637
624
|
const element = append(container, $('.history-item-group'));
|
|
638
|
-
const label = ( new IconLabel(element, { supportIcons: true }));
|
|
625
|
+
const label = ( (new IconLabel(element, { supportIcons: true })));
|
|
639
626
|
const iconContainer = prepend(label.element, $('.icon-container'));
|
|
640
|
-
const templateDisposables = ( new DisposableStore());
|
|
641
|
-
const toolBar = ( new WorkbenchToolBar(
|
|
627
|
+
const templateDisposables = ( (new DisposableStore()));
|
|
628
|
+
const toolBar = ( (new WorkbenchToolBar(
|
|
642
629
|
append(element, $('.actions')),
|
|
643
630
|
{ actionRunner: this.actionRunner, menuOptions: { shouldForwardArgs: true } },
|
|
644
631
|
this.menuService,
|
|
@@ -646,11 +633,11 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
646
633
|
this.contextMenuService,
|
|
647
634
|
this.keybindingService,
|
|
648
635
|
this.telemetryService
|
|
649
|
-
));
|
|
636
|
+
)));
|
|
650
637
|
templateDisposables.add(toolBar);
|
|
651
638
|
const countContainer = append(element, $('.count'));
|
|
652
|
-
const count = ( new CountBadge(countContainer, {}, defaultCountBadgeStyles));
|
|
653
|
-
return { iconContainer, label, toolBar, count, elementDisposables: ( new DisposableStore()), templateDisposables };
|
|
639
|
+
const count = ( (new CountBadge(countContainer, {}, defaultCountBadgeStyles)));
|
|
640
|
+
return { iconContainer, label, toolBar, count, elementDisposables: ( (new DisposableStore())), templateDisposables };
|
|
654
641
|
}
|
|
655
642
|
renderElement(node, index, templateData, height) {
|
|
656
643
|
const historyItemGroup = node.element;
|
|
@@ -676,7 +663,7 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
676
663
|
}
|
|
677
664
|
}
|
|
678
665
|
renderCompressedElements(node, index, templateData, height) {
|
|
679
|
-
throw new Error('Should never happen since node is incompressible');
|
|
666
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
680
667
|
}
|
|
681
668
|
disposeElement(node, index, templateData, height) {
|
|
682
669
|
templateData.elementDisposables.clear();
|
|
@@ -686,14 +673,14 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
686
673
|
templateData.templateDisposables.dispose();
|
|
687
674
|
}
|
|
688
675
|
};
|
|
689
|
-
HistoryItemGroupRenderer = HistoryItemGroupRenderer_1 = ( __decorate([
|
|
690
|
-
( __param(1, IContextKeyService)),
|
|
691
|
-
( __param(2, IContextMenuService)),
|
|
692
|
-
( __param(3, IKeybindingService)),
|
|
693
|
-
( __param(4, IMenuService)),
|
|
694
|
-
( __param(5, ISCMViewService)),
|
|
695
|
-
( __param(6, ITelemetryService))
|
|
696
|
-
], HistoryItemGroupRenderer));
|
|
676
|
+
HistoryItemGroupRenderer = HistoryItemGroupRenderer_1 = ( (__decorate([
|
|
677
|
+
( (__param(1, IContextKeyService))),
|
|
678
|
+
( (__param(2, IContextMenuService))),
|
|
679
|
+
( (__param(3, IKeybindingService))),
|
|
680
|
+
( (__param(4, IMenuService))),
|
|
681
|
+
( (__param(5, ISCMViewService))),
|
|
682
|
+
( (__param(6, ITelemetryService)))
|
|
683
|
+
], HistoryItemGroupRenderer)));
|
|
697
684
|
class HistoryItemActionRunner extends ActionRunner {
|
|
698
685
|
async runAction(action, context) {
|
|
699
686
|
if (!(action instanceof MenuItemAction)) {
|
|
@@ -725,20 +712,20 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
725
712
|
renderTemplate(container) {
|
|
726
713
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
|
|
727
714
|
const element = append(container, $('.history-item'));
|
|
728
|
-
const iconLabel = ( new IconLabel(element, { supportIcons: true }));
|
|
715
|
+
const iconLabel = ( (new IconLabel(element, { supportIcons: true })));
|
|
729
716
|
const iconContainer = prepend(iconLabel.element, $('.icon-container'));
|
|
730
|
-
const disposables = ( new DisposableStore());
|
|
717
|
+
const disposables = ( (new DisposableStore()));
|
|
731
718
|
const actionsContainer = append(element, $('.actions'));
|
|
732
|
-
const actionBar = ( new ActionBar(
|
|
719
|
+
const actionBar = ( (new ActionBar(
|
|
733
720
|
actionsContainer,
|
|
734
721
|
{ actionRunner: this.actionRunner, actionViewItemProvider: this.actionViewItemProvider }
|
|
735
|
-
));
|
|
722
|
+
)));
|
|
736
723
|
disposables.add(actionBar);
|
|
737
724
|
const statsContainer = append(element, $('.stats-container'));
|
|
738
725
|
const filesLabel = append(statsContainer, $('.files-label'));
|
|
739
726
|
const insertionsLabel = append(statsContainer, $('.insertions-label'));
|
|
740
727
|
const deletionsLabel = append(statsContainer, $('.deletions-label'));
|
|
741
|
-
return { iconContainer, label: iconLabel, actionBar, statsContainer, filesLabel, insertionsLabel, deletionsLabel, elementDisposables: ( new DisposableStore()), disposables };
|
|
728
|
+
return { iconContainer, label: iconLabel, actionBar, statsContainer, filesLabel, insertionsLabel, deletionsLabel, elementDisposables: ( (new DisposableStore())), disposables };
|
|
742
729
|
}
|
|
743
730
|
renderElement(node, index, templateData, height) {
|
|
744
731
|
const historyItem = node.element;
|
|
@@ -757,59 +744,31 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
757
744
|
this.renderStatistics(node, index, templateData, height);
|
|
758
745
|
}
|
|
759
746
|
renderCompressedElements(node, index, templateData, height) {
|
|
760
|
-
throw new Error('Should never happen since node is incompressible');
|
|
747
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
761
748
|
}
|
|
762
749
|
renderStatistics(node, index, templateData, height) {
|
|
763
750
|
const historyItem = node.element;
|
|
764
751
|
if (historyItem.statistics) {
|
|
765
752
|
const statsAriaLabel = [
|
|
766
753
|
historyItem.statistics.files === 1 ?
|
|
767
|
-
( localizeWithPath(
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
"{0} file changed",
|
|
771
|
-
historyItem.statistics.files
|
|
772
|
-
)) :
|
|
773
|
-
( localizeWithPath(
|
|
774
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
775
|
-
'filesChanged',
|
|
776
|
-
"{0} files changed",
|
|
777
|
-
historyItem.statistics.files
|
|
778
|
-
)),
|
|
779
|
-
historyItem.statistics.insertions === 1 ? ( localizeWithPath(
|
|
780
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
781
|
-
'insertion',
|
|
782
|
-
"{0} insertion{1}",
|
|
783
|
-
historyItem.statistics.insertions,
|
|
784
|
-
'(+)'
|
|
785
|
-
)) :
|
|
754
|
+
( localizeWithPath(_moduleId, 4, "{0} file changed", historyItem.statistics.files)) :
|
|
755
|
+
( localizeWithPath(_moduleId, 5, "{0} files changed", historyItem.statistics.files)),
|
|
756
|
+
historyItem.statistics.insertions === 1 ? ( localizeWithPath(_moduleId, 6, "{0} insertion{1}", historyItem.statistics.insertions, '(+)')) :
|
|
786
757
|
historyItem.statistics.insertions > 1 ? ( localizeWithPath(
|
|
787
|
-
|
|
788
|
-
|
|
758
|
+
_moduleId,
|
|
759
|
+
7,
|
|
789
760
|
"{0} insertions{1}",
|
|
790
761
|
historyItem.statistics.insertions,
|
|
791
762
|
'(+)'
|
|
792
763
|
)) : '',
|
|
793
|
-
historyItem.statistics.deletions === 1 ? ( localizeWithPath(
|
|
794
|
-
'
|
|
795
|
-
'deletion',
|
|
796
|
-
"{0} deletion{1}",
|
|
797
|
-
historyItem.statistics.deletions,
|
|
798
|
-
'(-)'
|
|
799
|
-
)) :
|
|
800
|
-
historyItem.statistics.deletions > 1 ? ( localizeWithPath(
|
|
801
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
802
|
-
'deletions',
|
|
803
|
-
"{0} deletions{1}",
|
|
804
|
-
historyItem.statistics.deletions,
|
|
805
|
-
'(-)'
|
|
806
|
-
)) : ''
|
|
764
|
+
historyItem.statistics.deletions === 1 ? ( localizeWithPath(_moduleId, 8, "{0} deletion{1}", historyItem.statistics.deletions, '(-)')) :
|
|
765
|
+
historyItem.statistics.deletions > 1 ? ( localizeWithPath(_moduleId, 9, "{0} deletions{1}", historyItem.statistics.deletions, '(-)')) : ''
|
|
807
766
|
];
|
|
808
767
|
const statsTitle = statsAriaLabel
|
|
809
768
|
.filter(l => l !== '').join(', ');
|
|
810
769
|
templateData.statsContainer.title = statsTitle;
|
|
811
770
|
templateData.statsContainer.setAttribute('aria-label', statsTitle);
|
|
812
|
-
templateData.filesLabel.textContent = ( historyItem.statistics.files.toString());
|
|
771
|
+
templateData.filesLabel.textContent = ( (historyItem.statistics.files.toString()));
|
|
813
772
|
templateData.insertionsLabel.textContent = historyItem.statistics.insertions > 0 ? `+${historyItem.statistics.insertions}` : '';
|
|
814
773
|
templateData.insertionsLabel.classList.toggle('hidden', historyItem.statistics.insertions === 0);
|
|
815
774
|
templateData.deletionsLabel.textContent = historyItem.statistics.deletions > 0 ? `-${historyItem.statistics.deletions}` : '';
|
|
@@ -824,9 +783,9 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
824
783
|
templateData.disposables.dispose();
|
|
825
784
|
}
|
|
826
785
|
};
|
|
827
|
-
HistoryItemRenderer = HistoryItemRenderer_1 = ( __decorate([
|
|
828
|
-
( __param(2, ISCMViewService))
|
|
829
|
-
], HistoryItemRenderer));
|
|
786
|
+
HistoryItemRenderer = HistoryItemRenderer_1 = ( (__decorate([
|
|
787
|
+
( (__param(2, ISCMViewService)))
|
|
788
|
+
], HistoryItemRenderer)));
|
|
830
789
|
let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
831
790
|
static { HistoryItemChangeRenderer_1 = this; }
|
|
832
791
|
static { this.TEMPLATE_ID = 'historyItemChange'; }
|
|
@@ -841,7 +800,7 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
|
841
800
|
const name = append(element, $('.name'));
|
|
842
801
|
const fileLabel = this.labels.create(name, { supportDescriptionHighlights: true, supportHighlights: true });
|
|
843
802
|
const decorationIcon = append(element, $('.decoration-icon'));
|
|
844
|
-
return { element, name, fileLabel, decorationIcon, disposables: ( new DisposableStore()) };
|
|
803
|
+
return { element, name, fileLabel, decorationIcon, disposables: ( (new DisposableStore())) };
|
|
845
804
|
}
|
|
846
805
|
renderElement(node, index, templateData, height) {
|
|
847
806
|
const historyItemChangeOrFolder = node.element;
|
|
@@ -853,7 +812,7 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
|
853
812
|
renderCompressedElements(node, index, templateData, height) {
|
|
854
813
|
const compressed = node.element;
|
|
855
814
|
const folder = compressed.elements[compressed.elements.length - 1];
|
|
856
|
-
const label = ( compressed.elements.map(e => e.name));
|
|
815
|
+
const label = ( (compressed.elements.map(e => e.name)));
|
|
857
816
|
templateData.fileLabel.setResource({ resource: folder.uri, name: label }, {
|
|
858
817
|
fileDecorations: { colors: false, badges: true },
|
|
859
818
|
fileKind: FileKind.FOLDER,
|
|
@@ -864,9 +823,9 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
|
864
823
|
templateData.disposables.dispose();
|
|
865
824
|
}
|
|
866
825
|
};
|
|
867
|
-
HistoryItemChangeRenderer = HistoryItemChangeRenderer_1 = ( __decorate([
|
|
868
|
-
( __param(2, ILabelService))
|
|
869
|
-
], HistoryItemChangeRenderer));
|
|
826
|
+
HistoryItemChangeRenderer = HistoryItemChangeRenderer_1 = ( (__decorate([
|
|
827
|
+
( (__param(2, ILabelService)))
|
|
828
|
+
], HistoryItemChangeRenderer)));
|
|
870
829
|
let SeparatorRenderer = class SeparatorRenderer {
|
|
871
830
|
static { SeparatorRenderer_1 = this; }
|
|
872
831
|
static { this.TEMPLATE_ID = 'separator'; }
|
|
@@ -881,12 +840,12 @@ let SeparatorRenderer = class SeparatorRenderer {
|
|
|
881
840
|
renderTemplate(container) {
|
|
882
841
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
|
|
883
842
|
container.parentElement.parentElement.classList.add('cursor-default', 'force-no-hover');
|
|
884
|
-
const disposables = ( new DisposableStore());
|
|
843
|
+
const disposables = ( (new DisposableStore()));
|
|
885
844
|
const element = append(container, $('.separator-container'));
|
|
886
|
-
const label = ( new IconLabel(element, { supportIcons: true, }));
|
|
845
|
+
const label = ( (new IconLabel(element, { supportIcons: true, })));
|
|
887
846
|
append(element, $('.separator'));
|
|
888
847
|
disposables.add(label);
|
|
889
|
-
const toolBar = ( new MenuWorkbenchToolBar(
|
|
848
|
+
const toolBar = ( (new MenuWorkbenchToolBar(
|
|
890
849
|
append(element, $('.actions')),
|
|
891
850
|
MenuId.SCMChangesSeparator,
|
|
892
851
|
{ moreIcon: Codicon.gear },
|
|
@@ -895,7 +854,7 @@ let SeparatorRenderer = class SeparatorRenderer {
|
|
|
895
854
|
this.contextMenuService,
|
|
896
855
|
this.keybindingService,
|
|
897
856
|
this.telemetryService
|
|
898
|
-
));
|
|
857
|
+
)));
|
|
899
858
|
disposables.add(toolBar);
|
|
900
859
|
return { label, disposables };
|
|
901
860
|
}
|
|
@@ -903,19 +862,19 @@ let SeparatorRenderer = class SeparatorRenderer {
|
|
|
903
862
|
templateData.label.setLabel(element.element.label, undefined, { title: element.element.ariaLabel });
|
|
904
863
|
}
|
|
905
864
|
renderCompressedElements(node, index, templateData, height) {
|
|
906
|
-
throw new Error('Should never happen since node is incompressible');
|
|
865
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
907
866
|
}
|
|
908
867
|
disposeTemplate(templateData) {
|
|
909
868
|
templateData.disposables.dispose();
|
|
910
869
|
}
|
|
911
870
|
};
|
|
912
|
-
SeparatorRenderer = SeparatorRenderer_1 = ( __decorate([
|
|
913
|
-
( __param(0, IContextKeyService)),
|
|
914
|
-
( __param(1, IContextMenuService)),
|
|
915
|
-
( __param(2, IKeybindingService)),
|
|
916
|
-
( __param(3, IMenuService)),
|
|
917
|
-
( __param(4, ITelemetryService))
|
|
918
|
-
], SeparatorRenderer));
|
|
871
|
+
SeparatorRenderer = SeparatorRenderer_1 = ( (__decorate([
|
|
872
|
+
( (__param(0, IContextKeyService))),
|
|
873
|
+
( (__param(1, IContextMenuService))),
|
|
874
|
+
( (__param(2, IKeybindingService))),
|
|
875
|
+
( (__param(3, IMenuService))),
|
|
876
|
+
( (__param(4, ITelemetryService)))
|
|
877
|
+
], SeparatorRenderer)));
|
|
919
878
|
class ListDelegate {
|
|
920
879
|
constructor(inputRenderer) {
|
|
921
880
|
this.inputRenderer = inputRenderer;
|
|
@@ -960,7 +919,7 @@ class ListDelegate {
|
|
|
960
919
|
return SeparatorRenderer.TEMPLATE_ID;
|
|
961
920
|
}
|
|
962
921
|
else {
|
|
963
|
-
throw new Error('Unknown element');
|
|
922
|
+
throw ( (new Error('Unknown element')));
|
|
964
923
|
}
|
|
965
924
|
}
|
|
966
925
|
}
|
|
@@ -990,7 +949,7 @@ class SCMTreeSorter {
|
|
|
990
949
|
compare(one, other) {
|
|
991
950
|
if (isSCMRepository(one)) {
|
|
992
951
|
if (!isSCMRepository(other)) {
|
|
993
|
-
throw new Error('Invalid comparison');
|
|
952
|
+
throw ( (new Error('Invalid comparison')));
|
|
994
953
|
}
|
|
995
954
|
return 0;
|
|
996
955
|
}
|
|
@@ -1017,19 +976,19 @@ class SCMTreeSorter {
|
|
|
1017
976
|
}
|
|
1018
977
|
if (isSCMHistoryItemTreeElement(one)) {
|
|
1019
978
|
if (!isSCMHistoryItemTreeElement(other)) {
|
|
1020
|
-
throw new Error('Invalid comparison');
|
|
979
|
+
throw ( (new Error('Invalid comparison')));
|
|
1021
980
|
}
|
|
1022
981
|
return 0;
|
|
1023
982
|
}
|
|
1024
983
|
if (isSCMHistoryItemChangeTreeElement(one) || isSCMHistoryItemChangeNode(one)) {
|
|
1025
984
|
if (this.viewMode() === "list" ) {
|
|
1026
985
|
if (!isSCMHistoryItemChangeTreeElement(other)) {
|
|
1027
|
-
throw new Error('Invalid comparison');
|
|
986
|
+
throw ( (new Error('Invalid comparison')));
|
|
1028
987
|
}
|
|
1029
988
|
return comparePaths(one.uri.fsPath, other.uri.fsPath);
|
|
1030
989
|
}
|
|
1031
990
|
if (!isSCMHistoryItemChangeTreeElement(other) && !isSCMHistoryItemChangeNode(other)) {
|
|
1032
|
-
throw new Error('Invalid comparison');
|
|
991
|
+
throw ( (new Error('Invalid comparison')));
|
|
1033
992
|
}
|
|
1034
993
|
const oneName = isSCMHistoryItemChangeNode(one) ? one.name : basename(one.uri);
|
|
1035
994
|
const otherName = isSCMHistoryItemChangeNode(other) ? other.name : basename(other.uri);
|
|
@@ -1098,12 +1057,12 @@ let SCMTreeKeyboardNavigationLabelProvider = class SCMTreeKeyboardNavigationLabe
|
|
|
1098
1057
|
}
|
|
1099
1058
|
getCompressedNodeKeyboardNavigationLabel(elements) {
|
|
1100
1059
|
const folders = elements;
|
|
1101
|
-
return ( folders.map(e => e.name)).join('/');
|
|
1060
|
+
return ( (folders.map(e => e.name))).join('/');
|
|
1102
1061
|
}
|
|
1103
1062
|
};
|
|
1104
|
-
SCMTreeKeyboardNavigationLabelProvider = ( __decorate([
|
|
1105
|
-
( __param(1, ILabelService))
|
|
1106
|
-
], SCMTreeKeyboardNavigationLabelProvider));
|
|
1063
|
+
SCMTreeKeyboardNavigationLabelProvider = ( (__decorate([
|
|
1064
|
+
( (__param(1, ILabelService)))
|
|
1065
|
+
], SCMTreeKeyboardNavigationLabelProvider)));
|
|
1107
1066
|
function getSCMResourceId(element) {
|
|
1108
1067
|
if (isSCMRepository(element)) {
|
|
1109
1068
|
const provider = element.provider;
|
|
@@ -1124,11 +1083,11 @@ function getSCMResourceId(element) {
|
|
|
1124
1083
|
else if (isSCMResource(element)) {
|
|
1125
1084
|
const group = element.resourceGroup;
|
|
1126
1085
|
const provider = group.provider;
|
|
1127
|
-
return `resource:${provider.id}/${group.id}/${( element.sourceUri.toString())}`;
|
|
1086
|
+
return `resource:${provider.id}/${group.id}/${( (element.sourceUri.toString()))}`;
|
|
1128
1087
|
}
|
|
1129
1088
|
else if (isSCMResourceNode(element)) {
|
|
1130
1089
|
const group = element.context;
|
|
1131
|
-
return `folder:${group.provider.id}/${group.id}/$FOLDER/${( element.uri.toString())}`;
|
|
1090
|
+
return `folder:${group.provider.id}/${group.id}/$FOLDER/${( (element.uri.toString()))}`;
|
|
1132
1091
|
}
|
|
1133
1092
|
else if (isSCMHistoryItemGroupTreeElement(element)) {
|
|
1134
1093
|
const provider = element.repository.provider;
|
|
@@ -1143,20 +1102,20 @@ function getSCMResourceId(element) {
|
|
|
1143
1102
|
const historyItem = element.historyItem;
|
|
1144
1103
|
const historyItemGroup = historyItem.historyItemGroup;
|
|
1145
1104
|
const provider = historyItemGroup.repository.provider;
|
|
1146
|
-
return `historyItemChange:${provider.id}/${historyItemGroup.id}/${historyItem.id}/${( element.uri.toString())}`;
|
|
1105
|
+
return `historyItemChange:${provider.id}/${historyItemGroup.id}/${historyItem.id}/${( (element.uri.toString()))}`;
|
|
1147
1106
|
}
|
|
1148
1107
|
else if (isSCMHistoryItemChangeNode(element)) {
|
|
1149
1108
|
const historyItem = element.context;
|
|
1150
1109
|
const historyItemGroup = historyItem.historyItemGroup;
|
|
1151
1110
|
const provider = historyItemGroup.repository.provider;
|
|
1152
|
-
return `folder:${provider.id}/${historyItemGroup.id}/${historyItem.id}/$FOLDER/${( element.uri.toString())}`;
|
|
1111
|
+
return `folder:${provider.id}/${historyItemGroup.id}/${historyItem.id}/$FOLDER/${( (element.uri.toString()))}`;
|
|
1153
1112
|
}
|
|
1154
1113
|
else if (isSCMViewSeparator(element)) {
|
|
1155
1114
|
const provider = element.repository.provider;
|
|
1156
1115
|
return `separator:${provider.id}`;
|
|
1157
1116
|
}
|
|
1158
1117
|
else {
|
|
1159
|
-
throw new Error('Invalid tree element');
|
|
1118
|
+
throw ( (new Error('Invalid tree element')));
|
|
1160
1119
|
}
|
|
1161
1120
|
}
|
|
1162
1121
|
class SCMResourceIdentityProvider {
|
|
@@ -1169,11 +1128,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1169
1128
|
this.labelService = labelService;
|
|
1170
1129
|
}
|
|
1171
1130
|
getWidgetAriaLabel() {
|
|
1172
|
-
return ( localizeWithPath(
|
|
1173
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1174
|
-
'scm',
|
|
1175
|
-
"Source Control Management"
|
|
1176
|
-
));
|
|
1131
|
+
return ( localizeWithPath(_moduleId, 10, "Source Control Management"));
|
|
1177
1132
|
}
|
|
1178
1133
|
getAriaLabel(element) {
|
|
1179
1134
|
if (ResourceTree.isResourceNode(element)) {
|
|
@@ -1183,11 +1138,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1183
1138
|
return `${element.provider.name} ${element.provider.label}`;
|
|
1184
1139
|
}
|
|
1185
1140
|
else if (isSCMInput(element)) {
|
|
1186
|
-
return ( localizeWithPath(
|
|
1187
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1188
|
-
'input',
|
|
1189
|
-
"Source Control Input"
|
|
1190
|
-
));
|
|
1141
|
+
return ( localizeWithPath(_moduleId, 11, "Source Control Input"));
|
|
1191
1142
|
}
|
|
1192
1143
|
else if (isSCMActionButton(element)) {
|
|
1193
1144
|
return element.button?.command.title ?? '';
|
|
@@ -1226,56 +1177,52 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1226
1177
|
}
|
|
1227
1178
|
}
|
|
1228
1179
|
};
|
|
1229
|
-
SCMAccessibilityProvider = ( __decorate([
|
|
1230
|
-
( __param(0, ILabelService))
|
|
1231
|
-
], SCMAccessibilityProvider));
|
|
1180
|
+
SCMAccessibilityProvider = ( (__decorate([
|
|
1181
|
+
( (__param(0, ILabelService)))
|
|
1182
|
+
], SCMAccessibilityProvider)));
|
|
1232
1183
|
const Menus = {
|
|
1233
|
-
ViewSort: ( new MenuId('SCMViewSort')),
|
|
1234
|
-
Repositories: ( new MenuId('SCMRepositories')),
|
|
1235
|
-
ChangesSettings: ( new MenuId('SCMChangesSettings')),
|
|
1184
|
+
ViewSort: ( (new MenuId('SCMViewSort'))),
|
|
1185
|
+
Repositories: ( (new MenuId('SCMRepositories'))),
|
|
1186
|
+
ChangesSettings: ( (new MenuId('SCMChangesSettings'))),
|
|
1236
1187
|
};
|
|
1237
1188
|
const ContextKeys = {
|
|
1238
|
-
SCMViewMode: ( new RawContextKey('scmViewMode', "list" )),
|
|
1239
|
-
SCMViewSortKey: ( new RawContextKey('scmViewSortKey', "path" )),
|
|
1240
|
-
SCMViewAreAllRepositoriesCollapsed: ( new RawContextKey('scmViewAreAllRepositoriesCollapsed', false)),
|
|
1241
|
-
SCMViewIsAnyRepositoryCollapsible: ( new RawContextKey('scmViewIsAnyRepositoryCollapsible', false)),
|
|
1242
|
-
SCMProvider: ( new RawContextKey('scmProvider', undefined)),
|
|
1243
|
-
SCMProviderRootUri: ( new RawContextKey('scmProviderRootUri', undefined)),
|
|
1244
|
-
SCMProviderHasRootUri: ( new RawContextKey('scmProviderHasRootUri', undefined)),
|
|
1245
|
-
RepositoryCount: ( new RawContextKey('scmRepositoryCount', 0)),
|
|
1246
|
-
RepositoryVisibilityCount: ( new RawContextKey('scmRepositoryVisibleCount', 0)),
|
|
1189
|
+
SCMViewMode: ( (new RawContextKey('scmViewMode', "list" ))),
|
|
1190
|
+
SCMViewSortKey: ( (new RawContextKey('scmViewSortKey', "path" ))),
|
|
1191
|
+
SCMViewAreAllRepositoriesCollapsed: ( (new RawContextKey('scmViewAreAllRepositoriesCollapsed', false))),
|
|
1192
|
+
SCMViewIsAnyRepositoryCollapsible: ( (new RawContextKey('scmViewIsAnyRepositoryCollapsible', false))),
|
|
1193
|
+
SCMProvider: ( (new RawContextKey('scmProvider', undefined))),
|
|
1194
|
+
SCMProviderRootUri: ( (new RawContextKey('scmProviderRootUri', undefined))),
|
|
1195
|
+
SCMProviderHasRootUri: ( (new RawContextKey('scmProviderHasRootUri', undefined))),
|
|
1196
|
+
RepositoryCount: ( (new RawContextKey('scmRepositoryCount', 0))),
|
|
1197
|
+
RepositoryVisibilityCount: ( (new RawContextKey('scmRepositoryVisibleCount', 0))),
|
|
1247
1198
|
RepositoryVisibility(repository) {
|
|
1248
|
-
return (
|
|
1199
|
+
return (
|
|
1200
|
+
(new RawContextKey(`scmRepositoryVisible:${repository.provider.id}`, false))
|
|
1201
|
+
);
|
|
1249
1202
|
}
|
|
1250
1203
|
};
|
|
1251
1204
|
MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
|
|
1252
|
-
title: ( localizeWithPath(
|
|
1253
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1254
|
-
'sortAction',
|
|
1255
|
-
"View & Sort"
|
|
1256
|
-
)),
|
|
1205
|
+
title: ( localizeWithPath(_moduleId, 12, "View & Sort")),
|
|
1257
1206
|
submenu: Menus.ViewSort,
|
|
1258
|
-
when: ( ContextKeyExpr.and(
|
|
1207
|
+
when: ( (ContextKeyExpr.and(
|
|
1208
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1209
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0))
|
|
1210
|
+
))),
|
|
1259
1211
|
group: '0_view&sort',
|
|
1260
1212
|
order: 1
|
|
1261
1213
|
});
|
|
1262
1214
|
MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
|
|
1263
|
-
title: ( localizeWithPath(
|
|
1264
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1265
|
-
'scmChanges',
|
|
1266
|
-
"Incoming & Outgoing"
|
|
1267
|
-
)),
|
|
1215
|
+
title: ( localizeWithPath(_moduleId, 13, "Incoming & Outgoing")),
|
|
1268
1216
|
submenu: Menus.ChangesSettings,
|
|
1269
|
-
when: ( ContextKeyExpr.and(
|
|
1217
|
+
when: ( (ContextKeyExpr.and(
|
|
1218
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1219
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0))
|
|
1220
|
+
))),
|
|
1270
1221
|
group: '0_view&sort',
|
|
1271
1222
|
order: 2
|
|
1272
1223
|
});
|
|
1273
1224
|
MenuRegistry.appendMenuItem(Menus.ViewSort, {
|
|
1274
|
-
title: ( localizeWithPath(
|
|
1275
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1276
|
-
'repositories',
|
|
1277
|
-
"Repositories"
|
|
1278
|
-
)),
|
|
1225
|
+
title: ( localizeWithPath(_moduleId, 14, "Repositories")),
|
|
1279
1226
|
submenu: Menus.Repositories,
|
|
1280
1227
|
when: ContextKeyExpr.greater(ContextKeys.RepositoryCount.key, 1),
|
|
1281
1228
|
group: '0_repositories'
|
|
@@ -1285,7 +1232,7 @@ class SCMChangesSettingAction extends Action2 {
|
|
|
1285
1232
|
super({
|
|
1286
1233
|
...desc,
|
|
1287
1234
|
f1: false,
|
|
1288
|
-
toggled: ( ContextKeyExpr.equals(`config.${settingKey}`, settingValue)),
|
|
1235
|
+
toggled: ( (ContextKeyExpr.equals(`config.${settingKey}`, settingValue))),
|
|
1289
1236
|
});
|
|
1290
1237
|
this.settingKey = settingKey;
|
|
1291
1238
|
this.settingValue = settingValue;
|
|
@@ -1296,21 +1243,13 @@ class SCMChangesSettingAction extends Action2 {
|
|
|
1296
1243
|
}
|
|
1297
1244
|
}
|
|
1298
1245
|
MenuRegistry.appendMenuItem(MenuId.SCMChangesSeparator, {
|
|
1299
|
-
title: ( localizeWithPath(
|
|
1300
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1301
|
-
'incomingChanges',
|
|
1302
|
-
"Show Incoming Changes"
|
|
1303
|
-
)),
|
|
1246
|
+
title: ( localizeWithPath(_moduleId, 15, "Show Incoming Changes")),
|
|
1304
1247
|
submenu: MenuId.SCMIncomingChangesSetting,
|
|
1305
1248
|
group: '1_incoming&outgoing',
|
|
1306
1249
|
order: 1
|
|
1307
1250
|
});
|
|
1308
1251
|
MenuRegistry.appendMenuItem(Menus.ChangesSettings, {
|
|
1309
|
-
title: ( localizeWithPath(
|
|
1310
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1311
|
-
'incomingChanges',
|
|
1312
|
-
"Show Incoming Changes"
|
|
1313
|
-
)),
|
|
1252
|
+
title: ( localizeWithPath(_moduleId, 15, "Show Incoming Changes")),
|
|
1314
1253
|
submenu: MenuId.SCMIncomingChangesSetting,
|
|
1315
1254
|
group: '1_incoming&outgoing',
|
|
1316
1255
|
order: 1
|
|
@@ -1319,7 +1258,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1319
1258
|
constructor() {
|
|
1320
1259
|
super('scm.showIncomingChanges', 'always', {
|
|
1321
1260
|
id: 'workbench.scm.action.showIncomingChanges.always',
|
|
1322
|
-
title: ( localizeWithPath(
|
|
1261
|
+
title: ( localizeWithPath(_moduleId, 16, "Always")),
|
|
1323
1262
|
menu: { id: MenuId.SCMIncomingChangesSetting },
|
|
1324
1263
|
});
|
|
1325
1264
|
}
|
|
@@ -1328,7 +1267,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1328
1267
|
constructor() {
|
|
1329
1268
|
super('scm.showIncomingChanges', 'auto', {
|
|
1330
1269
|
id: 'workbench.scm.action.showIncomingChanges.auto',
|
|
1331
|
-
title: ( localizeWithPath(
|
|
1270
|
+
title: ( localizeWithPath(_moduleId, 17, "Auto")),
|
|
1332
1271
|
menu: {
|
|
1333
1272
|
id: MenuId.SCMIncomingChangesSetting,
|
|
1334
1273
|
}
|
|
@@ -1339,7 +1278,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1339
1278
|
constructor() {
|
|
1340
1279
|
super('scm.showIncomingChanges', 'never', {
|
|
1341
1280
|
id: 'workbench.scm.action.showIncomingChanges.never',
|
|
1342
|
-
title: ( localizeWithPath(
|
|
1281
|
+
title: ( localizeWithPath(_moduleId, 18, "Never")),
|
|
1343
1282
|
menu: {
|
|
1344
1283
|
id: MenuId.SCMIncomingChangesSetting,
|
|
1345
1284
|
}
|
|
@@ -1347,21 +1286,13 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1347
1286
|
}
|
|
1348
1287
|
});
|
|
1349
1288
|
MenuRegistry.appendMenuItem(MenuId.SCMChangesSeparator, {
|
|
1350
|
-
title: ( localizeWithPath(
|
|
1351
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1352
|
-
'outgoingChanges',
|
|
1353
|
-
"Show Outgoing Changes"
|
|
1354
|
-
)),
|
|
1289
|
+
title: ( localizeWithPath(_moduleId, 19, "Show Outgoing Changes")),
|
|
1355
1290
|
submenu: MenuId.SCMOutgoingChangesSetting,
|
|
1356
1291
|
group: '1_incoming&outgoing',
|
|
1357
1292
|
order: 2
|
|
1358
1293
|
});
|
|
1359
1294
|
MenuRegistry.appendMenuItem(Menus.ChangesSettings, {
|
|
1360
|
-
title: ( localizeWithPath(
|
|
1361
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1362
|
-
'outgoingChanges',
|
|
1363
|
-
"Show Outgoing Changes"
|
|
1364
|
-
)),
|
|
1295
|
+
title: ( localizeWithPath(_moduleId, 19, "Show Outgoing Changes")),
|
|
1365
1296
|
submenu: MenuId.SCMOutgoingChangesSetting,
|
|
1366
1297
|
group: '1_incoming&outgoing',
|
|
1367
1298
|
order: 2
|
|
@@ -1370,7 +1301,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1370
1301
|
constructor() {
|
|
1371
1302
|
super('scm.showOutgoingChanges', 'always', {
|
|
1372
1303
|
id: 'workbench.scm.action.showOutgoingChanges.always',
|
|
1373
|
-
title: ( localizeWithPath(
|
|
1304
|
+
title: ( localizeWithPath(_moduleId, 16, "Always")),
|
|
1374
1305
|
menu: {
|
|
1375
1306
|
id: MenuId.SCMOutgoingChangesSetting,
|
|
1376
1307
|
}
|
|
@@ -1381,7 +1312,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1381
1312
|
constructor() {
|
|
1382
1313
|
super('scm.showOutgoingChanges', 'auto', {
|
|
1383
1314
|
id: 'workbench.scm.action.showOutgoingChanges.auto',
|
|
1384
|
-
title: ( localizeWithPath(
|
|
1315
|
+
title: ( localizeWithPath(_moduleId, 17, "Auto")),
|
|
1385
1316
|
menu: {
|
|
1386
1317
|
id: MenuId.SCMOutgoingChangesSetting,
|
|
1387
1318
|
}
|
|
@@ -1392,7 +1323,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1392
1323
|
constructor() {
|
|
1393
1324
|
super('scm.showOutgoingChanges', 'never', {
|
|
1394
1325
|
id: 'workbench.scm.action.showOutgoingChanges.never',
|
|
1395
|
-
title: ( localizeWithPath(
|
|
1326
|
+
title: ( localizeWithPath(_moduleId, 18, "Never")),
|
|
1396
1327
|
menu: {
|
|
1397
1328
|
id: MenuId.SCMOutgoingChangesSetting,
|
|
1398
1329
|
}
|
|
@@ -1403,13 +1334,9 @@ registerAction2(class extends Action2 {
|
|
|
1403
1334
|
constructor() {
|
|
1404
1335
|
super({
|
|
1405
1336
|
id: 'workbench.scm.action.scm.showChangesSummary',
|
|
1406
|
-
title: ( localizeWithPath(
|
|
1407
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1408
|
-
'showChangesSummary',
|
|
1409
|
-
"Show Changes Summary"
|
|
1410
|
-
)),
|
|
1337
|
+
title: ( localizeWithPath(_moduleId, 20, "Show Changes Summary")),
|
|
1411
1338
|
f1: false,
|
|
1412
|
-
toggled: ( ContextKeyExpr.equals('config.scm.showChangesSummary', true)),
|
|
1339
|
+
toggled: ( (ContextKeyExpr.equals('config.scm.showChangesSummary', true))),
|
|
1413
1340
|
menu: [
|
|
1414
1341
|
{ id: MenuId.SCMChangesSeparator, order: 3 },
|
|
1415
1342
|
{ id: Menus.ChangesSettings, order: 3 },
|
|
@@ -1428,8 +1355,11 @@ class RepositoryVisibilityAction extends Action2 {
|
|
|
1428
1355
|
id: `workbench.scm.action.toggleRepositoryVisibility.${repository.provider.id}`,
|
|
1429
1356
|
title: repository.provider.name,
|
|
1430
1357
|
f1: false,
|
|
1431
|
-
precondition: ( ContextKeyExpr.or(
|
|
1432
|
-
|
|
1358
|
+
precondition: ( (ContextKeyExpr.or(
|
|
1359
|
+
(ContextKeys.RepositoryVisibilityCount.notEqualsTo(1)),
|
|
1360
|
+
(ContextKeys.RepositoryVisibility(repository).isEqualTo(false))
|
|
1361
|
+
))),
|
|
1362
|
+
toggled: ( (ContextKeys.RepositoryVisibility(repository).isEqualTo(true))),
|
|
1433
1363
|
menu: { id: Menus.Repositories, group: '0_repositories' }
|
|
1434
1364
|
});
|
|
1435
1365
|
this.repository = repository;
|
|
@@ -1443,8 +1373,8 @@ let RepositoryVisibilityActionController = class RepositoryVisibilityActionContr
|
|
|
1443
1373
|
constructor(contextKeyService, scmViewService, scmService) {
|
|
1444
1374
|
this.contextKeyService = contextKeyService;
|
|
1445
1375
|
this.scmViewService = scmViewService;
|
|
1446
|
-
this.items = ( new Map());
|
|
1447
|
-
this.disposables = ( new DisposableStore());
|
|
1376
|
+
this.items = ( (new Map()));
|
|
1377
|
+
this.disposables = ( (new DisposableStore()));
|
|
1448
1378
|
this.repositoryCountContextKey = ContextKeys.RepositoryCount.bindTo(contextKeyService);
|
|
1449
1379
|
this.repositoryVisibilityCountContextKey = ContextKeys.RepositoryVisibilityCount.bindTo(contextKeyService);
|
|
1450
1380
|
scmViewService.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories, this, this.disposables);
|
|
@@ -1490,32 +1420,28 @@ let RepositoryVisibilityActionController = class RepositoryVisibilityActionContr
|
|
|
1490
1420
|
}
|
|
1491
1421
|
updateRepositoryContextKeys() {
|
|
1492
1422
|
this.repositoryCountContextKey.set(this.items.size);
|
|
1493
|
-
this.repositoryVisibilityCountContextKey.set(Iterable.reduce(( this.items.keys()), (r, repository) => r + (this.scmViewService.isVisible(repository) ? 1 : 0), 0));
|
|
1423
|
+
this.repositoryVisibilityCountContextKey.set(Iterable.reduce(( (this.items.keys())), (r, repository) => r + (this.scmViewService.isVisible(repository) ? 1 : 0), 0));
|
|
1494
1424
|
}
|
|
1495
1425
|
dispose() {
|
|
1496
1426
|
this.disposables.dispose();
|
|
1497
|
-
dispose(( this.items.values()));
|
|
1427
|
+
dispose(( (this.items.values())));
|
|
1498
1428
|
this.items.clear();
|
|
1499
1429
|
}
|
|
1500
1430
|
};
|
|
1501
|
-
RepositoryVisibilityActionController = ( __decorate([
|
|
1502
|
-
( __param(0, IContextKeyService)),
|
|
1503
|
-
( __param(1, ISCMViewService)),
|
|
1504
|
-
( __param(2, ISCMService))
|
|
1505
|
-
], RepositoryVisibilityActionController));
|
|
1431
|
+
RepositoryVisibilityActionController = ( (__decorate([
|
|
1432
|
+
( (__param(0, IContextKeyService))),
|
|
1433
|
+
( (__param(1, ISCMViewService))),
|
|
1434
|
+
( (__param(2, ISCMService)))
|
|
1435
|
+
], RepositoryVisibilityActionController)));
|
|
1506
1436
|
class SetListViewModeAction extends ViewAction {
|
|
1507
1437
|
constructor(id = 'workbench.scm.action.setListViewMode', menu = {}) {
|
|
1508
1438
|
super({
|
|
1509
1439
|
id,
|
|
1510
|
-
title: ( localizeWithPath(
|
|
1511
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1512
|
-
'setListViewMode',
|
|
1513
|
-
"View as List"
|
|
1514
|
-
)),
|
|
1440
|
+
title: ( localizeWithPath(_moduleId, 21, "View as List")),
|
|
1515
1441
|
viewId: VIEW_PANE_ID,
|
|
1516
1442
|
f1: false,
|
|
1517
1443
|
icon: Codicon.listTree,
|
|
1518
|
-
toggled: ( ContextKeys.SCMViewMode.isEqualTo("list" )),
|
|
1444
|
+
toggled: ( (ContextKeys.SCMViewMode.isEqualTo("list" ))),
|
|
1519
1445
|
menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
|
|
1520
1446
|
});
|
|
1521
1447
|
}
|
|
@@ -1527,7 +1453,11 @@ class SetListViewModeNavigationAction extends SetListViewModeAction {
|
|
|
1527
1453
|
constructor() {
|
|
1528
1454
|
super('workbench.scm.action.setListViewModeNavigation', {
|
|
1529
1455
|
id: MenuId.SCMTitle,
|
|
1530
|
-
when: ( ContextKeyExpr.and(
|
|
1456
|
+
when: ( (ContextKeyExpr.and(
|
|
1457
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1458
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0)),
|
|
1459
|
+
(ContextKeys.SCMViewMode.isEqualTo("tree" ))
|
|
1460
|
+
))),
|
|
1531
1461
|
group: 'navigation',
|
|
1532
1462
|
order: -1000
|
|
1533
1463
|
});
|
|
@@ -1537,15 +1467,11 @@ class SetTreeViewModeAction extends ViewAction {
|
|
|
1537
1467
|
constructor(id = 'workbench.scm.action.setTreeViewMode', menu = {}) {
|
|
1538
1468
|
super({
|
|
1539
1469
|
id,
|
|
1540
|
-
title: ( localizeWithPath(
|
|
1541
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1542
|
-
'setTreeViewMode',
|
|
1543
|
-
"View as Tree"
|
|
1544
|
-
)),
|
|
1470
|
+
title: ( localizeWithPath(_moduleId, 22, "View as Tree")),
|
|
1545
1471
|
viewId: VIEW_PANE_ID,
|
|
1546
1472
|
f1: false,
|
|
1547
1473
|
icon: Codicon.listFlat,
|
|
1548
|
-
toggled: ( ContextKeys.SCMViewMode.isEqualTo("tree" )),
|
|
1474
|
+
toggled: ( (ContextKeys.SCMViewMode.isEqualTo("tree" ))),
|
|
1549
1475
|
menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
|
|
1550
1476
|
});
|
|
1551
1477
|
}
|
|
@@ -1557,7 +1483,11 @@ class SetTreeViewModeNavigationAction extends SetTreeViewModeAction {
|
|
|
1557
1483
|
constructor() {
|
|
1558
1484
|
super('workbench.scm.action.setTreeViewModeNavigation', {
|
|
1559
1485
|
id: MenuId.SCMTitle,
|
|
1560
|
-
when: ( ContextKeyExpr.and(
|
|
1486
|
+
when: ( (ContextKeyExpr.and(
|
|
1487
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1488
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0)),
|
|
1489
|
+
(ContextKeys.SCMViewMode.isEqualTo("list" ))
|
|
1490
|
+
))),
|
|
1561
1491
|
group: 'navigation',
|
|
1562
1492
|
order: -1000
|
|
1563
1493
|
});
|
|
@@ -1574,7 +1504,7 @@ class RepositorySortAction extends ViewAction {
|
|
|
1574
1504
|
title,
|
|
1575
1505
|
viewId: VIEW_PANE_ID,
|
|
1576
1506
|
f1: false,
|
|
1577
|
-
toggled: ( RepositoryContextKeys.RepositorySortKey.isEqualTo(sortKey)),
|
|
1507
|
+
toggled: ( (RepositoryContextKeys.RepositorySortKey.isEqualTo(sortKey))),
|
|
1578
1508
|
menu: [
|
|
1579
1509
|
{
|
|
1580
1510
|
id: Menus.Repositories,
|
|
@@ -1594,29 +1524,17 @@ class RepositorySortAction extends ViewAction {
|
|
|
1594
1524
|
}
|
|
1595
1525
|
class RepositorySortByDiscoveryTimeAction extends RepositorySortAction {
|
|
1596
1526
|
constructor() {
|
|
1597
|
-
super("discoveryTime" , ( localizeWithPath(
|
|
1598
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1599
|
-
'repositorySortByDiscoveryTime',
|
|
1600
|
-
"Sort by Discovery Time"
|
|
1601
|
-
)));
|
|
1527
|
+
super("discoveryTime" , ( localizeWithPath(_moduleId, 23, "Sort by Discovery Time")));
|
|
1602
1528
|
}
|
|
1603
1529
|
}
|
|
1604
1530
|
class RepositorySortByNameAction extends RepositorySortAction {
|
|
1605
1531
|
constructor() {
|
|
1606
|
-
super("name" , ( localizeWithPath(
|
|
1607
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1608
|
-
'repositorySortByName',
|
|
1609
|
-
"Sort by Name"
|
|
1610
|
-
)));
|
|
1532
|
+
super("name" , ( localizeWithPath(_moduleId, 24, "Sort by Name")));
|
|
1611
1533
|
}
|
|
1612
1534
|
}
|
|
1613
1535
|
class RepositorySortByPathAction extends RepositorySortAction {
|
|
1614
1536
|
constructor() {
|
|
1615
|
-
super("path" , ( localizeWithPath(
|
|
1616
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1617
|
-
'repositorySortByPath',
|
|
1618
|
-
"Sort by Path"
|
|
1619
|
-
)));
|
|
1537
|
+
super("path" , ( localizeWithPath(_moduleId, 25, "Sort by Path")));
|
|
1620
1538
|
}
|
|
1621
1539
|
}
|
|
1622
1540
|
registerAction2(RepositorySortByDiscoveryTimeAction);
|
|
@@ -1629,8 +1547,8 @@ class SetSortKeyAction extends ViewAction {
|
|
|
1629
1547
|
title,
|
|
1630
1548
|
viewId: VIEW_PANE_ID,
|
|
1631
1549
|
f1: false,
|
|
1632
|
-
toggled: ( ContextKeys.SCMViewSortKey.isEqualTo(sortKey)),
|
|
1633
|
-
precondition: ( ContextKeys.SCMViewMode.isEqualTo("list" )),
|
|
1550
|
+
toggled: ( (ContextKeys.SCMViewSortKey.isEqualTo(sortKey))),
|
|
1551
|
+
precondition: ( (ContextKeys.SCMViewMode.isEqualTo("list" ))),
|
|
1634
1552
|
menu: { id: Menus.ViewSort, group: '2_sort' }
|
|
1635
1553
|
});
|
|
1636
1554
|
this.sortKey = sortKey;
|
|
@@ -1641,29 +1559,17 @@ class SetSortKeyAction extends ViewAction {
|
|
|
1641
1559
|
}
|
|
1642
1560
|
class SetSortByNameAction extends SetSortKeyAction {
|
|
1643
1561
|
constructor() {
|
|
1644
|
-
super("name" , ( localizeWithPath(
|
|
1645
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1646
|
-
'sortChangesByName',
|
|
1647
|
-
"Sort Changes by Name"
|
|
1648
|
-
)));
|
|
1562
|
+
super("name" , ( localizeWithPath(_moduleId, 26, "Sort Changes by Name")));
|
|
1649
1563
|
}
|
|
1650
1564
|
}
|
|
1651
1565
|
class SetSortByPathAction extends SetSortKeyAction {
|
|
1652
1566
|
constructor() {
|
|
1653
|
-
super("path" , ( localizeWithPath(
|
|
1654
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1655
|
-
'sortChangesByPath',
|
|
1656
|
-
"Sort Changes by Path"
|
|
1657
|
-
)));
|
|
1567
|
+
super("path" , ( localizeWithPath(_moduleId, 27, "Sort Changes by Path")));
|
|
1658
1568
|
}
|
|
1659
1569
|
}
|
|
1660
1570
|
class SetSortByStatusAction extends SetSortKeyAction {
|
|
1661
1571
|
constructor() {
|
|
1662
|
-
super("status" , ( localizeWithPath(
|
|
1663
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1664
|
-
'sortChangesByStatus',
|
|
1665
|
-
"Sort Changes by Status"
|
|
1666
|
-
)));
|
|
1572
|
+
super("status" , ( localizeWithPath(_moduleId, 28, "Sort Changes by Status")));
|
|
1667
1573
|
}
|
|
1668
1574
|
}
|
|
1669
1575
|
registerAction2(SetSortByNameAction);
|
|
@@ -1673,18 +1579,18 @@ class CollapseAllRepositoriesAction extends ViewAction {
|
|
|
1673
1579
|
constructor() {
|
|
1674
1580
|
super({
|
|
1675
1581
|
id: `workbench.scm.action.collapseAllRepositories`,
|
|
1676
|
-
title: ( localizeWithPath(
|
|
1677
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1678
|
-
'collapse all',
|
|
1679
|
-
"Collapse All Repositories"
|
|
1680
|
-
)),
|
|
1582
|
+
title: ( localizeWithPath(_moduleId, 29, "Collapse All Repositories")),
|
|
1681
1583
|
viewId: VIEW_PANE_ID,
|
|
1682
1584
|
f1: false,
|
|
1683
1585
|
icon: Codicon.collapseAll,
|
|
1684
1586
|
menu: {
|
|
1685
1587
|
id: MenuId.SCMTitle,
|
|
1686
1588
|
group: 'navigation',
|
|
1687
|
-
when: ( ContextKeyExpr.and(
|
|
1589
|
+
when: ( (ContextKeyExpr.and(
|
|
1590
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1591
|
+
(ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)),
|
|
1592
|
+
(ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(false))
|
|
1593
|
+
)))
|
|
1688
1594
|
}
|
|
1689
1595
|
});
|
|
1690
1596
|
}
|
|
@@ -1696,18 +1602,18 @@ class ExpandAllRepositoriesAction extends ViewAction {
|
|
|
1696
1602
|
constructor() {
|
|
1697
1603
|
super({
|
|
1698
1604
|
id: `workbench.scm.action.expandAllRepositories`,
|
|
1699
|
-
title: ( localizeWithPath(
|
|
1700
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1701
|
-
'expand all',
|
|
1702
|
-
"Expand All Repositories"
|
|
1703
|
-
)),
|
|
1605
|
+
title: ( localizeWithPath(_moduleId, 30, "Expand All Repositories")),
|
|
1704
1606
|
viewId: VIEW_PANE_ID,
|
|
1705
1607
|
f1: false,
|
|
1706
1608
|
icon: Codicon.expandAll,
|
|
1707
1609
|
menu: {
|
|
1708
1610
|
id: MenuId.SCMTitle,
|
|
1709
1611
|
group: 'navigation',
|
|
1710
|
-
when: ( ContextKeyExpr.and(
|
|
1612
|
+
when: ( (ContextKeyExpr.and(
|
|
1613
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1614
|
+
(ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)),
|
|
1615
|
+
(ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(true))
|
|
1616
|
+
)))
|
|
1711
1617
|
}
|
|
1712
1618
|
});
|
|
1713
1619
|
}
|
|
@@ -1723,7 +1629,7 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
|
|
|
1723
1629
|
super();
|
|
1724
1630
|
this.input = input;
|
|
1725
1631
|
this.storageService = storageService;
|
|
1726
|
-
this._runningActions = ( new Set());
|
|
1632
|
+
this._runningActions = ( (new Set()));
|
|
1727
1633
|
}
|
|
1728
1634
|
async runAction(action) {
|
|
1729
1635
|
try {
|
|
@@ -1737,11 +1643,11 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
|
|
|
1737
1643
|
for (const group of this.input.repository.provider.groups) {
|
|
1738
1644
|
context.push({
|
|
1739
1645
|
resourceGroupId: group.id,
|
|
1740
|
-
resources: [...( group.resources.map(r => r.sourceUri))]
|
|
1646
|
+
resources: [...( (group.resources.map(r => r.sourceUri)))]
|
|
1741
1647
|
});
|
|
1742
1648
|
}
|
|
1743
1649
|
this._runningActions.add(action);
|
|
1744
|
-
this._cts = ( new CancellationTokenSource());
|
|
1650
|
+
this._cts = ( (new CancellationTokenSource()));
|
|
1745
1651
|
await action.run(...[this.input.repository.provider.rootUri, context, this._cts.token]);
|
|
1746
1652
|
}
|
|
1747
1653
|
finally {
|
|
@@ -1752,9 +1658,9 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
|
|
|
1752
1658
|
}
|
|
1753
1659
|
}
|
|
1754
1660
|
};
|
|
1755
|
-
SCMInputWidgetActionRunner = ( __decorate([
|
|
1756
|
-
( __param(1, IStorageService))
|
|
1757
|
-
], SCMInputWidgetActionRunner));
|
|
1661
|
+
SCMInputWidgetActionRunner = ( (__decorate([
|
|
1662
|
+
( (__param(1, IStorageService)))
|
|
1663
|
+
], SCMInputWidgetActionRunner)));
|
|
1758
1664
|
let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar {
|
|
1759
1665
|
get dropdownActions() { return this._dropdownActions; }
|
|
1760
1666
|
get dropdownAction() { return this._dropdownAction; }
|
|
@@ -1764,23 +1670,15 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1764
1670
|
this.contextKeyService = contextKeyService;
|
|
1765
1671
|
this.storageService = storageService;
|
|
1766
1672
|
this._dropdownActions = [];
|
|
1767
|
-
this._onDidChange = ( new Emitter());
|
|
1673
|
+
this._onDidChange = ( (new Emitter()));
|
|
1768
1674
|
this.onDidChange = this._onDidChange.event;
|
|
1769
|
-
this.repositoryDisposables = ( new DisposableStore());
|
|
1770
|
-
this._dropdownAction = ( new Action('scmInputMoreActions', ( localizeWithPath(
|
|
1771
|
-
|
|
1772
|
-
'scmInputMoreActions',
|
|
1773
|
-
"More Actions..."
|
|
1774
|
-
)), 'codicon-chevron-down'));
|
|
1775
|
-
this._cancelAction = ( new MenuItemAction({
|
|
1675
|
+
this.repositoryDisposables = ( (new DisposableStore()));
|
|
1676
|
+
this._dropdownAction = ( (new Action('scmInputMoreActions', ( localizeWithPath(_moduleId, 31, "More Actions...")), 'codicon-chevron-down')));
|
|
1677
|
+
this._cancelAction = ( (new MenuItemAction({
|
|
1776
1678
|
id: "scm.input.cancelAction" ,
|
|
1777
|
-
title: ( localizeWithPath(
|
|
1778
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1779
|
-
'scmInputCancelAction',
|
|
1780
|
-
"Cancel"
|
|
1781
|
-
)),
|
|
1679
|
+
title: ( localizeWithPath(_moduleId, 32, "Cancel")),
|
|
1782
1680
|
icon: Codicon.debugStop,
|
|
1783
|
-
}, undefined, undefined, undefined, contextKeyService, commandService));
|
|
1681
|
+
}, undefined, undefined, undefined, contextKeyService, commandService)));
|
|
1784
1682
|
}
|
|
1785
1683
|
setInput(input) {
|
|
1786
1684
|
this.repositoryDisposables.clear();
|
|
@@ -1791,7 +1689,9 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1791
1689
|
]);
|
|
1792
1690
|
const menu = this.repositoryDisposables.add(this.menuService.createMenu(MenuId.SCMInputBox, contextKeyService, { emitEventsForSubmenuChanges: true }));
|
|
1793
1691
|
const isEnabled = () => {
|
|
1794
|
-
return (
|
|
1692
|
+
return (
|
|
1693
|
+
(input.repository.provider.groups.some(g => g.resources.length > 0))
|
|
1694
|
+
);
|
|
1795
1695
|
};
|
|
1796
1696
|
const updateToolbar = () => {
|
|
1797
1697
|
const actions = [];
|
|
@@ -1815,7 +1715,7 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1815
1715
|
this.repositoryDisposables.add(menu.onDidChange(() => updateToolbar()));
|
|
1816
1716
|
this.repositoryDisposables.add(input.repository.provider.onDidChangeResources(() => updateToolbar()));
|
|
1817
1717
|
this.repositoryDisposables.add(this.storageService.onDidChangeValue(0 , "scm.input.lastActionId" , this.repositoryDisposables)(() => updateToolbar()));
|
|
1818
|
-
this.actionRunner = ( new SCMInputWidgetActionRunner(input, this.storageService));
|
|
1718
|
+
this.actionRunner = ( (new SCMInputWidgetActionRunner(input, this.storageService)));
|
|
1819
1719
|
this.repositoryDisposables.add(this.actionRunner.onWillRun(e => {
|
|
1820
1720
|
if (this.actionRunner.runningActions.size === 0) {
|
|
1821
1721
|
super.setActions([this._cancelAction], []);
|
|
@@ -1830,23 +1730,23 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1830
1730
|
updateToolbar();
|
|
1831
1731
|
}
|
|
1832
1732
|
};
|
|
1833
|
-
SCMInputWidgetToolbar = ( __decorate([
|
|
1834
|
-
( __param(2, IMenuService)),
|
|
1835
|
-
( __param(3, IContextKeyService)),
|
|
1836
|
-
( __param(4, IContextMenuService)),
|
|
1837
|
-
( __param(5, ICommandService)),
|
|
1838
|
-
( __param(6, IKeybindingService)),
|
|
1839
|
-
( __param(7, IStorageService)),
|
|
1840
|
-
( __param(8, ITelemetryService))
|
|
1841
|
-
], SCMInputWidgetToolbar));
|
|
1733
|
+
SCMInputWidgetToolbar = ( (__decorate([
|
|
1734
|
+
( (__param(2, IMenuService))),
|
|
1735
|
+
( (__param(3, IContextKeyService))),
|
|
1736
|
+
( (__param(4, IContextMenuService))),
|
|
1737
|
+
( (__param(5, ICommandService))),
|
|
1738
|
+
( (__param(6, IKeybindingService))),
|
|
1739
|
+
( (__param(7, IStorageService))),
|
|
1740
|
+
( (__param(8, ITelemetryService)))
|
|
1741
|
+
], SCMInputWidgetToolbar)));
|
|
1842
1742
|
class SCMInputWidgetEditorOptions {
|
|
1843
1743
|
constructor(overflowWidgetsDomNode, configurationService) {
|
|
1844
1744
|
this.overflowWidgetsDomNode = overflowWidgetsDomNode;
|
|
1845
1745
|
this.configurationService = configurationService;
|
|
1846
|
-
this._onDidChange = ( new Emitter());
|
|
1746
|
+
this._onDidChange = ( (new Emitter()));
|
|
1847
1747
|
this.onDidChange = this._onDidChange.event;
|
|
1848
1748
|
this.defaultInputFontFamily = DEFAULT_FONT_FAMILY;
|
|
1849
|
-
this._disposables = ( new DisposableStore());
|
|
1749
|
+
this._disposables = ( (new DisposableStore()));
|
|
1850
1750
|
const onDidChangeConfiguration = Event.filter(this.configurationService.onDidChangeConfiguration, e => {
|
|
1851
1751
|
return e.affectsConfiguration('editor.accessibilitySupport') ||
|
|
1852
1752
|
e.affectsConfiguration('editor.cursorBlinking') ||
|
|
@@ -1958,7 +1858,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
1958
1858
|
modelValue.textModelRef = modelRef;
|
|
1959
1859
|
const textModel = modelRef.object.textEditorModel;
|
|
1960
1860
|
this.inputEditor.setModel(textModel);
|
|
1961
|
-
const validationDelayer = ( new ThrottledDelayer(200));
|
|
1861
|
+
const validationDelayer = ( (new ThrottledDelayer(200)));
|
|
1962
1862
|
const validate = async () => {
|
|
1963
1863
|
const position = this.inputEditor.getSelection()?.getStartPosition();
|
|
1964
1864
|
const offset = position && textModel.getOffsetAt(position);
|
|
@@ -2059,8 +1959,8 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2059
1959
|
this.contextViewService = contextViewService;
|
|
2060
1960
|
this.openerService = openerService;
|
|
2061
1961
|
this.contextMenuService = contextMenuService;
|
|
2062
|
-
this.disposables = ( new DisposableStore());
|
|
2063
|
-
this.repositoryDisposables = ( new DisposableStore());
|
|
1962
|
+
this.disposables = ( (new DisposableStore()));
|
|
1963
|
+
this.repositoryDisposables = ( (new DisposableStore()));
|
|
2064
1964
|
this.validationDisposable = Disposable.None;
|
|
2065
1965
|
this.validationHasFocus = false;
|
|
2066
1966
|
this.lastLayoutWasTrash = false;
|
|
@@ -2071,7 +1971,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2071
1971
|
this.toolbarContainer = append(this.element, $('.scm-editor-toolbar'));
|
|
2072
1972
|
this.contextKeyService = contextKeyService.createScoped(this.element);
|
|
2073
1973
|
this.repositoryIdContextKey = this.contextKeyService.createKey('scmRepository', undefined);
|
|
2074
|
-
this.inputEditorOptions = ( new SCMInputWidgetEditorOptions(overflowWidgetsDomNode, this.configurationService));
|
|
1974
|
+
this.inputEditorOptions = ( (new SCMInputWidgetEditorOptions(overflowWidgetsDomNode, this.configurationService)));
|
|
2075
1975
|
this.disposables.add(this.inputEditorOptions.onDidChange(this.onDidChangeEditorOptions, this));
|
|
2076
1976
|
this.disposables.add(this.inputEditorOptions);
|
|
2077
1977
|
const editorConstructionOptions = this.inputEditorOptions.getEditorConstructionOptions();
|
|
@@ -2096,7 +1996,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2096
1996
|
EditorDictation.ID
|
|
2097
1997
|
])
|
|
2098
1998
|
};
|
|
2099
|
-
const services = ( new ServiceCollection([IContextKeyService, this.contextKeyService]));
|
|
1999
|
+
const services = ( (new ServiceCollection([IContextKeyService, this.contextKeyService])));
|
|
2100
2000
|
const instantiationService2 = instantiationService.createChild(services);
|
|
2101
2001
|
this.inputEditor = instantiationService2.createInstance(CodeEditorWidget, this.editorContainer, editorConstructionOptions, codeEditorWidgetOptions);
|
|
2102
2002
|
this.disposables.add(this.inputEditor);
|
|
@@ -2158,7 +2058,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2158
2058
|
layout() {
|
|
2159
2059
|
const editorHeight = this.getContentHeight();
|
|
2160
2060
|
const toolbarWidth = this.getToolbarWidth();
|
|
2161
|
-
const dimension = ( new Dimension(this.element.clientWidth - toolbarWidth, editorHeight));
|
|
2061
|
+
const dimension = ( (new Dimension(this.element.clientWidth - toolbarWidth, editorHeight)));
|
|
2162
2062
|
if (dimension.width < 0) {
|
|
2163
2063
|
this.lastLayoutWasTrash = true;
|
|
2164
2064
|
return;
|
|
@@ -2199,7 +2099,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2199
2099
|
if (!this.validation || !this.inputEditor.hasTextFocus()) {
|
|
2200
2100
|
return;
|
|
2201
2101
|
}
|
|
2202
|
-
const disposables = ( new DisposableStore());
|
|
2102
|
+
const disposables = ( (new DisposableStore()));
|
|
2203
2103
|
this.validationDisposable = this.contextViewService.showContextView({
|
|
2204
2104
|
getAnchor: () => this.element,
|
|
2205
2105
|
render: container => {
|
|
@@ -2241,12 +2141,12 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2241
2141
|
element.appendChild(renderedMarkdown.element);
|
|
2242
2142
|
}
|
|
2243
2143
|
const actionsContainer = append(validationContainer, $('.scm-editor-validation-actions'));
|
|
2244
|
-
const actionbar = ( new ActionBar(actionsContainer));
|
|
2245
|
-
const action = ( new Action('scmInputWidget.validationMessage.close', ( localizeWithPath(
|
|
2144
|
+
const actionbar = ( (new ActionBar(actionsContainer)));
|
|
2145
|
+
const action = ( (new Action('scmInputWidget.validationMessage.close', ( localizeWithPath(_moduleId, 33, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => {
|
|
2246
2146
|
this.contextViewService.hideContextView();
|
|
2247
2147
|
this.element.style.borderBottomLeftRadius = '2px';
|
|
2248
2148
|
this.element.style.borderBottomRightRadius = '2px';
|
|
2249
|
-
}));
|
|
2149
|
+
})));
|
|
2250
2150
|
disposables.add(actionbar);
|
|
2251
2151
|
actionbar.push(action, { icon: true, label: false });
|
|
2252
2152
|
return Disposable.None;
|
|
@@ -2285,18 +2185,18 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2285
2185
|
this.disposables.dispose();
|
|
2286
2186
|
}
|
|
2287
2187
|
};
|
|
2288
|
-
SCMInputWidget = SCMInputWidget_1 = ( __decorate([
|
|
2289
|
-
( __param(2, IContextKeyService)),
|
|
2290
|
-
( __param(3, IModelService)),
|
|
2291
|
-
( __param(4, ITextModelService)),
|
|
2292
|
-
( __param(5, IKeybindingService)),
|
|
2293
|
-
( __param(6, IConfigurationService)),
|
|
2294
|
-
( __param(7, IInstantiationService)),
|
|
2295
|
-
( __param(8, ISCMViewService)),
|
|
2296
|
-
( __param(9, IContextViewService)),
|
|
2297
|
-
( __param(10, IOpenerService)),
|
|
2298
|
-
( __param(11, IContextMenuService))
|
|
2299
|
-
], SCMInputWidget));
|
|
2188
|
+
SCMInputWidget = SCMInputWidget_1 = ( (__decorate([
|
|
2189
|
+
( (__param(2, IContextKeyService))),
|
|
2190
|
+
( (__param(3, IModelService))),
|
|
2191
|
+
( (__param(4, ITextModelService))),
|
|
2192
|
+
( (__param(5, IKeybindingService))),
|
|
2193
|
+
( (__param(6, IConfigurationService))),
|
|
2194
|
+
( (__param(7, IInstantiationService))),
|
|
2195
|
+
( (__param(8, ISCMViewService))),
|
|
2196
|
+
( (__param(9, IContextViewService))),
|
|
2197
|
+
( (__param(10, IOpenerService))),
|
|
2198
|
+
( (__param(11, IContextMenuService)))
|
|
2199
|
+
], SCMInputWidget)));
|
|
2300
2200
|
let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
2301
2201
|
get viewMode() { return this._viewMode; }
|
|
2302
2202
|
set viewMode(mode) {
|
|
@@ -2335,16 +2235,16 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2335
2235
|
this.scmViewService = scmViewService;
|
|
2336
2236
|
this.storageService = storageService;
|
|
2337
2237
|
this.uriIdentityService = uriIdentityService;
|
|
2338
|
-
this._onDidChangeViewMode = ( new Emitter());
|
|
2238
|
+
this._onDidChangeViewMode = ( (new Emitter()));
|
|
2339
2239
|
this.onDidChangeViewMode = this._onDidChangeViewMode.event;
|
|
2340
|
-
this._onDidChangeViewSortKey = ( new Emitter());
|
|
2240
|
+
this._onDidChangeViewSortKey = ( (new Emitter()));
|
|
2341
2241
|
this.onDidChangeViewSortKey = this._onDidChangeViewSortKey.event;
|
|
2342
|
-
this.items = ( new DisposableMap());
|
|
2343
|
-
this.visibilityDisposables = ( new DisposableStore());
|
|
2344
|
-
this.treeOperationSequencer = ( new Sequencer());
|
|
2345
|
-
this.revealResourceThrottler = ( new Throttler());
|
|
2346
|
-
this.updateChildrenThrottler = ( new Throttler());
|
|
2347
|
-
this.disposables = ( new DisposableStore());
|
|
2242
|
+
this.items = ( (new DisposableMap()));
|
|
2243
|
+
this.visibilityDisposables = ( (new DisposableStore()));
|
|
2244
|
+
this.treeOperationSequencer = ( (new Sequencer()));
|
|
2245
|
+
this.revealResourceThrottler = ( (new Throttler()));
|
|
2246
|
+
this.updateChildrenThrottler = ( (new Throttler()));
|
|
2247
|
+
this.disposables = ( (new DisposableStore()));
|
|
2348
2248
|
this._viewMode = this.getViewMode();
|
|
2349
2249
|
this._viewSortKey = this.getViewSortKey();
|
|
2350
2250
|
this.viewModeContextKey = ContextKeys.SCMViewMode.bindTo(contextKeyService);
|
|
@@ -2356,7 +2256,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2356
2256
|
this.scmProviderContextKey = ContextKeys.SCMProvider.bindTo(contextKeyService);
|
|
2357
2257
|
this.scmProviderRootUriContextKey = ContextKeys.SCMProviderRootUri.bindTo(contextKeyService);
|
|
2358
2258
|
this.scmProviderHasRootUriContextKey = ContextKeys.SCMProviderHasRootUri.bindTo(contextKeyService);
|
|
2359
|
-
this._onDidLayout = ( new Emitter());
|
|
2259
|
+
this._onDidLayout = ( (new Emitter()));
|
|
2360
2260
|
this.layoutCache = { height: undefined, width: undefined, onDidChange: this._onDidLayout.event };
|
|
2361
2261
|
this.storageService.onDidChangeValue(1 , undefined, this.disposables)(e => {
|
|
2362
2262
|
switch (e.key) {
|
|
@@ -2431,7 +2331,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2431
2331
|
}
|
|
2432
2332
|
else {
|
|
2433
2333
|
this.visibilityDisposables.clear();
|
|
2434
|
-
this.onDidChangeVisibleRepositories({ added: Iterable.empty(), removed: [...( this.items.keys())] });
|
|
2334
|
+
this.onDidChangeVisibleRepositories({ added: Iterable.empty(), removed: [...( (this.items.keys()))] });
|
|
2435
2335
|
this.treeScrollTop = this.tree.scrollTop;
|
|
2436
2336
|
}
|
|
2437
2337
|
this.updateRepositoryCollapseAllContextKeys();
|
|
@@ -2446,18 +2346,18 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2446
2346
|
this.actionButtonRenderer = this.instantiationService.createInstance(ActionButtonRenderer);
|
|
2447
2347
|
this.listLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
|
|
2448
2348
|
this.disposables.add(this.listLabels);
|
|
2449
|
-
const resourceActionRunner = ( new RepositoryPaneActionRunner(() => this.getSelectedResources()));
|
|
2349
|
+
const resourceActionRunner = ( (new RepositoryPaneActionRunner(() => this.getSelectedResources())));
|
|
2450
2350
|
resourceActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
|
|
2451
2351
|
this.disposables.add(resourceActionRunner);
|
|
2452
|
-
const historyItemGroupActionRunner = ( new HistoryItemGroupActionRunner());
|
|
2352
|
+
const historyItemGroupActionRunner = ( (new HistoryItemGroupActionRunner()));
|
|
2453
2353
|
historyItemGroupActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
|
|
2454
2354
|
this.disposables.add(historyItemGroupActionRunner);
|
|
2455
|
-
const historyItemActionRunner = ( new HistoryItemActionRunner());
|
|
2355
|
+
const historyItemActionRunner = ( (new HistoryItemActionRunner()));
|
|
2456
2356
|
historyItemActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
|
|
2457
2357
|
this.disposables.add(historyItemActionRunner);
|
|
2458
2358
|
const treeDataSource = this.instantiationService.createInstance(SCMTreeDataSource, () => this.viewMode);
|
|
2459
2359
|
this.disposables.add(treeDataSource);
|
|
2460
|
-
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Tree Repo', container, ( new ListDelegate(this.inputRenderer)), ( new SCMTreeCompressionDelegate()), [
|
|
2360
|
+
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Tree Repo', container, ( (new ListDelegate(this.inputRenderer))), ( (new SCMTreeCompressionDelegate())), [
|
|
2461
2361
|
this.inputRenderer,
|
|
2462
2362
|
this.actionButtonRenderer,
|
|
2463
2363
|
this.instantiationService.createInstance(RepositoryRenderer, MenuId.SCMTitle, getActionViewItemProvider(this.instantiationService)),
|
|
@@ -2471,10 +2371,10 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2471
2371
|
horizontalScrolling: false,
|
|
2472
2372
|
setRowLineHeight: false,
|
|
2473
2373
|
transformOptimization: false,
|
|
2474
|
-
filter: ( new SCMTreeFilter()),
|
|
2475
|
-
dnd: ( new SCMTreeDragAndDrop(this.instantiationService)),
|
|
2476
|
-
identityProvider: ( new SCMResourceIdentityProvider()),
|
|
2477
|
-
sorter: ( new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey)),
|
|
2374
|
+
filter: ( (new SCMTreeFilter())),
|
|
2375
|
+
dnd: ( (new SCMTreeDragAndDrop(this.instantiationService))),
|
|
2376
|
+
identityProvider: ( (new SCMResourceIdentityProvider())),
|
|
2377
|
+
sorter: ( (new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey))),
|
|
2478
2378
|
keyboardNavigationLabelProvider: this.instantiationService.createInstance(SCMTreeKeyboardNavigationLabelProvider, () => this.viewMode),
|
|
2479
2379
|
overrideStyles: {
|
|
2480
2380
|
listBackground: this.viewDescriptorService.getViewLocationById(this.id) === 1 ? PANEL_BACKGROUND : SIDE_BAR_BACKGROUND
|
|
@@ -2584,12 +2484,12 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2584
2484
|
if (!uri) {
|
|
2585
2485
|
return;
|
|
2586
2486
|
}
|
|
2587
|
-
if (( this.tree.getFocus().some(
|
|
2487
|
+
if (( (this.tree.getFocus().some(
|
|
2588
2488
|
e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
|
|
2589
|
-
)) &&
|
|
2590
|
-
( this.tree.getSelection().some(
|
|
2591
|
-
|
|
2592
|
-
|
|
2489
|
+
))) &&
|
|
2490
|
+
( (this.tree.getSelection().some(
|
|
2491
|
+
e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
|
|
2492
|
+
)))) {
|
|
2593
2493
|
return;
|
|
2594
2494
|
}
|
|
2595
2495
|
this.revealResourceThrottler.queue(() => this.treeOperationSequencer.queue(async () => {
|
|
@@ -2615,7 +2515,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2615
2515
|
}
|
|
2616
2516
|
onDidChangeVisibleRepositories({ added, removed }) {
|
|
2617
2517
|
for (const repository of added) {
|
|
2618
|
-
const repositoryDisposables = ( new DisposableStore());
|
|
2518
|
+
const repositoryDisposables = ( (new DisposableStore()));
|
|
2619
2519
|
repositoryDisposables.add(repository.provider.onDidChange(() => this.updateChildren(repository)));
|
|
2620
2520
|
repositoryDisposables.add(repository.input.onDidChangeVisibility(() => this.updateChildren(repository)));
|
|
2621
2521
|
repositoryDisposables.add(repository.provider.onDidChangeResourceGroups(() => this.updateChildren(repository)));
|
|
@@ -2630,7 +2530,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2630
2530
|
}));
|
|
2631
2531
|
this.logService.debug('SCMViewPane:onDidChangeVisibleRepositories - onDidChangeCurrentHistoryItemGroup listener added');
|
|
2632
2532
|
}));
|
|
2633
|
-
const resourceGroupDisposables = repositoryDisposables.add(( new DisposableMap()));
|
|
2533
|
+
const resourceGroupDisposables = repositoryDisposables.add(( (new DisposableMap())));
|
|
2634
2534
|
const onDidChangeResourceGroups = () => {
|
|
2635
2535
|
for (const [resourceGroup] of resourceGroupDisposables) {
|
|
2636
2536
|
if (!repository.provider.groups.includes(resourceGroup)) {
|
|
@@ -2638,8 +2538,8 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2638
2538
|
}
|
|
2639
2539
|
}
|
|
2640
2540
|
for (const resourceGroup of repository.provider.groups) {
|
|
2641
|
-
if (!( resourceGroupDisposables.has(resourceGroup))) {
|
|
2642
|
-
const disposableStore = ( new DisposableStore());
|
|
2541
|
+
if (!( (resourceGroupDisposables.has(resourceGroup)))) {
|
|
2542
|
+
const disposableStore = ( (new DisposableStore()));
|
|
2643
2543
|
disposableStore.add(resourceGroup.onDidChange(() => this.updateChildren(repository)));
|
|
2644
2544
|
disposableStore.add(resourceGroup.onDidChangeResources(() => this.updateChildren(repository)));
|
|
2645
2545
|
resourceGroupDisposables.set(resourceGroup, disposableStore);
|
|
@@ -2672,12 +2572,12 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2672
2572
|
const element = e.element;
|
|
2673
2573
|
let context = element;
|
|
2674
2574
|
let actions = [];
|
|
2675
|
-
let actionRunner = ( new RepositoryPaneActionRunner(() => this.getSelectedResources()));
|
|
2575
|
+
let actionRunner = ( (new RepositoryPaneActionRunner(() => this.getSelectedResources())));
|
|
2676
2576
|
if (isSCMRepository(element)) {
|
|
2677
2577
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.provider);
|
|
2678
2578
|
const menu = menus.repositoryContextMenu;
|
|
2679
2579
|
context = element.provider;
|
|
2680
|
-
actionRunner = ( new RepositoryActionRunner(() => this.getSelectedRepositories()));
|
|
2580
|
+
actionRunner = ( (new RepositoryActionRunner(() => this.getSelectedRepositories())));
|
|
2681
2581
|
actions = collectContextMenuActions(menu);
|
|
2682
2582
|
}
|
|
2683
2583
|
else if (isSCMInput(element) || isSCMActionButton(element)) ;
|
|
@@ -2707,7 +2607,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2707
2607
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.repository.provider);
|
|
2708
2608
|
const menu = menus.historyProviderMenu?.getHistoryItemGroupContextMenu(element);
|
|
2709
2609
|
if (menu) {
|
|
2710
|
-
actionRunner = ( new HistoryItemGroupActionRunner());
|
|
2610
|
+
actionRunner = ( (new HistoryItemGroupActionRunner()));
|
|
2711
2611
|
createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, actions);
|
|
2712
2612
|
}
|
|
2713
2613
|
}
|
|
@@ -2715,7 +2615,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2715
2615
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.historyItemGroup.repository.provider);
|
|
2716
2616
|
const menu = menus.historyProviderMenu?.getHistoryItemMenu(element);
|
|
2717
2617
|
if (menu) {
|
|
2718
|
-
actionRunner = ( new HistoryItemActionRunner());
|
|
2618
|
+
actionRunner = ( (new HistoryItemActionRunner()));
|
|
2719
2619
|
actions = collectContextMenuActions(menu);
|
|
2720
2620
|
}
|
|
2721
2621
|
}
|
|
@@ -2730,7 +2630,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2730
2630
|
getSelectedRepositories() {
|
|
2731
2631
|
const focusedRepositories = this.tree.getFocus().filter(r => !!r && isSCMRepository(r));
|
|
2732
2632
|
const selectedRepositories = this.tree.getSelection().filter(r => !!r && isSCMRepository(r));
|
|
2733
|
-
return Array.from(( new Set([...focusedRepositories, ...selectedRepositories])));
|
|
2633
|
+
return Array.from(( (new Set([...focusedRepositories, ...selectedRepositories]))));
|
|
2734
2634
|
}
|
|
2735
2635
|
getSelectedResources() {
|
|
2736
2636
|
return this.tree.getSelection()
|
|
@@ -2810,7 +2710,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2810
2710
|
updateScmProviderContextKeys() {
|
|
2811
2711
|
const alwaysShowRepositories = this.configurationService.getValue('scm.alwaysShowRepositories');
|
|
2812
2712
|
if (!alwaysShowRepositories && this.items.size === 1) {
|
|
2813
|
-
const provider = Iterable.first(( this.items.keys())).provider;
|
|
2713
|
+
const provider = Iterable.first(( (this.items.keys()))).provider;
|
|
2814
2714
|
this.scmProviderContextKey.set(provider.contextValue);
|
|
2815
2715
|
this.scmProviderRootUriContextKey.set(provider.rootUri?.toString());
|
|
2816
2716
|
this.scmProviderHasRootUriContextKey.set(!!provider.rootUri);
|
|
@@ -2827,7 +2727,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2827
2727
|
this.areAllRepositoriesCollapsedContextKey.set(false);
|
|
2828
2728
|
return;
|
|
2829
2729
|
}
|
|
2830
|
-
this.isAnyRepositoryCollapsibleContextKey.set(( this.scmViewService.visibleRepositories.some(r => this.tree.hasElement(r) && this.tree.isCollapsible(r))));
|
|
2730
|
+
this.isAnyRepositoryCollapsibleContextKey.set(( (this.scmViewService.visibleRepositories.some(r => this.tree.hasElement(r) && this.tree.isCollapsible(r)))));
|
|
2831
2731
|
this.areAllRepositoriesCollapsedContextKey.set(this.scmViewService.visibleRepositories.every(r => this.tree.hasElement(r) && (!this.tree.isCollapsible(r) || this.tree.isCollapsed(r))));
|
|
2832
2732
|
}
|
|
2833
2733
|
collapseAllRepositories() {
|
|
@@ -2874,25 +2774,25 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2874
2774
|
super.dispose();
|
|
2875
2775
|
}
|
|
2876
2776
|
};
|
|
2877
|
-
SCMViewPane = ( __decorate([
|
|
2878
|
-
( __param(1, ICommandService)),
|
|
2879
|
-
( __param(2, IEditorService)),
|
|
2880
|
-
( __param(3, ILogService)),
|
|
2881
|
-
( __param(4, IMenuService)),
|
|
2882
|
-
( __param(5, ISCMService)),
|
|
2883
|
-
( __param(6, ISCMViewService)),
|
|
2884
|
-
( __param(7, IStorageService)),
|
|
2885
|
-
( __param(8, IUriIdentityService)),
|
|
2886
|
-
( __param(9, IKeybindingService)),
|
|
2887
|
-
( __param(10, IThemeService)),
|
|
2888
|
-
( __param(11, IContextMenuService)),
|
|
2889
|
-
( __param(12, IInstantiationService)),
|
|
2890
|
-
( __param(13, IViewDescriptorService)),
|
|
2891
|
-
( __param(14, IConfigurationService)),
|
|
2892
|
-
( __param(15, IContextKeyService)),
|
|
2893
|
-
( __param(16, IOpenerService)),
|
|
2894
|
-
( __param(17, ITelemetryService))
|
|
2895
|
-
], SCMViewPane));
|
|
2777
|
+
SCMViewPane = ( (__decorate([
|
|
2778
|
+
( (__param(1, ICommandService))),
|
|
2779
|
+
( (__param(2, IEditorService))),
|
|
2780
|
+
( (__param(3, ILogService))),
|
|
2781
|
+
( (__param(4, IMenuService))),
|
|
2782
|
+
( (__param(5, ISCMService))),
|
|
2783
|
+
( (__param(6, ISCMViewService))),
|
|
2784
|
+
( (__param(7, IStorageService))),
|
|
2785
|
+
( (__param(8, IUriIdentityService))),
|
|
2786
|
+
( (__param(9, IKeybindingService))),
|
|
2787
|
+
( (__param(10, IThemeService))),
|
|
2788
|
+
( (__param(11, IContextMenuService))),
|
|
2789
|
+
( (__param(12, IInstantiationService))),
|
|
2790
|
+
( (__param(13, IViewDescriptorService))),
|
|
2791
|
+
( (__param(14, IConfigurationService))),
|
|
2792
|
+
( (__param(15, IContextKeyService))),
|
|
2793
|
+
( (__param(16, IOpenerService))),
|
|
2794
|
+
( (__param(17, ITelemetryService)))
|
|
2795
|
+
], SCMViewPane)));
|
|
2896
2796
|
let SCMTreeDataSource = class SCMTreeDataSource {
|
|
2897
2797
|
constructor(viewMode, configurationService, logService, scmViewService, uriIdentityService) {
|
|
2898
2798
|
this.viewMode = viewMode;
|
|
@@ -2900,9 +2800,9 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
2900
2800
|
this.logService = logService;
|
|
2901
2801
|
this.scmViewService = scmViewService;
|
|
2902
2802
|
this.uriIdentityService = uriIdentityService;
|
|
2903
|
-
this.historyProviderCache = ( new Map());
|
|
2904
|
-
this.repositoryDisposables = ( new DisposableMap());
|
|
2905
|
-
this.disposables = ( new DisposableStore());
|
|
2803
|
+
this.historyProviderCache = ( (new Map()));
|
|
2804
|
+
this.repositoryDisposables = ( (new DisposableMap()));
|
|
2805
|
+
this.disposables = ( (new DisposableStore()));
|
|
2906
2806
|
const onDidChangeConfiguration = Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.showChangesSummary'), this.disposables);
|
|
2907
2807
|
this.disposables.add(onDidChangeConfiguration(() => this.historyProviderCache.clear()));
|
|
2908
2808
|
this.scmViewService.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories, this, this.disposables);
|
|
@@ -2943,7 +2843,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
2943
2843
|
return false;
|
|
2944
2844
|
}
|
|
2945
2845
|
else {
|
|
2946
|
-
throw new Error('hasChildren not implemented.');
|
|
2846
|
+
throw ( (new Error('hasChildren not implemented.')));
|
|
2947
2847
|
}
|
|
2948
2848
|
}
|
|
2949
2849
|
async getChildren(inputOrElement) {
|
|
@@ -2967,47 +2867,23 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
2967
2867
|
button: actionButton
|
|
2968
2868
|
});
|
|
2969
2869
|
}
|
|
2970
|
-
const hasSomeChanges = ( resourceGroups.some(group => group.resources.length > 0));
|
|
2870
|
+
const hasSomeChanges = ( (resourceGroups.some(group => group.resources.length > 0)));
|
|
2971
2871
|
if (hasSomeChanges || (repositoryCount === 1 && (!showActionButton || !actionButton))) {
|
|
2972
2872
|
children.push(...resourceGroups);
|
|
2973
2873
|
}
|
|
2974
2874
|
const historyItemGroups = await this.getHistoryItemGroups(inputOrElement);
|
|
2975
2875
|
if (historyItemGroups.length > 0) {
|
|
2976
|
-
let label = ( localizeWithPath(
|
|
2977
|
-
|
|
2978
|
-
'syncSeparatorHeader',
|
|
2979
|
-
"Incoming/Outgoing"
|
|
2980
|
-
));
|
|
2981
|
-
let ariaLabel = ( localizeWithPath(
|
|
2982
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
2983
|
-
'syncSeparatorHeaderAriaLabel',
|
|
2984
|
-
"Incoming and outgoing changes"
|
|
2985
|
-
));
|
|
2876
|
+
let label = ( localizeWithPath(_moduleId, 34, "Incoming/Outgoing"));
|
|
2877
|
+
let ariaLabel = ( localizeWithPath(_moduleId, 35, "Incoming and outgoing changes"));
|
|
2986
2878
|
const incomingHistoryItems = historyItemGroups.find(g => g.direction === 'incoming');
|
|
2987
2879
|
const outgoingHistoryItems = historyItemGroups.find(g => g.direction === 'outgoing');
|
|
2988
2880
|
if (incomingHistoryItems && !outgoingHistoryItems) {
|
|
2989
|
-
label = ( localizeWithPath(
|
|
2990
|
-
|
|
2991
|
-
'syncIncomingSeparatorHeader',
|
|
2992
|
-
"Incoming"
|
|
2993
|
-
));
|
|
2994
|
-
ariaLabel = ( localizeWithPath(
|
|
2995
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
2996
|
-
'syncIncomingSeparatorHeaderAriaLabel',
|
|
2997
|
-
"Incoming changes"
|
|
2998
|
-
));
|
|
2881
|
+
label = ( localizeWithPath(_moduleId, 36, "Incoming"));
|
|
2882
|
+
ariaLabel = ( localizeWithPath(_moduleId, 37, "Incoming changes"));
|
|
2999
2883
|
}
|
|
3000
2884
|
else if (!incomingHistoryItems && outgoingHistoryItems) {
|
|
3001
|
-
label = ( localizeWithPath(
|
|
3002
|
-
|
|
3003
|
-
'syncOutgoingSeparatorHeader',
|
|
3004
|
-
"Outgoing"
|
|
3005
|
-
));
|
|
3006
|
-
ariaLabel = ( localizeWithPath(
|
|
3007
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
3008
|
-
'syncOutgoingSeparatorHeaderAriaLabel',
|
|
3009
|
-
"Outgoing changes"
|
|
3010
|
-
));
|
|
2885
|
+
label = ( localizeWithPath(_moduleId, 38, "Outgoing"));
|
|
2886
|
+
ariaLabel = ( localizeWithPath(_moduleId, 39, "Outgoing changes"));
|
|
3011
2887
|
}
|
|
3012
2888
|
children.push({ label, ariaLabel, repository: inputOrElement, type: 'separator' });
|
|
3013
2889
|
}
|
|
@@ -3062,8 +2938,8 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3062
2938
|
id: currentHistoryItemGroup.base.id,
|
|
3063
2939
|
label: currentHistoryItemGroup.base.label,
|
|
3064
2940
|
ariaLabel: ( localizeWithPath(
|
|
3065
|
-
|
|
3066
|
-
|
|
2941
|
+
_moduleId,
|
|
2942
|
+
40,
|
|
3067
2943
|
"Incoming changes from {0}",
|
|
3068
2944
|
currentHistoryItemGroup.base.label
|
|
3069
2945
|
)),
|
|
@@ -3077,12 +2953,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3077
2953
|
outgoingHistoryItemGroup = {
|
|
3078
2954
|
id: currentHistoryItemGroup.id,
|
|
3079
2955
|
label: currentHistoryItemGroup.label,
|
|
3080
|
-
ariaLabel: ( localizeWithPath(
|
|
3081
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
3082
|
-
'outgoingChangesAriaLabel',
|
|
3083
|
-
"Outgoing changes to {0}",
|
|
3084
|
-
currentHistoryItemGroup.label
|
|
3085
|
-
)),
|
|
2956
|
+
ariaLabel: ( localizeWithPath(_moduleId, 41, "Outgoing changes to {0}", currentHistoryItemGroup.label)),
|
|
3086
2957
|
icon: Codicon.arrowCircleUp,
|
|
3087
2958
|
direction: 'outgoing',
|
|
3088
2959
|
ancestor: ancestor.id,
|
|
@@ -3133,21 +3004,17 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3133
3004
|
children.push({
|
|
3134
3005
|
...historyItemsElement[0],
|
|
3135
3006
|
icon: historyItemsElement[0].icon ?? Codicon.files,
|
|
3136
|
-
label: ( localizeWithPath(
|
|
3137
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
3138
|
-
'allChanges',
|
|
3139
|
-
"All Changes"
|
|
3140
|
-
)),
|
|
3007
|
+
label: ( localizeWithPath(_moduleId, 42, "All Changes")),
|
|
3141
3008
|
historyItemGroup: element,
|
|
3142
3009
|
type: 'allChanges'
|
|
3143
3010
|
});
|
|
3144
3011
|
}
|
|
3145
|
-
children.push(...( historyItemsElement[1]
|
|
3012
|
+
children.push(...( (historyItemsElement[1]
|
|
3146
3013
|
.map(historyItem => ({
|
|
3147
3014
|
...historyItem,
|
|
3148
3015
|
historyItemGroup: element,
|
|
3149
3016
|
type: 'historyItem'
|
|
3150
|
-
}))));
|
|
3017
|
+
})))));
|
|
3151
3018
|
return children;
|
|
3152
3019
|
}
|
|
3153
3020
|
async getHistoryItemChanges(element) {
|
|
@@ -3169,17 +3036,19 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3169
3036
|
});
|
|
3170
3037
|
}
|
|
3171
3038
|
if (this.viewMode() === "list" ) {
|
|
3172
|
-
return (
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3039
|
+
return (
|
|
3040
|
+
(historyItemChanges.map(change => ({
|
|
3041
|
+
...change,
|
|
3042
|
+
historyItem: element,
|
|
3043
|
+
type: 'historyItemChange'
|
|
3044
|
+
})))
|
|
3045
|
+
);
|
|
3046
|
+
}
|
|
3047
|
+
const tree = ( (new ResourceTree(
|
|
3179
3048
|
element,
|
|
3180
3049
|
repository.provider.rootUri ?? URI.file('/'),
|
|
3181
3050
|
this.uriIdentityService.extUri
|
|
3182
|
-
));
|
|
3051
|
+
)));
|
|
3183
3052
|
for (const change of historyItemChanges) {
|
|
3184
3053
|
tree.add(change.uri, {
|
|
3185
3054
|
...change,
|
|
@@ -3202,7 +3071,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3202
3071
|
return element.parent;
|
|
3203
3072
|
}
|
|
3204
3073
|
else {
|
|
3205
|
-
throw new Error('Invalid element passed to getParent');
|
|
3074
|
+
throw ( (new Error('Invalid element passed to getParent')));
|
|
3206
3075
|
}
|
|
3207
3076
|
}
|
|
3208
3077
|
else if (isSCMResource(element)) {
|
|
@@ -3212,7 +3081,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3212
3081
|
const node = element.resourceGroup.resourceTree.getNode(element.sourceUri);
|
|
3213
3082
|
const result = node?.parent;
|
|
3214
3083
|
if (!result) {
|
|
3215
|
-
throw new Error('Invalid element passed to getParent');
|
|
3084
|
+
throw ( (new Error('Invalid element passed to getParent')));
|
|
3216
3085
|
}
|
|
3217
3086
|
if (result === element.resourceGroup.resourceTree.root) {
|
|
3218
3087
|
return element.resourceGroup;
|
|
@@ -3220,7 +3089,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3220
3089
|
return result;
|
|
3221
3090
|
}
|
|
3222
3091
|
else {
|
|
3223
|
-
throw new Error('Unexpected call to getParent');
|
|
3092
|
+
throw ( (new Error('Unexpected call to getParent')));
|
|
3224
3093
|
}
|
|
3225
3094
|
}
|
|
3226
3095
|
getConfiguration() {
|
|
@@ -3234,7 +3103,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3234
3103
|
}
|
|
3235
3104
|
onDidChangeVisibleRepositories({ added, removed }) {
|
|
3236
3105
|
for (const repository of added) {
|
|
3237
|
-
const repositoryDisposables = ( new DisposableStore());
|
|
3106
|
+
const repositoryDisposables = ( (new DisposableStore()));
|
|
3238
3107
|
repositoryDisposables.add(Event.runAndSubscribe(repository.provider.onDidChangeHistoryProvider, () => {
|
|
3239
3108
|
if (!repository.provider.historyProvider) {
|
|
3240
3109
|
this.logService.debug('SCMTreeDataSource:onDidChangeVisibleRepositories - no history provider present');
|
|
@@ -3257,8 +3126,8 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3257
3126
|
return this.historyProviderCache.get(repository) ?? {
|
|
3258
3127
|
incomingHistoryItemGroup: undefined,
|
|
3259
3128
|
outgoingHistoryItemGroup: undefined,
|
|
3260
|
-
historyItems: ( new Map()),
|
|
3261
|
-
historyItemChanges: ( new Map())
|
|
3129
|
+
historyItems: ( (new Map())),
|
|
3130
|
+
historyItemChanges: ( (new Map()))
|
|
3262
3131
|
};
|
|
3263
3132
|
}
|
|
3264
3133
|
dispose() {
|
|
@@ -3266,19 +3135,19 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3266
3135
|
this.disposables.dispose();
|
|
3267
3136
|
}
|
|
3268
3137
|
};
|
|
3269
|
-
SCMTreeDataSource = ( __decorate([
|
|
3270
|
-
( __param(1, IConfigurationService)),
|
|
3271
|
-
( __param(2, ILogService)),
|
|
3272
|
-
( __param(3, ISCMViewService)),
|
|
3273
|
-
( __param(4, IUriIdentityService))
|
|
3274
|
-
], SCMTreeDataSource));
|
|
3138
|
+
SCMTreeDataSource = ( (__decorate([
|
|
3139
|
+
( (__param(1, IConfigurationService))),
|
|
3140
|
+
( (__param(2, ILogService))),
|
|
3141
|
+
( (__param(3, ISCMViewService))),
|
|
3142
|
+
( (__param(4, IUriIdentityService)))
|
|
3143
|
+
], SCMTreeDataSource)));
|
|
3275
3144
|
class SCMActionButton {
|
|
3276
3145
|
constructor(container, contextMenuService, commandService, notificationService) {
|
|
3277
3146
|
this.container = container;
|
|
3278
3147
|
this.contextMenuService = contextMenuService;
|
|
3279
3148
|
this.commandService = commandService;
|
|
3280
3149
|
this.notificationService = notificationService;
|
|
3281
|
-
this.disposables = ( new MutableDisposable());
|
|
3150
|
+
this.disposables = ( (new MutableDisposable()));
|
|
3282
3151
|
}
|
|
3283
3152
|
dispose() {
|
|
3284
3153
|
this.disposables?.dispose();
|
|
@@ -3293,33 +3162,33 @@ class SCMActionButton {
|
|
|
3293
3162
|
for (let index = 0; index < button.secondaryCommands.length; index++) {
|
|
3294
3163
|
const commands = button.secondaryCommands[index];
|
|
3295
3164
|
for (const command of commands) {
|
|
3296
|
-
actions.push(( new Action(
|
|
3165
|
+
actions.push(( (new Action(
|
|
3297
3166
|
command.id,
|
|
3298
3167
|
command.title,
|
|
3299
3168
|
undefined,
|
|
3300
3169
|
true,
|
|
3301
3170
|
async () => await this.executeCommand(command.id, ...(command.arguments || []))
|
|
3302
|
-
)));
|
|
3171
|
+
))));
|
|
3303
3172
|
}
|
|
3304
3173
|
if (commands.length) {
|
|
3305
|
-
actions.push(( new Separator()));
|
|
3174
|
+
actions.push(( (new Separator())));
|
|
3306
3175
|
}
|
|
3307
3176
|
}
|
|
3308
3177
|
actions.pop();
|
|
3309
|
-
this.button = ( new ButtonWithDropdown(this.container, {
|
|
3178
|
+
this.button = ( (new ButtonWithDropdown(this.container, {
|
|
3310
3179
|
actions: actions,
|
|
3311
3180
|
addPrimaryActionToDropdown: false,
|
|
3312
3181
|
contextMenuProvider: this.contextMenuService,
|
|
3313
3182
|
title: button.command.tooltip,
|
|
3314
3183
|
supportIcons: true,
|
|
3315
3184
|
...defaultButtonStyles
|
|
3316
|
-
}));
|
|
3185
|
+
})));
|
|
3317
3186
|
}
|
|
3318
3187
|
else {
|
|
3319
|
-
this.button = ( new Button(
|
|
3188
|
+
this.button = ( (new Button(
|
|
3320
3189
|
this.container,
|
|
3321
3190
|
{ supportIcons: true, supportShortLabel: !!button.description, title: button.command.tooltip, ...defaultButtonStyles }
|
|
3322
|
-
));
|
|
3191
|
+
)));
|
|
3323
3192
|
}
|
|
3324
3193
|
this.button.enabled = button.enabled;
|
|
3325
3194
|
this.button.label = button.command.title;
|
|
@@ -3333,7 +3202,7 @@ class SCMActionButton {
|
|
|
3333
3202
|
this.button?.focus();
|
|
3334
3203
|
}
|
|
3335
3204
|
clear() {
|
|
3336
|
-
this.disposables.value = ( new DisposableStore());
|
|
3205
|
+
this.disposables.value = ( (new DisposableStore()));
|
|
3337
3206
|
this.button = undefined;
|
|
3338
3207
|
clearNode(this.container);
|
|
3339
3208
|
}
|
|
@@ -3361,10 +3230,10 @@ let ScmInputContentProvider = class ScmInputContentProvider extends Disposable {
|
|
|
3361
3230
|
return this._modelService.createModel('', this._languageService.createById('scminput'), resource);
|
|
3362
3231
|
}
|
|
3363
3232
|
};
|
|
3364
|
-
ScmInputContentProvider = ( __decorate([
|
|
3365
|
-
( __param(0, ITextModelService)),
|
|
3366
|
-
( __param(1, IModelService)),
|
|
3367
|
-
( __param(2, ILanguageService))
|
|
3368
|
-
], ScmInputContentProvider));
|
|
3233
|
+
ScmInputContentProvider = ( (__decorate([
|
|
3234
|
+
( (__param(0, ITextModelService))),
|
|
3235
|
+
( (__param(1, IModelService))),
|
|
3236
|
+
( (__param(2, ILanguageService)))
|
|
3237
|
+
], ScmInputContentProvider)));
|
|
3369
3238
|
|
|
3370
3239
|
export { ActionButtonRenderer, SCMAccessibilityProvider, SCMActionButton, SCMTreeKeyboardNavigationLabelProvider, SCMTreeSorter, SCMViewPane };
|