@codingame/monaco-vscode-bulk-edit-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/bulkEdit/browser/bulkEditService.js +58 -117
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +2 -2
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +2 -2
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.js +61 -118
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.js +57 -60
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.js +46 -43
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.js +100 -113
|
@@ -24,6 +24,7 @@ import { PLAINTEXT_LANGUAGE_ID } from 'vscode/vscode/vs/editor/common/languages/
|
|
|
24
24
|
import { SnippetParser } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetParser';
|
|
25
25
|
|
|
26
26
|
var CategoryElementRenderer_1, FileElementRenderer_1, TextEditElementRenderer_1;
|
|
27
|
+
const _moduleId = "vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree";
|
|
27
28
|
class CategoryElement {
|
|
28
29
|
constructor(parent, category) {
|
|
29
30
|
this.parent = parent;
|
|
@@ -33,7 +34,7 @@ class CategoryElement {
|
|
|
33
34
|
const model = this.parent;
|
|
34
35
|
let checked = true;
|
|
35
36
|
for (const file of this.category.fileOperations) {
|
|
36
|
-
for (const edit of ( file.originalEdits.values())) {
|
|
37
|
+
for (const edit of ( (file.originalEdits.values()))) {
|
|
37
38
|
checked = checked && model.checked.isChecked(edit);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -42,7 +43,7 @@ class CategoryElement {
|
|
|
42
43
|
setChecked(value) {
|
|
43
44
|
const model = this.parent;
|
|
44
45
|
for (const file of this.category.fileOperations) {
|
|
45
|
-
for (const edit of ( file.originalEdits.values())) {
|
|
46
|
+
for (const edit of ( (file.originalEdits.values()))) {
|
|
46
47
|
model.checked.updateChecked(edit, value);
|
|
47
48
|
}
|
|
48
49
|
}
|
|
@@ -59,7 +60,7 @@ class FileElement {
|
|
|
59
60
|
if (this.edit.type === 1 ) {
|
|
60
61
|
checked = !this.edit.textEdits.every(edit => !model.checked.isChecked(edit.textEdit));
|
|
61
62
|
}
|
|
62
|
-
for (const edit of ( this.edit.originalEdits.values())) {
|
|
63
|
+
for (const edit of ( (this.edit.originalEdits.values()))) {
|
|
63
64
|
if (edit instanceof ResourceFileEdit) {
|
|
64
65
|
checked = checked && model.checked.isChecked(edit);
|
|
65
66
|
}
|
|
@@ -67,8 +68,8 @@ class FileElement {
|
|
|
67
68
|
if (this.parent instanceof CategoryElement && this.edit.type === 1 ) {
|
|
68
69
|
for (const category of model.categories) {
|
|
69
70
|
for (const file of category.fileOperations) {
|
|
70
|
-
if (( file.uri.toString()) === ( this.edit.uri.toString())) {
|
|
71
|
-
for (const edit of ( file.originalEdits.values())) {
|
|
71
|
+
if (( (file.uri.toString())) === ( (this.edit.uri.toString()))) {
|
|
72
|
+
for (const edit of ( (file.originalEdits.values()))) {
|
|
72
73
|
if (edit instanceof ResourceFileEdit) {
|
|
73
74
|
checked = checked && model.checked.isChecked(edit);
|
|
74
75
|
}
|
|
@@ -81,14 +82,14 @@ class FileElement {
|
|
|
81
82
|
}
|
|
82
83
|
setChecked(value) {
|
|
83
84
|
const model = this.parent instanceof CategoryElement ? this.parent.parent : this.parent;
|
|
84
|
-
for (const edit of ( this.edit.originalEdits.values())) {
|
|
85
|
+
for (const edit of ( (this.edit.originalEdits.values()))) {
|
|
85
86
|
model.checked.updateChecked(edit, value);
|
|
86
87
|
}
|
|
87
88
|
if (this.parent instanceof CategoryElement && this.edit.type !== 1 ) {
|
|
88
89
|
for (const category of model.categories) {
|
|
89
90
|
for (const file of category.fileOperations) {
|
|
90
|
-
if (( file.uri.toString()) === ( this.edit.uri.toString())) {
|
|
91
|
-
for (const edit of ( file.originalEdits.values())) {
|
|
91
|
+
if (( (file.uri.toString())) === ( (this.edit.uri.toString()))) {
|
|
92
|
+
for (const edit of ( (file.originalEdits.values()))) {
|
|
92
93
|
model.checked.updateChecked(edit, value);
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -102,8 +103,8 @@ class FileElement {
|
|
|
102
103
|
let checked = true;
|
|
103
104
|
for (const category of model.categories) {
|
|
104
105
|
for (const file of category.fileOperations) {
|
|
105
|
-
if (( file.uri.toString()) === ( this.edit.uri.toString())) {
|
|
106
|
-
for (const edit of ( file.originalEdits.values())) {
|
|
106
|
+
if (( (file.uri.toString())) === ( (this.edit.uri.toString()))) {
|
|
107
|
+
for (const edit of ( (file.originalEdits.values()))) {
|
|
107
108
|
if (edit instanceof ResourceFileEdit) {
|
|
108
109
|
checked = checked && model.checked.isChecked(edit);
|
|
109
110
|
}
|
|
@@ -140,7 +141,7 @@ class TextEditElement {
|
|
|
140
141
|
}
|
|
141
142
|
model.checked.updateChecked(this.edit.textEdit, value);
|
|
142
143
|
if (value) {
|
|
143
|
-
for (const edit of ( this.parent.edit.originalEdits.values())) {
|
|
144
|
+
for (const edit of ( (this.parent.edit.originalEdits.values()))) {
|
|
144
145
|
if (edit instanceof ResourceFileEdit) {
|
|
145
146
|
model.checked.updateChecked(edit, value);
|
|
146
147
|
}
|
|
@@ -171,11 +172,11 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
171
172
|
async getChildren(element) {
|
|
172
173
|
if (element instanceof BulkFileOperations) {
|
|
173
174
|
return this.groupByFile
|
|
174
|
-
? ( element.fileOperations.map(op => ( new FileElement(element, op))))
|
|
175
|
-
: ( element.categories.map(cat => ( new CategoryElement(element, cat))));
|
|
175
|
+
? ( (element.fileOperations.map(op => ( (new FileElement(element, op))))))
|
|
176
|
+
: ( (element.categories.map(cat => ( (new CategoryElement(element, cat))))));
|
|
176
177
|
}
|
|
177
178
|
if (element instanceof CategoryElement) {
|
|
178
|
-
return Array.from(element.category.fileOperations, op => ( new FileElement(element, op)));
|
|
179
|
+
return Array.from(element.category.fileOperations, op => ( (new FileElement(element, op))));
|
|
179
180
|
}
|
|
180
181
|
if (element instanceof FileElement && element.edit.textEdits.length > 0) {
|
|
181
182
|
let textModel;
|
|
@@ -186,7 +187,7 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
186
187
|
textModelDisposable = ref;
|
|
187
188
|
}
|
|
188
189
|
catch {
|
|
189
|
-
textModel = ( new TextModel(
|
|
190
|
+
textModel = ( (new TextModel(
|
|
190
191
|
'',
|
|
191
192
|
PLAINTEXT_LANGUAGE_ID,
|
|
192
193
|
TextModel.DEFAULT_CREATION_OPTIONS,
|
|
@@ -194,10 +195,10 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
194
195
|
this._undoRedoService,
|
|
195
196
|
this._languageService,
|
|
196
197
|
this._languageConfigurationService
|
|
197
|
-
));
|
|
198
|
+
)));
|
|
198
199
|
textModelDisposable = textModel;
|
|
199
200
|
}
|
|
200
|
-
const result = ( element.edit.textEdits.map((edit, idx) => {
|
|
201
|
+
const result = ( (element.edit.textEdits.map((edit, idx) => {
|
|
201
202
|
const range = textModel.validateRange(edit.textEdit.textEdit.range);
|
|
202
203
|
const startTokens = textModel.tokenization.getLineTokens(range.startLineNumber);
|
|
203
204
|
let prefixLen = 23;
|
|
@@ -209,30 +210,32 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
209
210
|
for (let idx = endTokens.findTokenIndexAtOffset(range.endColumn - 1); suffixLen < 50 && idx < endTokens.getCount(); idx++) {
|
|
210
211
|
suffixLen += endTokens.getEndOffset(idx) - endTokens.getStartOffset(idx);
|
|
211
212
|
}
|
|
212
|
-
return (
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
range.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
213
|
+
return (
|
|
214
|
+
(new TextEditElement(element, idx, edit, textModel.getValueInRange(( (new Range(
|
|
215
|
+
range.startLineNumber,
|
|
216
|
+
range.startColumn - prefixLen,
|
|
217
|
+
range.startLineNumber,
|
|
218
|
+
range.startColumn
|
|
219
|
+
)))), textModel.getValueInRange(range), !edit.textEdit.textEdit.insertAsSnippet ? edit.textEdit.textEdit.text : SnippetParser.asInsertText(edit.textEdit.textEdit.text), textModel.getValueInRange(( (new Range(
|
|
220
|
+
range.endLineNumber,
|
|
221
|
+
range.endColumn,
|
|
222
|
+
range.endLineNumber,
|
|
223
|
+
range.endColumn + suffixLen
|
|
224
|
+
))))))
|
|
225
|
+
);
|
|
226
|
+
})));
|
|
224
227
|
textModelDisposable.dispose();
|
|
225
228
|
return result;
|
|
226
229
|
}
|
|
227
230
|
return [];
|
|
228
231
|
}
|
|
229
232
|
};
|
|
230
|
-
BulkEditDataSource = ( __decorate([
|
|
231
|
-
( __param(0, ITextModelService)),
|
|
232
|
-
( __param(1, IUndoRedoService)),
|
|
233
|
-
( __param(2, ILanguageService)),
|
|
234
|
-
( __param(3, ILanguageConfigurationService))
|
|
235
|
-
], BulkEditDataSource));
|
|
233
|
+
BulkEditDataSource = ( (__decorate([
|
|
234
|
+
( (__param(0, ITextModelService))),
|
|
235
|
+
( (__param(1, IUndoRedoService))),
|
|
236
|
+
( (__param(2, ILanguageService))),
|
|
237
|
+
( (__param(3, ILanguageConfigurationService)))
|
|
238
|
+
], BulkEditDataSource)));
|
|
236
239
|
class BulkEditSorter {
|
|
237
240
|
compare(a, b) {
|
|
238
241
|
if (a instanceof FileElement && b instanceof FileElement) {
|
|
@@ -245,18 +248,14 @@ class BulkEditSorter {
|
|
|
245
248
|
}
|
|
246
249
|
}
|
|
247
250
|
function compareBulkFileOperations(a, b) {
|
|
248
|
-
return compare(( a.uri.toString()), ( b.uri.toString()));
|
|
251
|
+
return compare(( (a.uri.toString())), ( (b.uri.toString())));
|
|
249
252
|
}
|
|
250
253
|
let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
251
254
|
constructor(_labelService) {
|
|
252
255
|
this._labelService = _labelService;
|
|
253
256
|
}
|
|
254
257
|
getWidgetAriaLabel() {
|
|
255
|
-
return ( localizeWithPath(
|
|
256
|
-
'vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree',
|
|
257
|
-
'bulkEdit',
|
|
258
|
-
"Bulk Edit"
|
|
259
|
-
));
|
|
258
|
+
return ( localizeWithPath(_moduleId, 0, "Bulk Edit"));
|
|
260
259
|
}
|
|
261
260
|
getRole(_element) {
|
|
262
261
|
return 'checkbox';
|
|
@@ -266,8 +265,8 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
266
265
|
if (element.edit.textEdits.length > 0) {
|
|
267
266
|
if (element.edit.type & 8 && element.edit.newUri) {
|
|
268
267
|
return ( localizeWithPath(
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
_moduleId,
|
|
269
|
+
1,
|
|
271
270
|
"Renaming {0} to {1}, also making text edits",
|
|
272
271
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
273
272
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -275,24 +274,24 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
275
274
|
}
|
|
276
275
|
else if (element.edit.type & 2 ) {
|
|
277
276
|
return ( localizeWithPath(
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
_moduleId,
|
|
278
|
+
2,
|
|
280
279
|
"Creating {0}, also making text edits",
|
|
281
280
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
282
281
|
));
|
|
283
282
|
}
|
|
284
283
|
else if (element.edit.type & 4 ) {
|
|
285
284
|
return ( localizeWithPath(
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
_moduleId,
|
|
286
|
+
3,
|
|
288
287
|
"Deleting {0}, also making text edits",
|
|
289
288
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
290
289
|
));
|
|
291
290
|
}
|
|
292
291
|
else {
|
|
293
292
|
return ( localizeWithPath(
|
|
294
|
-
|
|
295
|
-
|
|
293
|
+
_moduleId,
|
|
294
|
+
4,
|
|
296
295
|
"{0}, making text edits",
|
|
297
296
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
298
297
|
));
|
|
@@ -301,8 +300,8 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
301
300
|
else {
|
|
302
301
|
if (element.edit.type & 8 && element.edit.newUri) {
|
|
303
302
|
return ( localizeWithPath(
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
_moduleId,
|
|
304
|
+
5,
|
|
306
305
|
"Renaming {0} to {1}",
|
|
307
306
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
308
307
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -310,16 +309,16 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
310
309
|
}
|
|
311
310
|
else if (element.edit.type & 2 ) {
|
|
312
311
|
return ( localizeWithPath(
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
_moduleId,
|
|
313
|
+
6,
|
|
315
314
|
"Creating {0}",
|
|
316
315
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
317
316
|
));
|
|
318
317
|
}
|
|
319
318
|
else if (element.edit.type & 4 ) {
|
|
320
319
|
return ( localizeWithPath(
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
_moduleId,
|
|
321
|
+
7,
|
|
323
322
|
"Deleting {0}",
|
|
324
323
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
325
324
|
));
|
|
@@ -329,8 +328,8 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
329
328
|
if (element instanceof TextEditElement) {
|
|
330
329
|
if (element.selecting.length > 0 && element.inserting.length > 0) {
|
|
331
330
|
return ( localizeWithPath(
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
_moduleId,
|
|
332
|
+
8,
|
|
334
333
|
"line {0}, replacing {1} with {2}",
|
|
335
334
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
336
335
|
element.selecting,
|
|
@@ -339,8 +338,8 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
339
338
|
}
|
|
340
339
|
else if (element.selecting.length > 0 && element.inserting.length === 0) {
|
|
341
340
|
return ( localizeWithPath(
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
_moduleId,
|
|
342
|
+
9,
|
|
344
343
|
"line {0}, removing {1}",
|
|
345
344
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
346
345
|
element.selecting
|
|
@@ -348,8 +347,8 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
348
347
|
}
|
|
349
348
|
else if (element.selecting.length === 0 && element.inserting.length > 0) {
|
|
350
349
|
return ( localizeWithPath(
|
|
351
|
-
|
|
352
|
-
|
|
350
|
+
_moduleId,
|
|
351
|
+
10,
|
|
353
352
|
"line {0}, inserting {1}",
|
|
354
353
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
355
354
|
element.selecting
|
|
@@ -359,16 +358,16 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
359
358
|
return null;
|
|
360
359
|
}
|
|
361
360
|
};
|
|
362
|
-
BulkEditAccessibilityProvider = ( __decorate([
|
|
363
|
-
( __param(0, ILabelService))
|
|
364
|
-
], BulkEditAccessibilityProvider));
|
|
361
|
+
BulkEditAccessibilityProvider = ( (__decorate([
|
|
362
|
+
( (__param(0, ILabelService)))
|
|
363
|
+
], BulkEditAccessibilityProvider)));
|
|
365
364
|
class BulkEditIdentityProvider {
|
|
366
365
|
getId(element) {
|
|
367
366
|
if (element instanceof FileElement) {
|
|
368
367
|
return element.edit.uri + (element.parent instanceof CategoryElement ? JSON.stringify(element.parent.category.metadata) : '');
|
|
369
368
|
}
|
|
370
369
|
else if (element instanceof TextEditElement) {
|
|
371
|
-
return ( element.parent.edit.uri.toString()) + element.idx;
|
|
370
|
+
return ( (element.parent.edit.uri.toString())) + element.idx;
|
|
372
371
|
}
|
|
373
372
|
else {
|
|
374
373
|
return JSON.stringify(element.category.metadata);
|
|
@@ -380,7 +379,7 @@ class CategoryElementTemplate {
|
|
|
380
379
|
container.classList.add('category');
|
|
381
380
|
this.icon = document.createElement('div');
|
|
382
381
|
container.appendChild(this.icon);
|
|
383
|
-
this.label = ( new IconLabel(container));
|
|
382
|
+
this.label = ( (new IconLabel(container)));
|
|
384
383
|
}
|
|
385
384
|
}
|
|
386
385
|
let CategoryElementRenderer = class CategoryElementRenderer {
|
|
@@ -391,7 +390,9 @@ let CategoryElementRenderer = class CategoryElementRenderer {
|
|
|
391
390
|
this.templateId = CategoryElementRenderer_1.id;
|
|
392
391
|
}
|
|
393
392
|
renderTemplate(container) {
|
|
394
|
-
return (
|
|
393
|
+
return (
|
|
394
|
+
(new CategoryElementTemplate(container))
|
|
395
|
+
);
|
|
395
396
|
}
|
|
396
397
|
renderElement(node, _index, template) {
|
|
397
398
|
template.icon.style.setProperty('--background-dark', null);
|
|
@@ -421,14 +422,14 @@ let CategoryElementRenderer = class CategoryElementRenderer {
|
|
|
421
422
|
template.label.dispose();
|
|
422
423
|
}
|
|
423
424
|
};
|
|
424
|
-
CategoryElementRenderer = CategoryElementRenderer_1 = ( __decorate([
|
|
425
|
-
( __param(0, IThemeService))
|
|
426
|
-
], CategoryElementRenderer));
|
|
425
|
+
CategoryElementRenderer = CategoryElementRenderer_1 = ( (__decorate([
|
|
426
|
+
( (__param(0, IThemeService)))
|
|
427
|
+
], CategoryElementRenderer)));
|
|
427
428
|
let FileElementTemplate = class FileElementTemplate {
|
|
428
429
|
constructor(container, resourceLabels, _labelService) {
|
|
429
430
|
this._labelService = _labelService;
|
|
430
|
-
this._disposables = ( new DisposableStore());
|
|
431
|
-
this._localDisposables = ( new DisposableStore());
|
|
431
|
+
this._disposables = ( (new DisposableStore()));
|
|
432
|
+
this._localDisposables = ( (new DisposableStore()));
|
|
432
433
|
this._checkbox = document.createElement('input');
|
|
433
434
|
this._checkbox.className = 'edit-checkbox';
|
|
434
435
|
this._checkbox.type = 'checkbox';
|
|
@@ -455,8 +456,8 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
455
456
|
this._label.setResource({
|
|
456
457
|
resource: element.edit.uri,
|
|
457
458
|
name: ( localizeWithPath(
|
|
458
|
-
|
|
459
|
-
|
|
459
|
+
_moduleId,
|
|
460
|
+
11,
|
|
460
461
|
"{0} → {1}",
|
|
461
462
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
462
463
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -464,11 +465,7 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
464
465
|
}, {
|
|
465
466
|
fileDecorations: { colors: true, badges: false }
|
|
466
467
|
});
|
|
467
|
-
this._details.innerText = ( localizeWithPath(
|
|
468
|
-
'vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree',
|
|
469
|
-
'detail.rename',
|
|
470
|
-
"(renaming)"
|
|
471
|
-
));
|
|
468
|
+
this._details.innerText = ( localizeWithPath(_moduleId, 12, "(renaming)"));
|
|
472
469
|
}
|
|
473
470
|
else {
|
|
474
471
|
const options = {
|
|
@@ -478,18 +475,10 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
478
475
|
extraClasses: []
|
|
479
476
|
};
|
|
480
477
|
if (element.edit.type & 2 ) {
|
|
481
|
-
this._details.innerText = ( localizeWithPath(
|
|
482
|
-
'vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree',
|
|
483
|
-
'detail.create',
|
|
484
|
-
"(creating)"
|
|
485
|
-
));
|
|
478
|
+
this._details.innerText = ( localizeWithPath(_moduleId, 13, "(creating)"));
|
|
486
479
|
}
|
|
487
480
|
else if (element.edit.type & 4 ) {
|
|
488
|
-
this._details.innerText = ( localizeWithPath(
|
|
489
|
-
'vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree',
|
|
490
|
-
'detail.del',
|
|
491
|
-
"(deleting)"
|
|
492
|
-
));
|
|
481
|
+
this._details.innerText = ( localizeWithPath(_moduleId, 14, "(deleting)"));
|
|
493
482
|
options.extraClasses.push('delete');
|
|
494
483
|
}
|
|
495
484
|
else {
|
|
@@ -499,9 +488,9 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
499
488
|
}
|
|
500
489
|
}
|
|
501
490
|
};
|
|
502
|
-
FileElementTemplate = ( __decorate([
|
|
503
|
-
( __param(2, ILabelService))
|
|
504
|
-
], FileElementTemplate));
|
|
491
|
+
FileElementTemplate = ( (__decorate([
|
|
492
|
+
( (__param(2, ILabelService)))
|
|
493
|
+
], FileElementTemplate)));
|
|
505
494
|
let FileElementRenderer = class FileElementRenderer {
|
|
506
495
|
static { FileElementRenderer_1 = this; }
|
|
507
496
|
static { this.id = 'FileElementRenderer'; }
|
|
@@ -511,7 +500,9 @@ let FileElementRenderer = class FileElementRenderer {
|
|
|
511
500
|
this.templateId = FileElementRenderer_1.id;
|
|
512
501
|
}
|
|
513
502
|
renderTemplate(container) {
|
|
514
|
-
return (
|
|
503
|
+
return (
|
|
504
|
+
(new FileElementTemplate(container, this._resourceLabels, this._labelService))
|
|
505
|
+
);
|
|
515
506
|
}
|
|
516
507
|
renderElement(node, _index, template) {
|
|
517
508
|
template.set(node.element, node.filterData);
|
|
@@ -520,14 +511,14 @@ let FileElementRenderer = class FileElementRenderer {
|
|
|
520
511
|
template.dispose();
|
|
521
512
|
}
|
|
522
513
|
};
|
|
523
|
-
FileElementRenderer = FileElementRenderer_1 = ( __decorate([
|
|
524
|
-
( __param(1, ILabelService))
|
|
525
|
-
], FileElementRenderer));
|
|
514
|
+
FileElementRenderer = FileElementRenderer_1 = ( (__decorate([
|
|
515
|
+
( (__param(1, ILabelService)))
|
|
516
|
+
], FileElementRenderer)));
|
|
526
517
|
let TextEditElementTemplate = class TextEditElementTemplate {
|
|
527
518
|
constructor(container, _themeService) {
|
|
528
519
|
this._themeService = _themeService;
|
|
529
|
-
this._disposables = ( new DisposableStore());
|
|
530
|
-
this._localDisposables = ( new DisposableStore());
|
|
520
|
+
this._disposables = ( (new DisposableStore()));
|
|
521
|
+
this._localDisposables = ( (new DisposableStore()));
|
|
531
522
|
container.classList.add('textedit');
|
|
532
523
|
this._checkbox = document.createElement('input');
|
|
533
524
|
this._checkbox.className = 'edit-checkbox';
|
|
@@ -536,7 +527,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
536
527
|
container.appendChild(this._checkbox);
|
|
537
528
|
this._icon = document.createElement('div');
|
|
538
529
|
container.appendChild(this._icon);
|
|
539
|
-
this._label = this._disposables.add(( new HighlightedLabel(container)));
|
|
530
|
+
this._label = this._disposables.add(( (new HighlightedLabel(container))));
|
|
540
531
|
}
|
|
541
532
|
dispose() {
|
|
542
533
|
this._localDisposables.dispose();
|
|
@@ -566,13 +557,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
566
557
|
let title;
|
|
567
558
|
const { metadata } = element.edit.textEdit;
|
|
568
559
|
if (metadata && metadata.description) {
|
|
569
|
-
title = ( localizeWithPath(
|
|
570
|
-
'vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree',
|
|
571
|
-
'title',
|
|
572
|
-
"{0} - {1}",
|
|
573
|
-
metadata.label,
|
|
574
|
-
metadata.description
|
|
575
|
-
));
|
|
560
|
+
title = ( localizeWithPath(_moduleId, 15, "{0} - {1}", metadata.label, metadata.description));
|
|
576
561
|
}
|
|
577
562
|
else if (metadata) {
|
|
578
563
|
title = metadata.label;
|
|
@@ -605,9 +590,9 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
605
590
|
this._icon.title = title || '';
|
|
606
591
|
}
|
|
607
592
|
};
|
|
608
|
-
TextEditElementTemplate = ( __decorate([
|
|
609
|
-
( __param(1, IThemeService))
|
|
610
|
-
], TextEditElementTemplate));
|
|
593
|
+
TextEditElementTemplate = ( (__decorate([
|
|
594
|
+
( (__param(1, IThemeService)))
|
|
595
|
+
], TextEditElementTemplate)));
|
|
611
596
|
let TextEditElementRenderer = class TextEditElementRenderer {
|
|
612
597
|
static { TextEditElementRenderer_1 = this; }
|
|
613
598
|
static { this.id = 'TextEditElementRenderer'; }
|
|
@@ -616,16 +601,18 @@ let TextEditElementRenderer = class TextEditElementRenderer {
|
|
|
616
601
|
this.templateId = TextEditElementRenderer_1.id;
|
|
617
602
|
}
|
|
618
603
|
renderTemplate(container) {
|
|
619
|
-
return (
|
|
604
|
+
return (
|
|
605
|
+
(new TextEditElementTemplate(container, this._themeService))
|
|
606
|
+
);
|
|
620
607
|
}
|
|
621
608
|
renderElement({ element }, _index, template) {
|
|
622
609
|
template.set(element);
|
|
623
610
|
}
|
|
624
611
|
disposeTemplate(_template) { }
|
|
625
612
|
};
|
|
626
|
-
TextEditElementRenderer = TextEditElementRenderer_1 = ( __decorate([
|
|
627
|
-
( __param(0, IThemeService))
|
|
628
|
-
], TextEditElementRenderer));
|
|
613
|
+
TextEditElementRenderer = TextEditElementRenderer_1 = ( (__decorate([
|
|
614
|
+
( (__param(0, IThemeService)))
|
|
615
|
+
], TextEditElementRenderer)));
|
|
629
616
|
class BulkEditDelegate {
|
|
630
617
|
getHeight() {
|
|
631
618
|
return 23;
|