@codingame/monaco-vscode-scm-service-override 4.5.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +39 -47
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +35 -34
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +189 -288
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +28 -29
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +2 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +513 -568
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +15 -18
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +14 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/util.js +4 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +118 -0
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +1 -1
|
@@ -4,7 +4,7 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
4
4
|
import { basename, dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
5
5
|
import { Disposable, DisposableStore, toDisposable, combinedDisposable, MutableDisposable, dispose, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
7
|
-
import { append, $, asCSSUrl, prepend, Dimension, trackFocus, clearNode } from 'vscode/vscode/vs/base/browser/dom';
|
|
7
|
+
import { append, $, asCSSUrl, prepend, Dimension, trackFocus, isPointerEvent, clearNode } from 'vscode/vscode/vs/base/browser/dom';
|
|
8
8
|
import { VIEW_PANE_ID, SCMInputChangeReason } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
9
9
|
import { ISCMViewService, ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
10
10
|
import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
|
|
@@ -45,12 +45,11 @@ import { MenuPreventer } from 'vscode/vscode/vs/workbench/contrib/codeEditor/bro
|
|
|
45
45
|
import { SelectionClipboardContributionID } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/selectionClipboard';
|
|
46
46
|
import { EditorDictation } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation';
|
|
47
47
|
import { ContextMenuController } from 'vscode/vscode/vs/editor/contrib/contextmenu/browser/contextmenu';
|
|
48
|
-
import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
48
|
+
import { language, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
49
49
|
import { compare, format } from 'vscode/vscode/vs/base/common/strings';
|
|
50
50
|
import { SuggestController } from 'vscode/vscode/vs/editor/contrib/suggest/browser/suggestController';
|
|
51
51
|
import { SnippetController2 } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetController2';
|
|
52
52
|
import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
53
|
-
import { HoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/hover';
|
|
54
53
|
import { ColorDetector } from 'vscode/vscode/vs/editor/contrib/colorPicker/browser/colorDetector';
|
|
55
54
|
import { LinkDetector } from 'vscode/vscode/vs/editor/contrib/links/browser/links';
|
|
56
55
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
@@ -69,6 +68,7 @@ import { ButtonWithDropdown, Button } from 'vscode/vscode/vs/base/browser/ui/but
|
|
|
69
68
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
70
69
|
import { RepositoryContextKeys } from './scmViewService.js';
|
|
71
70
|
import { DragAndDropController } from 'vscode/vscode/vs/editor/contrib/dnd/browser/dnd';
|
|
71
|
+
import { CopyPasteController } from 'vscode/vscode/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController';
|
|
72
72
|
import { DropIntoEditorController } from 'vscode/vscode/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController';
|
|
73
73
|
import { MessageController } from 'vscode/vscode/vs/editor/contrib/message/browser/messageController';
|
|
74
74
|
import { defaultCountBadgeStyles, defaultButtonStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
@@ -100,48 +100,78 @@ import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellati
|
|
|
100
100
|
import { DropdownWithPrimaryActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
|
|
101
101
|
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
102
102
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
103
|
+
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
104
|
+
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
105
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
106
|
+
import { OpenScmGroupAction } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
|
|
107
|
+
import { HoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverController';
|
|
103
108
|
|
|
104
109
|
var ActionButtonRenderer_1, InputRenderer_1, ResourceGroupRenderer_1, ResourceRenderer_1, HistoryItemGroupRenderer_1, HistoryItemRenderer_1, HistoryItemChangeRenderer_1, SeparatorRenderer_1, SCMInputWidget_1;
|
|
110
|
+
const _moduleId = "vs/workbench/contrib/scm/browser/scmViewPane";
|
|
105
111
|
registerColor('scm.historyItemAdditionsForeground', {
|
|
106
112
|
dark: 'gitDecoration.addedResourceForeground',
|
|
107
113
|
light: 'gitDecoration.addedResourceForeground',
|
|
108
114
|
hcDark: 'gitDecoration.addedResourceForeground',
|
|
109
115
|
hcLight: 'gitDecoration.addedResourceForeground'
|
|
110
|
-
}, ( localizeWithPath(
|
|
111
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
112
|
-
'scm.historyItemAdditionsForeground',
|
|
113
|
-
"History item additions foreground color."
|
|
114
|
-
)));
|
|
116
|
+
}, ( localizeWithPath(_moduleId, 0, "History item additions foreground color.")));
|
|
115
117
|
registerColor('scm.historyItemDeletionsForeground', {
|
|
116
118
|
dark: 'gitDecoration.deletedResourceForeground',
|
|
117
119
|
light: 'gitDecoration.deletedResourceForeground',
|
|
118
120
|
hcDark: 'gitDecoration.deletedResourceForeground',
|
|
119
121
|
hcLight: 'gitDecoration.deletedResourceForeground'
|
|
120
|
-
}, ( localizeWithPath(
|
|
121
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
122
|
-
'scm.historyItemDeletionsForeground',
|
|
123
|
-
"History item deletions foreground color."
|
|
124
|
-
)));
|
|
122
|
+
}, ( localizeWithPath(_moduleId, 1, "History item deletions foreground color.")));
|
|
125
123
|
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
|
-
)));
|
|
124
|
+
dark: ( (transparent(foreground, 0.2))),
|
|
125
|
+
light: ( (transparent(foreground, 0.2))),
|
|
126
|
+
hcDark: ( (transparent(foreground, 0.2))),
|
|
127
|
+
hcLight: ( (transparent(foreground, 0.2)))
|
|
128
|
+
}, ( localizeWithPath(_moduleId, 2, "History item statistics border color.")));
|
|
135
129
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
130
|
+
dark: ( (transparent(listActiveSelectionForeground, 0.2))),
|
|
131
|
+
light: ( (transparent(listActiveSelectionForeground, 0.2))),
|
|
132
|
+
hcDark: ( (transparent(listActiveSelectionForeground, 0.2))),
|
|
133
|
+
hcLight: ( (transparent(listActiveSelectionForeground, 0.2)))
|
|
134
|
+
}, ( localizeWithPath(_moduleId, 3, "History item selected statistics border color.")));
|
|
135
|
+
function processResourceFilterData(uri, filterData) {
|
|
136
|
+
if (!filterData) {
|
|
137
|
+
return [undefined, undefined];
|
|
138
|
+
}
|
|
139
|
+
if (!filterData.label) {
|
|
140
|
+
const matches = createMatches(filterData);
|
|
141
|
+
return [matches, undefined];
|
|
142
|
+
}
|
|
143
|
+
const fileName = basename(uri);
|
|
144
|
+
const label = filterData.label;
|
|
145
|
+
const pathLength = label.length - fileName.length;
|
|
146
|
+
const matches = createMatches(filterData.score);
|
|
147
|
+
if (label === fileName) {
|
|
148
|
+
return [matches, undefined];
|
|
149
|
+
}
|
|
150
|
+
const labelMatches = [];
|
|
151
|
+
const descriptionMatches = [];
|
|
152
|
+
for (const match of matches) {
|
|
153
|
+
if (match.start > pathLength) {
|
|
154
|
+
labelMatches.push({
|
|
155
|
+
start: match.start - pathLength,
|
|
156
|
+
end: match.end - pathLength
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
else if (match.end < pathLength) {
|
|
160
|
+
descriptionMatches.push(match);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
labelMatches.push({
|
|
164
|
+
start: 0,
|
|
165
|
+
end: match.end - pathLength
|
|
166
|
+
});
|
|
167
|
+
descriptionMatches.push({
|
|
168
|
+
start: match.start,
|
|
169
|
+
end: pathLength
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return [labelMatches, descriptionMatches];
|
|
174
|
+
}
|
|
145
175
|
let ActionButtonRenderer = class ActionButtonRenderer {
|
|
146
176
|
static { ActionButtonRenderer_1 = this; }
|
|
147
177
|
static { this.DEFAULT_HEIGHT = 30; }
|
|
@@ -151,23 +181,23 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
151
181
|
this.commandService = commandService;
|
|
152
182
|
this.contextMenuService = contextMenuService;
|
|
153
183
|
this.notificationService = notificationService;
|
|
154
|
-
this.actionButtons = ( new Map());
|
|
184
|
+
this.actionButtons = ( (new Map()));
|
|
155
185
|
}
|
|
156
186
|
renderTemplate(container) {
|
|
157
187
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
|
|
158
188
|
container.parentElement.parentElement.classList.add('cursor-default', 'force-no-hover');
|
|
159
189
|
const buttonContainer = append(container, $('.button-container'));
|
|
160
|
-
const actionButton = ( new SCMActionButton(
|
|
190
|
+
const actionButton = ( (new SCMActionButton(
|
|
161
191
|
buttonContainer,
|
|
162
192
|
this.contextMenuService,
|
|
163
193
|
this.commandService,
|
|
164
194
|
this.notificationService
|
|
165
|
-
));
|
|
195
|
+
)));
|
|
166
196
|
return { actionButton, disposable: Disposable.None, templateDisposable: actionButton };
|
|
167
197
|
}
|
|
168
198
|
renderElement(node, index, templateData, height) {
|
|
169
199
|
templateData.disposable.dispose();
|
|
170
|
-
const disposables = ( new DisposableStore());
|
|
200
|
+
const disposables = ( (new DisposableStore()));
|
|
171
201
|
const actionButton = node.element;
|
|
172
202
|
templateData.actionButton.setButton(node.element.button);
|
|
173
203
|
const renderedActionButtons = this.actionButtons.get(actionButton) ?? [];
|
|
@@ -177,7 +207,7 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
177
207
|
const renderedActionButtons = this.actionButtons.get(actionButton) ?? [];
|
|
178
208
|
const renderedWidgetIndex = renderedActionButtons.findIndex(renderedActionButton => renderedActionButton === templateData.actionButton);
|
|
179
209
|
if (renderedWidgetIndex < 0) {
|
|
180
|
-
throw new Error('Disposing unknown action button');
|
|
210
|
+
throw ( (new Error('Disposing unknown action button')));
|
|
181
211
|
}
|
|
182
212
|
if (renderedActionButtons.length === 1) {
|
|
183
213
|
this.actionButtons.delete(actionButton);
|
|
@@ -190,7 +220,7 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
190
220
|
templateData.disposable = disposables;
|
|
191
221
|
}
|
|
192
222
|
renderCompressedElements() {
|
|
193
|
-
throw new Error('Should never happen since node is incompressible');
|
|
223
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
194
224
|
}
|
|
195
225
|
focusActionButton(actionButton) {
|
|
196
226
|
this.actionButtons.get(actionButton)?.forEach(renderedActionButton => renderedActionButton.focus());
|
|
@@ -203,18 +233,20 @@ let ActionButtonRenderer = class ActionButtonRenderer {
|
|
|
203
233
|
templateData.templateDisposable.dispose();
|
|
204
234
|
}
|
|
205
235
|
};
|
|
206
|
-
ActionButtonRenderer = ActionButtonRenderer_1 = ( __decorate([
|
|
207
|
-
( __param(0, ICommandService)),
|
|
208
|
-
( __param(1, IContextMenuService)),
|
|
209
|
-
( __param(2, INotificationService))
|
|
210
|
-
], ActionButtonRenderer));
|
|
236
|
+
ActionButtonRenderer = ActionButtonRenderer_1 = ( (__decorate([
|
|
237
|
+
( (__param(0, ICommandService))),
|
|
238
|
+
( (__param(1, IContextMenuService))),
|
|
239
|
+
( (__param(2, INotificationService)))
|
|
240
|
+
], ActionButtonRenderer)));
|
|
211
241
|
class SCMTreeDragAndDrop {
|
|
212
242
|
constructor(instantiationService) {
|
|
213
243
|
this.instantiationService = instantiationService;
|
|
214
244
|
}
|
|
215
245
|
getDragURI(element) {
|
|
216
246
|
if (isSCMResource(element)) {
|
|
217
|
-
return (
|
|
247
|
+
return (
|
|
248
|
+
(element.sourceUri.toString())
|
|
249
|
+
);
|
|
218
250
|
}
|
|
219
251
|
return null;
|
|
220
252
|
}
|
|
@@ -222,7 +254,7 @@ class SCMTreeDragAndDrop {
|
|
|
222
254
|
const items = SCMTreeDragAndDrop.getResourcesFromDragAndDropData(data);
|
|
223
255
|
if (originalEvent.dataTransfer && items?.length) {
|
|
224
256
|
this.instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, items, originalEvent));
|
|
225
|
-
const fileResources = ( items.filter(s => s.scheme === Schemas.file).map(r => r.fsPath));
|
|
257
|
+
const fileResources = ( (items.filter(s => s.scheme === Schemas.file).map(r => r.fsPath)));
|
|
226
258
|
if (fileResources.length) {
|
|
227
259
|
originalEvent.dataTransfer.setData(CodeDataTransfers.FILES, JSON.stringify(fileResources));
|
|
228
260
|
}
|
|
@@ -262,18 +294,18 @@ let InputRenderer = class InputRenderer {
|
|
|
262
294
|
this.overflowWidgetsDomNode = overflowWidgetsDomNode;
|
|
263
295
|
this.updateHeight = updateHeight;
|
|
264
296
|
this.instantiationService = instantiationService;
|
|
265
|
-
this.inputWidgets = ( new Map());
|
|
266
|
-
this.contentHeights = ( new WeakMap());
|
|
267
|
-
this.editorSelections = ( new WeakMap());
|
|
297
|
+
this.inputWidgets = ( (new Map()));
|
|
298
|
+
this.contentHeights = ( (new WeakMap()));
|
|
299
|
+
this.editorSelections = ( (new WeakMap()));
|
|
268
300
|
}
|
|
269
301
|
renderTemplate(container) {
|
|
270
302
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
|
|
271
303
|
container.parentElement.parentElement.classList.add('force-no-hover');
|
|
272
|
-
const templateDisposable = ( new DisposableStore());
|
|
304
|
+
const templateDisposable = ( (new DisposableStore()));
|
|
273
305
|
const inputElement = append(container, $('.scm-input'));
|
|
274
306
|
const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode);
|
|
275
307
|
templateDisposable.add(inputWidget);
|
|
276
|
-
return { inputWidget, inputWidgetHeight: InputRenderer_1.DEFAULT_HEIGHT, elementDisposables: ( new DisposableStore()), templateDisposable };
|
|
308
|
+
return { inputWidget, inputWidgetHeight: InputRenderer_1.DEFAULT_HEIGHT, elementDisposables: ( (new DisposableStore())), templateDisposable };
|
|
277
309
|
}
|
|
278
310
|
renderElement(node, index, templateData) {
|
|
279
311
|
const input = node.element;
|
|
@@ -285,7 +317,7 @@ let InputRenderer = class InputRenderer {
|
|
|
285
317
|
const renderedWidgets = this.inputWidgets.get(input) ?? [];
|
|
286
318
|
const renderedWidgetIndex = renderedWidgets.findIndex(renderedWidget => renderedWidget === templateData.inputWidget);
|
|
287
319
|
if (renderedWidgetIndex < 0) {
|
|
288
|
-
throw new Error('Disposing unknown input widget');
|
|
320
|
+
throw ( (new Error('Disposing unknown input widget')));
|
|
289
321
|
}
|
|
290
322
|
if (renderedWidgets.length === 1) {
|
|
291
323
|
this.inputWidgets.delete(input);
|
|
@@ -325,7 +357,7 @@ let InputRenderer = class InputRenderer {
|
|
|
325
357
|
layoutEditor();
|
|
326
358
|
}
|
|
327
359
|
renderCompressedElements() {
|
|
328
|
-
throw new Error('Should never happen since node is incompressible');
|
|
360
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
329
361
|
}
|
|
330
362
|
disposeElement(group, index, template) {
|
|
331
363
|
template.elementDisposables.clear();
|
|
@@ -357,9 +389,9 @@ let InputRenderer = class InputRenderer {
|
|
|
357
389
|
}
|
|
358
390
|
}
|
|
359
391
|
};
|
|
360
|
-
InputRenderer = InputRenderer_1 = ( __decorate([
|
|
361
|
-
( __param(3, IInstantiationService))
|
|
362
|
-
], InputRenderer));
|
|
392
|
+
InputRenderer = InputRenderer_1 = ( (__decorate([
|
|
393
|
+
( (__param(3, IInstantiationService)))
|
|
394
|
+
], InputRenderer)));
|
|
363
395
|
let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
364
396
|
static { ResourceGroupRenderer_1 = this; }
|
|
365
397
|
static { this.TEMPLATE_ID = 'resource group'; }
|
|
@@ -373,11 +405,11 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
|
373
405
|
const element = append(container, $('.resource-group'));
|
|
374
406
|
const name = append(element, $('.name'));
|
|
375
407
|
const actionsContainer = append(element, $('.actions'));
|
|
376
|
-
const actionBar = ( new ActionBar(actionsContainer, { actionViewItemProvider: this.actionViewItemProvider }));
|
|
408
|
+
const actionBar = ( (new ActionBar(actionsContainer, { actionViewItemProvider: this.actionViewItemProvider })));
|
|
377
409
|
const countContainer = append(element, $('.count'));
|
|
378
|
-
const count = ( new CountBadge(countContainer, {}, defaultCountBadgeStyles));
|
|
410
|
+
const count = ( (new CountBadge(countContainer, {}, defaultCountBadgeStyles)));
|
|
379
411
|
const disposables = combinedDisposable(actionBar);
|
|
380
|
-
return { name, count, actionBar, elementDisposables: ( new DisposableStore()), disposables };
|
|
412
|
+
return { name, count, actionBar, elementDisposables: ( (new DisposableStore())), disposables };
|
|
381
413
|
}
|
|
382
414
|
renderElement(node, index, template) {
|
|
383
415
|
const group = node.element;
|
|
@@ -389,7 +421,7 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
|
389
421
|
template.elementDisposables.add(connectPrimaryMenuToInlineActionBar(menus.getResourceGroupMenu(group), template.actionBar));
|
|
390
422
|
}
|
|
391
423
|
renderCompressedElements(node, index, templateData, height) {
|
|
392
|
-
throw new Error('Should never happen since node is incompressible');
|
|
424
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
393
425
|
}
|
|
394
426
|
disposeElement(group, index, template) {
|
|
395
427
|
template.elementDisposables.clear();
|
|
@@ -399,9 +431,9 @@ let ResourceGroupRenderer = class ResourceGroupRenderer {
|
|
|
399
431
|
template.disposables.dispose();
|
|
400
432
|
}
|
|
401
433
|
};
|
|
402
|
-
ResourceGroupRenderer = ResourceGroupRenderer_1 = ( __decorate([
|
|
403
|
-
( __param(1, ISCMViewService))
|
|
404
|
-
], ResourceGroupRenderer));
|
|
434
|
+
ResourceGroupRenderer = ResourceGroupRenderer_1 = ( (__decorate([
|
|
435
|
+
( (__param(1, ISCMViewService)))
|
|
436
|
+
], ResourceGroupRenderer)));
|
|
405
437
|
class RepositoryPaneActionRunner extends ActionRunner {
|
|
406
438
|
constructor(getSelectedResources) {
|
|
407
439
|
super();
|
|
@@ -412,9 +444,9 @@ class RepositoryPaneActionRunner extends ActionRunner {
|
|
|
412
444
|
return super.runAction(action, context);
|
|
413
445
|
}
|
|
414
446
|
const selection = this.getSelectedResources();
|
|
415
|
-
const contextIsSelected = ( selection.some(s => s === context));
|
|
447
|
+
const contextIsSelected = ( (selection.some(s => s === context)));
|
|
416
448
|
const actualContext = contextIsSelected ? selection : [context];
|
|
417
|
-
const args = flatten(( actualContext.map(e => ResourceTree.isResourceNode(e) ? ResourceTree.collect(e) : [e])));
|
|
449
|
+
const args = flatten(( (actualContext.map(e => ResourceTree.isResourceNode(e) ? ResourceTree.collect(e) : [e]))));
|
|
418
450
|
await action.run(...args);
|
|
419
451
|
}
|
|
420
452
|
}
|
|
@@ -430,8 +462,8 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
430
462
|
this.labelService = labelService;
|
|
431
463
|
this.scmViewService = scmViewService;
|
|
432
464
|
this.themeService = themeService;
|
|
433
|
-
this.disposables = ( new DisposableStore());
|
|
434
|
-
this.renderedResources = ( new Map());
|
|
465
|
+
this.disposables = ( (new DisposableStore()));
|
|
466
|
+
this.renderedResources = ( (new Map()));
|
|
435
467
|
themeService.onDidColorThemeChange(this.onDidColorThemeChange, this, this.disposables);
|
|
436
468
|
}
|
|
437
469
|
renderTemplate(container) {
|
|
@@ -439,14 +471,14 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
439
471
|
const name = append(element, $('.name'));
|
|
440
472
|
const fileLabel = this.labels.create(name, { supportDescriptionHighlights: true, supportHighlights: true });
|
|
441
473
|
const actionsContainer = append(fileLabel.element, $('.actions'));
|
|
442
|
-
const actionBar = ( new ActionBar(actionsContainer, {
|
|
474
|
+
const actionBar = ( (new ActionBar(actionsContainer, {
|
|
443
475
|
actionViewItemProvider: this.actionViewItemProvider,
|
|
444
476
|
actionRunner: this.actionRunner
|
|
445
|
-
}));
|
|
477
|
+
})));
|
|
446
478
|
const decorationIcon = append(element, $('.decoration-icon'));
|
|
447
|
-
const actionBarMenuListener = ( new MutableDisposable());
|
|
479
|
+
const actionBarMenuListener = ( (new MutableDisposable()));
|
|
448
480
|
const disposables = combinedDisposable(actionBar, fileLabel, actionBarMenuListener);
|
|
449
|
-
return { element, name, fileLabel, decorationIcon, actionBar, actionBarMenu: undefined, actionBarMenuListener, elementDisposables: ( new DisposableStore()), disposables };
|
|
481
|
+
return { element, name, fileLabel, decorationIcon, actionBar, actionBarMenu: undefined, actionBarMenuListener, elementDisposables: ( (new DisposableStore())), disposables };
|
|
450
482
|
}
|
|
451
483
|
renderElement(node, index, template) {
|
|
452
484
|
const resourceOrFolder = node.element;
|
|
@@ -475,7 +507,7 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
475
507
|
else {
|
|
476
508
|
const menus = this.scmViewService.menus.getRepositoryMenus(resourceOrFolder.resourceGroup.provider);
|
|
477
509
|
this._renderActionBar(template, resourceOrFolder, menus.getResourceMenu(resourceOrFolder));
|
|
478
|
-
[matches, descriptionMatches] =
|
|
510
|
+
[matches, descriptionMatches] = processResourceFilterData(uri, node.filterData);
|
|
479
511
|
template.element.classList.toggle('faded', resourceOrFolder.decorations.faded);
|
|
480
512
|
strikethrough = resourceOrFolder.decorations.strikeThrough;
|
|
481
513
|
}
|
|
@@ -493,7 +525,7 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
493
525
|
renderCompressedElements(node, index, template, height) {
|
|
494
526
|
const compressed = node.element;
|
|
495
527
|
const folder = compressed.elements[compressed.elements.length - 1];
|
|
496
|
-
const label = ( compressed.elements.map(e => e.name));
|
|
528
|
+
const label = ( (compressed.elements.map(e => e.name)));
|
|
497
529
|
const fileKind = FileKind.FOLDER;
|
|
498
530
|
const matches = createMatches(node.filterData);
|
|
499
531
|
template.fileLabel.setResource({ resource: folder.uri, name: label }, {
|
|
@@ -525,46 +557,6 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
525
557
|
}
|
|
526
558
|
template.actionBar.context = resourceOrFolder;
|
|
527
559
|
}
|
|
528
|
-
_processFilterData(uri, filterData) {
|
|
529
|
-
if (!filterData) {
|
|
530
|
-
return [undefined, undefined];
|
|
531
|
-
}
|
|
532
|
-
if (!filterData.label) {
|
|
533
|
-
const matches = createMatches(filterData);
|
|
534
|
-
return [matches, undefined];
|
|
535
|
-
}
|
|
536
|
-
const fileName = basename(uri);
|
|
537
|
-
const label = filterData.label;
|
|
538
|
-
const pathLength = label.length - fileName.length;
|
|
539
|
-
const matches = createMatches(filterData.score);
|
|
540
|
-
if (label === fileName) {
|
|
541
|
-
return [matches, undefined];
|
|
542
|
-
}
|
|
543
|
-
const labelMatches = [];
|
|
544
|
-
const descriptionMatches = [];
|
|
545
|
-
for (const match of matches) {
|
|
546
|
-
if (match.start > pathLength) {
|
|
547
|
-
labelMatches.push({
|
|
548
|
-
start: match.start - pathLength,
|
|
549
|
-
end: match.end - pathLength
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
else if (match.end < pathLength) {
|
|
553
|
-
descriptionMatches.push(match);
|
|
554
|
-
}
|
|
555
|
-
else {
|
|
556
|
-
labelMatches.push({
|
|
557
|
-
start: 0,
|
|
558
|
-
end: match.end - pathLength
|
|
559
|
-
});
|
|
560
|
-
descriptionMatches.push({
|
|
561
|
-
start: match.start,
|
|
562
|
-
end: pathLength
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
return [labelMatches, descriptionMatches];
|
|
567
|
-
}
|
|
568
560
|
onDidColorThemeChange() {
|
|
569
561
|
for (const [template, data] of this.renderedResources) {
|
|
570
562
|
this.renderIcon(template, data);
|
|
@@ -606,11 +598,11 @@ let ResourceRenderer = class ResourceRenderer {
|
|
|
606
598
|
this.disposables.dispose();
|
|
607
599
|
}
|
|
608
600
|
};
|
|
609
|
-
ResourceRenderer = ResourceRenderer_1 = ( __decorate([
|
|
610
|
-
( __param(4, ILabelService)),
|
|
611
|
-
( __param(5, ISCMViewService)),
|
|
612
|
-
( __param(6, IThemeService))
|
|
613
|
-
], ResourceRenderer));
|
|
601
|
+
ResourceRenderer = ResourceRenderer_1 = ( (__decorate([
|
|
602
|
+
( (__param(4, ILabelService))),
|
|
603
|
+
( (__param(5, ISCMViewService))),
|
|
604
|
+
( (__param(6, IThemeService)))
|
|
605
|
+
], ResourceRenderer)));
|
|
614
606
|
class HistoryItemGroupActionRunner extends ActionRunner {
|
|
615
607
|
runAction(action, context) {
|
|
616
608
|
if (!(action instanceof MenuItemAction)) {
|
|
@@ -623,11 +615,12 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
623
615
|
static { HistoryItemGroupRenderer_1 = this; }
|
|
624
616
|
static { this.TEMPLATE_ID = 'history-item-group'; }
|
|
625
617
|
get templateId() { return HistoryItemGroupRenderer_1.TEMPLATE_ID; }
|
|
626
|
-
constructor(actionRunner, contextKeyService, contextMenuService, keybindingService, menuService, scmViewService, telemetryService) {
|
|
618
|
+
constructor(actionRunner, contextKeyService, contextMenuService, keybindingService, commandService, menuService, scmViewService, telemetryService) {
|
|
627
619
|
this.actionRunner = actionRunner;
|
|
628
620
|
this.contextKeyService = contextKeyService;
|
|
629
621
|
this.contextMenuService = contextMenuService;
|
|
630
622
|
this.keybindingService = keybindingService;
|
|
623
|
+
this.commandService = commandService;
|
|
631
624
|
this.menuService = menuService;
|
|
632
625
|
this.scmViewService = scmViewService;
|
|
633
626
|
this.telemetryService = telemetryService;
|
|
@@ -635,22 +628,23 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
635
628
|
renderTemplate(container) {
|
|
636
629
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
|
|
637
630
|
const element = append(container, $('.history-item-group'));
|
|
638
|
-
const label = ( new IconLabel(element, { supportIcons: true }));
|
|
631
|
+
const label = ( (new IconLabel(element, { supportIcons: true })));
|
|
639
632
|
const iconContainer = prepend(label.element, $('.icon-container'));
|
|
640
|
-
const templateDisposables = ( new DisposableStore());
|
|
641
|
-
const toolBar = ( new WorkbenchToolBar(
|
|
633
|
+
const templateDisposables = ( (new DisposableStore()));
|
|
634
|
+
const toolBar = ( (new WorkbenchToolBar(
|
|
642
635
|
append(element, $('.actions')),
|
|
643
636
|
{ actionRunner: this.actionRunner, menuOptions: { shouldForwardArgs: true } },
|
|
644
637
|
this.menuService,
|
|
645
638
|
this.contextKeyService,
|
|
646
639
|
this.contextMenuService,
|
|
647
640
|
this.keybindingService,
|
|
641
|
+
this.commandService,
|
|
648
642
|
this.telemetryService
|
|
649
|
-
));
|
|
643
|
+
)));
|
|
650
644
|
templateDisposables.add(toolBar);
|
|
651
645
|
const countContainer = append(element, $('.count'));
|
|
652
|
-
const count = ( new CountBadge(countContainer, {}, defaultCountBadgeStyles));
|
|
653
|
-
return { iconContainer, label, toolBar, count, elementDisposables: ( new DisposableStore()), templateDisposables };
|
|
646
|
+
const count = ( (new CountBadge(countContainer, {}, defaultCountBadgeStyles)));
|
|
647
|
+
return { iconContainer, label, toolBar, count, elementDisposables: ( (new DisposableStore())), templateDisposables };
|
|
654
648
|
}
|
|
655
649
|
renderElement(node, index, templateData, height) {
|
|
656
650
|
const historyItemGroup = node.element;
|
|
@@ -676,7 +670,7 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
676
670
|
}
|
|
677
671
|
}
|
|
678
672
|
renderCompressedElements(node, index, templateData, height) {
|
|
679
|
-
throw new Error('Should never happen since node is incompressible');
|
|
673
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
680
674
|
}
|
|
681
675
|
disposeElement(node, index, templateData, height) {
|
|
682
676
|
templateData.elementDisposables.clear();
|
|
@@ -686,14 +680,15 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
|
|
|
686
680
|
templateData.templateDisposables.dispose();
|
|
687
681
|
}
|
|
688
682
|
};
|
|
689
|
-
HistoryItemGroupRenderer = HistoryItemGroupRenderer_1 = ( __decorate([
|
|
690
|
-
( __param(1, IContextKeyService)),
|
|
691
|
-
( __param(2, IContextMenuService)),
|
|
692
|
-
( __param(3, IKeybindingService)),
|
|
693
|
-
( __param(4,
|
|
694
|
-
( __param(5,
|
|
695
|
-
( __param(6,
|
|
696
|
-
|
|
683
|
+
HistoryItemGroupRenderer = HistoryItemGroupRenderer_1 = ( (__decorate([
|
|
684
|
+
( (__param(1, IContextKeyService))),
|
|
685
|
+
( (__param(2, IContextMenuService))),
|
|
686
|
+
( (__param(3, IKeybindingService))),
|
|
687
|
+
( (__param(4, ICommandService))),
|
|
688
|
+
( (__param(5, IMenuService))),
|
|
689
|
+
( (__param(6, ISCMViewService))),
|
|
690
|
+
( (__param(7, ITelemetryService)))
|
|
691
|
+
], HistoryItemGroupRenderer)));
|
|
697
692
|
class HistoryItemActionRunner extends ActionRunner {
|
|
698
693
|
async runAction(action, context) {
|
|
699
694
|
if (!(action instanceof MenuItemAction)) {
|
|
@@ -704,8 +699,8 @@ class HistoryItemActionRunner extends ActionRunner {
|
|
|
704
699
|
args.push({
|
|
705
700
|
id: context.id,
|
|
706
701
|
parentIds: context.parentIds,
|
|
707
|
-
|
|
708
|
-
|
|
702
|
+
message: context.message,
|
|
703
|
+
author: context.author,
|
|
709
704
|
icon: context.icon,
|
|
710
705
|
timestamp: context.timestamp,
|
|
711
706
|
statistics: context.statistics,
|
|
@@ -717,28 +712,34 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
717
712
|
static { HistoryItemRenderer_1 = this; }
|
|
718
713
|
static { this.TEMPLATE_ID = 'history-item'; }
|
|
719
714
|
get templateId() { return HistoryItemRenderer_1.TEMPLATE_ID; }
|
|
720
|
-
constructor(actionRunner, actionViewItemProvider, scmViewService) {
|
|
715
|
+
constructor(actionRunner, actionViewItemProvider, hoverService, scmViewService) {
|
|
721
716
|
this.actionRunner = actionRunner;
|
|
722
717
|
this.actionViewItemProvider = actionViewItemProvider;
|
|
718
|
+
this.hoverService = hoverService;
|
|
723
719
|
this.scmViewService = scmViewService;
|
|
724
720
|
}
|
|
725
721
|
renderTemplate(container) {
|
|
726
722
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
|
|
727
723
|
const element = append(container, $('.history-item'));
|
|
728
|
-
const iconLabel = ( new IconLabel(
|
|
724
|
+
const iconLabel = ( (new IconLabel(
|
|
725
|
+
element,
|
|
726
|
+
{ supportIcons: true, supportHighlights: true, supportDescriptionHighlights: true }
|
|
727
|
+
)));
|
|
729
728
|
const iconContainer = prepend(iconLabel.element, $('.icon-container'));
|
|
730
|
-
const disposables = ( new DisposableStore());
|
|
729
|
+
const disposables = ( (new DisposableStore()));
|
|
731
730
|
const actionsContainer = append(element, $('.actions'));
|
|
732
|
-
const actionBar = ( new ActionBar(
|
|
731
|
+
const actionBar = ( (new ActionBar(
|
|
733
732
|
actionsContainer,
|
|
734
733
|
{ actionRunner: this.actionRunner, actionViewItemProvider: this.actionViewItemProvider }
|
|
735
|
-
));
|
|
734
|
+
)));
|
|
736
735
|
disposables.add(actionBar);
|
|
737
736
|
const statsContainer = append(element, $('.stats-container'));
|
|
738
737
|
const filesLabel = append(statsContainer, $('.files-label'));
|
|
739
738
|
const insertionsLabel = append(statsContainer, $('.insertions-label'));
|
|
740
739
|
const deletionsLabel = append(statsContainer, $('.deletions-label'));
|
|
741
|
-
|
|
740
|
+
const statsCustomHover = this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), statsContainer, '');
|
|
741
|
+
disposables.add(statsCustomHover);
|
|
742
|
+
return { iconContainer, label: iconLabel, actionBar, statsContainer, statsCustomHover, filesLabel, insertionsLabel, deletionsLabel, elementDisposables: ( (new DisposableStore())), disposables };
|
|
742
743
|
}
|
|
743
744
|
renderElement(node, index, templateData, height) {
|
|
744
745
|
const historyItem = node.element;
|
|
@@ -746,7 +747,9 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
746
747
|
if (historyItem.icon && ThemeIcon.isThemeIcon(historyItem.icon)) {
|
|
747
748
|
templateData.iconContainer.classList.add(...ThemeIcon.asClassNameArray(historyItem.icon));
|
|
748
749
|
}
|
|
749
|
-
|
|
750
|
+
const title = this.getTooltip(historyItem);
|
|
751
|
+
const [matches, descriptionMatches] = this.processMatches(historyItem, node.filterData);
|
|
752
|
+
templateData.label.setLabel(historyItem.message, historyItem.author, { matches, descriptionMatches, title });
|
|
750
753
|
templateData.actionBar.clear();
|
|
751
754
|
templateData.actionBar.context = historyItem;
|
|
752
755
|
const menus = this.scmViewService.menus.getRepositoryMenus(historyItem.historyItemGroup.repository.provider);
|
|
@@ -757,59 +760,51 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
757
760
|
this.renderStatistics(node, index, templateData, height);
|
|
758
761
|
}
|
|
759
762
|
renderCompressedElements(node, index, templateData, height) {
|
|
760
|
-
throw new Error('Should never happen since node is incompressible');
|
|
763
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
764
|
+
}
|
|
765
|
+
getTooltip(historyItem) {
|
|
766
|
+
const markdown = ( (new MarkdownString('', { isTrusted: true, supportThemeIcons: true })));
|
|
767
|
+
if (historyItem.author) {
|
|
768
|
+
markdown.appendMarkdown(`$(account) **${historyItem.author}**\n\n`);
|
|
769
|
+
}
|
|
770
|
+
if (historyItem.timestamp) {
|
|
771
|
+
const dateFormatter = new Intl.DateTimeFormat(language, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
|
|
772
|
+
markdown.appendMarkdown(`$(history) ${dateFormatter.format(historyItem.timestamp)}\n\n`);
|
|
773
|
+
}
|
|
774
|
+
markdown.appendMarkdown(historyItem.message);
|
|
775
|
+
return { markdown, markdownNotSupportedFallback: historyItem.message };
|
|
776
|
+
}
|
|
777
|
+
processMatches(historyItem, filterData) {
|
|
778
|
+
if (!filterData) {
|
|
779
|
+
return [undefined, undefined];
|
|
780
|
+
}
|
|
781
|
+
return [
|
|
782
|
+
historyItem.message === filterData.label ? createMatches(filterData.score) : undefined,
|
|
783
|
+
historyItem.author === filterData.label ? createMatches(filterData.score) : undefined
|
|
784
|
+
];
|
|
761
785
|
}
|
|
762
786
|
renderStatistics(node, index, templateData, height) {
|
|
763
787
|
const historyItem = node.element;
|
|
764
788
|
if (historyItem.statistics) {
|
|
765
789
|
const statsAriaLabel = [
|
|
766
790
|
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
|
-
)) :
|
|
791
|
+
( localizeWithPath(_moduleId, 4, "{0} file changed", historyItem.statistics.files)) :
|
|
792
|
+
( localizeWithPath(_moduleId, 5, "{0} files changed", historyItem.statistics.files)),
|
|
793
|
+
historyItem.statistics.insertions === 1 ? ( localizeWithPath(_moduleId, 6, "{0} insertion{1}", historyItem.statistics.insertions, '(+)')) :
|
|
786
794
|
historyItem.statistics.insertions > 1 ? ( localizeWithPath(
|
|
787
|
-
|
|
788
|
-
|
|
795
|
+
_moduleId,
|
|
796
|
+
7,
|
|
789
797
|
"{0} insertions{1}",
|
|
790
798
|
historyItem.statistics.insertions,
|
|
791
799
|
'(+)'
|
|
792
800
|
)) : '',
|
|
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
|
-
)) : ''
|
|
801
|
+
historyItem.statistics.deletions === 1 ? ( localizeWithPath(_moduleId, 8, "{0} deletion{1}", historyItem.statistics.deletions, '(-)')) :
|
|
802
|
+
historyItem.statistics.deletions > 1 ? ( localizeWithPath(_moduleId, 9, "{0} deletions{1}", historyItem.statistics.deletions, '(-)')) : ''
|
|
807
803
|
];
|
|
808
|
-
const statsTitle = statsAriaLabel
|
|
809
|
-
.filter(l => l !== '').join(', ');
|
|
810
|
-
templateData.statsContainer.title = statsTitle;
|
|
804
|
+
const statsTitle = statsAriaLabel.filter(l => l !== '').join(', ');
|
|
811
805
|
templateData.statsContainer.setAttribute('aria-label', statsTitle);
|
|
812
|
-
templateData.
|
|
806
|
+
templateData.statsCustomHover.update(statsTitle);
|
|
807
|
+
templateData.filesLabel.textContent = ( (historyItem.statistics.files.toString()));
|
|
813
808
|
templateData.insertionsLabel.textContent = historyItem.statistics.insertions > 0 ? `+${historyItem.statistics.insertions}` : '';
|
|
814
809
|
templateData.insertionsLabel.classList.toggle('hidden', historyItem.statistics.insertions === 0);
|
|
815
810
|
templateData.deletionsLabel.textContent = historyItem.statistics.deletions > 0 ? `-${historyItem.statistics.deletions}` : '';
|
|
@@ -824,9 +819,10 @@ let HistoryItemRenderer = class HistoryItemRenderer {
|
|
|
824
819
|
templateData.disposables.dispose();
|
|
825
820
|
}
|
|
826
821
|
};
|
|
827
|
-
HistoryItemRenderer = HistoryItemRenderer_1 = ( __decorate([
|
|
828
|
-
( __param(2,
|
|
829
|
-
|
|
822
|
+
HistoryItemRenderer = HistoryItemRenderer_1 = ( (__decorate([
|
|
823
|
+
( (__param(2, IHoverService))),
|
|
824
|
+
( (__param(3, ISCMViewService)))
|
|
825
|
+
], HistoryItemRenderer)));
|
|
830
826
|
let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
831
827
|
static { HistoryItemChangeRenderer_1 = this; }
|
|
832
828
|
static { this.TEMPLATE_ID = 'historyItemChange'; }
|
|
@@ -841,22 +837,34 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
|
841
837
|
const name = append(element, $('.name'));
|
|
842
838
|
const fileLabel = this.labels.create(name, { supportDescriptionHighlights: true, supportHighlights: true });
|
|
843
839
|
const decorationIcon = append(element, $('.decoration-icon'));
|
|
844
|
-
return { element, name, fileLabel, decorationIcon, disposables: ( new DisposableStore()) };
|
|
840
|
+
return { element, name, fileLabel, decorationIcon, disposables: ( (new DisposableStore())) };
|
|
845
841
|
}
|
|
846
842
|
renderElement(node, index, templateData, height) {
|
|
847
843
|
const historyItemChangeOrFolder = node.element;
|
|
848
844
|
const uri = ResourceTree.isResourceNode(historyItemChangeOrFolder) ? historyItemChangeOrFolder.element?.uri ?? historyItemChangeOrFolder.uri : historyItemChangeOrFolder.uri;
|
|
849
845
|
const fileKind = ResourceTree.isResourceNode(historyItemChangeOrFolder) ? FileKind.FOLDER : FileKind.FILE;
|
|
850
846
|
const hidePath = this.viewMode() === "tree" ;
|
|
851
|
-
|
|
847
|
+
let matches;
|
|
848
|
+
let descriptionMatches;
|
|
849
|
+
if (ResourceTree.isResourceNode(historyItemChangeOrFolder)) {
|
|
850
|
+
if (!historyItemChangeOrFolder.element) {
|
|
851
|
+
matches = createMatches(node.filterData);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
else {
|
|
855
|
+
[matches, descriptionMatches] = processResourceFilterData(uri, node.filterData);
|
|
856
|
+
}
|
|
857
|
+
templateData.fileLabel.setFile(uri, { fileDecorations: { colors: false, badges: true }, fileKind, hidePath, matches, descriptionMatches });
|
|
852
858
|
}
|
|
853
859
|
renderCompressedElements(node, index, templateData, height) {
|
|
854
860
|
const compressed = node.element;
|
|
855
861
|
const folder = compressed.elements[compressed.elements.length - 1];
|
|
856
|
-
const label = ( compressed.elements.map(e => e.name));
|
|
862
|
+
const label = ( (compressed.elements.map(e => e.name)));
|
|
863
|
+
const matches = createMatches(node.filterData);
|
|
857
864
|
templateData.fileLabel.setResource({ resource: folder.uri, name: label }, {
|
|
858
865
|
fileDecorations: { colors: false, badges: true },
|
|
859
866
|
fileKind: FileKind.FOLDER,
|
|
867
|
+
matches,
|
|
860
868
|
separator: this.labelService.getSeparator(folder.uri.scheme)
|
|
861
869
|
});
|
|
862
870
|
}
|
|
@@ -864,29 +872,30 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
|
|
|
864
872
|
templateData.disposables.dispose();
|
|
865
873
|
}
|
|
866
874
|
};
|
|
867
|
-
HistoryItemChangeRenderer = HistoryItemChangeRenderer_1 = ( __decorate([
|
|
868
|
-
( __param(2, ILabelService))
|
|
869
|
-
], HistoryItemChangeRenderer));
|
|
875
|
+
HistoryItemChangeRenderer = HistoryItemChangeRenderer_1 = ( (__decorate([
|
|
876
|
+
( (__param(2, ILabelService)))
|
|
877
|
+
], HistoryItemChangeRenderer)));
|
|
870
878
|
let SeparatorRenderer = class SeparatorRenderer {
|
|
871
879
|
static { SeparatorRenderer_1 = this; }
|
|
872
880
|
static { this.TEMPLATE_ID = 'separator'; }
|
|
873
881
|
get templateId() { return SeparatorRenderer_1.TEMPLATE_ID; }
|
|
874
|
-
constructor(contextKeyService, contextMenuService, keybindingService, menuService, telemetryService) {
|
|
882
|
+
constructor(contextKeyService, contextMenuService, keybindingService, commandService, menuService, telemetryService) {
|
|
875
883
|
this.contextKeyService = contextKeyService;
|
|
876
884
|
this.contextMenuService = contextMenuService;
|
|
877
885
|
this.keybindingService = keybindingService;
|
|
886
|
+
this.commandService = commandService;
|
|
878
887
|
this.menuService = menuService;
|
|
879
888
|
this.telemetryService = telemetryService;
|
|
880
889
|
}
|
|
881
890
|
renderTemplate(container) {
|
|
882
891
|
container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-no-twistie');
|
|
883
892
|
container.parentElement.parentElement.classList.add('cursor-default', 'force-no-hover');
|
|
884
|
-
const disposables = ( new DisposableStore());
|
|
893
|
+
const disposables = ( (new DisposableStore()));
|
|
885
894
|
const element = append(container, $('.separator-container'));
|
|
886
|
-
const label = ( new IconLabel(element, { supportIcons: true, }));
|
|
895
|
+
const label = ( (new IconLabel(element, { supportIcons: true, })));
|
|
887
896
|
append(element, $('.separator'));
|
|
888
897
|
disposables.add(label);
|
|
889
|
-
const toolBar = ( new MenuWorkbenchToolBar(
|
|
898
|
+
const toolBar = ( (new MenuWorkbenchToolBar(
|
|
890
899
|
append(element, $('.actions')),
|
|
891
900
|
MenuId.SCMChangesSeparator,
|
|
892
901
|
{ moreIcon: Codicon.gear },
|
|
@@ -894,8 +903,9 @@ let SeparatorRenderer = class SeparatorRenderer {
|
|
|
894
903
|
this.contextKeyService,
|
|
895
904
|
this.contextMenuService,
|
|
896
905
|
this.keybindingService,
|
|
906
|
+
this.commandService,
|
|
897
907
|
this.telemetryService
|
|
898
|
-
));
|
|
908
|
+
)));
|
|
899
909
|
disposables.add(toolBar);
|
|
900
910
|
return { label, disposables };
|
|
901
911
|
}
|
|
@@ -903,19 +913,20 @@ let SeparatorRenderer = class SeparatorRenderer {
|
|
|
903
913
|
templateData.label.setLabel(element.element.label, undefined, { title: element.element.ariaLabel });
|
|
904
914
|
}
|
|
905
915
|
renderCompressedElements(node, index, templateData, height) {
|
|
906
|
-
throw new Error('Should never happen since node is incompressible');
|
|
916
|
+
throw ( (new Error('Should never happen since node is incompressible')));
|
|
907
917
|
}
|
|
908
918
|
disposeTemplate(templateData) {
|
|
909
919
|
templateData.disposables.dispose();
|
|
910
920
|
}
|
|
911
921
|
};
|
|
912
|
-
SeparatorRenderer = SeparatorRenderer_1 = ( __decorate([
|
|
913
|
-
( __param(0, IContextKeyService)),
|
|
914
|
-
( __param(1, IContextMenuService)),
|
|
915
|
-
( __param(2, IKeybindingService)),
|
|
916
|
-
( __param(3,
|
|
917
|
-
( __param(4,
|
|
918
|
-
|
|
922
|
+
SeparatorRenderer = SeparatorRenderer_1 = ( (__decorate([
|
|
923
|
+
( (__param(0, IContextKeyService))),
|
|
924
|
+
( (__param(1, IContextMenuService))),
|
|
925
|
+
( (__param(2, IKeybindingService))),
|
|
926
|
+
( (__param(3, ICommandService))),
|
|
927
|
+
( (__param(4, IMenuService))),
|
|
928
|
+
( (__param(5, ITelemetryService)))
|
|
929
|
+
], SeparatorRenderer)));
|
|
919
930
|
class ListDelegate {
|
|
920
931
|
constructor(inputRenderer) {
|
|
921
932
|
this.inputRenderer = inputRenderer;
|
|
@@ -960,7 +971,7 @@ class ListDelegate {
|
|
|
960
971
|
return SeparatorRenderer.TEMPLATE_ID;
|
|
961
972
|
}
|
|
962
973
|
else {
|
|
963
|
-
throw new Error('Unknown element');
|
|
974
|
+
throw ( (new Error('Unknown element')));
|
|
964
975
|
}
|
|
965
976
|
}
|
|
966
977
|
}
|
|
@@ -990,7 +1001,7 @@ class SCMTreeSorter {
|
|
|
990
1001
|
compare(one, other) {
|
|
991
1002
|
if (isSCMRepository(one)) {
|
|
992
1003
|
if (!isSCMRepository(other)) {
|
|
993
|
-
throw new Error('Invalid comparison');
|
|
1004
|
+
throw ( (new Error('Invalid comparison')));
|
|
994
1005
|
}
|
|
995
1006
|
return 0;
|
|
996
1007
|
}
|
|
@@ -1017,19 +1028,19 @@ class SCMTreeSorter {
|
|
|
1017
1028
|
}
|
|
1018
1029
|
if (isSCMHistoryItemTreeElement(one)) {
|
|
1019
1030
|
if (!isSCMHistoryItemTreeElement(other)) {
|
|
1020
|
-
throw new Error('Invalid comparison');
|
|
1031
|
+
throw ( (new Error('Invalid comparison')));
|
|
1021
1032
|
}
|
|
1022
1033
|
return 0;
|
|
1023
1034
|
}
|
|
1024
1035
|
if (isSCMHistoryItemChangeTreeElement(one) || isSCMHistoryItemChangeNode(one)) {
|
|
1025
1036
|
if (this.viewMode() === "list" ) {
|
|
1026
1037
|
if (!isSCMHistoryItemChangeTreeElement(other)) {
|
|
1027
|
-
throw new Error('Invalid comparison');
|
|
1038
|
+
throw ( (new Error('Invalid comparison')));
|
|
1028
1039
|
}
|
|
1029
1040
|
return comparePaths(one.uri.fsPath, other.uri.fsPath);
|
|
1030
1041
|
}
|
|
1031
1042
|
if (!isSCMHistoryItemChangeTreeElement(other) && !isSCMHistoryItemChangeNode(other)) {
|
|
1032
|
-
throw new Error('Invalid comparison');
|
|
1043
|
+
throw ( (new Error('Invalid comparison')));
|
|
1033
1044
|
}
|
|
1034
1045
|
const oneName = isSCMHistoryItemChangeNode(one) ? one.name : basename(one.uri);
|
|
1035
1046
|
const otherName = isSCMHistoryItemChangeNode(other) ? other.name : basename(other.uri);
|
|
@@ -1081,7 +1092,7 @@ let SCMTreeKeyboardNavigationLabelProvider = class SCMTreeKeyboardNavigationLabe
|
|
|
1081
1092
|
return element.label;
|
|
1082
1093
|
}
|
|
1083
1094
|
else if (isSCMHistoryItemTreeElement(element)) {
|
|
1084
|
-
return element.
|
|
1095
|
+
return [element.message, element.author];
|
|
1085
1096
|
}
|
|
1086
1097
|
else if (isSCMViewSeparator(element)) {
|
|
1087
1098
|
return element.label;
|
|
@@ -1098,12 +1109,12 @@ let SCMTreeKeyboardNavigationLabelProvider = class SCMTreeKeyboardNavigationLabe
|
|
|
1098
1109
|
}
|
|
1099
1110
|
getCompressedNodeKeyboardNavigationLabel(elements) {
|
|
1100
1111
|
const folders = elements;
|
|
1101
|
-
return ( folders.map(e => e.name)).join('/');
|
|
1112
|
+
return ( (folders.map(e => e.name))).join('/');
|
|
1102
1113
|
}
|
|
1103
1114
|
};
|
|
1104
|
-
SCMTreeKeyboardNavigationLabelProvider = ( __decorate([
|
|
1105
|
-
( __param(1, ILabelService))
|
|
1106
|
-
], SCMTreeKeyboardNavigationLabelProvider));
|
|
1115
|
+
SCMTreeKeyboardNavigationLabelProvider = ( (__decorate([
|
|
1116
|
+
( (__param(1, ILabelService)))
|
|
1117
|
+
], SCMTreeKeyboardNavigationLabelProvider)));
|
|
1107
1118
|
function getSCMResourceId(element) {
|
|
1108
1119
|
if (isSCMRepository(element)) {
|
|
1109
1120
|
const provider = element.provider;
|
|
@@ -1124,11 +1135,11 @@ function getSCMResourceId(element) {
|
|
|
1124
1135
|
else if (isSCMResource(element)) {
|
|
1125
1136
|
const group = element.resourceGroup;
|
|
1126
1137
|
const provider = group.provider;
|
|
1127
|
-
return `resource:${provider.id}/${group.id}/${( element.sourceUri.toString())}`;
|
|
1138
|
+
return `resource:${provider.id}/${group.id}/${( (element.sourceUri.toString()))}`;
|
|
1128
1139
|
}
|
|
1129
1140
|
else if (isSCMResourceNode(element)) {
|
|
1130
1141
|
const group = element.context;
|
|
1131
|
-
return `folder:${group.provider.id}/${group.id}/$FOLDER/${( element.uri.toString())}`;
|
|
1142
|
+
return `folder:${group.provider.id}/${group.id}/$FOLDER/${( (element.uri.toString()))}`;
|
|
1132
1143
|
}
|
|
1133
1144
|
else if (isSCMHistoryItemGroupTreeElement(element)) {
|
|
1134
1145
|
const provider = element.repository.provider;
|
|
@@ -1143,20 +1154,20 @@ function getSCMResourceId(element) {
|
|
|
1143
1154
|
const historyItem = element.historyItem;
|
|
1144
1155
|
const historyItemGroup = historyItem.historyItemGroup;
|
|
1145
1156
|
const provider = historyItemGroup.repository.provider;
|
|
1146
|
-
return `historyItemChange:${provider.id}/${historyItemGroup.id}/${historyItem.id}/${( element.uri.toString())}`;
|
|
1157
|
+
return `historyItemChange:${provider.id}/${historyItemGroup.id}/${historyItem.id}/${( (element.uri.toString()))}`;
|
|
1147
1158
|
}
|
|
1148
1159
|
else if (isSCMHistoryItemChangeNode(element)) {
|
|
1149
1160
|
const historyItem = element.context;
|
|
1150
1161
|
const historyItemGroup = historyItem.historyItemGroup;
|
|
1151
1162
|
const provider = historyItemGroup.repository.provider;
|
|
1152
|
-
return `folder:${provider.id}/${historyItemGroup.id}/${historyItem.id}/$FOLDER/${( element.uri.toString())}`;
|
|
1163
|
+
return `folder:${provider.id}/${historyItemGroup.id}/${historyItem.id}/$FOLDER/${( (element.uri.toString()))}`;
|
|
1153
1164
|
}
|
|
1154
1165
|
else if (isSCMViewSeparator(element)) {
|
|
1155
1166
|
const provider = element.repository.provider;
|
|
1156
1167
|
return `separator:${provider.id}`;
|
|
1157
1168
|
}
|
|
1158
1169
|
else {
|
|
1159
|
-
throw new Error('Invalid tree element');
|
|
1170
|
+
throw ( (new Error('Invalid tree element')));
|
|
1160
1171
|
}
|
|
1161
1172
|
}
|
|
1162
1173
|
class SCMResourceIdentityProvider {
|
|
@@ -1169,11 +1180,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1169
1180
|
this.labelService = labelService;
|
|
1170
1181
|
}
|
|
1171
1182
|
getWidgetAriaLabel() {
|
|
1172
|
-
return ( localizeWithPath(
|
|
1173
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1174
|
-
'scm',
|
|
1175
|
-
"Source Control Management"
|
|
1176
|
-
));
|
|
1183
|
+
return ( localizeWithPath(_moduleId, 10, "Source Control Management"));
|
|
1177
1184
|
}
|
|
1178
1185
|
getAriaLabel(element) {
|
|
1179
1186
|
if (ResourceTree.isResourceNode(element)) {
|
|
@@ -1183,11 +1190,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1183
1190
|
return `${element.provider.name} ${element.provider.label}`;
|
|
1184
1191
|
}
|
|
1185
1192
|
else if (isSCMInput(element)) {
|
|
1186
|
-
return ( localizeWithPath(
|
|
1187
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1188
|
-
'input',
|
|
1189
|
-
"Source Control Input"
|
|
1190
|
-
));
|
|
1193
|
+
return ( localizeWithPath(_moduleId, 11, "Source Control Input"));
|
|
1191
1194
|
}
|
|
1192
1195
|
else if (isSCMActionButton(element)) {
|
|
1193
1196
|
return element.button?.command.title ?? '';
|
|
@@ -1199,7 +1202,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1199
1202
|
return element.ariaLabel ?? `${element.label.trim()}${element.description ? `, ${element.description}` : ''}`;
|
|
1200
1203
|
}
|
|
1201
1204
|
else if (isSCMHistoryItemTreeElement(element)) {
|
|
1202
|
-
return `${stripIcons(element.
|
|
1205
|
+
return `${stripIcons(element.message).trim()}${element.author ? `, ${element.author}` : ''}`;
|
|
1203
1206
|
}
|
|
1204
1207
|
else if (isSCMHistoryItemChangeTreeElement(element)) {
|
|
1205
1208
|
const result = [basename(element.uri)];
|
|
@@ -1226,56 +1229,52 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
|
|
|
1226
1229
|
}
|
|
1227
1230
|
}
|
|
1228
1231
|
};
|
|
1229
|
-
SCMAccessibilityProvider = ( __decorate([
|
|
1230
|
-
( __param(0, ILabelService))
|
|
1231
|
-
], SCMAccessibilityProvider));
|
|
1232
|
+
SCMAccessibilityProvider = ( (__decorate([
|
|
1233
|
+
( (__param(0, ILabelService)))
|
|
1234
|
+
], SCMAccessibilityProvider)));
|
|
1232
1235
|
const Menus = {
|
|
1233
|
-
ViewSort: ( new MenuId('SCMViewSort')),
|
|
1234
|
-
Repositories: ( new MenuId('SCMRepositories')),
|
|
1235
|
-
ChangesSettings: ( new MenuId('SCMChangesSettings')),
|
|
1236
|
+
ViewSort: ( (new MenuId('SCMViewSort'))),
|
|
1237
|
+
Repositories: ( (new MenuId('SCMRepositories'))),
|
|
1238
|
+
ChangesSettings: ( (new MenuId('SCMChangesSettings'))),
|
|
1236
1239
|
};
|
|
1237
1240
|
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)),
|
|
1241
|
+
SCMViewMode: ( (new RawContextKey('scmViewMode', "list" ))),
|
|
1242
|
+
SCMViewSortKey: ( (new RawContextKey('scmViewSortKey', "path" ))),
|
|
1243
|
+
SCMViewAreAllRepositoriesCollapsed: ( (new RawContextKey('scmViewAreAllRepositoriesCollapsed', false))),
|
|
1244
|
+
SCMViewIsAnyRepositoryCollapsible: ( (new RawContextKey('scmViewIsAnyRepositoryCollapsible', false))),
|
|
1245
|
+
SCMProvider: ( (new RawContextKey('scmProvider', undefined))),
|
|
1246
|
+
SCMProviderRootUri: ( (new RawContextKey('scmProviderRootUri', undefined))),
|
|
1247
|
+
SCMProviderHasRootUri: ( (new RawContextKey('scmProviderHasRootUri', undefined))),
|
|
1248
|
+
RepositoryCount: ( (new RawContextKey('scmRepositoryCount', 0))),
|
|
1249
|
+
RepositoryVisibilityCount: ( (new RawContextKey('scmRepositoryVisibleCount', 0))),
|
|
1247
1250
|
RepositoryVisibility(repository) {
|
|
1248
|
-
return (
|
|
1251
|
+
return (
|
|
1252
|
+
(new RawContextKey(`scmRepositoryVisible:${repository.provider.id}`, false))
|
|
1253
|
+
);
|
|
1249
1254
|
}
|
|
1250
1255
|
};
|
|
1251
1256
|
MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
|
|
1252
|
-
title: ( localizeWithPath(
|
|
1253
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1254
|
-
'sortAction',
|
|
1255
|
-
"View & Sort"
|
|
1256
|
-
)),
|
|
1257
|
+
title: ( localizeWithPath(_moduleId, 12, "View & Sort")),
|
|
1257
1258
|
submenu: Menus.ViewSort,
|
|
1258
|
-
when: ( ContextKeyExpr.and(
|
|
1259
|
+
when: ( (ContextKeyExpr.and(
|
|
1260
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1261
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0))
|
|
1262
|
+
))),
|
|
1259
1263
|
group: '0_view&sort',
|
|
1260
1264
|
order: 1
|
|
1261
1265
|
});
|
|
1262
1266
|
MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
|
|
1263
|
-
title: ( localizeWithPath(
|
|
1264
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1265
|
-
'scmChanges',
|
|
1266
|
-
"Incoming & Outgoing"
|
|
1267
|
-
)),
|
|
1267
|
+
title: ( localizeWithPath(_moduleId, 13, "Incoming & Outgoing")),
|
|
1268
1268
|
submenu: Menus.ChangesSettings,
|
|
1269
|
-
when: ( ContextKeyExpr.and(
|
|
1269
|
+
when: ( (ContextKeyExpr.and(
|
|
1270
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1271
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0))
|
|
1272
|
+
))),
|
|
1270
1273
|
group: '0_view&sort',
|
|
1271
1274
|
order: 2
|
|
1272
1275
|
});
|
|
1273
1276
|
MenuRegistry.appendMenuItem(Menus.ViewSort, {
|
|
1274
|
-
title: ( localizeWithPath(
|
|
1275
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1276
|
-
'repositories',
|
|
1277
|
-
"Repositories"
|
|
1278
|
-
)),
|
|
1277
|
+
title: ( localizeWithPath(_moduleId, 14, "Repositories")),
|
|
1279
1278
|
submenu: Menus.Repositories,
|
|
1280
1279
|
when: ContextKeyExpr.greater(ContextKeys.RepositoryCount.key, 1),
|
|
1281
1280
|
group: '0_repositories'
|
|
@@ -1285,7 +1284,7 @@ class SCMChangesSettingAction extends Action2 {
|
|
|
1285
1284
|
super({
|
|
1286
1285
|
...desc,
|
|
1287
1286
|
f1: false,
|
|
1288
|
-
toggled: ( ContextKeyExpr.equals(`config.${settingKey}`, settingValue)),
|
|
1287
|
+
toggled: ( (ContextKeyExpr.equals(`config.${settingKey}`, settingValue))),
|
|
1289
1288
|
});
|
|
1290
1289
|
this.settingKey = settingKey;
|
|
1291
1290
|
this.settingValue = settingValue;
|
|
@@ -1296,21 +1295,13 @@ class SCMChangesSettingAction extends Action2 {
|
|
|
1296
1295
|
}
|
|
1297
1296
|
}
|
|
1298
1297
|
MenuRegistry.appendMenuItem(MenuId.SCMChangesSeparator, {
|
|
1299
|
-
title: ( localizeWithPath(
|
|
1300
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1301
|
-
'incomingChanges',
|
|
1302
|
-
"Show Incoming Changes"
|
|
1303
|
-
)),
|
|
1298
|
+
title: ( localizeWithPath(_moduleId, 15, "Show Incoming Changes")),
|
|
1304
1299
|
submenu: MenuId.SCMIncomingChangesSetting,
|
|
1305
1300
|
group: '1_incoming&outgoing',
|
|
1306
1301
|
order: 1
|
|
1307
1302
|
});
|
|
1308
1303
|
MenuRegistry.appendMenuItem(Menus.ChangesSettings, {
|
|
1309
|
-
title: ( localizeWithPath(
|
|
1310
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1311
|
-
'incomingChanges',
|
|
1312
|
-
"Show Incoming Changes"
|
|
1313
|
-
)),
|
|
1304
|
+
title: ( localizeWithPath(_moduleId, 15, "Show Incoming Changes")),
|
|
1314
1305
|
submenu: MenuId.SCMIncomingChangesSetting,
|
|
1315
1306
|
group: '1_incoming&outgoing',
|
|
1316
1307
|
order: 1
|
|
@@ -1319,7 +1310,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1319
1310
|
constructor() {
|
|
1320
1311
|
super('scm.showIncomingChanges', 'always', {
|
|
1321
1312
|
id: 'workbench.scm.action.showIncomingChanges.always',
|
|
1322
|
-
title: ( localizeWithPath(
|
|
1313
|
+
title: ( localizeWithPath(_moduleId, 16, "Always")),
|
|
1323
1314
|
menu: { id: MenuId.SCMIncomingChangesSetting },
|
|
1324
1315
|
});
|
|
1325
1316
|
}
|
|
@@ -1328,7 +1319,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1328
1319
|
constructor() {
|
|
1329
1320
|
super('scm.showIncomingChanges', 'auto', {
|
|
1330
1321
|
id: 'workbench.scm.action.showIncomingChanges.auto',
|
|
1331
|
-
title: ( localizeWithPath(
|
|
1322
|
+
title: ( localizeWithPath(_moduleId, 17, "Auto")),
|
|
1332
1323
|
menu: {
|
|
1333
1324
|
id: MenuId.SCMIncomingChangesSetting,
|
|
1334
1325
|
}
|
|
@@ -1339,7 +1330,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1339
1330
|
constructor() {
|
|
1340
1331
|
super('scm.showIncomingChanges', 'never', {
|
|
1341
1332
|
id: 'workbench.scm.action.showIncomingChanges.never',
|
|
1342
|
-
title: ( localizeWithPath(
|
|
1333
|
+
title: ( localizeWithPath(_moduleId, 18, "Never")),
|
|
1343
1334
|
menu: {
|
|
1344
1335
|
id: MenuId.SCMIncomingChangesSetting,
|
|
1345
1336
|
}
|
|
@@ -1347,21 +1338,13 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1347
1338
|
}
|
|
1348
1339
|
});
|
|
1349
1340
|
MenuRegistry.appendMenuItem(MenuId.SCMChangesSeparator, {
|
|
1350
|
-
title: ( localizeWithPath(
|
|
1351
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1352
|
-
'outgoingChanges',
|
|
1353
|
-
"Show Outgoing Changes"
|
|
1354
|
-
)),
|
|
1341
|
+
title: ( localizeWithPath(_moduleId, 19, "Show Outgoing Changes")),
|
|
1355
1342
|
submenu: MenuId.SCMOutgoingChangesSetting,
|
|
1356
1343
|
group: '1_incoming&outgoing',
|
|
1357
1344
|
order: 2
|
|
1358
1345
|
});
|
|
1359
1346
|
MenuRegistry.appendMenuItem(Menus.ChangesSettings, {
|
|
1360
|
-
title: ( localizeWithPath(
|
|
1361
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1362
|
-
'outgoingChanges',
|
|
1363
|
-
"Show Outgoing Changes"
|
|
1364
|
-
)),
|
|
1347
|
+
title: ( localizeWithPath(_moduleId, 19, "Show Outgoing Changes")),
|
|
1365
1348
|
submenu: MenuId.SCMOutgoingChangesSetting,
|
|
1366
1349
|
group: '1_incoming&outgoing',
|
|
1367
1350
|
order: 2
|
|
@@ -1370,7 +1353,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1370
1353
|
constructor() {
|
|
1371
1354
|
super('scm.showOutgoingChanges', 'always', {
|
|
1372
1355
|
id: 'workbench.scm.action.showOutgoingChanges.always',
|
|
1373
|
-
title: ( localizeWithPath(
|
|
1356
|
+
title: ( localizeWithPath(_moduleId, 16, "Always")),
|
|
1374
1357
|
menu: {
|
|
1375
1358
|
id: MenuId.SCMOutgoingChangesSetting,
|
|
1376
1359
|
}
|
|
@@ -1381,7 +1364,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1381
1364
|
constructor() {
|
|
1382
1365
|
super('scm.showOutgoingChanges', 'auto', {
|
|
1383
1366
|
id: 'workbench.scm.action.showOutgoingChanges.auto',
|
|
1384
|
-
title: ( localizeWithPath(
|
|
1367
|
+
title: ( localizeWithPath(_moduleId, 17, "Auto")),
|
|
1385
1368
|
menu: {
|
|
1386
1369
|
id: MenuId.SCMOutgoingChangesSetting,
|
|
1387
1370
|
}
|
|
@@ -1392,7 +1375,7 @@ registerAction2(class extends SCMChangesSettingAction {
|
|
|
1392
1375
|
constructor() {
|
|
1393
1376
|
super('scm.showOutgoingChanges', 'never', {
|
|
1394
1377
|
id: 'workbench.scm.action.showOutgoingChanges.never',
|
|
1395
|
-
title: ( localizeWithPath(
|
|
1378
|
+
title: ( localizeWithPath(_moduleId, 18, "Never")),
|
|
1396
1379
|
menu: {
|
|
1397
1380
|
id: MenuId.SCMOutgoingChangesSetting,
|
|
1398
1381
|
}
|
|
@@ -1403,13 +1386,9 @@ registerAction2(class extends Action2 {
|
|
|
1403
1386
|
constructor() {
|
|
1404
1387
|
super({
|
|
1405
1388
|
id: 'workbench.scm.action.scm.showChangesSummary',
|
|
1406
|
-
title: ( localizeWithPath(
|
|
1407
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1408
|
-
'showChangesSummary',
|
|
1409
|
-
"Show Changes Summary"
|
|
1410
|
-
)),
|
|
1389
|
+
title: ( localizeWithPath(_moduleId, 20, "Show Changes Summary")),
|
|
1411
1390
|
f1: false,
|
|
1412
|
-
toggled: ( ContextKeyExpr.equals('config.scm.showChangesSummary', true)),
|
|
1391
|
+
toggled: ( (ContextKeyExpr.equals('config.scm.showChangesSummary', true))),
|
|
1413
1392
|
menu: [
|
|
1414
1393
|
{ id: MenuId.SCMChangesSeparator, order: 3 },
|
|
1415
1394
|
{ id: Menus.ChangesSettings, order: 3 },
|
|
@@ -1428,8 +1407,11 @@ class RepositoryVisibilityAction extends Action2 {
|
|
|
1428
1407
|
id: `workbench.scm.action.toggleRepositoryVisibility.${repository.provider.id}`,
|
|
1429
1408
|
title: repository.provider.name,
|
|
1430
1409
|
f1: false,
|
|
1431
|
-
precondition: ( ContextKeyExpr.or(
|
|
1432
|
-
|
|
1410
|
+
precondition: ( (ContextKeyExpr.or(
|
|
1411
|
+
(ContextKeys.RepositoryVisibilityCount.notEqualsTo(1)),
|
|
1412
|
+
(ContextKeys.RepositoryVisibility(repository).isEqualTo(false))
|
|
1413
|
+
))),
|
|
1414
|
+
toggled: ( (ContextKeys.RepositoryVisibility(repository).isEqualTo(true))),
|
|
1433
1415
|
menu: { id: Menus.Repositories, group: '0_repositories' }
|
|
1434
1416
|
});
|
|
1435
1417
|
this.repository = repository;
|
|
@@ -1443,8 +1425,8 @@ let RepositoryVisibilityActionController = class RepositoryVisibilityActionContr
|
|
|
1443
1425
|
constructor(contextKeyService, scmViewService, scmService) {
|
|
1444
1426
|
this.contextKeyService = contextKeyService;
|
|
1445
1427
|
this.scmViewService = scmViewService;
|
|
1446
|
-
this.items = ( new Map());
|
|
1447
|
-
this.disposables = ( new DisposableStore());
|
|
1428
|
+
this.items = ( (new Map()));
|
|
1429
|
+
this.disposables = ( (new DisposableStore()));
|
|
1448
1430
|
this.repositoryCountContextKey = ContextKeys.RepositoryCount.bindTo(contextKeyService);
|
|
1449
1431
|
this.repositoryVisibilityCountContextKey = ContextKeys.RepositoryVisibilityCount.bindTo(contextKeyService);
|
|
1450
1432
|
scmViewService.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories, this, this.disposables);
|
|
@@ -1490,32 +1472,28 @@ let RepositoryVisibilityActionController = class RepositoryVisibilityActionContr
|
|
|
1490
1472
|
}
|
|
1491
1473
|
updateRepositoryContextKeys() {
|
|
1492
1474
|
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));
|
|
1475
|
+
this.repositoryVisibilityCountContextKey.set(Iterable.reduce(( (this.items.keys())), (r, repository) => r + (this.scmViewService.isVisible(repository) ? 1 : 0), 0));
|
|
1494
1476
|
}
|
|
1495
1477
|
dispose() {
|
|
1496
1478
|
this.disposables.dispose();
|
|
1497
|
-
dispose(( this.items.values()));
|
|
1479
|
+
dispose(( (this.items.values())));
|
|
1498
1480
|
this.items.clear();
|
|
1499
1481
|
}
|
|
1500
1482
|
};
|
|
1501
|
-
RepositoryVisibilityActionController = ( __decorate([
|
|
1502
|
-
( __param(0, IContextKeyService)),
|
|
1503
|
-
( __param(1, ISCMViewService)),
|
|
1504
|
-
( __param(2, ISCMService))
|
|
1505
|
-
], RepositoryVisibilityActionController));
|
|
1483
|
+
RepositoryVisibilityActionController = ( (__decorate([
|
|
1484
|
+
( (__param(0, IContextKeyService))),
|
|
1485
|
+
( (__param(1, ISCMViewService))),
|
|
1486
|
+
( (__param(2, ISCMService)))
|
|
1487
|
+
], RepositoryVisibilityActionController)));
|
|
1506
1488
|
class SetListViewModeAction extends ViewAction {
|
|
1507
1489
|
constructor(id = 'workbench.scm.action.setListViewMode', menu = {}) {
|
|
1508
1490
|
super({
|
|
1509
1491
|
id,
|
|
1510
|
-
title: ( localizeWithPath(
|
|
1511
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1512
|
-
'setListViewMode',
|
|
1513
|
-
"View as List"
|
|
1514
|
-
)),
|
|
1492
|
+
title: ( localizeWithPath(_moduleId, 21, "View as List")),
|
|
1515
1493
|
viewId: VIEW_PANE_ID,
|
|
1516
1494
|
f1: false,
|
|
1517
1495
|
icon: Codicon.listTree,
|
|
1518
|
-
toggled: ( ContextKeys.SCMViewMode.isEqualTo("list" )),
|
|
1496
|
+
toggled: ( (ContextKeys.SCMViewMode.isEqualTo("list" ))),
|
|
1519
1497
|
menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
|
|
1520
1498
|
});
|
|
1521
1499
|
}
|
|
@@ -1527,7 +1505,11 @@ class SetListViewModeNavigationAction extends SetListViewModeAction {
|
|
|
1527
1505
|
constructor() {
|
|
1528
1506
|
super('workbench.scm.action.setListViewModeNavigation', {
|
|
1529
1507
|
id: MenuId.SCMTitle,
|
|
1530
|
-
when: ( ContextKeyExpr.and(
|
|
1508
|
+
when: ( (ContextKeyExpr.and(
|
|
1509
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1510
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0)),
|
|
1511
|
+
(ContextKeys.SCMViewMode.isEqualTo("tree" ))
|
|
1512
|
+
))),
|
|
1531
1513
|
group: 'navigation',
|
|
1532
1514
|
order: -1000
|
|
1533
1515
|
});
|
|
@@ -1537,15 +1519,11 @@ class SetTreeViewModeAction extends ViewAction {
|
|
|
1537
1519
|
constructor(id = 'workbench.scm.action.setTreeViewMode', menu = {}) {
|
|
1538
1520
|
super({
|
|
1539
1521
|
id,
|
|
1540
|
-
title: ( localizeWithPath(
|
|
1541
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1542
|
-
'setTreeViewMode',
|
|
1543
|
-
"View as Tree"
|
|
1544
|
-
)),
|
|
1522
|
+
title: ( localizeWithPath(_moduleId, 22, "View as Tree")),
|
|
1545
1523
|
viewId: VIEW_PANE_ID,
|
|
1546
1524
|
f1: false,
|
|
1547
1525
|
icon: Codicon.listFlat,
|
|
1548
|
-
toggled: ( ContextKeys.SCMViewMode.isEqualTo("tree" )),
|
|
1526
|
+
toggled: ( (ContextKeys.SCMViewMode.isEqualTo("tree" ))),
|
|
1549
1527
|
menu: { id: Menus.ViewSort, group: '1_viewmode', ...menu }
|
|
1550
1528
|
});
|
|
1551
1529
|
}
|
|
@@ -1557,7 +1535,11 @@ class SetTreeViewModeNavigationAction extends SetTreeViewModeAction {
|
|
|
1557
1535
|
constructor() {
|
|
1558
1536
|
super('workbench.scm.action.setTreeViewModeNavigation', {
|
|
1559
1537
|
id: MenuId.SCMTitle,
|
|
1560
|
-
when: ( ContextKeyExpr.and(
|
|
1538
|
+
when: ( (ContextKeyExpr.and(
|
|
1539
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1540
|
+
(ContextKeys.RepositoryCount.notEqualsTo(0)),
|
|
1541
|
+
(ContextKeys.SCMViewMode.isEqualTo("list" ))
|
|
1542
|
+
))),
|
|
1561
1543
|
group: 'navigation',
|
|
1562
1544
|
order: -1000
|
|
1563
1545
|
});
|
|
@@ -1574,7 +1556,7 @@ class RepositorySortAction extends ViewAction {
|
|
|
1574
1556
|
title,
|
|
1575
1557
|
viewId: VIEW_PANE_ID,
|
|
1576
1558
|
f1: false,
|
|
1577
|
-
toggled: ( RepositoryContextKeys.RepositorySortKey.isEqualTo(sortKey)),
|
|
1559
|
+
toggled: ( (RepositoryContextKeys.RepositorySortKey.isEqualTo(sortKey))),
|
|
1578
1560
|
menu: [
|
|
1579
1561
|
{
|
|
1580
1562
|
id: Menus.Repositories,
|
|
@@ -1594,29 +1576,17 @@ class RepositorySortAction extends ViewAction {
|
|
|
1594
1576
|
}
|
|
1595
1577
|
class RepositorySortByDiscoveryTimeAction extends RepositorySortAction {
|
|
1596
1578
|
constructor() {
|
|
1597
|
-
super("discoveryTime" , ( localizeWithPath(
|
|
1598
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1599
|
-
'repositorySortByDiscoveryTime',
|
|
1600
|
-
"Sort by Discovery Time"
|
|
1601
|
-
)));
|
|
1579
|
+
super("discoveryTime" , ( localizeWithPath(_moduleId, 23, "Sort by Discovery Time")));
|
|
1602
1580
|
}
|
|
1603
1581
|
}
|
|
1604
1582
|
class RepositorySortByNameAction extends RepositorySortAction {
|
|
1605
1583
|
constructor() {
|
|
1606
|
-
super("name" , ( localizeWithPath(
|
|
1607
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1608
|
-
'repositorySortByName',
|
|
1609
|
-
"Sort by Name"
|
|
1610
|
-
)));
|
|
1584
|
+
super("name" , ( localizeWithPath(_moduleId, 24, "Sort by Name")));
|
|
1611
1585
|
}
|
|
1612
1586
|
}
|
|
1613
1587
|
class RepositorySortByPathAction extends RepositorySortAction {
|
|
1614
1588
|
constructor() {
|
|
1615
|
-
super("path" , ( localizeWithPath(
|
|
1616
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1617
|
-
'repositorySortByPath',
|
|
1618
|
-
"Sort by Path"
|
|
1619
|
-
)));
|
|
1589
|
+
super("path" , ( localizeWithPath(_moduleId, 25, "Sort by Path")));
|
|
1620
1590
|
}
|
|
1621
1591
|
}
|
|
1622
1592
|
registerAction2(RepositorySortByDiscoveryTimeAction);
|
|
@@ -1629,8 +1599,8 @@ class SetSortKeyAction extends ViewAction {
|
|
|
1629
1599
|
title,
|
|
1630
1600
|
viewId: VIEW_PANE_ID,
|
|
1631
1601
|
f1: false,
|
|
1632
|
-
toggled: ( ContextKeys.SCMViewSortKey.isEqualTo(sortKey)),
|
|
1633
|
-
precondition: ( ContextKeys.SCMViewMode.isEqualTo("list" )),
|
|
1602
|
+
toggled: ( (ContextKeys.SCMViewSortKey.isEqualTo(sortKey))),
|
|
1603
|
+
precondition: ( (ContextKeys.SCMViewMode.isEqualTo("list" ))),
|
|
1634
1604
|
menu: { id: Menus.ViewSort, group: '2_sort' }
|
|
1635
1605
|
});
|
|
1636
1606
|
this.sortKey = sortKey;
|
|
@@ -1641,29 +1611,17 @@ class SetSortKeyAction extends ViewAction {
|
|
|
1641
1611
|
}
|
|
1642
1612
|
class SetSortByNameAction extends SetSortKeyAction {
|
|
1643
1613
|
constructor() {
|
|
1644
|
-
super("name" , ( localizeWithPath(
|
|
1645
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1646
|
-
'sortChangesByName',
|
|
1647
|
-
"Sort Changes by Name"
|
|
1648
|
-
)));
|
|
1614
|
+
super("name" , ( localizeWithPath(_moduleId, 26, "Sort Changes by Name")));
|
|
1649
1615
|
}
|
|
1650
1616
|
}
|
|
1651
1617
|
class SetSortByPathAction extends SetSortKeyAction {
|
|
1652
1618
|
constructor() {
|
|
1653
|
-
super("path" , ( localizeWithPath(
|
|
1654
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1655
|
-
'sortChangesByPath',
|
|
1656
|
-
"Sort Changes by Path"
|
|
1657
|
-
)));
|
|
1619
|
+
super("path" , ( localizeWithPath(_moduleId, 27, "Sort Changes by Path")));
|
|
1658
1620
|
}
|
|
1659
1621
|
}
|
|
1660
1622
|
class SetSortByStatusAction extends SetSortKeyAction {
|
|
1661
1623
|
constructor() {
|
|
1662
|
-
super("status" , ( localizeWithPath(
|
|
1663
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1664
|
-
'sortChangesByStatus',
|
|
1665
|
-
"Sort Changes by Status"
|
|
1666
|
-
)));
|
|
1624
|
+
super("status" , ( localizeWithPath(_moduleId, 28, "Sort Changes by Status")));
|
|
1667
1625
|
}
|
|
1668
1626
|
}
|
|
1669
1627
|
registerAction2(SetSortByNameAction);
|
|
@@ -1673,18 +1631,18 @@ class CollapseAllRepositoriesAction extends ViewAction {
|
|
|
1673
1631
|
constructor() {
|
|
1674
1632
|
super({
|
|
1675
1633
|
id: `workbench.scm.action.collapseAllRepositories`,
|
|
1676
|
-
title: ( localizeWithPath(
|
|
1677
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1678
|
-
'collapse all',
|
|
1679
|
-
"Collapse All Repositories"
|
|
1680
|
-
)),
|
|
1634
|
+
title: ( localizeWithPath(_moduleId, 29, "Collapse All Repositories")),
|
|
1681
1635
|
viewId: VIEW_PANE_ID,
|
|
1682
1636
|
f1: false,
|
|
1683
1637
|
icon: Codicon.collapseAll,
|
|
1684
1638
|
menu: {
|
|
1685
1639
|
id: MenuId.SCMTitle,
|
|
1686
1640
|
group: 'navigation',
|
|
1687
|
-
when: ( ContextKeyExpr.and(
|
|
1641
|
+
when: ( (ContextKeyExpr.and(
|
|
1642
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1643
|
+
(ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)),
|
|
1644
|
+
(ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(false))
|
|
1645
|
+
)))
|
|
1688
1646
|
}
|
|
1689
1647
|
});
|
|
1690
1648
|
}
|
|
@@ -1696,18 +1654,18 @@ class ExpandAllRepositoriesAction extends ViewAction {
|
|
|
1696
1654
|
constructor() {
|
|
1697
1655
|
super({
|
|
1698
1656
|
id: `workbench.scm.action.expandAllRepositories`,
|
|
1699
|
-
title: ( localizeWithPath(
|
|
1700
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1701
|
-
'expand all',
|
|
1702
|
-
"Expand All Repositories"
|
|
1703
|
-
)),
|
|
1657
|
+
title: ( localizeWithPath(_moduleId, 30, "Expand All Repositories")),
|
|
1704
1658
|
viewId: VIEW_PANE_ID,
|
|
1705
1659
|
f1: false,
|
|
1706
1660
|
icon: Codicon.expandAll,
|
|
1707
1661
|
menu: {
|
|
1708
1662
|
id: MenuId.SCMTitle,
|
|
1709
1663
|
group: 'navigation',
|
|
1710
|
-
when: ( ContextKeyExpr.and(
|
|
1664
|
+
when: ( (ContextKeyExpr.and(
|
|
1665
|
+
(ContextKeyExpr.equals('view', VIEW_PANE_ID)),
|
|
1666
|
+
(ContextKeys.SCMViewIsAnyRepositoryCollapsible.isEqualTo(true)),
|
|
1667
|
+
(ContextKeys.SCMViewAreAllRepositoriesCollapsed.isEqualTo(true))
|
|
1668
|
+
)))
|
|
1711
1669
|
}
|
|
1712
1670
|
});
|
|
1713
1671
|
}
|
|
@@ -1723,7 +1681,7 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
|
|
|
1723
1681
|
super();
|
|
1724
1682
|
this.input = input;
|
|
1725
1683
|
this.storageService = storageService;
|
|
1726
|
-
this._runningActions = ( new Set());
|
|
1684
|
+
this._runningActions = ( (new Set()));
|
|
1727
1685
|
}
|
|
1728
1686
|
async runAction(action) {
|
|
1729
1687
|
try {
|
|
@@ -1737,11 +1695,11 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
|
|
|
1737
1695
|
for (const group of this.input.repository.provider.groups) {
|
|
1738
1696
|
context.push({
|
|
1739
1697
|
resourceGroupId: group.id,
|
|
1740
|
-
resources: [...( group.resources.map(r => r.sourceUri))]
|
|
1698
|
+
resources: [...( (group.resources.map(r => r.sourceUri)))]
|
|
1741
1699
|
});
|
|
1742
1700
|
}
|
|
1743
1701
|
this._runningActions.add(action);
|
|
1744
|
-
this._cts = ( new CancellationTokenSource());
|
|
1702
|
+
this._cts = ( (new CancellationTokenSource()));
|
|
1745
1703
|
await action.run(...[this.input.repository.provider.rootUri, context, this._cts.token]);
|
|
1746
1704
|
}
|
|
1747
1705
|
finally {
|
|
@@ -1752,35 +1710,27 @@ let SCMInputWidgetActionRunner = class SCMInputWidgetActionRunner extends Action
|
|
|
1752
1710
|
}
|
|
1753
1711
|
}
|
|
1754
1712
|
};
|
|
1755
|
-
SCMInputWidgetActionRunner = ( __decorate([
|
|
1756
|
-
( __param(1, IStorageService))
|
|
1757
|
-
], SCMInputWidgetActionRunner));
|
|
1713
|
+
SCMInputWidgetActionRunner = ( (__decorate([
|
|
1714
|
+
( (__param(1, IStorageService)))
|
|
1715
|
+
], SCMInputWidgetActionRunner)));
|
|
1758
1716
|
let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar {
|
|
1759
1717
|
get dropdownActions() { return this._dropdownActions; }
|
|
1760
1718
|
get dropdownAction() { return this._dropdownAction; }
|
|
1761
1719
|
constructor(container, options, menuService, contextKeyService, contextMenuService, commandService, keybindingService, storageService, telemetryService) {
|
|
1762
|
-
super(container, { resetMenu: MenuId.SCMInputBox, ...options }, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService);
|
|
1720
|
+
super(container, { resetMenu: MenuId.SCMInputBox, ...options }, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService);
|
|
1763
1721
|
this.menuService = menuService;
|
|
1764
1722
|
this.contextKeyService = contextKeyService;
|
|
1765
1723
|
this.storageService = storageService;
|
|
1766
1724
|
this._dropdownActions = [];
|
|
1767
|
-
this._onDidChange = ( new Emitter());
|
|
1725
|
+
this._onDidChange = ( (new Emitter()));
|
|
1768
1726
|
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({
|
|
1727
|
+
this.repositoryDisposables = ( (new DisposableStore()));
|
|
1728
|
+
this._dropdownAction = ( (new Action('scmInputMoreActions', ( localizeWithPath(_moduleId, 31, "More Actions...")), 'codicon-chevron-down')));
|
|
1729
|
+
this._cancelAction = ( (new MenuItemAction({
|
|
1776
1730
|
id: "scm.input.cancelAction" ,
|
|
1777
|
-
title: ( localizeWithPath(
|
|
1778
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
1779
|
-
'scmInputCancelAction',
|
|
1780
|
-
"Cancel"
|
|
1781
|
-
)),
|
|
1731
|
+
title: ( localizeWithPath(_moduleId, 32, "Cancel")),
|
|
1782
1732
|
icon: Codicon.debugStop,
|
|
1783
|
-
}, undefined, undefined, undefined, contextKeyService, commandService));
|
|
1733
|
+
}, undefined, undefined, undefined, undefined, contextKeyService, commandService)));
|
|
1784
1734
|
}
|
|
1785
1735
|
setInput(input) {
|
|
1786
1736
|
this.repositoryDisposables.clear();
|
|
@@ -1791,7 +1741,9 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1791
1741
|
]);
|
|
1792
1742
|
const menu = this.repositoryDisposables.add(this.menuService.createMenu(MenuId.SCMInputBox, contextKeyService, { emitEventsForSubmenuChanges: true }));
|
|
1793
1743
|
const isEnabled = () => {
|
|
1794
|
-
return (
|
|
1744
|
+
return (
|
|
1745
|
+
(input.repository.provider.groups.some(g => g.resources.length > 0))
|
|
1746
|
+
);
|
|
1795
1747
|
};
|
|
1796
1748
|
const updateToolbar = () => {
|
|
1797
1749
|
const actions = [];
|
|
@@ -1815,7 +1767,7 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1815
1767
|
this.repositoryDisposables.add(menu.onDidChange(() => updateToolbar()));
|
|
1816
1768
|
this.repositoryDisposables.add(input.repository.provider.onDidChangeResources(() => updateToolbar()));
|
|
1817
1769
|
this.repositoryDisposables.add(this.storageService.onDidChangeValue(0 , "scm.input.lastActionId" , this.repositoryDisposables)(() => updateToolbar()));
|
|
1818
|
-
this.actionRunner = ( new SCMInputWidgetActionRunner(input, this.storageService));
|
|
1770
|
+
this.actionRunner = ( (new SCMInputWidgetActionRunner(input, this.storageService)));
|
|
1819
1771
|
this.repositoryDisposables.add(this.actionRunner.onWillRun(e => {
|
|
1820
1772
|
if (this.actionRunner.runningActions.size === 0) {
|
|
1821
1773
|
super.setActions([this._cancelAction], []);
|
|
@@ -1830,23 +1782,23 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
|
|
|
1830
1782
|
updateToolbar();
|
|
1831
1783
|
}
|
|
1832
1784
|
};
|
|
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));
|
|
1785
|
+
SCMInputWidgetToolbar = ( (__decorate([
|
|
1786
|
+
( (__param(2, IMenuService))),
|
|
1787
|
+
( (__param(3, IContextKeyService))),
|
|
1788
|
+
( (__param(4, IContextMenuService))),
|
|
1789
|
+
( (__param(5, ICommandService))),
|
|
1790
|
+
( (__param(6, IKeybindingService))),
|
|
1791
|
+
( (__param(7, IStorageService))),
|
|
1792
|
+
( (__param(8, ITelemetryService)))
|
|
1793
|
+
], SCMInputWidgetToolbar)));
|
|
1842
1794
|
class SCMInputWidgetEditorOptions {
|
|
1843
1795
|
constructor(overflowWidgetsDomNode, configurationService) {
|
|
1844
1796
|
this.overflowWidgetsDomNode = overflowWidgetsDomNode;
|
|
1845
1797
|
this.configurationService = configurationService;
|
|
1846
|
-
this._onDidChange = ( new Emitter());
|
|
1798
|
+
this._onDidChange = ( (new Emitter()));
|
|
1847
1799
|
this.onDidChange = this._onDidChange.event;
|
|
1848
1800
|
this.defaultInputFontFamily = DEFAULT_FONT_FAMILY;
|
|
1849
|
-
this._disposables = ( new DisposableStore());
|
|
1801
|
+
this._disposables = ( (new DisposableStore()));
|
|
1850
1802
|
const onDidChangeConfiguration = Event.filter(this.configurationService.onDidChangeConfiguration, e => {
|
|
1851
1803
|
return e.affectsConfiguration('editor.accessibilitySupport') ||
|
|
1852
1804
|
e.affectsConfiguration('editor.cursorBlinking') ||
|
|
@@ -1958,7 +1910,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
1958
1910
|
modelValue.textModelRef = modelRef;
|
|
1959
1911
|
const textModel = modelRef.object.textEditorModel;
|
|
1960
1912
|
this.inputEditor.setModel(textModel);
|
|
1961
|
-
const validationDelayer = ( new ThrottledDelayer(200));
|
|
1913
|
+
const validationDelayer = ( (new ThrottledDelayer(200)));
|
|
1962
1914
|
const validate = async () => {
|
|
1963
1915
|
const position = this.inputEditor.getSelection()?.getStartPosition();
|
|
1964
1916
|
const offset = position && textModel.getOffsetAt(position);
|
|
@@ -2059,9 +2011,8 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2059
2011
|
this.contextViewService = contextViewService;
|
|
2060
2012
|
this.openerService = openerService;
|
|
2061
2013
|
this.contextMenuService = contextMenuService;
|
|
2062
|
-
this.disposables = ( new DisposableStore());
|
|
2063
|
-
this.repositoryDisposables = ( new DisposableStore());
|
|
2064
|
-
this.validationDisposable = Disposable.None;
|
|
2014
|
+
this.disposables = ( (new DisposableStore()));
|
|
2015
|
+
this.repositoryDisposables = ( (new DisposableStore()));
|
|
2065
2016
|
this.validationHasFocus = false;
|
|
2066
2017
|
this.lastLayoutWasTrash = false;
|
|
2067
2018
|
this.shouldFocusAfterLayout = false;
|
|
@@ -2071,7 +2022,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2071
2022
|
this.toolbarContainer = append(this.element, $('.scm-editor-toolbar'));
|
|
2072
2023
|
this.contextKeyService = contextKeyService.createScoped(this.element);
|
|
2073
2024
|
this.repositoryIdContextKey = this.contextKeyService.createKey('scmRepository', undefined);
|
|
2074
|
-
this.inputEditorOptions = ( new SCMInputWidgetEditorOptions(overflowWidgetsDomNode, this.configurationService));
|
|
2025
|
+
this.inputEditorOptions = ( (new SCMInputWidgetEditorOptions(overflowWidgetsDomNode, this.configurationService)));
|
|
2075
2026
|
this.disposables.add(this.inputEditorOptions.onDidChange(this.onDidChangeEditorOptions, this));
|
|
2076
2027
|
this.disposables.add(this.inputEditorOptions);
|
|
2077
2028
|
const editorConstructionOptions = this.inputEditorOptions.getEditorConstructionOptions();
|
|
@@ -2082,6 +2033,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2082
2033
|
ColorDetector.ID,
|
|
2083
2034
|
ContextMenuController.ID,
|
|
2084
2035
|
DragAndDropController.ID,
|
|
2036
|
+
CopyPasteController.ID,
|
|
2085
2037
|
DropIntoEditorController.ID,
|
|
2086
2038
|
LinkDetector.ID,
|
|
2087
2039
|
MenuPreventer.ID,
|
|
@@ -2093,10 +2045,10 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2093
2045
|
InlineCompletionsController.ID,
|
|
2094
2046
|
CodeActionController.ID,
|
|
2095
2047
|
FormatOnType.ID,
|
|
2096
|
-
EditorDictation.ID
|
|
2048
|
+
EditorDictation.ID,
|
|
2097
2049
|
])
|
|
2098
2050
|
};
|
|
2099
|
-
const services = ( new ServiceCollection([IContextKeyService, this.contextKeyService]));
|
|
2051
|
+
const services = ( (new ServiceCollection([IContextKeyService, this.contextKeyService])));
|
|
2100
2052
|
const instantiationService2 = instantiationService.createChild(services);
|
|
2101
2053
|
this.inputEditor = instantiationService2.createInstance(CodeEditorWidget, this.editorContainer, editorConstructionOptions, codeEditorWidgetOptions);
|
|
2102
2054
|
this.disposables.add(this.inputEditor);
|
|
@@ -2115,6 +2067,10 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2115
2067
|
}
|
|
2116
2068
|
}, 0);
|
|
2117
2069
|
}));
|
|
2070
|
+
this.disposables.add(this.inputEditor.onDidBlurEditorWidget(() => {
|
|
2071
|
+
CopyPasteController.get(this.inputEditor)?.clearWidgets();
|
|
2072
|
+
DropIntoEditorController.get(this.inputEditor)?.clearWidgets();
|
|
2073
|
+
}));
|
|
2118
2074
|
const firstLineKey = this.contextKeyService.createKey('scmInputIsInFirstPosition', false);
|
|
2119
2075
|
const lastLineKey = this.contextKeyService.createKey('scmInputIsInLastPosition', false);
|
|
2120
2076
|
this.disposables.add(this.inputEditor.onDidChangeCursorPosition(({ position }) => {
|
|
@@ -2158,7 +2114,7 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2158
2114
|
layout() {
|
|
2159
2115
|
const editorHeight = this.getContentHeight();
|
|
2160
2116
|
const toolbarWidth = this.getToolbarWidth();
|
|
2161
|
-
const dimension = ( new Dimension(this.element.clientWidth - toolbarWidth, editorHeight));
|
|
2117
|
+
const dimension = ( (new Dimension(this.element.clientWidth - toolbarWidth, editorHeight)));
|
|
2162
2118
|
if (dimension.width < 0) {
|
|
2163
2119
|
this.lastLayoutWasTrash = true;
|
|
2164
2120
|
return;
|
|
@@ -2199,8 +2155,8 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2199
2155
|
if (!this.validation || !this.inputEditor.hasTextFocus()) {
|
|
2200
2156
|
return;
|
|
2201
2157
|
}
|
|
2202
|
-
const disposables = ( new DisposableStore());
|
|
2203
|
-
this.
|
|
2158
|
+
const disposables = ( (new DisposableStore()));
|
|
2159
|
+
this.validationContextView = this.contextViewService.showContextView({
|
|
2204
2160
|
getAnchor: () => this.element,
|
|
2205
2161
|
render: container => {
|
|
2206
2162
|
this.element.style.borderBottomLeftRadius = '0';
|
|
@@ -2241,12 +2197,12 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2241
2197
|
element.appendChild(renderedMarkdown.element);
|
|
2242
2198
|
}
|
|
2243
2199
|
const actionsContainer = append(validationContainer, $('.scm-editor-validation-actions'));
|
|
2244
|
-
const actionbar = ( new ActionBar(actionsContainer));
|
|
2245
|
-
const action = ( new Action('scmInputWidget.validationMessage.close', ( localizeWithPath(
|
|
2200
|
+
const actionbar = ( (new ActionBar(actionsContainer)));
|
|
2201
|
+
const action = ( (new Action('scmInputWidget.validationMessage.close', ( localizeWithPath(_moduleId, 33, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => {
|
|
2246
2202
|
this.contextViewService.hideContextView();
|
|
2247
2203
|
this.element.style.borderBottomLeftRadius = '2px';
|
|
2248
2204
|
this.element.style.borderBottomRightRadius = '2px';
|
|
2249
|
-
}));
|
|
2205
|
+
})));
|
|
2250
2206
|
disposables.add(actionbar);
|
|
2251
2207
|
actionbar.push(action, { icon: true, label: false });
|
|
2252
2208
|
return Disposable.None;
|
|
@@ -2275,7 +2231,8 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2275
2231
|
this.placeholderTextContainer.style.lineHeight = `${lineHeight}px`;
|
|
2276
2232
|
}
|
|
2277
2233
|
clearValidation() {
|
|
2278
|
-
this.
|
|
2234
|
+
this.validationContextView?.close();
|
|
2235
|
+
this.validationContextView = undefined;
|
|
2279
2236
|
this.validationHasFocus = false;
|
|
2280
2237
|
}
|
|
2281
2238
|
dispose() {
|
|
@@ -2285,18 +2242,18 @@ let SCMInputWidget = class SCMInputWidget {
|
|
|
2285
2242
|
this.disposables.dispose();
|
|
2286
2243
|
}
|
|
2287
2244
|
};
|
|
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));
|
|
2245
|
+
SCMInputWidget = SCMInputWidget_1 = ( (__decorate([
|
|
2246
|
+
( (__param(2, IContextKeyService))),
|
|
2247
|
+
( (__param(3, IModelService))),
|
|
2248
|
+
( (__param(4, ITextModelService))),
|
|
2249
|
+
( (__param(5, IKeybindingService))),
|
|
2250
|
+
( (__param(6, IConfigurationService))),
|
|
2251
|
+
( (__param(7, IInstantiationService))),
|
|
2252
|
+
( (__param(8, ISCMViewService))),
|
|
2253
|
+
( (__param(9, IContextViewService))),
|
|
2254
|
+
( (__param(10, IOpenerService))),
|
|
2255
|
+
( (__param(11, IContextMenuService)))
|
|
2256
|
+
], SCMInputWidget)));
|
|
2300
2257
|
let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
2301
2258
|
get viewMode() { return this._viewMode; }
|
|
2302
2259
|
set viewMode(mode) {
|
|
@@ -2325,8 +2282,8 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2325
2282
|
this.storageService.store(`scm.viewSortKey`, sortKey, 1 , 0 );
|
|
2326
2283
|
}
|
|
2327
2284
|
}
|
|
2328
|
-
constructor(options, commandService, editorService, logService, menuService, scmService, scmViewService, storageService, uriIdentityService, keybindingService, themeService, contextMenuService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, telemetryService) {
|
|
2329
|
-
super({ ...options, titleMenuId: MenuId.SCMTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
2285
|
+
constructor(options, commandService, editorService, logService, menuService, scmService, scmViewService, storageService, uriIdentityService, keybindingService, themeService, contextMenuService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, telemetryService, hoverService) {
|
|
2286
|
+
super({ ...options, titleMenuId: MenuId.SCMTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
2330
2287
|
this.commandService = commandService;
|
|
2331
2288
|
this.editorService = editorService;
|
|
2332
2289
|
this.logService = logService;
|
|
@@ -2335,16 +2292,16 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2335
2292
|
this.scmViewService = scmViewService;
|
|
2336
2293
|
this.storageService = storageService;
|
|
2337
2294
|
this.uriIdentityService = uriIdentityService;
|
|
2338
|
-
this._onDidChangeViewMode = ( new Emitter());
|
|
2295
|
+
this._onDidChangeViewMode = ( (new Emitter()));
|
|
2339
2296
|
this.onDidChangeViewMode = this._onDidChangeViewMode.event;
|
|
2340
|
-
this._onDidChangeViewSortKey = ( new Emitter());
|
|
2297
|
+
this._onDidChangeViewSortKey = ( (new Emitter()));
|
|
2341
2298
|
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());
|
|
2299
|
+
this.items = ( (new DisposableMap()));
|
|
2300
|
+
this.visibilityDisposables = ( (new DisposableStore()));
|
|
2301
|
+
this.treeOperationSequencer = ( (new Sequencer()));
|
|
2302
|
+
this.revealResourceThrottler = ( (new Throttler()));
|
|
2303
|
+
this.updateChildrenThrottler = ( (new Throttler()));
|
|
2304
|
+
this.disposables = ( (new DisposableStore()));
|
|
2348
2305
|
this._viewMode = this.getViewMode();
|
|
2349
2306
|
this._viewSortKey = this.getViewSortKey();
|
|
2350
2307
|
this.viewModeContextKey = ContextKeys.SCMViewMode.bindTo(contextKeyService);
|
|
@@ -2356,7 +2313,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2356
2313
|
this.scmProviderContextKey = ContextKeys.SCMProvider.bindTo(contextKeyService);
|
|
2357
2314
|
this.scmProviderRootUriContextKey = ContextKeys.SCMProviderRootUri.bindTo(contextKeyService);
|
|
2358
2315
|
this.scmProviderHasRootUriContextKey = ContextKeys.SCMProviderHasRootUri.bindTo(contextKeyService);
|
|
2359
|
-
this._onDidLayout = ( new Emitter());
|
|
2316
|
+
this._onDidLayout = ( (new Emitter()));
|
|
2360
2317
|
this.layoutCache = { height: undefined, width: undefined, onDidChange: this._onDidLayout.event };
|
|
2361
2318
|
this.storageService.onDidChangeValue(1 , undefined, this.disposables)(e => {
|
|
2362
2319
|
switch (e.key) {
|
|
@@ -2431,7 +2388,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2431
2388
|
}
|
|
2432
2389
|
else {
|
|
2433
2390
|
this.visibilityDisposables.clear();
|
|
2434
|
-
this.onDidChangeVisibleRepositories({ added: Iterable.empty(), removed: [...( this.items.keys())] });
|
|
2391
|
+
this.onDidChangeVisibleRepositories({ added: Iterable.empty(), removed: [...( (this.items.keys()))] });
|
|
2435
2392
|
this.treeScrollTop = this.tree.scrollTop;
|
|
2436
2393
|
}
|
|
2437
2394
|
this.updateRepositoryCollapseAllContextKeys();
|
|
@@ -2446,18 +2403,18 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2446
2403
|
this.actionButtonRenderer = this.instantiationService.createInstance(ActionButtonRenderer);
|
|
2447
2404
|
this.listLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
|
|
2448
2405
|
this.disposables.add(this.listLabels);
|
|
2449
|
-
const resourceActionRunner = ( new RepositoryPaneActionRunner(() => this.getSelectedResources()));
|
|
2406
|
+
const resourceActionRunner = ( (new RepositoryPaneActionRunner(() => this.getSelectedResources())));
|
|
2450
2407
|
resourceActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
|
|
2451
2408
|
this.disposables.add(resourceActionRunner);
|
|
2452
|
-
const historyItemGroupActionRunner = ( new HistoryItemGroupActionRunner());
|
|
2409
|
+
const historyItemGroupActionRunner = ( (new HistoryItemGroupActionRunner()));
|
|
2453
2410
|
historyItemGroupActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
|
|
2454
2411
|
this.disposables.add(historyItemGroupActionRunner);
|
|
2455
|
-
const historyItemActionRunner = ( new HistoryItemActionRunner());
|
|
2412
|
+
const historyItemActionRunner = ( (new HistoryItemActionRunner()));
|
|
2456
2413
|
historyItemActionRunner.onWillRun(() => this.tree.domFocus(), this, this.disposables);
|
|
2457
2414
|
this.disposables.add(historyItemActionRunner);
|
|
2458
2415
|
const treeDataSource = this.instantiationService.createInstance(SCMTreeDataSource, () => this.viewMode);
|
|
2459
2416
|
this.disposables.add(treeDataSource);
|
|
2460
|
-
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Tree Repo', container, ( new ListDelegate(this.inputRenderer)), ( new SCMTreeCompressionDelegate()), [
|
|
2417
|
+
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'SCM Tree Repo', container, ( (new ListDelegate(this.inputRenderer))), ( (new SCMTreeCompressionDelegate())), [
|
|
2461
2418
|
this.inputRenderer,
|
|
2462
2419
|
this.actionButtonRenderer,
|
|
2463
2420
|
this.instantiationService.createInstance(RepositoryRenderer, MenuId.SCMTitle, getActionViewItemProvider(this.instantiationService)),
|
|
@@ -2471,10 +2428,10 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2471
2428
|
horizontalScrolling: false,
|
|
2472
2429
|
setRowLineHeight: false,
|
|
2473
2430
|
transformOptimization: false,
|
|
2474
|
-
filter: ( new SCMTreeFilter()),
|
|
2475
|
-
dnd: ( new SCMTreeDragAndDrop(this.instantiationService)),
|
|
2476
|
-
identityProvider: ( new SCMResourceIdentityProvider()),
|
|
2477
|
-
sorter: ( new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey)),
|
|
2431
|
+
filter: ( (new SCMTreeFilter())),
|
|
2432
|
+
dnd: ( (new SCMTreeDragAndDrop(this.instantiationService))),
|
|
2433
|
+
identityProvider: ( (new SCMResourceIdentityProvider())),
|
|
2434
|
+
sorter: ( (new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey))),
|
|
2478
2435
|
keyboardNavigationLabelProvider: this.instantiationService.createInstance(SCMTreeKeyboardNavigationLabelProvider, () => this.viewMode),
|
|
2479
2436
|
overrideStyles: {
|
|
2480
2437
|
listBackground: this.viewDescriptorService.getViewLocationById(this.id) === 1 ? PANEL_BACKGROUND : SIDE_BAR_BACKGROUND
|
|
@@ -2533,7 +2490,25 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2533
2490
|
}
|
|
2534
2491
|
else if (isSCMResource(e.element)) {
|
|
2535
2492
|
if (e.element.command?.id === API_OPEN_EDITOR_COMMAND_ID || e.element.command?.id === API_OPEN_DIFF_EDITOR_COMMAND_ID) {
|
|
2536
|
-
|
|
2493
|
+
if (isPointerEvent(e.browserEvent) && e.browserEvent.button === 1) {
|
|
2494
|
+
const resourceGroup = e.element.resourceGroup;
|
|
2495
|
+
const title = `${resourceGroup.provider.label}: ${resourceGroup.label}`;
|
|
2496
|
+
await OpenScmGroupAction.openMultiFileDiffEditor(this.editorService, title, resourceGroup.provider.rootUri, resourceGroup.id, {
|
|
2497
|
+
...e.editorOptions,
|
|
2498
|
+
viewState: {
|
|
2499
|
+
revealData: {
|
|
2500
|
+
resource: {
|
|
2501
|
+
original: e.element.multiDiffEditorOriginalUri,
|
|
2502
|
+
modified: e.element.multiDiffEditorModifiedUri,
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
},
|
|
2506
|
+
preserveFocus: true,
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
else {
|
|
2510
|
+
await this.commandService.executeCommand(e.element.command.id, ...(e.element.command.arguments || []), e);
|
|
2511
|
+
}
|
|
2537
2512
|
}
|
|
2538
2513
|
else {
|
|
2539
2514
|
await e.element.open(!!e.editorOptions.preserveFocus);
|
|
@@ -2584,12 +2559,12 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2584
2559
|
if (!uri) {
|
|
2585
2560
|
return;
|
|
2586
2561
|
}
|
|
2587
|
-
if (( this.tree.getFocus().some(
|
|
2562
|
+
if (( (this.tree.getFocus().some(
|
|
2563
|
+
e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
|
|
2564
|
+
))) &&
|
|
2565
|
+
( (this.tree.getSelection().some(
|
|
2588
2566
|
e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
|
|
2589
|
-
))
|
|
2590
|
-
( this.tree.getSelection().some(
|
|
2591
|
-
e => isSCMResource(e) && this.uriIdentityService.extUri.isEqual(e.sourceUri, uri)
|
|
2592
|
-
))) {
|
|
2567
|
+
)))) {
|
|
2593
2568
|
return;
|
|
2594
2569
|
}
|
|
2595
2570
|
this.revealResourceThrottler.queue(() => this.treeOperationSequencer.queue(async () => {
|
|
@@ -2615,7 +2590,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2615
2590
|
}
|
|
2616
2591
|
onDidChangeVisibleRepositories({ added, removed }) {
|
|
2617
2592
|
for (const repository of added) {
|
|
2618
|
-
const repositoryDisposables = ( new DisposableStore());
|
|
2593
|
+
const repositoryDisposables = ( (new DisposableStore()));
|
|
2619
2594
|
repositoryDisposables.add(repository.provider.onDidChange(() => this.updateChildren(repository)));
|
|
2620
2595
|
repositoryDisposables.add(repository.input.onDidChangeVisibility(() => this.updateChildren(repository)));
|
|
2621
2596
|
repositoryDisposables.add(repository.provider.onDidChangeResourceGroups(() => this.updateChildren(repository)));
|
|
@@ -2630,7 +2605,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2630
2605
|
}));
|
|
2631
2606
|
this.logService.debug('SCMViewPane:onDidChangeVisibleRepositories - onDidChangeCurrentHistoryItemGroup listener added');
|
|
2632
2607
|
}));
|
|
2633
|
-
const resourceGroupDisposables = repositoryDisposables.add(( new DisposableMap()));
|
|
2608
|
+
const resourceGroupDisposables = repositoryDisposables.add(( (new DisposableMap())));
|
|
2634
2609
|
const onDidChangeResourceGroups = () => {
|
|
2635
2610
|
for (const [resourceGroup] of resourceGroupDisposables) {
|
|
2636
2611
|
if (!repository.provider.groups.includes(resourceGroup)) {
|
|
@@ -2638,8 +2613,8 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2638
2613
|
}
|
|
2639
2614
|
}
|
|
2640
2615
|
for (const resourceGroup of repository.provider.groups) {
|
|
2641
|
-
if (!( resourceGroupDisposables.has(resourceGroup))) {
|
|
2642
|
-
const disposableStore = ( new DisposableStore());
|
|
2616
|
+
if (!( (resourceGroupDisposables.has(resourceGroup)))) {
|
|
2617
|
+
const disposableStore = ( (new DisposableStore()));
|
|
2643
2618
|
disposableStore.add(resourceGroup.onDidChange(() => this.updateChildren(repository)));
|
|
2644
2619
|
disposableStore.add(resourceGroup.onDidChangeResources(() => this.updateChildren(repository)));
|
|
2645
2620
|
resourceGroupDisposables.set(resourceGroup, disposableStore);
|
|
@@ -2672,12 +2647,12 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2672
2647
|
const element = e.element;
|
|
2673
2648
|
let context = element;
|
|
2674
2649
|
let actions = [];
|
|
2675
|
-
let actionRunner = ( new RepositoryPaneActionRunner(() => this.getSelectedResources()));
|
|
2650
|
+
let actionRunner = ( (new RepositoryPaneActionRunner(() => this.getSelectedResources())));
|
|
2676
2651
|
if (isSCMRepository(element)) {
|
|
2677
2652
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.provider);
|
|
2678
2653
|
const menu = menus.repositoryContextMenu;
|
|
2679
2654
|
context = element.provider;
|
|
2680
|
-
actionRunner = ( new RepositoryActionRunner(() => this.getSelectedRepositories()));
|
|
2655
|
+
actionRunner = ( (new RepositoryActionRunner(() => this.getSelectedRepositories())));
|
|
2681
2656
|
actions = collectContextMenuActions(menu);
|
|
2682
2657
|
}
|
|
2683
2658
|
else if (isSCMInput(element) || isSCMActionButton(element)) ;
|
|
@@ -2707,7 +2682,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2707
2682
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.repository.provider);
|
|
2708
2683
|
const menu = menus.historyProviderMenu?.getHistoryItemGroupContextMenu(element);
|
|
2709
2684
|
if (menu) {
|
|
2710
|
-
actionRunner = ( new HistoryItemGroupActionRunner());
|
|
2685
|
+
actionRunner = ( (new HistoryItemGroupActionRunner()));
|
|
2711
2686
|
createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, actions);
|
|
2712
2687
|
}
|
|
2713
2688
|
}
|
|
@@ -2715,7 +2690,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2715
2690
|
const menus = this.scmViewService.menus.getRepositoryMenus(element.historyItemGroup.repository.provider);
|
|
2716
2691
|
const menu = menus.historyProviderMenu?.getHistoryItemMenu(element);
|
|
2717
2692
|
if (menu) {
|
|
2718
|
-
actionRunner = ( new HistoryItemActionRunner());
|
|
2693
|
+
actionRunner = ( (new HistoryItemActionRunner()));
|
|
2719
2694
|
actions = collectContextMenuActions(menu);
|
|
2720
2695
|
}
|
|
2721
2696
|
}
|
|
@@ -2730,7 +2705,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2730
2705
|
getSelectedRepositories() {
|
|
2731
2706
|
const focusedRepositories = this.tree.getFocus().filter(r => !!r && isSCMRepository(r));
|
|
2732
2707
|
const selectedRepositories = this.tree.getSelection().filter(r => !!r && isSCMRepository(r));
|
|
2733
|
-
return Array.from(( new Set([...focusedRepositories, ...selectedRepositories])));
|
|
2708
|
+
return Array.from(( (new Set([...focusedRepositories, ...selectedRepositories]))));
|
|
2734
2709
|
}
|
|
2735
2710
|
getSelectedResources() {
|
|
2736
2711
|
return this.tree.getSelection()
|
|
@@ -2810,7 +2785,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2810
2785
|
updateScmProviderContextKeys() {
|
|
2811
2786
|
const alwaysShowRepositories = this.configurationService.getValue('scm.alwaysShowRepositories');
|
|
2812
2787
|
if (!alwaysShowRepositories && this.items.size === 1) {
|
|
2813
|
-
const provider = Iterable.first(( this.items.keys())).provider;
|
|
2788
|
+
const provider = Iterable.first(( (this.items.keys()))).provider;
|
|
2814
2789
|
this.scmProviderContextKey.set(provider.contextValue);
|
|
2815
2790
|
this.scmProviderRootUriContextKey.set(provider.rootUri?.toString());
|
|
2816
2791
|
this.scmProviderHasRootUriContextKey.set(!!provider.rootUri);
|
|
@@ -2827,7 +2802,7 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2827
2802
|
this.areAllRepositoriesCollapsedContextKey.set(false);
|
|
2828
2803
|
return;
|
|
2829
2804
|
}
|
|
2830
|
-
this.isAnyRepositoryCollapsibleContextKey.set(( this.scmViewService.visibleRepositories.some(r => this.tree.hasElement(r) && this.tree.isCollapsible(r))));
|
|
2805
|
+
this.isAnyRepositoryCollapsibleContextKey.set(( (this.scmViewService.visibleRepositories.some(r => this.tree.hasElement(r) && this.tree.isCollapsible(r)))));
|
|
2831
2806
|
this.areAllRepositoriesCollapsedContextKey.set(this.scmViewService.visibleRepositories.every(r => this.tree.hasElement(r) && (!this.tree.isCollapsible(r) || this.tree.isCollapsed(r))));
|
|
2832
2807
|
}
|
|
2833
2808
|
collapseAllRepositories() {
|
|
@@ -2874,25 +2849,26 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
|
|
|
2874
2849
|
super.dispose();
|
|
2875
2850
|
}
|
|
2876
2851
|
};
|
|
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
|
-
|
|
2852
|
+
SCMViewPane = ( (__decorate([
|
|
2853
|
+
( (__param(1, ICommandService))),
|
|
2854
|
+
( (__param(2, IEditorService))),
|
|
2855
|
+
( (__param(3, ILogService))),
|
|
2856
|
+
( (__param(4, IMenuService))),
|
|
2857
|
+
( (__param(5, ISCMService))),
|
|
2858
|
+
( (__param(6, ISCMViewService))),
|
|
2859
|
+
( (__param(7, IStorageService))),
|
|
2860
|
+
( (__param(8, IUriIdentityService))),
|
|
2861
|
+
( (__param(9, IKeybindingService))),
|
|
2862
|
+
( (__param(10, IThemeService))),
|
|
2863
|
+
( (__param(11, IContextMenuService))),
|
|
2864
|
+
( (__param(12, IInstantiationService))),
|
|
2865
|
+
( (__param(13, IViewDescriptorService))),
|
|
2866
|
+
( (__param(14, IConfigurationService))),
|
|
2867
|
+
( (__param(15, IContextKeyService))),
|
|
2868
|
+
( (__param(16, IOpenerService))),
|
|
2869
|
+
( (__param(17, ITelemetryService))),
|
|
2870
|
+
( (__param(18, IHoverService)))
|
|
2871
|
+
], SCMViewPane)));
|
|
2896
2872
|
let SCMTreeDataSource = class SCMTreeDataSource {
|
|
2897
2873
|
constructor(viewMode, configurationService, logService, scmViewService, uriIdentityService) {
|
|
2898
2874
|
this.viewMode = viewMode;
|
|
@@ -2900,9 +2876,9 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
2900
2876
|
this.logService = logService;
|
|
2901
2877
|
this.scmViewService = scmViewService;
|
|
2902
2878
|
this.uriIdentityService = uriIdentityService;
|
|
2903
|
-
this.historyProviderCache = ( new Map());
|
|
2904
|
-
this.repositoryDisposables = ( new DisposableMap());
|
|
2905
|
-
this.disposables = ( new DisposableStore());
|
|
2879
|
+
this.historyProviderCache = ( (new Map()));
|
|
2880
|
+
this.repositoryDisposables = ( (new DisposableMap()));
|
|
2881
|
+
this.disposables = ( (new DisposableStore()));
|
|
2906
2882
|
const onDidChangeConfiguration = Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.showChangesSummary'), this.disposables);
|
|
2907
2883
|
this.disposables.add(onDidChangeConfiguration(() => this.historyProviderCache.clear()));
|
|
2908
2884
|
this.scmViewService.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories, this, this.disposables);
|
|
@@ -2943,7 +2919,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
2943
2919
|
return false;
|
|
2944
2920
|
}
|
|
2945
2921
|
else {
|
|
2946
|
-
throw new Error('hasChildren not implemented.');
|
|
2922
|
+
throw ( (new Error('hasChildren not implemented.')));
|
|
2947
2923
|
}
|
|
2948
2924
|
}
|
|
2949
2925
|
async getChildren(inputOrElement) {
|
|
@@ -2967,47 +2943,23 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
2967
2943
|
button: actionButton
|
|
2968
2944
|
});
|
|
2969
2945
|
}
|
|
2970
|
-
const hasSomeChanges = ( resourceGroups.some(group => group.resources.length > 0));
|
|
2946
|
+
const hasSomeChanges = ( (resourceGroups.some(group => group.resources.length > 0)));
|
|
2971
2947
|
if (hasSomeChanges || (repositoryCount === 1 && (!showActionButton || !actionButton))) {
|
|
2972
2948
|
children.push(...resourceGroups);
|
|
2973
2949
|
}
|
|
2974
2950
|
const historyItemGroups = await this.getHistoryItemGroups(inputOrElement);
|
|
2975
2951
|
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
|
-
));
|
|
2952
|
+
let label = ( localizeWithPath(_moduleId, 34, "Incoming/Outgoing"));
|
|
2953
|
+
let ariaLabel = ( localizeWithPath(_moduleId, 35, "Incoming and outgoing changes"));
|
|
2986
2954
|
const incomingHistoryItems = historyItemGroups.find(g => g.direction === 'incoming');
|
|
2987
2955
|
const outgoingHistoryItems = historyItemGroups.find(g => g.direction === 'outgoing');
|
|
2988
2956
|
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
|
-
));
|
|
2957
|
+
label = ( localizeWithPath(_moduleId, 36, "Incoming"));
|
|
2958
|
+
ariaLabel = ( localizeWithPath(_moduleId, 37, "Incoming changes"));
|
|
2999
2959
|
}
|
|
3000
2960
|
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
|
-
));
|
|
2961
|
+
label = ( localizeWithPath(_moduleId, 38, "Outgoing"));
|
|
2962
|
+
ariaLabel = ( localizeWithPath(_moduleId, 39, "Outgoing changes"));
|
|
3011
2963
|
}
|
|
3012
2964
|
children.push({ label, ariaLabel, repository: inputOrElement, type: 'separator' });
|
|
3013
2965
|
}
|
|
@@ -3060,12 +3012,12 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3060
3012
|
}
|
|
3061
3013
|
incomingHistoryItemGroup = currentHistoryItemGroup.base ? {
|
|
3062
3014
|
id: currentHistoryItemGroup.base.id,
|
|
3063
|
-
label: currentHistoryItemGroup.base.
|
|
3015
|
+
label: currentHistoryItemGroup.base.name,
|
|
3064
3016
|
ariaLabel: ( localizeWithPath(
|
|
3065
|
-
|
|
3066
|
-
|
|
3017
|
+
_moduleId,
|
|
3018
|
+
40,
|
|
3067
3019
|
"Incoming changes from {0}",
|
|
3068
|
-
currentHistoryItemGroup.base.
|
|
3020
|
+
currentHistoryItemGroup.base.name
|
|
3069
3021
|
)),
|
|
3070
3022
|
icon: Codicon.arrowCircleDown,
|
|
3071
3023
|
direction: 'incoming',
|
|
@@ -3076,13 +3028,8 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3076
3028
|
} : undefined;
|
|
3077
3029
|
outgoingHistoryItemGroup = {
|
|
3078
3030
|
id: currentHistoryItemGroup.id,
|
|
3079
|
-
label: currentHistoryItemGroup.
|
|
3080
|
-
ariaLabel: ( localizeWithPath(
|
|
3081
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
3082
|
-
'outgoingChangesAriaLabel',
|
|
3083
|
-
"Outgoing changes to {0}",
|
|
3084
|
-
currentHistoryItemGroup.label
|
|
3085
|
-
)),
|
|
3031
|
+
label: currentHistoryItemGroup.name,
|
|
3032
|
+
ariaLabel: ( localizeWithPath(_moduleId, 41, "Outgoing changes to {0}", currentHistoryItemGroup.name)),
|
|
3086
3033
|
icon: Codicon.arrowCircleUp,
|
|
3087
3034
|
direction: 'outgoing',
|
|
3088
3035
|
ancestor: ancestor.id,
|
|
@@ -3133,21 +3080,17 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3133
3080
|
children.push({
|
|
3134
3081
|
...historyItemsElement[0],
|
|
3135
3082
|
icon: historyItemsElement[0].icon ?? Codicon.files,
|
|
3136
|
-
|
|
3137
|
-
'vs/workbench/contrib/scm/browser/scmViewPane',
|
|
3138
|
-
'allChanges',
|
|
3139
|
-
"All Changes"
|
|
3140
|
-
)),
|
|
3083
|
+
message: ( localizeWithPath(_moduleId, 42, "All Changes")),
|
|
3141
3084
|
historyItemGroup: element,
|
|
3142
3085
|
type: 'allChanges'
|
|
3143
3086
|
});
|
|
3144
3087
|
}
|
|
3145
|
-
children.push(...( historyItemsElement[1]
|
|
3088
|
+
children.push(...( (historyItemsElement[1]
|
|
3146
3089
|
.map(historyItem => ({
|
|
3147
3090
|
...historyItem,
|
|
3148
3091
|
historyItemGroup: element,
|
|
3149
3092
|
type: 'historyItem'
|
|
3150
|
-
}))));
|
|
3093
|
+
})))));
|
|
3151
3094
|
return children;
|
|
3152
3095
|
}
|
|
3153
3096
|
async getHistoryItemChanges(element) {
|
|
@@ -3169,17 +3112,19 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3169
3112
|
});
|
|
3170
3113
|
}
|
|
3171
3114
|
if (this.viewMode() === "list" ) {
|
|
3172
|
-
return (
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3115
|
+
return (
|
|
3116
|
+
(historyItemChanges.map(change => ({
|
|
3117
|
+
...change,
|
|
3118
|
+
historyItem: element,
|
|
3119
|
+
type: 'historyItemChange'
|
|
3120
|
+
})))
|
|
3121
|
+
);
|
|
3122
|
+
}
|
|
3123
|
+
const tree = ( (new ResourceTree(
|
|
3179
3124
|
element,
|
|
3180
3125
|
repository.provider.rootUri ?? URI.file('/'),
|
|
3181
3126
|
this.uriIdentityService.extUri
|
|
3182
|
-
));
|
|
3127
|
+
)));
|
|
3183
3128
|
for (const change of historyItemChanges) {
|
|
3184
3129
|
tree.add(change.uri, {
|
|
3185
3130
|
...change,
|
|
@@ -3202,7 +3147,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3202
3147
|
return element.parent;
|
|
3203
3148
|
}
|
|
3204
3149
|
else {
|
|
3205
|
-
throw new Error('Invalid element passed to getParent');
|
|
3150
|
+
throw ( (new Error('Invalid element passed to getParent')));
|
|
3206
3151
|
}
|
|
3207
3152
|
}
|
|
3208
3153
|
else if (isSCMResource(element)) {
|
|
@@ -3212,7 +3157,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3212
3157
|
const node = element.resourceGroup.resourceTree.getNode(element.sourceUri);
|
|
3213
3158
|
const result = node?.parent;
|
|
3214
3159
|
if (!result) {
|
|
3215
|
-
throw new Error('Invalid element passed to getParent');
|
|
3160
|
+
throw ( (new Error('Invalid element passed to getParent')));
|
|
3216
3161
|
}
|
|
3217
3162
|
if (result === element.resourceGroup.resourceTree.root) {
|
|
3218
3163
|
return element.resourceGroup;
|
|
@@ -3220,7 +3165,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3220
3165
|
return result;
|
|
3221
3166
|
}
|
|
3222
3167
|
else {
|
|
3223
|
-
throw new Error('Unexpected call to getParent');
|
|
3168
|
+
throw ( (new Error('Unexpected call to getParent')));
|
|
3224
3169
|
}
|
|
3225
3170
|
}
|
|
3226
3171
|
getConfiguration() {
|
|
@@ -3234,7 +3179,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3234
3179
|
}
|
|
3235
3180
|
onDidChangeVisibleRepositories({ added, removed }) {
|
|
3236
3181
|
for (const repository of added) {
|
|
3237
|
-
const repositoryDisposables = ( new DisposableStore());
|
|
3182
|
+
const repositoryDisposables = ( (new DisposableStore()));
|
|
3238
3183
|
repositoryDisposables.add(Event.runAndSubscribe(repository.provider.onDidChangeHistoryProvider, () => {
|
|
3239
3184
|
if (!repository.provider.historyProvider) {
|
|
3240
3185
|
this.logService.debug('SCMTreeDataSource:onDidChangeVisibleRepositories - no history provider present');
|
|
@@ -3257,8 +3202,8 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3257
3202
|
return this.historyProviderCache.get(repository) ?? {
|
|
3258
3203
|
incomingHistoryItemGroup: undefined,
|
|
3259
3204
|
outgoingHistoryItemGroup: undefined,
|
|
3260
|
-
historyItems: ( new Map()),
|
|
3261
|
-
historyItemChanges: ( new Map())
|
|
3205
|
+
historyItems: ( (new Map())),
|
|
3206
|
+
historyItemChanges: ( (new Map()))
|
|
3262
3207
|
};
|
|
3263
3208
|
}
|
|
3264
3209
|
dispose() {
|
|
@@ -3266,19 +3211,19 @@ let SCMTreeDataSource = class SCMTreeDataSource {
|
|
|
3266
3211
|
this.disposables.dispose();
|
|
3267
3212
|
}
|
|
3268
3213
|
};
|
|
3269
|
-
SCMTreeDataSource = ( __decorate([
|
|
3270
|
-
( __param(1, IConfigurationService)),
|
|
3271
|
-
( __param(2, ILogService)),
|
|
3272
|
-
( __param(3, ISCMViewService)),
|
|
3273
|
-
( __param(4, IUriIdentityService))
|
|
3274
|
-
], SCMTreeDataSource));
|
|
3214
|
+
SCMTreeDataSource = ( (__decorate([
|
|
3215
|
+
( (__param(1, IConfigurationService))),
|
|
3216
|
+
( (__param(2, ILogService))),
|
|
3217
|
+
( (__param(3, ISCMViewService))),
|
|
3218
|
+
( (__param(4, IUriIdentityService)))
|
|
3219
|
+
], SCMTreeDataSource)));
|
|
3275
3220
|
class SCMActionButton {
|
|
3276
3221
|
constructor(container, contextMenuService, commandService, notificationService) {
|
|
3277
3222
|
this.container = container;
|
|
3278
3223
|
this.contextMenuService = contextMenuService;
|
|
3279
3224
|
this.commandService = commandService;
|
|
3280
3225
|
this.notificationService = notificationService;
|
|
3281
|
-
this.disposables = ( new MutableDisposable());
|
|
3226
|
+
this.disposables = ( (new MutableDisposable()));
|
|
3282
3227
|
}
|
|
3283
3228
|
dispose() {
|
|
3284
3229
|
this.disposables?.dispose();
|
|
@@ -3293,33 +3238,33 @@ class SCMActionButton {
|
|
|
3293
3238
|
for (let index = 0; index < button.secondaryCommands.length; index++) {
|
|
3294
3239
|
const commands = button.secondaryCommands[index];
|
|
3295
3240
|
for (const command of commands) {
|
|
3296
|
-
actions.push(( new Action(
|
|
3241
|
+
actions.push(( (new Action(
|
|
3297
3242
|
command.id,
|
|
3298
3243
|
command.title,
|
|
3299
3244
|
undefined,
|
|
3300
3245
|
true,
|
|
3301
3246
|
async () => await this.executeCommand(command.id, ...(command.arguments || []))
|
|
3302
|
-
)));
|
|
3247
|
+
))));
|
|
3303
3248
|
}
|
|
3304
3249
|
if (commands.length) {
|
|
3305
|
-
actions.push(( new Separator()));
|
|
3250
|
+
actions.push(( (new Separator())));
|
|
3306
3251
|
}
|
|
3307
3252
|
}
|
|
3308
3253
|
actions.pop();
|
|
3309
|
-
this.button = ( new ButtonWithDropdown(this.container, {
|
|
3254
|
+
this.button = ( (new ButtonWithDropdown(this.container, {
|
|
3310
3255
|
actions: actions,
|
|
3311
3256
|
addPrimaryActionToDropdown: false,
|
|
3312
3257
|
contextMenuProvider: this.contextMenuService,
|
|
3313
3258
|
title: button.command.tooltip,
|
|
3314
3259
|
supportIcons: true,
|
|
3315
3260
|
...defaultButtonStyles
|
|
3316
|
-
}));
|
|
3261
|
+
})));
|
|
3317
3262
|
}
|
|
3318
3263
|
else {
|
|
3319
|
-
this.button = ( new Button(
|
|
3264
|
+
this.button = ( (new Button(
|
|
3320
3265
|
this.container,
|
|
3321
3266
|
{ supportIcons: true, supportShortLabel: !!button.description, title: button.command.tooltip, ...defaultButtonStyles }
|
|
3322
|
-
));
|
|
3267
|
+
)));
|
|
3323
3268
|
}
|
|
3324
3269
|
this.button.enabled = button.enabled;
|
|
3325
3270
|
this.button.label = button.command.title;
|
|
@@ -3333,7 +3278,7 @@ class SCMActionButton {
|
|
|
3333
3278
|
this.button?.focus();
|
|
3334
3279
|
}
|
|
3335
3280
|
clear() {
|
|
3336
|
-
this.disposables.value = ( new DisposableStore());
|
|
3281
|
+
this.disposables.value = ( (new DisposableStore()));
|
|
3337
3282
|
this.button = undefined;
|
|
3338
3283
|
clearNode(this.container);
|
|
3339
3284
|
}
|
|
@@ -3361,10 +3306,10 @@ let ScmInputContentProvider = class ScmInputContentProvider extends Disposable {
|
|
|
3361
3306
|
return this._modelService.createModel('', this._languageService.createById('scminput'), resource);
|
|
3362
3307
|
}
|
|
3363
3308
|
};
|
|
3364
|
-
ScmInputContentProvider = ( __decorate([
|
|
3365
|
-
( __param(0, ITextModelService)),
|
|
3366
|
-
( __param(1, IModelService)),
|
|
3367
|
-
( __param(2, ILanguageService))
|
|
3368
|
-
], ScmInputContentProvider));
|
|
3309
|
+
ScmInputContentProvider = ( (__decorate([
|
|
3310
|
+
( (__param(0, ITextModelService))),
|
|
3311
|
+
( (__param(1, IModelService))),
|
|
3312
|
+
( (__param(2, ILanguageService)))
|
|
3313
|
+
], ScmInputContentProvider)));
|
|
3369
3314
|
|
|
3370
3315
|
export { ActionButtonRenderer, SCMAccessibilityProvider, SCMActionButton, SCMTreeKeyboardNavigationLabelProvider, SCMTreeSorter, SCMViewPane };
|