@codingame/monaco-vscode-bulk-edit-service-override 19.1.4 → 20.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 +6 -6
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +16 -21
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/conflicts.js +1 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.js +6 -6
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.js +1 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.js +16 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-bulk-edit-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - bulk-edit service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "20.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common": "20.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "20.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-api": "20.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common": "20.0.0"
|
|
23
23
|
},
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"module": "index.js",
|
|
@@ -17,7 +17,7 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
17
17
|
import { Progress } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
18
18
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
19
19
|
import { UndoRedoGroup } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo';
|
|
20
|
-
import { ResourceNotebookCellEdit, BulkCellEdits } from '@codingame/monaco-vscode-
|
|
20
|
+
import { ResourceNotebookCellEdit, BulkCellEdits } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
21
21
|
import { BulkFileEdits } from './bulkFileEdits.js';
|
|
22
22
|
import { BulkTextEdits } from './bulkTextEdits.js';
|
|
23
23
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -25,6 +25,7 @@ import { ShutdownReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
25
25
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
26
26
|
import { IWorkingCopyService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
|
|
27
27
|
import { ResourceAttachmentEdit, OpaqueEdits } from './opaqueEdits.js';
|
|
28
|
+
import { isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
28
29
|
|
|
29
30
|
function liftEdits(edits) {
|
|
30
31
|
return ( edits.map(edit => {
|
|
@@ -71,24 +72,24 @@ let BulkEdit = class BulkEdit {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
if (this._edits.length === 0) {
|
|
74
|
-
return localize(
|
|
75
|
+
return localize(4383, "Made no edits");
|
|
75
76
|
}
|
|
76
77
|
else if (otherResources.size === 0) {
|
|
77
78
|
if (textEditCount > 1 && textEditResources.size > 1) {
|
|
78
79
|
return localize(
|
|
79
|
-
|
|
80
|
+
4384,
|
|
80
81
|
"Made {0} text edits in {1} files",
|
|
81
82
|
textEditCount,
|
|
82
83
|
textEditResources.size
|
|
83
84
|
);
|
|
84
85
|
}
|
|
85
86
|
else {
|
|
86
|
-
return localize(
|
|
87
|
+
return localize(4385, "Made {0} text edits in one file", textEditCount);
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
else {
|
|
90
91
|
return localize(
|
|
91
|
-
|
|
92
|
+
4386,
|
|
92
93
|
"Made {0} text edits in {1} files, also created or deleted {2} files",
|
|
93
94
|
textEditCount,
|
|
94
95
|
textEditResources.size,
|
|
@@ -140,12 +141,12 @@ let BulkEdit = class BulkEdit {
|
|
|
140
141
|
}
|
|
141
142
|
async _performFileEdits(edits, undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress) {
|
|
142
143
|
this._logService.debug('_performFileEdits', JSON.stringify(edits));
|
|
143
|
-
const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(
|
|
144
|
+
const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(4387, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
|
|
144
145
|
return await model.apply();
|
|
145
146
|
}
|
|
146
147
|
async _performTextEdits(edits, undoRedoGroup, undoRedoSource, progress, reason) {
|
|
147
148
|
this._logService.debug('_performTextEdits', JSON.stringify(edits));
|
|
148
|
-
const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(
|
|
149
|
+
const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(4387, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
|
|
149
150
|
return await model.apply(reason);
|
|
150
151
|
}
|
|
151
152
|
async _performCellEdits(edits, undoRedoGroup, undoRedoSource, progress) {
|
|
@@ -188,7 +189,7 @@ let BulkEditService = class BulkEditService {
|
|
|
188
189
|
async apply(editsIn, options) {
|
|
189
190
|
let edits = liftEdits(Array.isArray(editsIn) ? editsIn : editsIn.edits);
|
|
190
191
|
if (edits.length === 0) {
|
|
191
|
-
return { ariaSummary: ( localize(
|
|
192
|
+
return { ariaSummary: ( localize(4388, "Made no edits")), isApplied: false };
|
|
192
193
|
}
|
|
193
194
|
if (this._previewHandler && (options?.showPreview || ( edits.some(value => value.metadata?.needsConfirmation)))) {
|
|
194
195
|
edits = await this._previewHandler(edits, options);
|
|
@@ -256,33 +257,27 @@ let BulkEditService = class BulkEditService {
|
|
|
256
257
|
}
|
|
257
258
|
async _shouldVeto(label, reason) {
|
|
258
259
|
let message;
|
|
259
|
-
let primaryButton;
|
|
260
260
|
switch (reason) {
|
|
261
261
|
case ShutdownReason.CLOSE:
|
|
262
|
-
message = ( localize(
|
|
263
|
-
primaryButton = ( localize(4349, "&&Close Window"));
|
|
262
|
+
message = ( localize(4389, "Are you sure you want to close the window?"));
|
|
264
263
|
break;
|
|
265
264
|
case ShutdownReason.LOAD:
|
|
266
|
-
message = ( localize(
|
|
267
|
-
primaryButton = ( localize(4351, "Change &&Workspace"));
|
|
265
|
+
message = ( localize(4390, "Are you sure you want to change the workspace?"));
|
|
268
266
|
break;
|
|
269
267
|
case ShutdownReason.RELOAD:
|
|
270
|
-
message = ( localize(
|
|
271
|
-
primaryButton = ( localize(4353, "&&Reload Window"));
|
|
268
|
+
message = ( localize(4391, "Are you sure you want to reload the window?"));
|
|
272
269
|
break;
|
|
273
270
|
default:
|
|
274
|
-
message = ( localize(
|
|
275
|
-
primaryButton = ( localize(4355, "&&Quit"));
|
|
271
|
+
message = isMacintosh ? ( localize(4392, "Are you sure you want to quit?")) : ( localize(4393, "Are you sure you want to exit?"));
|
|
276
272
|
break;
|
|
277
273
|
}
|
|
278
274
|
const result = await this._dialogService.confirm({
|
|
279
275
|
message,
|
|
280
276
|
detail: ( localize(
|
|
281
|
-
|
|
277
|
+
4394,
|
|
282
278
|
"'{0}' is in progress.",
|
|
283
|
-
label || ( localize(
|
|
279
|
+
label || ( localize(4395, "File operation"))
|
|
284
280
|
)),
|
|
285
|
-
primaryButton
|
|
286
281
|
});
|
|
287
282
|
return !result.confirmed;
|
|
288
283
|
}
|
|
@@ -302,7 +297,7 @@ const autoSaveSetting = 'files.refactoring.autoSave';
|
|
|
302
297
|
properties: {
|
|
303
298
|
[autoSaveSetting]: {
|
|
304
299
|
description: ( localize(
|
|
305
|
-
|
|
300
|
+
4396,
|
|
306
301
|
"Controls if files that were part of a refactoring are saved automatically"
|
|
307
302
|
)),
|
|
308
303
|
default: true,
|
|
@@ -8,7 +8,7 @@ import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
8
8
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
9
9
|
import { ResourceTextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService";
|
|
10
10
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
11
|
-
import {
|
|
11
|
+
import { TextModelEditSource } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource";
|
|
12
12
|
export declare class BulkTextEdits {
|
|
13
13
|
private readonly _label;
|
|
14
14
|
private readonly _code;
|
|
@@ -26,5 +26,5 @@ export declare class BulkTextEdits {
|
|
|
26
26
|
private _validateBeforePrepare;
|
|
27
27
|
private _createEditsTasks;
|
|
28
28
|
private _validateTasks;
|
|
29
|
-
apply(reason?:
|
|
29
|
+
apply(reason?: TextModelEditSource): Promise<readonly URI[]>;
|
|
30
30
|
}
|
|
@@ -6,7 +6,7 @@ import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
6
6
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
8
|
import { ResourceTextEdit, ResourceFileEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
|
|
9
|
-
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-
|
|
9
|
+
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
10
10
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
11
|
|
|
12
12
|
let ConflictDetector = class ConflictDetector {
|
|
@@ -97,12 +97,12 @@ let BulkEditPreviewContribution = class BulkEditPreviewContribution {
|
|
|
97
97
|
if (view.hasInput()) {
|
|
98
98
|
const { confirmed } = await this._dialogService.confirm({
|
|
99
99
|
type: Severity.Info,
|
|
100
|
-
message: ( localize(
|
|
100
|
+
message: ( localize(4397, "Another refactoring is being previewed.")),
|
|
101
101
|
detail: ( localize(
|
|
102
|
-
|
|
102
|
+
4398,
|
|
103
103
|
"Press 'Continue' to discard the previous refactoring and continue with the current refactoring."
|
|
104
104
|
)),
|
|
105
|
-
primaryButton: ( localize(
|
|
105
|
+
primaryButton: ( localize(4399, "&&Continue"))
|
|
106
106
|
});
|
|
107
107
|
if (!confirmed) {
|
|
108
108
|
return [];
|
|
@@ -143,8 +143,8 @@ registerAction2(class ApplyAction extends Action2 {
|
|
|
143
143
|
constructor() {
|
|
144
144
|
super({
|
|
145
145
|
id: 'refactorPreview.apply',
|
|
146
|
-
title: ( localize2(
|
|
147
|
-
category: ( localize2(
|
|
146
|
+
title: ( localize2(4400, "Apply Refactoring")),
|
|
147
|
+
category: ( localize2(4401, "Refactor Preview")),
|
|
148
148
|
icon: Codicon.check,
|
|
149
149
|
precondition: ( ContextKeyExpr.and(BulkEditPreviewContribution.ctxEnabled, BulkEditPane.ctxHasCheckedChanges)),
|
|
150
150
|
menu: [{
|
|
@@ -168,8 +168,8 @@ registerAction2(class DiscardAction extends Action2 {
|
|
|
168
168
|
constructor() {
|
|
169
169
|
super({
|
|
170
170
|
id: 'refactorPreview.discard',
|
|
171
|
-
title: ( localize2(
|
|
172
|
-
category: ( localize2(
|
|
171
|
+
title: ( localize2(4402, "Discard Refactoring")),
|
|
172
|
+
category: ( localize2(4401, "Refactor Preview")),
|
|
173
173
|
icon: Codicon.clearAll,
|
|
174
174
|
precondition: BulkEditPreviewContribution.ctxEnabled,
|
|
175
175
|
menu: [{
|
|
@@ -188,8 +188,8 @@ registerAction2(class ToggleAction extends Action2 {
|
|
|
188
188
|
constructor() {
|
|
189
189
|
super({
|
|
190
190
|
id: 'refactorPreview.toggleCheckedState',
|
|
191
|
-
title: ( localize2(
|
|
192
|
-
category: ( localize2(
|
|
191
|
+
title: ( localize2(4403, "Toggle Change")),
|
|
192
|
+
category: ( localize2(4401, "Refactor Preview")),
|
|
193
193
|
precondition: BulkEditPreviewContribution.ctxEnabled,
|
|
194
194
|
keybinding: {
|
|
195
195
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -212,8 +212,8 @@ registerAction2(class GroupByFile extends Action2 {
|
|
|
212
212
|
constructor() {
|
|
213
213
|
super({
|
|
214
214
|
id: 'refactorPreview.groupByFile',
|
|
215
|
-
title: ( localize2(
|
|
216
|
-
category: ( localize2(
|
|
215
|
+
title: ( localize2(4404, "Group Changes By File")),
|
|
216
|
+
category: ( localize2(4401, "Refactor Preview")),
|
|
217
217
|
icon: Codicon.ungroupByRefType,
|
|
218
218
|
precondition: ( ContextKeyExpr.and(BulkEditPane.ctxHasCategories, ( BulkEditPane.ctxGroupByFile.negate()), BulkEditPreviewContribution.ctxEnabled)),
|
|
219
219
|
menu: [{
|
|
@@ -234,8 +234,8 @@ registerAction2(class GroupByType extends Action2 {
|
|
|
234
234
|
constructor() {
|
|
235
235
|
super({
|
|
236
236
|
id: 'refactorPreview.groupByType',
|
|
237
|
-
title: ( localize2(
|
|
238
|
-
category: ( localize2(
|
|
237
|
+
title: ( localize2(4405, "Group Changes By Type")),
|
|
238
|
+
category: ( localize2(4401, "Refactor Preview")),
|
|
239
239
|
icon: Codicon.groupByRefType,
|
|
240
240
|
precondition: ( ContextKeyExpr.and(
|
|
241
241
|
BulkEditPane.ctxHasCategories,
|
|
@@ -260,8 +260,8 @@ registerAction2(class ToggleGrouping extends Action2 {
|
|
|
260
260
|
constructor() {
|
|
261
261
|
super({
|
|
262
262
|
id: 'refactorPreview.toggleGrouping',
|
|
263
|
-
title: ( localize2(
|
|
264
|
-
category: ( localize2(
|
|
263
|
+
title: ( localize2(4405, "Group Changes By Type")),
|
|
264
|
+
category: ( localize2(4401, "Refactor Preview")),
|
|
265
265
|
icon: Codicon.listTree,
|
|
266
266
|
toggled: ( BulkEditPane.ctxGroupByFile.negate()),
|
|
267
267
|
precondition: ( ContextKeyExpr.and(BulkEditPane.ctxHasCategories, BulkEditPreviewContribution.ctxEnabled)),
|
|
@@ -278,10 +278,10 @@ registerAction2(class ToggleGrouping extends Action2 {
|
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
registerWorkbenchContribution2(BulkEditPreviewContribution.ID, BulkEditPreviewContribution, WorkbenchPhase.BlockRestore);
|
|
281
|
-
const refactorPreviewViewIcon = registerIcon('refactor-preview-view-icon', Codicon.lightbulb, ( localize(
|
|
281
|
+
const refactorPreviewViewIcon = registerIcon('refactor-preview-view-icon', Codicon.lightbulb, ( localize(4406, 'View icon of the refactor preview view.')));
|
|
282
282
|
const container = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
283
283
|
id: BulkEditPane.ID,
|
|
284
|
-
title: ( localize2(
|
|
284
|
+
title: ( localize2(4407, "Refactor Preview")),
|
|
285
285
|
hideIfEmpty: true,
|
|
286
286
|
ctorDescriptor: ( new SyncDescriptor(
|
|
287
287
|
ViewPaneContainer,
|
|
@@ -292,7 +292,7 @@ const container = ( Registry.as(Extensions.ViewContainersRegistry)).registerView
|
|
|
292
292
|
}, ViewContainerLocation.Panel);
|
|
293
293
|
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
294
294
|
id: BulkEditPane.ID,
|
|
295
|
-
name: ( localize2(
|
|
295
|
+
name: ( localize2(4407, "Refactor Preview")),
|
|
296
296
|
when: BulkEditPreviewContribution.ctxEnabled,
|
|
297
297
|
ctorDescriptor: ( new SyncDescriptor(BulkEditPane)),
|
|
298
298
|
containerIcon: refactorPreviewViewIcon,
|
|
@@ -24,7 +24,7 @@ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode
|
|
|
24
24
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
25
25
|
import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
26
26
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
27
|
-
import { ResourceLabels } from '@codingame/monaco-vscode-
|
|
27
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/workbench/browser/labels';
|
|
28
28
|
import { ViewPane } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
29
29
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
30
30
|
import { BulkFileOperationType, BulkEditPreviewProvider, BulkFileOperations } from './bulkEditPreview.js';
|
|
@@ -140,15 +140,15 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
|
|
|
140
140
|
const buttonBar = ( new ButtonBar(buttonsContainer));
|
|
141
141
|
this._disposables.add(buttonBar);
|
|
142
142
|
const btnConfirm = buttonBar.addButton({ supportIcons: true, ...defaultButtonStyles });
|
|
143
|
-
btnConfirm.label = ( localize(
|
|
143
|
+
btnConfirm.label = ( localize(4408, 'Apply'));
|
|
144
144
|
btnConfirm.onDidClick(() => this.accept(), this, this._disposables);
|
|
145
145
|
const btnCancel = buttonBar.addButton({ ...defaultButtonStyles, secondary: true });
|
|
146
|
-
btnCancel.label = ( localize(
|
|
146
|
+
btnCancel.label = ( localize(4409, 'Discard'));
|
|
147
147
|
btnCancel.onDidClick(() => this.discard(), this, this._disposables);
|
|
148
148
|
this._message = createElement('span');
|
|
149
149
|
this._message.className = 'message';
|
|
150
150
|
this._message.innerText = ( localize(
|
|
151
|
-
|
|
151
|
+
4410,
|
|
152
152
|
"Invoke a code action, like rename, to see a preview of its changes here."
|
|
153
153
|
));
|
|
154
154
|
parent.appendChild(this._message);
|
|
@@ -221,14 +221,14 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
|
|
|
221
221
|
let message;
|
|
222
222
|
if (conflicts.length === 1) {
|
|
223
223
|
message = ( localize(
|
|
224
|
-
|
|
224
|
+
4411,
|
|
225
225
|
"Cannot apply refactoring because '{0}' has changed in the meantime.",
|
|
226
226
|
this._labelService.getUriLabel(conflicts[0], { relative: true })
|
|
227
227
|
));
|
|
228
228
|
}
|
|
229
229
|
else {
|
|
230
230
|
message = ( localize(
|
|
231
|
-
|
|
231
|
+
4412,
|
|
232
232
|
"Cannot apply refactoring because {0} other files have changed in the meantime.",
|
|
233
233
|
conflicts.length
|
|
234
234
|
));
|
|
@@ -104,7 +104,7 @@ class BulkFileOperation {
|
|
|
104
104
|
}
|
|
105
105
|
class BulkCategory {
|
|
106
106
|
static { this._defaultMetadata = ( Object.freeze({
|
|
107
|
-
label: ( localize(
|
|
107
|
+
label: ( localize(4413, "Other")),
|
|
108
108
|
icon: Codicon.symbolFile,
|
|
109
109
|
needsConfirmation: false
|
|
110
110
|
})); }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAsyncDataSource, ITreeRenderer, ITreeNode, ITreeSorter } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree";
|
|
2
2
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
3
3
|
import { FuzzyScore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
|
|
4
|
-
import { ResourceLabels } from "@codingame/monaco-vscode-
|
|
4
|
+
import { ResourceLabels } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/workbench/browser/labels";
|
|
5
5
|
import { IIdentityProvider, IListVirtualDelegate, IKeyboardNavigationLabelProvider } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/list";
|
|
6
6
|
import { BulkFileOperations, BulkFileOperation, BulkTextEdit, BulkCategory } from "./bulkEditPreview.js";
|
|
7
7
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
@@ -240,7 +240,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
240
240
|
this._labelService = _labelService;
|
|
241
241
|
}
|
|
242
242
|
getWidgetAriaLabel() {
|
|
243
|
-
return localize(
|
|
243
|
+
return localize(4414, "Bulk Edit");
|
|
244
244
|
}
|
|
245
245
|
getRole(_element) {
|
|
246
246
|
return 'checkbox';
|
|
@@ -250,7 +250,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
250
250
|
if (element.edit.textEdits.length > 0) {
|
|
251
251
|
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
|
252
252
|
return localize(
|
|
253
|
-
|
|
253
|
+
4415,
|
|
254
254
|
"Renaming {0} to {1}, also making text edits",
|
|
255
255
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
256
256
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -258,21 +258,21 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
258
258
|
}
|
|
259
259
|
else if (element.edit.type & BulkFileOperationType.Create) {
|
|
260
260
|
return localize(
|
|
261
|
-
|
|
261
|
+
4416,
|
|
262
262
|
"Creating {0}, also making text edits",
|
|
263
263
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
267
267
|
return localize(
|
|
268
|
-
|
|
268
|
+
4417,
|
|
269
269
|
"Deleting {0}, also making text edits",
|
|
270
270
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
else {
|
|
274
274
|
return localize(
|
|
275
|
-
|
|
275
|
+
4418,
|
|
276
276
|
"{0}, making text edits",
|
|
277
277
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
278
278
|
);
|
|
@@ -281,7 +281,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
281
281
|
else {
|
|
282
282
|
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
|
283
283
|
return localize(
|
|
284
|
-
|
|
284
|
+
4419,
|
|
285
285
|
"Renaming {0} to {1}",
|
|
286
286
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
287
287
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -289,14 +289,14 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
289
289
|
}
|
|
290
290
|
else if (element.edit.type & BulkFileOperationType.Create) {
|
|
291
291
|
return localize(
|
|
292
|
-
|
|
292
|
+
4420,
|
|
293
293
|
"Creating {0}",
|
|
294
294
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
297
|
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
298
298
|
return localize(
|
|
299
|
-
|
|
299
|
+
4421,
|
|
300
300
|
"Deleting {0}",
|
|
301
301
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
302
302
|
);
|
|
@@ -306,7 +306,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
306
306
|
if (element instanceof TextEditElement) {
|
|
307
307
|
if (element.selecting.length > 0 && element.inserting.length > 0) {
|
|
308
308
|
return localize(
|
|
309
|
-
|
|
309
|
+
4422,
|
|
310
310
|
"line {0}, replacing {1} with {2}",
|
|
311
311
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
312
312
|
element.selecting,
|
|
@@ -315,7 +315,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
315
315
|
}
|
|
316
316
|
else if (element.selecting.length > 0 && element.inserting.length === 0) {
|
|
317
317
|
return localize(
|
|
318
|
-
|
|
318
|
+
4423,
|
|
319
319
|
"line {0}, removing {1}",
|
|
320
320
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
321
321
|
element.selecting
|
|
@@ -323,7 +323,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
323
323
|
}
|
|
324
324
|
else if (element.selecting.length === 0 && element.inserting.length > 0) {
|
|
325
325
|
return localize(
|
|
326
|
-
|
|
326
|
+
4424,
|
|
327
327
|
"line {0}, inserting {1}",
|
|
328
328
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
329
329
|
element.selecting
|
|
@@ -429,7 +429,7 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
429
429
|
this._label.setResource({
|
|
430
430
|
resource: element.edit.uri,
|
|
431
431
|
name: ( localize(
|
|
432
|
-
|
|
432
|
+
4425,
|
|
433
433
|
"{0} → {1}",
|
|
434
434
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
435
435
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -437,7 +437,7 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
437
437
|
}, {
|
|
438
438
|
fileDecorations: { colors: true, badges: false }
|
|
439
439
|
});
|
|
440
|
-
this._details.innerText = ( localize(
|
|
440
|
+
this._details.innerText = ( localize(4426, "(renaming)"));
|
|
441
441
|
}
|
|
442
442
|
else {
|
|
443
443
|
const options = {
|
|
@@ -447,10 +447,10 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
447
447
|
extraClasses: []
|
|
448
448
|
};
|
|
449
449
|
if (element.edit.type & BulkFileOperationType.Create) {
|
|
450
|
-
this._details.innerText = ( localize(
|
|
450
|
+
this._details.innerText = ( localize(4427, "(creating)"));
|
|
451
451
|
}
|
|
452
452
|
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
453
|
-
this._details.innerText = ( localize(
|
|
453
|
+
this._details.innerText = ( localize(4428, "(deleting)"));
|
|
454
454
|
options.extraClasses.push('delete');
|
|
455
455
|
}
|
|
456
456
|
else {
|
|
@@ -527,7 +527,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
527
527
|
let title;
|
|
528
528
|
const { metadata } = element.edit.textEdit;
|
|
529
529
|
if (metadata && metadata.description) {
|
|
530
|
-
title = ( localize(
|
|
530
|
+
title = ( localize(4429, "{0} - {1}", metadata.label, metadata.description));
|
|
531
531
|
}
|
|
532
532
|
else if (metadata) {
|
|
533
533
|
title = metadata.label;
|