@codingame/monaco-vscode-bulk-edit-service-override 14.0.6 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +5 -5
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +20 -20
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +6 -5
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/conflicts.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/conflicts.js +2 -2
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.js +10 -13
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.js +4 -4
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.js +17 -17
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import '@codingame/monaco-vscode-api/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
3
3
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
-
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
|
|
4
|
+
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
|
|
5
5
|
import { BulkEditService } from './vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js';
|
|
6
6
|
import './vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.js';
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-bulk-edit-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - bulk-edit service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,10 +15,10 @@
|
|
|
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-api": "
|
|
18
|
+
"@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "15.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "15.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common": "15.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-api": "15.0.1"
|
|
22
22
|
},
|
|
23
23
|
"main": "index.js",
|
|
24
24
|
"module": "index.js",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { IBulkEditOptions, IBulkEditPreviewHandler, IBulkEditResult,
|
|
2
|
+
import { IBulkEditOptions, IBulkEditPreviewHandler, IBulkEditResult, ResourceEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService";
|
|
3
|
+
import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service";
|
|
3
4
|
import { WorkspaceEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
4
5
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
6
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
@@ -6,18 +6,18 @@ import { LinkedList } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
6
6
|
import { ResourceMap, ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
7
7
|
import { isCodeEditor, isDiffEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
8
8
|
import { ResourceTextEdit, ResourceFileEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
|
|
9
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
10
|
import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
|
|
10
11
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
13
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
13
14
|
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
14
15
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
15
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
16
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
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-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-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';
|
|
@@ -71,24 +71,24 @@ let BulkEdit = class BulkEdit {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
if (this._edits.length === 0) {
|
|
74
|
-
return localize(
|
|
74
|
+
return localize(4155, "Made no edits");
|
|
75
75
|
}
|
|
76
76
|
else if (otherResources.size === 0) {
|
|
77
77
|
if (textEditCount > 1 && textEditResources.size > 1) {
|
|
78
78
|
return localize(
|
|
79
|
-
|
|
79
|
+
4156,
|
|
80
80
|
"Made {0} text edits in {1} files",
|
|
81
81
|
textEditCount,
|
|
82
82
|
textEditResources.size
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
return localize(
|
|
86
|
+
return localize(4157, "Made {0} text edits in one file", textEditCount);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
return localize(
|
|
91
|
-
|
|
91
|
+
4158,
|
|
92
92
|
"Made {0} text edits in {1} files, also created or deleted {2} files",
|
|
93
93
|
textEditCount,
|
|
94
94
|
textEditResources.size,
|
|
@@ -140,12 +140,12 @@ let BulkEdit = class BulkEdit {
|
|
|
140
140
|
}
|
|
141
141
|
async _performFileEdits(edits, undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress) {
|
|
142
142
|
this._logService.debug('_performFileEdits', JSON.stringify(edits));
|
|
143
|
-
const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(
|
|
143
|
+
const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(4159, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
|
|
144
144
|
return await model.apply();
|
|
145
145
|
}
|
|
146
146
|
async _performTextEdits(edits, undoRedoGroup, undoRedoSource, progress) {
|
|
147
147
|
this._logService.debug('_performTextEdits', JSON.stringify(edits));
|
|
148
|
-
const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(
|
|
148
|
+
const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(4159, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
|
|
149
149
|
return await model.apply();
|
|
150
150
|
}
|
|
151
151
|
async _performCellEdits(edits, undoRedoGroup, undoRedoSource, progress) {
|
|
@@ -188,7 +188,7 @@ let BulkEditService = class BulkEditService {
|
|
|
188
188
|
async apply(editsIn, options) {
|
|
189
189
|
let edits = liftEdits(Array.isArray(editsIn) ? editsIn : editsIn.edits);
|
|
190
190
|
if (edits.length === 0) {
|
|
191
|
-
return { ariaSummary: ( localize(
|
|
191
|
+
return { ariaSummary: ( localize(4160, "Made no edits")), isApplied: false };
|
|
192
192
|
}
|
|
193
193
|
if (this._previewHandler && (options?.showPreview || ( edits.some(value => value.metadata?.needsConfirmation)))) {
|
|
194
194
|
edits = await this._previewHandler(edits, options);
|
|
@@ -259,28 +259,28 @@ let BulkEditService = class BulkEditService {
|
|
|
259
259
|
let primaryButton;
|
|
260
260
|
switch (reason) {
|
|
261
261
|
case ShutdownReason.CLOSE:
|
|
262
|
-
message = ( localize(
|
|
263
|
-
primaryButton = ( localize(
|
|
262
|
+
message = ( localize(4161, "Are you sure you want to close the window?"));
|
|
263
|
+
primaryButton = ( localize(4162, "&&Close Window"));
|
|
264
264
|
break;
|
|
265
265
|
case ShutdownReason.LOAD:
|
|
266
|
-
message = ( localize(
|
|
267
|
-
primaryButton = ( localize(
|
|
266
|
+
message = ( localize(4163, "Are you sure you want to change the workspace?"));
|
|
267
|
+
primaryButton = ( localize(4164, "Change &&Workspace"));
|
|
268
268
|
break;
|
|
269
269
|
case ShutdownReason.RELOAD:
|
|
270
|
-
message = ( localize(
|
|
271
|
-
primaryButton = ( localize(
|
|
270
|
+
message = ( localize(4165, "Are you sure you want to reload the window?"));
|
|
271
|
+
primaryButton = ( localize(4166, "&&Reload Window"));
|
|
272
272
|
break;
|
|
273
273
|
default:
|
|
274
|
-
message = ( localize(
|
|
275
|
-
primaryButton = ( localize(
|
|
274
|
+
message = ( localize(4167, "Are you sure you want to quit?"));
|
|
275
|
+
primaryButton = ( localize(4168, "&&Quit"));
|
|
276
276
|
break;
|
|
277
277
|
}
|
|
278
278
|
const result = await this._dialogService.confirm({
|
|
279
279
|
message,
|
|
280
280
|
detail: ( localize(
|
|
281
|
-
|
|
281
|
+
4169,
|
|
282
282
|
"'{0}' is in progress.",
|
|
283
|
-
label || ( localize(
|
|
283
|
+
label || ( localize(4170, "File operation"))
|
|
284
284
|
)),
|
|
285
285
|
primaryButton
|
|
286
286
|
});
|
|
@@ -302,7 +302,7 @@ const autoSaveSetting = 'files.refactoring.autoSave';
|
|
|
302
302
|
properties: {
|
|
303
303
|
[autoSaveSetting]: {
|
|
304
304
|
description: ( localize(
|
|
305
|
-
|
|
305
|
+
4171,
|
|
306
306
|
"Controls if files that were part of a refactoring are saved automatically"
|
|
307
307
|
)),
|
|
308
308
|
default: true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
2
|
import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
|
|
3
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
4
4
|
import { IProgress } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress";
|
|
5
|
-
import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker";
|
|
5
|
+
import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
|
|
6
6
|
import { UndoRedoGroup, UndoRedoSource } from "@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo";
|
|
7
7
|
import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service";
|
|
8
|
-
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model";
|
|
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
11
|
export declare class BulkTextEdits {
|
|
@@ -3,12 +3,12 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { dispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { EditOperation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation';
|
|
5
5
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
6
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
|
|
7
|
-
import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker';
|
|
6
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
7
|
+
import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service';
|
|
8
8
|
import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service';
|
|
9
9
|
import { SingleModelEditStackElement, MultiModelEditStackElement } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/editStack';
|
|
10
10
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
11
|
-
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model';
|
|
11
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
12
12
|
import { ResourceTextEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
|
|
13
13
|
import { SnippetController2 } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/snippet/browser/snippetController2';
|
|
14
14
|
import { SnippetParser } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/snippet/browser/snippetParser';
|
|
@@ -50,7 +50,7 @@ class ModelEditTask {
|
|
|
50
50
|
else {
|
|
51
51
|
range = Range.lift(textEdit.range);
|
|
52
52
|
}
|
|
53
|
-
this._edits.push({ ...EditOperation.replaceMove(range, textEdit.text), insertAsSnippet: textEdit.insertAsSnippet });
|
|
53
|
+
this._edits.push({ ...EditOperation.replaceMove(range, textEdit.text), insertAsSnippet: textEdit.insertAsSnippet, keepWhitespace: textEdit.keepWhitespace });
|
|
54
54
|
}
|
|
55
55
|
validate() {
|
|
56
56
|
if (typeof this._expectedModelVersionId === 'undefined' || this.model.getVersionId() === this._expectedModelVersionId) {
|
|
@@ -105,7 +105,8 @@ class EditorEditTask extends ModelEditTask {
|
|
|
105
105
|
if (edit.range && edit.text !== null) {
|
|
106
106
|
snippetEdits.push({
|
|
107
107
|
range: Range.lift(edit.range),
|
|
108
|
-
template: edit.insertAsSnippet ? edit.text : SnippetParser.escape(edit.text)
|
|
108
|
+
template: edit.insertAsSnippet ? edit.text : SnippetParser.escape(edit.text),
|
|
109
|
+
keepWhitespace: edit.keepWhitespace
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model";
|
|
3
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
4
4
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
5
5
|
import { ResourceEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService";
|
|
6
6
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
4
|
-
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model';
|
|
4
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
5
5
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
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-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-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 {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
4
4
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
5
|
-
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
|
|
5
|
+
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
|
|
6
6
|
import { BulkEditPane } from './bulkEditPane.js';
|
|
7
7
|
import { ViewContainerLocation, Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
8
8
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
9
9
|
import { FocusedViewContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
10
10
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
|
-
import { ViewPaneContainer } from '@codingame/monaco-vscode-
|
|
11
|
+
import { ViewPaneContainer } from '@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
12
12
|
import { RawContextKey, ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
13
13
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
14
14
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
@@ -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(4172, "Another refactoring is being previewed.")),
|
|
101
101
|
detail: ( localize(
|
|
102
|
-
|
|
102
|
+
4173,
|
|
103
103
|
"Press 'Continue' to discard the previous refactoring and continue with the current refactoring."
|
|
104
104
|
)),
|
|
105
|
-
primaryButton: ( localize(
|
|
105
|
+
primaryButton: ( localize(4174, "&&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(4175, "Apply Refactoring")),
|
|
147
|
+
category: ( localize2(4176, "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(4177, "Discard Refactoring")),
|
|
172
|
+
category: ( localize2(4176, "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(4178, "Toggle Change")),
|
|
192
|
+
category: ( localize2(4176, "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(4179, "Group Changes By File")),
|
|
216
|
+
category: ( localize2(4176, "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(4180, "Group Changes By Type")),
|
|
238
|
+
category: ( localize2(4176, "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(4180, "Group Changes By Type")),
|
|
264
|
+
category: ( localize2(4176, "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(4181, '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(4182, "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(4182, "Refactor Preview")),
|
|
296
296
|
when: BulkEditPreviewContribution.ctxEnabled,
|
|
297
297
|
ctorDescriptor: ( new SyncDescriptor(BulkEditPane)),
|
|
298
298
|
containerIcon: refactorPreviewViewIcon,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { ResourceEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService";
|
|
3
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
|
|
3
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
4
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
5
|
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
6
6
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
@@ -12,7 +12,6 @@ import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
12
12
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
13
13
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
14
14
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
15
|
-
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
16
15
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
17
16
|
import { ViewPane } from "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
18
17
|
import { IViewletViewOptions } from "@codingame/monaco-vscode-55ed5668-e8ca-5335-a587-790bcf1200c0-common/vscode/vs/workbench/browser/parts/views/viewsViewlet";
|
|
@@ -44,7 +43,7 @@ export declare class BulkEditPane extends ViewPane {
|
|
|
44
43
|
private _currentResolve?;
|
|
45
44
|
private _currentInput?;
|
|
46
45
|
private _currentProvider?;
|
|
47
|
-
constructor(options: IViewletViewOptions, _instaService: IInstantiationService, _editorService: IEditorService, _labelService: ILabelService, _textModelService: ITextModelService, _dialogService: IDialogService, _contextMenuService: IContextMenuService, _storageService: IStorageService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, openerService: IOpenerService, themeService: IThemeService,
|
|
46
|
+
constructor(options: IViewletViewOptions, _instaService: IInstantiationService, _editorService: IEditorService, _labelService: ILabelService, _textModelService: ITextModelService, _dialogService: IDialogService, _contextMenuService: IContextMenuService, _storageService: IStorageService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, openerService: IOpenerService, themeService: IThemeService, hoverService: IHoverService);
|
|
48
47
|
dispose(): void;
|
|
49
48
|
protected renderBody(parent: HTMLElement): void;
|
|
50
49
|
protected layoutBody(height: number, width: number): void;
|
|
@@ -5,7 +5,7 @@ import { LRUCachedFunction, CachedFunction } from '@codingame/monaco-vscode-api/
|
|
|
5
5
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
7
|
import './bulkEdit.css.js';
|
|
8
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
|
|
8
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
9
9
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
10
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
11
11
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -21,10 +21,9 @@ import { WorkbenchAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/p
|
|
|
21
21
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
22
22
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
23
23
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
24
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
25
24
|
import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
26
25
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
27
|
-
import { ResourceLabels } from '@codingame/monaco-vscode-
|
|
26
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common/vscode/vs/workbench/browser/labels';
|
|
28
27
|
import { ViewPane } from '@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
29
28
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
30
29
|
import { BulkFileOperationType, BulkEditPreviewProvider, BulkFileOperations } from './bulkEditPreview.js';
|
|
@@ -46,8 +45,8 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
|
|
|
46
45
|
static { this.ctxGroupByFile = ( new RawContextKey('refactorPreview.groupByFile', true)); }
|
|
47
46
|
static { this.ctxHasCheckedChanges = ( new RawContextKey('refactorPreview.hasCheckedChanges', true)); }
|
|
48
47
|
static { this._memGroupByFile = `${this.ID}.groupByFile`; }
|
|
49
|
-
constructor(options, _instaService, _editorService, _labelService, _textModelService, _dialogService, _contextMenuService, _storageService, contextKeyService, viewDescriptorService, keybindingService, contextMenuService, configurationService, openerService, themeService,
|
|
50
|
-
super({ ...options, titleMenuId: MenuId.BulkEditTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instaService, openerService, themeService,
|
|
48
|
+
constructor(options, _instaService, _editorService, _labelService, _textModelService, _dialogService, _contextMenuService, _storageService, contextKeyService, viewDescriptorService, keybindingService, contextMenuService, configurationService, openerService, themeService, hoverService) {
|
|
49
|
+
super({ ...options, titleMenuId: MenuId.BulkEditTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instaService, openerService, themeService, hoverService);
|
|
51
50
|
this._instaService = _instaService;
|
|
52
51
|
this._editorService = _editorService;
|
|
53
52
|
this._labelService = _labelService;
|
|
@@ -103,7 +102,6 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
|
|
|
103
102
|
this._ctxHasCategories = BulkEditPane_1.ctxHasCategories.bindTo(contextKeyService);
|
|
104
103
|
this._ctxGroupByFile = BulkEditPane_1.ctxGroupByFile.bindTo(contextKeyService);
|
|
105
104
|
this._ctxHasCheckedChanges = BulkEditPane_1.ctxHasCheckedChanges.bindTo(contextKeyService);
|
|
106
|
-
this.telemetryService.publicLog2('views.bulkEditPane');
|
|
107
105
|
}
|
|
108
106
|
dispose() {
|
|
109
107
|
this._tree.dispose();
|
|
@@ -139,15 +137,15 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
|
|
|
139
137
|
const buttonBar = ( new ButtonBar(buttonsContainer));
|
|
140
138
|
this._disposables.add(buttonBar);
|
|
141
139
|
const btnConfirm = buttonBar.addButton({ supportIcons: true, ...defaultButtonStyles });
|
|
142
|
-
btnConfirm.label = ( localize(
|
|
140
|
+
btnConfirm.label = ( localize(4183, 'Apply'));
|
|
143
141
|
btnConfirm.onDidClick(() => this.accept(), this, this._disposables);
|
|
144
142
|
const btnCancel = buttonBar.addButton({ ...defaultButtonStyles, secondary: true });
|
|
145
|
-
btnCancel.label = ( localize(
|
|
143
|
+
btnCancel.label = ( localize(4184, 'Discard'));
|
|
146
144
|
btnCancel.onDidClick(() => this.discard(), this, this._disposables);
|
|
147
145
|
this._message = document.createElement('span');
|
|
148
146
|
this._message.className = 'message';
|
|
149
147
|
this._message.innerText = ( localize(
|
|
150
|
-
|
|
148
|
+
4185,
|
|
151
149
|
"Invoke a code action, like rename, to see a preview of its changes here."
|
|
152
150
|
));
|
|
153
151
|
parent.appendChild(this._message);
|
|
@@ -220,14 +218,14 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
|
|
|
220
218
|
let message;
|
|
221
219
|
if (conflicts.length === 1) {
|
|
222
220
|
message = ( localize(
|
|
223
|
-
|
|
221
|
+
4186,
|
|
224
222
|
"Cannot apply refactoring because '{0}' has changed in the meantime.",
|
|
225
223
|
this._labelService.getUriLabel(conflicts[0], { relative: true })
|
|
226
224
|
));
|
|
227
225
|
}
|
|
228
226
|
else {
|
|
229
227
|
message = ( localize(
|
|
230
|
-
|
|
228
|
+
4187,
|
|
231
229
|
"Cannot apply refactoring because {0} other files have changed in the meantime.",
|
|
232
230
|
conflicts.length
|
|
233
231
|
));
|
|
@@ -336,8 +334,7 @@ BulkEditPane = BulkEditPane_1 = ( __decorate([
|
|
|
336
334
|
( __param(12, IConfigurationService)),
|
|
337
335
|
( __param(13, IOpenerService)),
|
|
338
336
|
( __param(14, IThemeService)),
|
|
339
|
-
( __param(15,
|
|
340
|
-
( __param(16, IHoverService))
|
|
337
|
+
( __param(15, IHoverService))
|
|
341
338
|
], BulkEditPane));
|
|
342
339
|
|
|
343
340
|
export { BulkEditPane };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ITextModelContentProvider
|
|
1
|
+
import { ITextModelContentProvider } from "@codingame/monaco-vscode-model-service-override/vscode/vs/editor/common/services/resolverService";
|
|
2
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
2
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language";
|
|
4
|
-
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model";
|
|
4
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
5
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
5
6
|
import { WorkspaceEditMetadata } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
6
7
|
import { ISingleEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation";
|
|
7
8
|
import { ServicesAccessor, IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
|
|
3
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
4
4
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
-
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language';
|
|
6
|
-
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model';
|
|
5
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
6
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
7
7
|
import { createTextBufferFactoryFromSnapshot } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
|
|
8
8
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
9
|
import { coalesceInPlace } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
@@ -103,7 +103,7 @@ class BulkFileOperation {
|
|
|
103
103
|
}
|
|
104
104
|
class BulkCategory {
|
|
105
105
|
static { this._defaultMetadata = ( Object.freeze({
|
|
106
|
-
label: ( localize(
|
|
106
|
+
label: ( localize(4188, "Other")),
|
|
107
107
|
icon: Codicon.symbolFile,
|
|
108
108
|
needsConfirmation: false
|
|
109
109
|
})); }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAsyncDataSource, ITreeRenderer, ITreeNode, ITreeSorter } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree";
|
|
2
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
|
|
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-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
|
|
3
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
4
4
|
import { createMatches } from '@codingame/monaco-vscode-api/vscode/vs/base/common/filters';
|
|
5
5
|
import { HighlightedLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
|
6
6
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
@@ -240,7 +240,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
240
240
|
this._labelService = _labelService;
|
|
241
241
|
}
|
|
242
242
|
getWidgetAriaLabel() {
|
|
243
|
-
return localize(
|
|
243
|
+
return localize(4189, "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
|
+
4190,
|
|
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
|
+
4191,
|
|
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
|
+
4192,
|
|
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
|
+
4193,
|
|
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
|
+
4194,
|
|
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
|
+
4195,
|
|
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
|
+
4196,
|
|
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
|
+
4197,
|
|
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
|
+
4198,
|
|
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
|
+
4199,
|
|
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
|
+
4200,
|
|
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(4201, "(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(4202, "(creating)"));
|
|
451
451
|
}
|
|
452
452
|
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
453
|
-
this._details.innerText = ( localize(
|
|
453
|
+
this._details.innerText = ( localize(4203, "(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(4204, "{0} - {1}", metadata.label, metadata.description));
|
|
531
531
|
}
|
|
532
532
|
else if (metadata) {
|
|
533
533
|
title = metadata.label;
|