@codingame/monaco-vscode-bulk-edit-service-override 11.1.2 → 12.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/index.d.ts +2 -1
- package/index.js +14 -1
- package/package.json +23 -7
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +82 -64
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +7 -5
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +2 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/conflicts.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/conflicts.js +3 -2
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/opaqueEdits.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/opaqueEdits.js +67 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.js +67 -74
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.js +65 -60
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.d.ts +87 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.js +56 -54
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.d.ts +132 -0
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.js +112 -119
- package/bulkEdit.js +0 -12
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
3
4
|
import { createMatches } from 'vscode/vscode/vs/base/common/filters';
|
|
4
5
|
import { HighlightedLabel } from 'vscode/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
|
@@ -6,7 +7,7 @@ import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
|
6
7
|
import { addDisposableListener } from 'vscode/vscode/vs/base/browser/dom';
|
|
7
8
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
9
|
import { TextModel } from 'vscode/vscode/vs/editor/common/model/textModel';
|
|
9
|
-
import { BulkFileOperations } from './bulkEditPreview.js';
|
|
10
|
+
import { BulkFileOperationType, BulkFileOperations } from './bulkEditPreview.js';
|
|
10
11
|
import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
|
|
11
12
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
12
13
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
@@ -32,7 +33,7 @@ class CategoryElement {
|
|
|
32
33
|
const model = this.parent;
|
|
33
34
|
let checked = true;
|
|
34
35
|
for (const file of this.category.fileOperations) {
|
|
35
|
-
for (const edit of (
|
|
36
|
+
for (const edit of ( file.originalEdits.values())) {
|
|
36
37
|
checked = checked && model.checked.isChecked(edit);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -41,7 +42,7 @@ class CategoryElement {
|
|
|
41
42
|
setChecked(value) {
|
|
42
43
|
const model = this.parent;
|
|
43
44
|
for (const file of this.category.fileOperations) {
|
|
44
|
-
for (const edit of (
|
|
45
|
+
for (const edit of ( file.originalEdits.values())) {
|
|
45
46
|
model.checked.updateChecked(edit, value);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -55,19 +56,19 @@ class FileElement {
|
|
|
55
56
|
isChecked() {
|
|
56
57
|
const model = this.parent instanceof CategoryElement ? this.parent.parent : this.parent;
|
|
57
58
|
let checked = true;
|
|
58
|
-
if (this.edit.type ===
|
|
59
|
+
if (this.edit.type === BulkFileOperationType.TextEdit) {
|
|
59
60
|
checked = !this.edit.textEdits.every(edit => !model.checked.isChecked(edit.textEdit));
|
|
60
61
|
}
|
|
61
|
-
for (const edit of (
|
|
62
|
+
for (const edit of ( this.edit.originalEdits.values())) {
|
|
62
63
|
if (edit instanceof ResourceFileEdit) {
|
|
63
64
|
checked = checked && model.checked.isChecked(edit);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
if (this.parent instanceof CategoryElement && this.edit.type ===
|
|
67
|
+
if (this.parent instanceof CategoryElement && this.edit.type === BulkFileOperationType.TextEdit) {
|
|
67
68
|
for (const category of model.categories) {
|
|
68
69
|
for (const file of category.fileOperations) {
|
|
69
|
-
if ((
|
|
70
|
-
for (const edit of (
|
|
70
|
+
if (( file.uri.toString()) === ( this.edit.uri.toString())) {
|
|
71
|
+
for (const edit of ( file.originalEdits.values())) {
|
|
71
72
|
if (edit instanceof ResourceFileEdit) {
|
|
72
73
|
checked = checked && model.checked.isChecked(edit);
|
|
73
74
|
}
|
|
@@ -80,14 +81,14 @@ class FileElement {
|
|
|
80
81
|
}
|
|
81
82
|
setChecked(value) {
|
|
82
83
|
const model = this.parent instanceof CategoryElement ? this.parent.parent : this.parent;
|
|
83
|
-
for (const edit of (
|
|
84
|
+
for (const edit of ( this.edit.originalEdits.values())) {
|
|
84
85
|
model.checked.updateChecked(edit, value);
|
|
85
86
|
}
|
|
86
|
-
if (this.parent instanceof CategoryElement && this.edit.type !==
|
|
87
|
+
if (this.parent instanceof CategoryElement && this.edit.type !== BulkFileOperationType.TextEdit) {
|
|
87
88
|
for (const category of model.categories) {
|
|
88
89
|
for (const file of category.fileOperations) {
|
|
89
|
-
if ((
|
|
90
|
-
for (const edit of (
|
|
90
|
+
if (( file.uri.toString()) === ( this.edit.uri.toString())) {
|
|
91
|
+
for (const edit of ( file.originalEdits.values())) {
|
|
91
92
|
model.checked.updateChecked(edit, value);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
@@ -96,13 +97,13 @@ class FileElement {
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
isDisabled() {
|
|
99
|
-
if (this.parent instanceof CategoryElement && this.edit.type ===
|
|
100
|
+
if (this.parent instanceof CategoryElement && this.edit.type === BulkFileOperationType.TextEdit) {
|
|
100
101
|
const model = this.parent.parent;
|
|
101
102
|
let checked = true;
|
|
102
103
|
for (const category of model.categories) {
|
|
103
104
|
for (const file of category.fileOperations) {
|
|
104
|
-
if ((
|
|
105
|
-
for (const edit of (
|
|
105
|
+
if (( file.uri.toString()) === ( this.edit.uri.toString())) {
|
|
106
|
+
for (const edit of ( file.originalEdits.values())) {
|
|
106
107
|
if (edit instanceof ResourceFileEdit) {
|
|
107
108
|
checked = checked && model.checked.isChecked(edit);
|
|
108
109
|
}
|
|
@@ -139,7 +140,7 @@ class TextEditElement {
|
|
|
139
140
|
}
|
|
140
141
|
model.checked.updateChecked(this.edit.textEdit, value);
|
|
141
142
|
if (value) {
|
|
142
|
-
for (const edit of (
|
|
143
|
+
for (const edit of ( this.parent.edit.originalEdits.values())) {
|
|
143
144
|
if (edit instanceof ResourceFileEdit) {
|
|
144
145
|
model.checked.updateChecked(edit, value);
|
|
145
146
|
}
|
|
@@ -168,11 +169,11 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
168
169
|
async getChildren(element) {
|
|
169
170
|
if (element instanceof BulkFileOperations) {
|
|
170
171
|
return this.groupByFile
|
|
171
|
-
? (
|
|
172
|
-
: (
|
|
172
|
+
? ( element.fileOperations.map(op => ( new FileElement(element, op))))
|
|
173
|
+
: ( element.categories.map(cat => ( new CategoryElement(element, cat))));
|
|
173
174
|
}
|
|
174
175
|
if (element instanceof CategoryElement) {
|
|
175
|
-
return Array.from(element.category.fileOperations, op => (
|
|
176
|
+
return Array.from(element.category.fileOperations, op => ( new FileElement(element, op)));
|
|
176
177
|
}
|
|
177
178
|
if (element instanceof FileElement && element.edit.textEdits.length > 0) {
|
|
178
179
|
let textModel;
|
|
@@ -186,7 +187,7 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
186
187
|
textModel = this._instantiationService.createInstance(TextModel, '', PLAINTEXT_LANGUAGE_ID, TextModel.DEFAULT_CREATION_OPTIONS, null);
|
|
187
188
|
textModelDisposable = textModel;
|
|
188
189
|
}
|
|
189
|
-
const result = (
|
|
190
|
+
const result = ( element.edit.textEdits.map((edit, idx) => {
|
|
190
191
|
const range = textModel.validateRange(edit.textEdit.textEdit.range);
|
|
191
192
|
const startTokens = textModel.tokenization.getLineTokens(range.startLineNumber);
|
|
192
193
|
let prefixLen = 23;
|
|
@@ -198,30 +199,28 @@ let BulkEditDataSource = class BulkEditDataSource {
|
|
|
198
199
|
for (let idx = endTokens.findTokenIndexAtOffset(range.endColumn - 1); suffixLen < 50 && idx < endTokens.getCount(); idx++) {
|
|
199
200
|
suffixLen += endTokens.getEndOffset(idx) - endTokens.getStartOffset(idx);
|
|
200
201
|
}
|
|
201
|
-
return (
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
);
|
|
214
|
-
})));
|
|
202
|
+
return ( new TextEditElement(element, idx, edit, textModel.getValueInRange(( new Range(
|
|
203
|
+
range.startLineNumber,
|
|
204
|
+
range.startColumn - prefixLen,
|
|
205
|
+
range.startLineNumber,
|
|
206
|
+
range.startColumn
|
|
207
|
+
))), textModel.getValueInRange(range), !edit.textEdit.textEdit.insertAsSnippet ? edit.textEdit.textEdit.text : SnippetParser.asInsertText(edit.textEdit.textEdit.text), textModel.getValueInRange(( new Range(
|
|
208
|
+
range.endLineNumber,
|
|
209
|
+
range.endColumn,
|
|
210
|
+
range.endLineNumber,
|
|
211
|
+
range.endColumn + suffixLen
|
|
212
|
+
)))));
|
|
213
|
+
}));
|
|
215
214
|
textModelDisposable.dispose();
|
|
216
215
|
return result;
|
|
217
216
|
}
|
|
218
217
|
return [];
|
|
219
218
|
}
|
|
220
219
|
};
|
|
221
|
-
BulkEditDataSource = (
|
|
222
|
-
(
|
|
223
|
-
(
|
|
224
|
-
], BulkEditDataSource))
|
|
220
|
+
BulkEditDataSource = ( __decorate([
|
|
221
|
+
( __param(0, ITextModelService)),
|
|
222
|
+
( __param(1, IInstantiationService))
|
|
223
|
+
], BulkEditDataSource));
|
|
225
224
|
class BulkEditSorter {
|
|
226
225
|
compare(a, b) {
|
|
227
226
|
if (a instanceof FileElement && b instanceof FileElement) {
|
|
@@ -234,14 +233,14 @@ class BulkEditSorter {
|
|
|
234
233
|
}
|
|
235
234
|
}
|
|
236
235
|
function compareBulkFileOperations(a, b) {
|
|
237
|
-
return compare((
|
|
236
|
+
return compare(( a.uri.toString()), ( b.uri.toString()));
|
|
238
237
|
}
|
|
239
238
|
let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
240
239
|
constructor(_labelService) {
|
|
241
240
|
this._labelService = _labelService;
|
|
242
241
|
}
|
|
243
242
|
getWidgetAriaLabel() {
|
|
244
|
-
return
|
|
243
|
+
return localize(4095, "Bulk Edit");
|
|
245
244
|
}
|
|
246
245
|
getRole(_element) {
|
|
247
246
|
return 'checkbox';
|
|
@@ -249,101 +248,101 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
|
|
|
249
248
|
getAriaLabel(element) {
|
|
250
249
|
if (element instanceof FileElement) {
|
|
251
250
|
if (element.edit.textEdits.length > 0) {
|
|
252
|
-
if (element.edit.type &
|
|
253
|
-
return
|
|
254
|
-
|
|
251
|
+
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
|
252
|
+
return localize(
|
|
253
|
+
4096,
|
|
255
254
|
"Renaming {0} to {1}, also making text edits",
|
|
256
255
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
257
256
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
258
|
-
)
|
|
257
|
+
);
|
|
259
258
|
}
|
|
260
|
-
else if (element.edit.type &
|
|
261
|
-
return
|
|
262
|
-
|
|
259
|
+
else if (element.edit.type & BulkFileOperationType.Create) {
|
|
260
|
+
return localize(
|
|
261
|
+
4097,
|
|
263
262
|
"Creating {0}, also making text edits",
|
|
264
263
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
265
|
-
)
|
|
264
|
+
);
|
|
266
265
|
}
|
|
267
|
-
else if (element.edit.type &
|
|
268
|
-
return
|
|
269
|
-
|
|
266
|
+
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
267
|
+
return localize(
|
|
268
|
+
4098,
|
|
270
269
|
"Deleting {0}, also making text edits",
|
|
271
270
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
272
|
-
)
|
|
271
|
+
);
|
|
273
272
|
}
|
|
274
273
|
else {
|
|
275
|
-
return
|
|
276
|
-
|
|
274
|
+
return localize(
|
|
275
|
+
4099,
|
|
277
276
|
"{0}, making text edits",
|
|
278
277
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
279
|
-
)
|
|
278
|
+
);
|
|
280
279
|
}
|
|
281
280
|
}
|
|
282
281
|
else {
|
|
283
|
-
if (element.edit.type &
|
|
284
|
-
return
|
|
285
|
-
|
|
282
|
+
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
|
283
|
+
return localize(
|
|
284
|
+
4100,
|
|
286
285
|
"Renaming {0} to {1}",
|
|
287
286
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
288
287
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
289
|
-
)
|
|
288
|
+
);
|
|
290
289
|
}
|
|
291
|
-
else if (element.edit.type &
|
|
292
|
-
return
|
|
293
|
-
|
|
290
|
+
else if (element.edit.type & BulkFileOperationType.Create) {
|
|
291
|
+
return localize(
|
|
292
|
+
4101,
|
|
294
293
|
"Creating {0}",
|
|
295
294
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
296
|
-
)
|
|
295
|
+
);
|
|
297
296
|
}
|
|
298
|
-
else if (element.edit.type &
|
|
299
|
-
return
|
|
300
|
-
|
|
297
|
+
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
298
|
+
return localize(
|
|
299
|
+
4102,
|
|
301
300
|
"Deleting {0}",
|
|
302
301
|
this._labelService.getUriLabel(element.edit.uri, { relative: true })
|
|
303
|
-
)
|
|
302
|
+
);
|
|
304
303
|
}
|
|
305
304
|
}
|
|
306
305
|
}
|
|
307
306
|
if (element instanceof TextEditElement) {
|
|
308
307
|
if (element.selecting.length > 0 && element.inserting.length > 0) {
|
|
309
|
-
return
|
|
310
|
-
|
|
308
|
+
return localize(
|
|
309
|
+
4103,
|
|
311
310
|
"line {0}, replacing {1} with {2}",
|
|
312
311
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
313
312
|
element.selecting,
|
|
314
313
|
element.inserting
|
|
315
|
-
)
|
|
314
|
+
);
|
|
316
315
|
}
|
|
317
316
|
else if (element.selecting.length > 0 && element.inserting.length === 0) {
|
|
318
|
-
return
|
|
319
|
-
|
|
317
|
+
return localize(
|
|
318
|
+
4104,
|
|
320
319
|
"line {0}, removing {1}",
|
|
321
320
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
322
321
|
element.selecting
|
|
323
|
-
)
|
|
322
|
+
);
|
|
324
323
|
}
|
|
325
324
|
else if (element.selecting.length === 0 && element.inserting.length > 0) {
|
|
326
|
-
return
|
|
327
|
-
|
|
325
|
+
return localize(
|
|
326
|
+
4105,
|
|
328
327
|
"line {0}, inserting {1}",
|
|
329
328
|
element.edit.textEdit.textEdit.range.startLineNumber,
|
|
330
329
|
element.selecting
|
|
331
|
-
)
|
|
330
|
+
);
|
|
332
331
|
}
|
|
333
332
|
}
|
|
334
333
|
return null;
|
|
335
334
|
}
|
|
336
335
|
};
|
|
337
|
-
BulkEditAccessibilityProvider = (
|
|
338
|
-
(
|
|
339
|
-
], BulkEditAccessibilityProvider))
|
|
336
|
+
BulkEditAccessibilityProvider = ( __decorate([
|
|
337
|
+
( __param(0, ILabelService))
|
|
338
|
+
], BulkEditAccessibilityProvider));
|
|
340
339
|
class BulkEditIdentityProvider {
|
|
341
340
|
getId(element) {
|
|
342
341
|
if (element instanceof FileElement) {
|
|
343
342
|
return element.edit.uri + (element.parent instanceof CategoryElement ? JSON.stringify(element.parent.category.metadata) : '');
|
|
344
343
|
}
|
|
345
344
|
else if (element instanceof TextEditElement) {
|
|
346
|
-
return (
|
|
345
|
+
return ( element.parent.edit.uri.toString()) + element.idx;
|
|
347
346
|
}
|
|
348
347
|
else {
|
|
349
348
|
return JSON.stringify(element.category.metadata);
|
|
@@ -355,7 +354,7 @@ class CategoryElementTemplate {
|
|
|
355
354
|
container.classList.add('category');
|
|
356
355
|
this.icon = document.createElement('div');
|
|
357
356
|
container.appendChild(this.icon);
|
|
358
|
-
this.label = (
|
|
357
|
+
this.label = ( new IconLabel(container));
|
|
359
358
|
}
|
|
360
359
|
}
|
|
361
360
|
let CategoryElementRenderer = class CategoryElementRenderer {
|
|
@@ -366,9 +365,7 @@ let CategoryElementRenderer = class CategoryElementRenderer {
|
|
|
366
365
|
this.templateId = CategoryElementRenderer_1.id;
|
|
367
366
|
}
|
|
368
367
|
renderTemplate(container) {
|
|
369
|
-
return (
|
|
370
|
-
(new CategoryElementTemplate(container))
|
|
371
|
-
);
|
|
368
|
+
return ( new CategoryElementTemplate(container));
|
|
372
369
|
}
|
|
373
370
|
renderElement(node, _index, template) {
|
|
374
371
|
template.icon.style.setProperty('--background-dark', null);
|
|
@@ -398,14 +395,14 @@ let CategoryElementRenderer = class CategoryElementRenderer {
|
|
|
398
395
|
template.label.dispose();
|
|
399
396
|
}
|
|
400
397
|
};
|
|
401
|
-
CategoryElementRenderer = CategoryElementRenderer_1 = (
|
|
402
|
-
(
|
|
403
|
-
], CategoryElementRenderer))
|
|
398
|
+
CategoryElementRenderer = CategoryElementRenderer_1 = ( __decorate([
|
|
399
|
+
( __param(0, IThemeService))
|
|
400
|
+
], CategoryElementRenderer));
|
|
404
401
|
let FileElementTemplate = class FileElementTemplate {
|
|
405
402
|
constructor(container, resourceLabels, _labelService) {
|
|
406
403
|
this._labelService = _labelService;
|
|
407
|
-
this._disposables = (
|
|
408
|
-
this._localDisposables = (
|
|
404
|
+
this._disposables = ( new DisposableStore());
|
|
405
|
+
this._localDisposables = ( new DisposableStore());
|
|
409
406
|
this._checkbox = document.createElement('input');
|
|
410
407
|
this._checkbox.className = 'edit-checkbox';
|
|
411
408
|
this._checkbox.type = 'checkbox';
|
|
@@ -428,11 +425,11 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
428
425
|
this._localDisposables.add(addDisposableListener(this._checkbox, 'change', () => {
|
|
429
426
|
element.setChecked(this._checkbox.checked);
|
|
430
427
|
}));
|
|
431
|
-
if (element.edit.type &
|
|
428
|
+
if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
|
|
432
429
|
this._label.setResource({
|
|
433
430
|
resource: element.edit.uri,
|
|
434
431
|
name: ( localize(
|
|
435
|
-
|
|
432
|
+
4106,
|
|
436
433
|
"{0} → {1}",
|
|
437
434
|
this._labelService.getUriLabel(element.edit.uri, { relative: true }),
|
|
438
435
|
this._labelService.getUriLabel(element.edit.newUri, { relative: true })
|
|
@@ -440,7 +437,7 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
440
437
|
}, {
|
|
441
438
|
fileDecorations: { colors: true, badges: false }
|
|
442
439
|
});
|
|
443
|
-
this._details.innerText = ( localize(
|
|
440
|
+
this._details.innerText = ( localize(4107, "(renaming)"));
|
|
444
441
|
}
|
|
445
442
|
else {
|
|
446
443
|
const options = {
|
|
@@ -449,11 +446,11 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
449
446
|
fileDecorations: { colors: true, badges: false },
|
|
450
447
|
extraClasses: []
|
|
451
448
|
};
|
|
452
|
-
if (element.edit.type &
|
|
453
|
-
this._details.innerText = ( localize(
|
|
449
|
+
if (element.edit.type & BulkFileOperationType.Create) {
|
|
450
|
+
this._details.innerText = ( localize(4108, "(creating)"));
|
|
454
451
|
}
|
|
455
|
-
else if (element.edit.type &
|
|
456
|
-
this._details.innerText = ( localize(
|
|
452
|
+
else if (element.edit.type & BulkFileOperationType.Delete) {
|
|
453
|
+
this._details.innerText = ( localize(4109, "(deleting)"));
|
|
457
454
|
options.extraClasses.push('delete');
|
|
458
455
|
}
|
|
459
456
|
else {
|
|
@@ -463,9 +460,9 @@ let FileElementTemplate = class FileElementTemplate {
|
|
|
463
460
|
}
|
|
464
461
|
}
|
|
465
462
|
};
|
|
466
|
-
FileElementTemplate = (
|
|
467
|
-
(
|
|
468
|
-
], FileElementTemplate))
|
|
463
|
+
FileElementTemplate = ( __decorate([
|
|
464
|
+
( __param(2, ILabelService))
|
|
465
|
+
], FileElementTemplate));
|
|
469
466
|
let FileElementRenderer = class FileElementRenderer {
|
|
470
467
|
static { FileElementRenderer_1 = this; }
|
|
471
468
|
static { this.id = 'FileElementRenderer'; }
|
|
@@ -475,9 +472,7 @@ let FileElementRenderer = class FileElementRenderer {
|
|
|
475
472
|
this.templateId = FileElementRenderer_1.id;
|
|
476
473
|
}
|
|
477
474
|
renderTemplate(container) {
|
|
478
|
-
return (
|
|
479
|
-
(new FileElementTemplate(container, this._resourceLabels, this._labelService))
|
|
480
|
-
);
|
|
475
|
+
return ( new FileElementTemplate(container, this._resourceLabels, this._labelService));
|
|
481
476
|
}
|
|
482
477
|
renderElement(node, _index, template) {
|
|
483
478
|
template.set(node.element, node.filterData);
|
|
@@ -486,14 +481,14 @@ let FileElementRenderer = class FileElementRenderer {
|
|
|
486
481
|
template.dispose();
|
|
487
482
|
}
|
|
488
483
|
};
|
|
489
|
-
FileElementRenderer = FileElementRenderer_1 = (
|
|
490
|
-
(
|
|
491
|
-
], FileElementRenderer))
|
|
484
|
+
FileElementRenderer = FileElementRenderer_1 = ( __decorate([
|
|
485
|
+
( __param(1, ILabelService))
|
|
486
|
+
], FileElementRenderer));
|
|
492
487
|
let TextEditElementTemplate = class TextEditElementTemplate {
|
|
493
488
|
constructor(container, _themeService) {
|
|
494
489
|
this._themeService = _themeService;
|
|
495
|
-
this._disposables = (
|
|
496
|
-
this._localDisposables = (
|
|
490
|
+
this._disposables = ( new DisposableStore());
|
|
491
|
+
this._localDisposables = ( new DisposableStore());
|
|
497
492
|
container.classList.add('textedit');
|
|
498
493
|
this._checkbox = document.createElement('input');
|
|
499
494
|
this._checkbox.className = 'edit-checkbox';
|
|
@@ -502,7 +497,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
502
497
|
container.appendChild(this._checkbox);
|
|
503
498
|
this._icon = document.createElement('div');
|
|
504
499
|
container.appendChild(this._icon);
|
|
505
|
-
this._label = this._disposables.add((
|
|
500
|
+
this._label = this._disposables.add(( new HighlightedLabel(container)));
|
|
506
501
|
}
|
|
507
502
|
dispose() {
|
|
508
503
|
this._localDisposables.dispose();
|
|
@@ -532,7 +527,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
532
527
|
let title;
|
|
533
528
|
const { metadata } = element.edit.textEdit;
|
|
534
529
|
if (metadata && metadata.description) {
|
|
535
|
-
title = ( localize(
|
|
530
|
+
title = ( localize(4110, "{0} - {1}", metadata.label, metadata.description));
|
|
536
531
|
}
|
|
537
532
|
else if (metadata) {
|
|
538
533
|
title = metadata.label;
|
|
@@ -565,9 +560,9 @@ let TextEditElementTemplate = class TextEditElementTemplate {
|
|
|
565
560
|
this._icon.title = title || '';
|
|
566
561
|
}
|
|
567
562
|
};
|
|
568
|
-
TextEditElementTemplate = (
|
|
569
|
-
(
|
|
570
|
-
], TextEditElementTemplate))
|
|
563
|
+
TextEditElementTemplate = ( __decorate([
|
|
564
|
+
( __param(1, IThemeService))
|
|
565
|
+
], TextEditElementTemplate));
|
|
571
566
|
let TextEditElementRenderer = class TextEditElementRenderer {
|
|
572
567
|
static { TextEditElementRenderer_1 = this; }
|
|
573
568
|
static { this.id = 'TextEditElementRenderer'; }
|
|
@@ -576,18 +571,16 @@ let TextEditElementRenderer = class TextEditElementRenderer {
|
|
|
576
571
|
this.templateId = TextEditElementRenderer_1.id;
|
|
577
572
|
}
|
|
578
573
|
renderTemplate(container) {
|
|
579
|
-
return (
|
|
580
|
-
(new TextEditElementTemplate(container, this._themeService))
|
|
581
|
-
);
|
|
574
|
+
return ( new TextEditElementTemplate(container, this._themeService));
|
|
582
575
|
}
|
|
583
576
|
renderElement({ element }, _index, template) {
|
|
584
577
|
template.set(element);
|
|
585
578
|
}
|
|
586
579
|
disposeTemplate(_template) { }
|
|
587
580
|
};
|
|
588
|
-
TextEditElementRenderer = TextEditElementRenderer_1 = (
|
|
589
|
-
(
|
|
590
|
-
], TextEditElementRenderer))
|
|
581
|
+
TextEditElementRenderer = TextEditElementRenderer_1 = ( __decorate([
|
|
582
|
+
( __param(0, IThemeService))
|
|
583
|
+
], TextEditElementRenderer));
|
|
591
584
|
class BulkEditDelegate {
|
|
592
585
|
getHeight() {
|
|
593
586
|
return 23;
|
package/bulkEdit.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
2
|
-
import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
3
|
-
import { BulkEditService } from './vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js';
|
|
4
|
-
import './vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution.js';
|
|
5
|
-
|
|
6
|
-
function getServiceOverride() {
|
|
7
|
-
return {
|
|
8
|
-
[( IBulkEditService.toString())]: new SyncDescriptor(BulkEditService, [], true)
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { getServiceOverride as default };
|