@codingame/monaco-vscode-explorer-service-override 25.1.1 → 26.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-explorer-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - explorer service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -25,9 +25,24 @@ import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/
|
|
|
25
25
|
var ExplorerService_1;
|
|
26
26
|
const UNDO_REDO_SOURCE = ( new UndoRedoSource());
|
|
27
27
|
let ExplorerService = class ExplorerService {
|
|
28
|
-
static {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
static {
|
|
29
|
+
ExplorerService_1 = this;
|
|
30
|
+
}
|
|
31
|
+
static {
|
|
32
|
+
this.EXPLORER_FILE_CHANGES_REACT_DELAY = 500;
|
|
33
|
+
}
|
|
34
|
+
constructor(
|
|
35
|
+
fileService,
|
|
36
|
+
configurationService,
|
|
37
|
+
contextService,
|
|
38
|
+
clipboardService,
|
|
39
|
+
editorService,
|
|
40
|
+
uriIdentityService,
|
|
41
|
+
bulkEditService,
|
|
42
|
+
progressService,
|
|
43
|
+
hostService,
|
|
44
|
+
filesConfigurationService
|
|
45
|
+
) {
|
|
31
46
|
this.fileService = fileService;
|
|
32
47
|
this.configurationService = configurationService;
|
|
33
48
|
this.contextService = contextService;
|
|
@@ -39,7 +54,7 @@ let ExplorerService = class ExplorerService {
|
|
|
39
54
|
this.filesConfigurationService = filesConfigurationService;
|
|
40
55
|
this.disposables = ( new DisposableStore());
|
|
41
56
|
this.fileChangeEvents = [];
|
|
42
|
-
this.config = this.configurationService.getValue(
|
|
57
|
+
this.config = this.configurationService.getValue("explorer");
|
|
43
58
|
this.model = ( new ExplorerModel(
|
|
44
59
|
this.contextService,
|
|
45
60
|
this.uriIdentityService,
|
|
@@ -86,8 +101,13 @@ let ExplorerService = class ExplorerService {
|
|
|
86
101
|
this.onFileChangesScheduler.schedule();
|
|
87
102
|
}
|
|
88
103
|
}));
|
|
89
|
-
this.disposables.add(
|
|
90
|
-
|
|
104
|
+
this.disposables.add(
|
|
105
|
+
this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e))
|
|
106
|
+
);
|
|
107
|
+
this.disposables.add(Event.any(
|
|
108
|
+
this.fileService.onDidChangeFileSystemProviderRegistrations,
|
|
109
|
+
this.fileService.onDidChangeFileSystemProviderCapabilities
|
|
110
|
+
)(async e => {
|
|
91
111
|
let affected = false;
|
|
92
112
|
this.model.roots.forEach(r => {
|
|
93
113
|
if (r.resource.scheme === e.scheme) {
|
|
@@ -109,12 +129,9 @@ let ExplorerService = class ExplorerService {
|
|
|
109
129
|
this.refresh(false);
|
|
110
130
|
}
|
|
111
131
|
}));
|
|
112
|
-
this.revealExcludeMatcher = ( new ResourceGlobMatcher(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
contextService,
|
|
116
|
-
configurationService
|
|
117
|
-
));
|
|
132
|
+
this.revealExcludeMatcher = ( new ResourceGlobMatcher(uri => getRevealExcludes(configurationService.getValue({
|
|
133
|
+
resource: uri
|
|
134
|
+
})), event => event.affectsConfiguration("explorer.autoRevealExclude"), contextService, configurationService));
|
|
118
135
|
this.disposables.add(this.revealExcludeMatcher);
|
|
119
136
|
}
|
|
120
137
|
get roots() {
|
|
@@ -124,7 +141,7 @@ let ExplorerService = class ExplorerService {
|
|
|
124
141
|
return {
|
|
125
142
|
sortOrder: this.config.sortOrder,
|
|
126
143
|
lexicographicOptions: this.config.sortOrderLexicographicOptions,
|
|
127
|
-
reverse: this.config.sortOrderReverse
|
|
144
|
+
reverse: this.config.sortOrderReverse
|
|
128
145
|
};
|
|
129
146
|
}
|
|
130
147
|
registerView(contextProvider) {
|
|
@@ -142,8 +159,7 @@ let ExplorerService = class ExplorerService {
|
|
|
142
159
|
items.add(child);
|
|
143
160
|
}
|
|
144
161
|
}
|
|
145
|
-
}
|
|
146
|
-
catch {
|
|
162
|
+
} catch {
|
|
147
163
|
return;
|
|
148
164
|
}
|
|
149
165
|
});
|
|
@@ -157,28 +173,30 @@ let ExplorerService = class ExplorerService {
|
|
|
157
173
|
progressOptions = {
|
|
158
174
|
location: location,
|
|
159
175
|
title: options.progressLabel,
|
|
160
|
-
cancellable: edit.length > 1
|
|
176
|
+
cancellable: edit.length > 1
|
|
161
177
|
};
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
178
|
+
} else {
|
|
164
179
|
progressOptions = {
|
|
165
180
|
location: location,
|
|
166
181
|
title: options.progressLabel,
|
|
167
182
|
cancellable: edit.length > 1,
|
|
168
|
-
delay: 500
|
|
183
|
+
delay: 500
|
|
169
184
|
};
|
|
170
185
|
}
|
|
171
|
-
const promise = this.progressService.withProgress(progressOptions, async
|
|
186
|
+
const promise = this.progressService.withProgress(progressOptions, async progress => {
|
|
172
187
|
await this.bulkEditService.apply(edit, {
|
|
173
188
|
undoRedoSource: UNDO_REDO_SOURCE,
|
|
174
189
|
label: options.undoLabel,
|
|
175
|
-
code:
|
|
190
|
+
code: "undoredo.explorerOperation",
|
|
176
191
|
progress,
|
|
177
192
|
token: cancellationTokenSource.token,
|
|
178
193
|
confirmBeforeUndo: options.confirmBeforeUndo
|
|
179
194
|
});
|
|
180
195
|
}, () => cancellationTokenSource.cancel());
|
|
181
|
-
await this.progressService.withProgress({
|
|
196
|
+
await this.progressService.withProgress({
|
|
197
|
+
location: ProgressLocation.Explorer,
|
|
198
|
+
delay: 500
|
|
199
|
+
}, () => promise);
|
|
182
200
|
cancellationTokenSource.dispose();
|
|
183
201
|
}
|
|
184
202
|
hasViewFocus() {
|
|
@@ -188,8 +206,9 @@ let ExplorerService = class ExplorerService {
|
|
|
188
206
|
return this.model.findClosest(resource);
|
|
189
207
|
}
|
|
190
208
|
findClosestRoot(resource) {
|
|
191
|
-
const parentRoots = this.model.roots.filter(r => this.uriIdentityService.extUri.isEqualOrParent(resource, r.resource))
|
|
192
|
-
|
|
209
|
+
const parentRoots = this.model.roots.filter(r => this.uriIdentityService.extUri.isEqualOrParent(resource, r.resource)).sort(
|
|
210
|
+
(first, second) => second.resource.path.length - first.resource.path.length
|
|
211
|
+
);
|
|
193
212
|
return parentRoots.length ? parentRoots[0] : null;
|
|
194
213
|
}
|
|
195
214
|
async setEditable(stat, data) {
|
|
@@ -198,15 +217,16 @@ let ExplorerService = class ExplorerService {
|
|
|
198
217
|
}
|
|
199
218
|
if (!data) {
|
|
200
219
|
this.editable = undefined;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
220
|
+
} else {
|
|
221
|
+
this.editable = {
|
|
222
|
+
stat,
|
|
223
|
+
data
|
|
224
|
+
};
|
|
204
225
|
}
|
|
205
226
|
const isEditing = this.isEditable(stat);
|
|
206
227
|
try {
|
|
207
228
|
await this.view.setEditable(stat, isEditing);
|
|
208
|
-
}
|
|
209
|
-
catch {
|
|
229
|
+
} catch {
|
|
210
230
|
return;
|
|
211
231
|
}
|
|
212
232
|
if (!this.editable && this.fileChangeEvents.length && !this.onFileChangesScheduler.isScheduled()) {
|
|
@@ -235,7 +255,7 @@ let ExplorerService = class ExplorerService {
|
|
|
235
255
|
if (!this.view) {
|
|
236
256
|
return;
|
|
237
257
|
}
|
|
238
|
-
const ignoreRevealExcludes = reveal ===
|
|
258
|
+
const ignoreRevealExcludes = reveal === "force";
|
|
239
259
|
const fileStat = this.findClosest(resource);
|
|
240
260
|
if (fileStat) {
|
|
241
261
|
if (!this.shouldAutoRevealItem(fileStat, ignoreRevealExcludes)) {
|
|
@@ -244,14 +264,24 @@ let ExplorerService = class ExplorerService {
|
|
|
244
264
|
await this.view.selectResource(fileStat.resource, reveal);
|
|
245
265
|
return Promise.resolve(undefined);
|
|
246
266
|
}
|
|
247
|
-
const options = {
|
|
267
|
+
const options = {
|
|
268
|
+
resolveTo: [resource],
|
|
269
|
+
resolveMetadata: this.config.sortOrder === SortOrder.Modified
|
|
270
|
+
};
|
|
248
271
|
const root = this.findClosestRoot(resource);
|
|
249
272
|
if (!root) {
|
|
250
273
|
return undefined;
|
|
251
274
|
}
|
|
252
275
|
try {
|
|
253
276
|
const stat = await this.fileService.resolve(root.resource, options);
|
|
254
|
-
const modelStat = ExplorerItem.create(
|
|
277
|
+
const modelStat = ExplorerItem.create(
|
|
278
|
+
this.fileService,
|
|
279
|
+
this.configurationService,
|
|
280
|
+
this.filesConfigurationService,
|
|
281
|
+
stat,
|
|
282
|
+
undefined,
|
|
283
|
+
options.resolveTo
|
|
284
|
+
);
|
|
255
285
|
ExplorerItem.mergeLocalWithDisk(modelStat, root);
|
|
256
286
|
const item = root.find(resource);
|
|
257
287
|
await this.view.refresh(true, root);
|
|
@@ -259,8 +289,7 @@ let ExplorerService = class ExplorerService {
|
|
|
259
289
|
return;
|
|
260
290
|
}
|
|
261
291
|
await this.view.selectResource(item ? item.resource : undefined, reveal);
|
|
262
|
-
}
|
|
263
|
-
catch (error) {
|
|
292
|
+
} catch (error) {
|
|
264
293
|
root.error = error;
|
|
265
294
|
await this.view.refresh(false, root);
|
|
266
295
|
}
|
|
@@ -286,16 +315,30 @@ let ExplorerService = class ExplorerService {
|
|
|
286
315
|
const parentResource = dirname(addedElement.resource);
|
|
287
316
|
const parents = this.model.findAll(parentResource);
|
|
288
317
|
if (parents.length) {
|
|
289
|
-
await Promise.all(( parents.map(async
|
|
318
|
+
await Promise.all(( parents.map(async p => {
|
|
290
319
|
const resolveMetadata = this.config.sortOrder === `modified`;
|
|
291
320
|
if (!p.isDirectoryResolved) {
|
|
292
|
-
const stat = await this.fileService.resolve(p.resource, {
|
|
321
|
+
const stat = await this.fileService.resolve(p.resource, {
|
|
322
|
+
resolveMetadata
|
|
323
|
+
});
|
|
293
324
|
if (stat) {
|
|
294
|
-
const modelStat = ExplorerItem.create(
|
|
325
|
+
const modelStat = ExplorerItem.create(
|
|
326
|
+
this.fileService,
|
|
327
|
+
this.configurationService,
|
|
328
|
+
this.filesConfigurationService,
|
|
329
|
+
stat,
|
|
330
|
+
p.parent
|
|
331
|
+
);
|
|
295
332
|
ExplorerItem.mergeLocalWithDisk(modelStat, p);
|
|
296
333
|
}
|
|
297
334
|
}
|
|
298
|
-
const childElement = ExplorerItem.create(
|
|
335
|
+
const childElement = ExplorerItem.create(
|
|
336
|
+
this.fileService,
|
|
337
|
+
this.configurationService,
|
|
338
|
+
this.filesConfigurationService,
|
|
339
|
+
addedElement,
|
|
340
|
+
p.parent
|
|
341
|
+
);
|
|
299
342
|
p.removeChild(childElement);
|
|
300
343
|
p.addChild(childElement);
|
|
301
344
|
await this.view?.refresh(shouldDeepRefresh, p);
|
|
@@ -310,7 +353,7 @@ let ExplorerService = class ExplorerService {
|
|
|
310
353
|
const modelElements = this.model.findAll(oldResource);
|
|
311
354
|
const sameParentMove = modelElements.every(e => !e.nestedParent) && this.uriIdentityService.extUri.isEqual(oldParentResource, newParentResource);
|
|
312
355
|
if (sameParentMove) {
|
|
313
|
-
await Promise.all(( modelElements.map(async
|
|
356
|
+
await Promise.all(( modelElements.map(async modelElement => {
|
|
314
357
|
modelElement.rename(newElement);
|
|
315
358
|
await this.view?.refresh(shouldDeepRefresh, modelElement.parent);
|
|
316
359
|
})));
|
|
@@ -333,7 +376,7 @@ let ExplorerService = class ExplorerService {
|
|
|
333
376
|
}
|
|
334
377
|
else if (e.isOperation(FileOperation.DELETE)) {
|
|
335
378
|
const modelElements = this.model.findAll(e.resource);
|
|
336
|
-
await Promise.all(( modelElements.map(async
|
|
379
|
+
await Promise.all(( modelElements.map(async modelElement => {
|
|
337
380
|
if (modelElement.parent) {
|
|
338
381
|
const parent = modelElement.parent;
|
|
339
382
|
parent.removeChild(modelElement);
|
|
@@ -372,11 +415,11 @@ let ExplorerService = class ExplorerService {
|
|
|
372
415
|
return true;
|
|
373
416
|
}
|
|
374
417
|
async onConfigurationUpdated(event) {
|
|
375
|
-
if (!event.affectsConfiguration(
|
|
418
|
+
if (!event.affectsConfiguration("explorer")) {
|
|
376
419
|
return;
|
|
377
420
|
}
|
|
378
421
|
let shouldRefresh = false;
|
|
379
|
-
if (event.affectsConfiguration(
|
|
422
|
+
if (event.affectsConfiguration("explorer.fileNesting")) {
|
|
380
423
|
shouldRefresh = true;
|
|
381
424
|
}
|
|
382
425
|
const configuration = this.configurationService.getValue();
|
|
@@ -401,18 +444,7 @@ let ExplorerService = class ExplorerService {
|
|
|
401
444
|
this.disposables.dispose();
|
|
402
445
|
}
|
|
403
446
|
};
|
|
404
|
-
ExplorerService = ExplorerService_1 = ( __decorate([
|
|
405
|
-
( __param(0, IFileService)),
|
|
406
|
-
( __param(1, IConfigurationService)),
|
|
407
|
-
( __param(2, IWorkspaceContextService)),
|
|
408
|
-
( __param(3, IClipboardService)),
|
|
409
|
-
( __param(4, IEditorService)),
|
|
410
|
-
( __param(5, IUriIdentityService)),
|
|
411
|
-
( __param(6, IBulkEditService)),
|
|
412
|
-
( __param(7, IProgressService)),
|
|
413
|
-
( __param(8, IHostService)),
|
|
414
|
-
( __param(9, IFilesConfigurationService))
|
|
415
|
-
], ExplorerService));
|
|
447
|
+
ExplorerService = ExplorerService_1 = ( __decorate([( __param(0, IFileService)), ( __param(1, IConfigurationService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IClipboardService)), ( __param(4, IEditorService)), ( __param(5, IUriIdentityService)), ( __param(6, IBulkEditService)), ( __param(7, IProgressService)), ( __param(8, IHostService)), ( __param(9, IFilesConfigurationService))], ExplorerService));
|
|
416
448
|
function doesFileEventAffect(item, view, events, types) {
|
|
417
449
|
for (const [_name, child] of item.children) {
|
|
418
450
|
if (view.isItemVisible(child)) {
|
|
@@ -15,357 +15,329 @@ import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/f
|
|
|
15
15
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/files.contribution._fileEditorFactory';
|
|
16
16
|
import { IExplorerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/files.service';
|
|
17
17
|
|
|
18
|
-
registerWorkbenchContribution2(
|
|
18
|
+
registerWorkbenchContribution2(
|
|
19
|
+
ExplorerViewletViewsContribution.ID,
|
|
20
|
+
ExplorerViewletViewsContribution,
|
|
21
|
+
WorkbenchPhase.BlockStartup
|
|
22
|
+
);
|
|
19
23
|
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
20
24
|
configurationRegistry.registerConfiguration({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
"id": "explorer",
|
|
26
|
+
"order": 10,
|
|
27
|
+
"title": ( localize(8473, "File Explorer")),
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"explorer.openEditors.visible": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"description": ( localize(
|
|
33
|
+
8474,
|
|
30
34
|
"The initial maximum number of editors shown in the Open Editors pane. Exceeding this limit will show a scroll bar and allow resizing the pane to display more items."
|
|
31
35
|
)),
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
"default": 9,
|
|
37
|
+
"minimum": 1
|
|
34
38
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
"explorer.openEditors.minVisible": {
|
|
40
|
+
"type": "number",
|
|
41
|
+
"description": ( localize(
|
|
42
|
+
8475,
|
|
39
43
|
"The minimum number of editor slots pre-allocated in the Open Editors pane. If set to 0 the Open Editors pane will dynamically resize based on the number of editors."
|
|
40
44
|
)),
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
"default": 0,
|
|
46
|
+
"minimum": 0
|
|
43
47
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'Editors are ordered alphabetically by full path inside each editor group.'
|
|
57
|
-
))
|
|
58
|
-
],
|
|
59
|
-
'default': 'editorOrder'
|
|
48
|
+
"explorer.openEditors.sortOrder": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": ["editorOrder", "alphabetical", "fullPath"],
|
|
51
|
+
"description": ( localize(8476, "Controls the sorting order of editors in the Open Editors pane.")),
|
|
52
|
+
"enumDescriptions": [( localize(8477, "Editors are ordered in the same order editor tabs are shown.")), ( localize(
|
|
53
|
+
8478,
|
|
54
|
+
"Editors are ordered alphabetically by tab name inside each editor group."
|
|
55
|
+
)), ( localize(
|
|
56
|
+
8479,
|
|
57
|
+
"Editors are ordered alphabetically by full path inside each editor group."
|
|
58
|
+
))],
|
|
59
|
+
"default": "editorOrder"
|
|
60
60
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
( localize(8170, 'Files will not be scrolled into view, but will still be focused.')),
|
|
69
|
-
],
|
|
70
|
-
'description': ( localize(
|
|
71
|
-
8171,
|
|
61
|
+
"explorer.autoReveal": {
|
|
62
|
+
"type": ["boolean", "string"],
|
|
63
|
+
"enum": [true, false, "focusNoScroll"],
|
|
64
|
+
"default": true,
|
|
65
|
+
"enumDescriptions": [( localize(8480, "Files will be revealed and selected.")), ( localize(8481, "Files will not be revealed and selected.")), ( localize(8482, "Files will not be scrolled into view, but will still be focused."))],
|
|
66
|
+
"description": ( localize(
|
|
67
|
+
8483,
|
|
72
68
|
"Controls whether the Explorer should automatically reveal and select files when opening them."
|
|
73
69
|
))
|
|
74
70
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
"explorer.autoRevealExclude": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"markdownDescription": ( localize(
|
|
74
|
+
8484,
|
|
79
75
|
"Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) for excluding files and folders from being revealed and selected in the Explorer when they are opened. Glob patterns are always evaluated relative to the path of the workspace folder unless they are absolute paths."
|
|
80
76
|
)),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
)
|
|
102
|
-
|
|
77
|
+
"default": {
|
|
78
|
+
"**/node_modules": true,
|
|
79
|
+
"**/bower_components": true
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": {
|
|
82
|
+
"anyOf": [{
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"description": ( localize(
|
|
85
|
+
8485,
|
|
86
|
+
"The glob pattern to match file paths against. Set to true or false to enable or disable the pattern."
|
|
87
|
+
))
|
|
88
|
+
}, {
|
|
89
|
+
type: "object",
|
|
90
|
+
properties: {
|
|
91
|
+
when: {
|
|
92
|
+
type: "string",
|
|
93
|
+
pattern: "\\w*\\$\\(basename\\)\\w*",
|
|
94
|
+
default: "$(basename).ext",
|
|
95
|
+
description: ( localize(
|
|
96
|
+
8486,
|
|
97
|
+
"Additional check on the siblings of a matching file. Use $(basename) as variable for the matching file name."
|
|
98
|
+
))
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
|
-
]
|
|
101
|
+
}]
|
|
106
102
|
}
|
|
107
103
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
104
|
+
"explorer.enableDragAndDrop": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"description": ( localize(
|
|
107
|
+
8487,
|
|
112
108
|
"Controls whether the Explorer should allow to move files and folders via drag and drop. This setting only effects drag and drop from inside the Explorer."
|
|
113
109
|
)),
|
|
114
|
-
|
|
110
|
+
"default": true
|
|
115
111
|
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
"explorer.confirmDragAndDrop": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"description": ( localize(
|
|
115
|
+
8488,
|
|
120
116
|
"Controls whether the Explorer should ask for confirmation to move files and folders via drag and drop."
|
|
121
117
|
)),
|
|
122
|
-
|
|
118
|
+
"default": true
|
|
123
119
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
120
|
+
"explorer.confirmPasteNative": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"description": ( localize(
|
|
123
|
+
8489,
|
|
128
124
|
"Controls whether the Explorer should ask for confirmation when pasting native files and folders."
|
|
129
125
|
)),
|
|
130
|
-
|
|
126
|
+
"default": true
|
|
131
127
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
"explorer.confirmDelete": {
|
|
129
|
+
"type": "boolean",
|
|
130
|
+
"description": ( localize(
|
|
131
|
+
8490,
|
|
136
132
|
"Controls whether the Explorer should ask for confirmation when deleting files and folders."
|
|
137
133
|
)),
|
|
138
|
-
|
|
134
|
+
"default": true
|
|
139
135
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
"explorer.enableUndo": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": ( localize(
|
|
139
|
+
8491,
|
|
144
140
|
"Controls whether the Explorer should support undoing file and folder operations."
|
|
145
141
|
)),
|
|
146
|
-
|
|
142
|
+
"default": true
|
|
147
143
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
"explorer.confirmUndo": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [UndoConfirmLevel.Verbose, UndoConfirmLevel.Default, UndoConfirmLevel.Light],
|
|
147
|
+
"description": ( localize(
|
|
148
|
+
8492,
|
|
153
149
|
"Controls whether the Explorer should ask for confirmation when undoing."
|
|
154
150
|
)),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
( localize(8181, 'Explorer will prompt before all undo operations.')),
|
|
158
|
-
( localize(8182, 'Explorer will prompt before destructive undo operations.')),
|
|
159
|
-
( localize(8183, 'Explorer will not prompt before undo operations when focused.')),
|
|
160
|
-
],
|
|
151
|
+
"default": UndoConfirmLevel.Default,
|
|
152
|
+
"enumDescriptions": [( localize(8493, "Explorer will prompt before all undo operations.")), ( localize(8494, "Explorer will prompt before destructive undo operations.")), ( localize(8495, "Explorer will not prompt before undo operations when focused."))]
|
|
161
153
|
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
154
|
+
"explorer.expandSingleFolderWorkspaces": {
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"description": ( localize(
|
|
157
|
+
8496,
|
|
166
158
|
"Controls whether the Explorer should expand multi-root workspaces containing only one folder during initialization"
|
|
167
159
|
)),
|
|
168
|
-
|
|
160
|
+
"default": true
|
|
169
161
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
( localize(
|
|
180
|
-
8186,
|
|
181
|
-
'Files and folders are sorted by their names. Files are interwoven with folders.'
|
|
182
|
-
)),
|
|
183
|
-
( localize(
|
|
184
|
-
8187,
|
|
185
|
-
'Files and folders are sorted by their names. Files are displayed before folders.'
|
|
186
|
-
)),
|
|
187
|
-
( localize(
|
|
188
|
-
8188,
|
|
189
|
-
'Files and folders are grouped by extension type then sorted by their names. Folders are displayed before files.'
|
|
190
|
-
)),
|
|
191
|
-
( localize(
|
|
192
|
-
8189,
|
|
193
|
-
'Files and folders are sorted by last modified date in descending order. Folders are displayed before files.'
|
|
194
|
-
)),
|
|
195
|
-
( localize(
|
|
196
|
-
8190,
|
|
197
|
-
'Files and folders are sorted by their names. Folders are displayed before files. Files with nested children are displayed before other files.'
|
|
198
|
-
))
|
|
162
|
+
"explorer.sortOrder": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"enum": [
|
|
165
|
+
SortOrder.Default,
|
|
166
|
+
SortOrder.Mixed,
|
|
167
|
+
SortOrder.FilesFirst,
|
|
168
|
+
SortOrder.Type,
|
|
169
|
+
SortOrder.Modified,
|
|
170
|
+
SortOrder.FoldersNestsFiles
|
|
199
171
|
],
|
|
200
|
-
|
|
201
|
-
|
|
172
|
+
"default": SortOrder.Default,
|
|
173
|
+
"enumDescriptions": [( localize(
|
|
174
|
+
8497,
|
|
175
|
+
"Files and folders are sorted by their names. Folders are displayed before files."
|
|
176
|
+
)), ( localize(
|
|
177
|
+
8498,
|
|
178
|
+
"Files and folders are sorted by their names. Files are interwoven with folders."
|
|
179
|
+
)), ( localize(
|
|
180
|
+
8499,
|
|
181
|
+
"Files and folders are sorted by their names. Files are displayed before folders."
|
|
182
|
+
)), ( localize(
|
|
183
|
+
8500,
|
|
184
|
+
"Files and folders are grouped by extension type then sorted by their names. Folders are displayed before files."
|
|
185
|
+
)), ( localize(
|
|
186
|
+
8501,
|
|
187
|
+
"Files and folders are sorted by last modified date in descending order. Folders are displayed before files."
|
|
188
|
+
)), ( localize(
|
|
189
|
+
8502,
|
|
190
|
+
"Files and folders are sorted by their names. Folders are displayed before files. Files with nested children are displayed before other files."
|
|
191
|
+
))],
|
|
192
|
+
"markdownDescription": ( localize(
|
|
193
|
+
8503,
|
|
202
194
|
"Controls the property-based sorting of files and folders in the Explorer. When `#explorer.fileNesting.enabled#` is enabled, also controls sorting of nested files."
|
|
203
195
|
))
|
|
204
196
|
},
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
( localize(8194, 'Lowercase names are grouped together before uppercase names.')),
|
|
213
|
-
( localize(8195, 'Names are sorted in Unicode order.'))
|
|
197
|
+
"explorer.sortOrderLexicographicOptions": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"enum": [
|
|
200
|
+
LexicographicOptions.Default,
|
|
201
|
+
LexicographicOptions.Upper,
|
|
202
|
+
LexicographicOptions.Lower,
|
|
203
|
+
LexicographicOptions.Unicode
|
|
214
204
|
],
|
|
215
|
-
|
|
216
|
-
|
|
205
|
+
"default": LexicographicOptions.Default,
|
|
206
|
+
"enumDescriptions": [( localize(8504, "Uppercase and lowercase names are mixed together.")), ( localize(8505, "Uppercase names are grouped together before lowercase names.")), ( localize(8506, "Lowercase names are grouped together before uppercase names.")), ( localize(8507, "Names are sorted in Unicode order."))],
|
|
207
|
+
"description": ( localize(
|
|
208
|
+
8508,
|
|
217
209
|
"Controls the lexicographic sorting of file and folder names in the Explorer."
|
|
218
210
|
))
|
|
219
211
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
212
|
+
"explorer.sortOrderReverse": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"description": ( localize(
|
|
215
|
+
8509,
|
|
224
216
|
"Controls whether the file and folder sort order, should be reversed."
|
|
225
217
|
)),
|
|
226
|
-
|
|
218
|
+
"default": false
|
|
227
219
|
},
|
|
228
|
-
|
|
229
|
-
type:
|
|
230
|
-
description: ( localize(
|
|
220
|
+
"explorer.decorations.colors": {
|
|
221
|
+
type: "boolean",
|
|
222
|
+
description: ( localize(8510, "Controls whether file decorations should use colors.")),
|
|
231
223
|
default: true
|
|
232
224
|
},
|
|
233
|
-
|
|
234
|
-
type:
|
|
235
|
-
description: ( localize(
|
|
225
|
+
"explorer.decorations.badges": {
|
|
226
|
+
type: "boolean",
|
|
227
|
+
description: ( localize(8511, "Controls whether file decorations should use badges.")),
|
|
236
228
|
default: true
|
|
237
229
|
},
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
enum: [
|
|
241
|
-
enumDescriptions: [
|
|
242
|
-
|
|
243
|
-
8200,
|
|
230
|
+
"explorer.incrementalNaming": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
enum: ["simple", "smart", "disabled"],
|
|
233
|
+
enumDescriptions: [( localize(
|
|
234
|
+
8512,
|
|
244
235
|
"Appends the word \"copy\" at the end of the duplicated name potentially followed by a number."
|
|
245
|
-
)),
|
|
246
|
-
|
|
247
|
-
8201,
|
|
236
|
+
)), ( localize(
|
|
237
|
+
8513,
|
|
248
238
|
"Adds a number at the end of the duplicated name. If some number is already part of the name, tries to increase that number."
|
|
249
|
-
)),
|
|
250
|
-
|
|
251
|
-
8202,
|
|
239
|
+
)), ( localize(
|
|
240
|
+
8514,
|
|
252
241
|
"Disables incremental naming. If two files with the same name exist you will be prompted to overwrite the existing file."
|
|
253
|
-
))
|
|
254
|
-
],
|
|
242
|
+
))],
|
|
255
243
|
description: ( localize(
|
|
256
|
-
|
|
244
|
+
8515,
|
|
257
245
|
"Controls which naming strategy to use when giving a new name to a duplicated Explorer item on paste."
|
|
258
246
|
)),
|
|
259
|
-
default:
|
|
247
|
+
default: "simple"
|
|
260
248
|
},
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
249
|
+
"explorer.autoOpenDroppedFile": {
|
|
250
|
+
"type": "boolean",
|
|
251
|
+
"description": ( localize(
|
|
252
|
+
8516,
|
|
265
253
|
"Controls whether the Explorer should automatically open a file when it is dropped into the explorer"
|
|
266
254
|
)),
|
|
267
|
-
|
|
255
|
+
"default": true
|
|
268
256
|
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
257
|
+
"explorer.compactFolders": {
|
|
258
|
+
"type": "boolean",
|
|
259
|
+
"description": ( localize(
|
|
260
|
+
8517,
|
|
273
261
|
"Controls whether the Explorer should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element. Useful for Java package structures, for example."
|
|
274
262
|
)),
|
|
275
|
-
|
|
263
|
+
"default": true
|
|
276
264
|
},
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
],
|
|
284
|
-
'enumDescriptions': [
|
|
285
|
-
( localize(8206, "Use slash as path separation character.")),
|
|
286
|
-
( localize(8207, "Use backslash as path separation character.")),
|
|
287
|
-
( localize(8208, "Uses operating system specific path separation character.")),
|
|
288
|
-
],
|
|
289
|
-
'description': ( localize(
|
|
290
|
-
8209,
|
|
265
|
+
"explorer.copyRelativePathSeparator": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"enum": ["/", "\\", "auto"],
|
|
268
|
+
"enumDescriptions": [( localize(8518, "Use slash as path separation character.")), ( localize(8519, "Use backslash as path separation character.")), ( localize(8520, "Uses operating system specific path separation character."))],
|
|
269
|
+
"description": ( localize(
|
|
270
|
+
8521,
|
|
291
271
|
"The path separation character used when copying relative file paths."
|
|
292
272
|
)),
|
|
293
|
-
|
|
273
|
+
"default": "auto"
|
|
294
274
|
},
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
],
|
|
302
|
-
'enumDescriptions': [
|
|
303
|
-
( localize(8210, "Use slash as path separation character.")),
|
|
304
|
-
( localize(8211, "Use backslash as path separation character.")),
|
|
305
|
-
( localize(8212, "Uses operating system specific path separation character.")),
|
|
306
|
-
],
|
|
307
|
-
'description': ( localize(8213, "The path separation character used when copying file paths.")),
|
|
308
|
-
'default': 'auto'
|
|
275
|
+
"explorer.copyPathSeparator": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"enum": ["/", "\\", "auto"],
|
|
278
|
+
"enumDescriptions": [( localize(8522, "Use slash as path separation character.")), ( localize(8523, "Use backslash as path separation character.")), ( localize(8524, "Uses operating system specific path separation character."))],
|
|
279
|
+
"description": ( localize(8525, "The path separation character used when copying file paths.")),
|
|
280
|
+
"default": "auto"
|
|
309
281
|
},
|
|
310
|
-
|
|
311
|
-
type:
|
|
282
|
+
"explorer.excludeGitIgnore": {
|
|
283
|
+
type: "boolean",
|
|
312
284
|
markdownDescription: ( localize(
|
|
313
|
-
|
|
285
|
+
8526,
|
|
314
286
|
"Controls whether entries in .gitignore should be parsed and excluded from the Explorer. Similar to {0}.",
|
|
315
|
-
|
|
287
|
+
"`#files.exclude#`"
|
|
316
288
|
)),
|
|
317
289
|
default: false,
|
|
318
290
|
scope: ConfigurationScope.RESOURCE
|
|
319
291
|
},
|
|
320
|
-
|
|
321
|
-
|
|
292
|
+
"explorer.fileNesting.enabled": {
|
|
293
|
+
"type": "boolean",
|
|
322
294
|
scope: ConfigurationScope.RESOURCE,
|
|
323
|
-
|
|
324
|
-
|
|
295
|
+
"markdownDescription": ( localize(
|
|
296
|
+
8527,
|
|
325
297
|
"Controls whether file nesting is enabled in the Explorer. File nesting allows for related files in a directory to be visually grouped together under a single parent file."
|
|
326
298
|
)),
|
|
327
|
-
|
|
299
|
+
"default": false
|
|
328
300
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
301
|
+
"explorer.fileNesting.expand": {
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"markdownDescription": ( localize(
|
|
304
|
+
8528,
|
|
333
305
|
"Controls whether file nests are automatically expanded. {0} must be set for this to take effect.",
|
|
334
|
-
|
|
306
|
+
"`#explorer.fileNesting.enabled#`"
|
|
335
307
|
)),
|
|
336
|
-
|
|
308
|
+
"default": true
|
|
337
309
|
},
|
|
338
|
-
|
|
339
|
-
|
|
310
|
+
"explorer.fileNesting.patterns": {
|
|
311
|
+
"type": "object",
|
|
340
312
|
scope: ConfigurationScope.RESOURCE,
|
|
341
|
-
|
|
342
|
-
|
|
313
|
+
"markdownDescription": ( localize(
|
|
314
|
+
8529,
|
|
343
315
|
"Controls nesting of files in the Explorer. {0} must be set for this to take effect. Each __Item__ represents a parent pattern and may contain a single `*` character that matches any string. Each __Value__ represents a comma separated list of the child patterns that should be shown nested under a given parent. Child patterns may contain several special tokens:\n- `${capture}`: Matches the resolved value of the `*` from the parent pattern\n- `${basename}`: Matches the parent file's basename, the `file` in `file.ts`\n- `${extname}`: Matches the parent file's extension, the `ts` in `file.ts`\n- `${dirname}`: Matches the parent file's directory name, the `src` in `src/file.ts`\n- `*`: Matches any string, may only be used once per child pattern",
|
|
344
|
-
|
|
316
|
+
"`#explorer.fileNesting.enabled#`"
|
|
345
317
|
)),
|
|
346
318
|
patternProperties: {
|
|
347
|
-
|
|
319
|
+
"^[^*]*\\*?[^*]*$": {
|
|
348
320
|
markdownDescription: ( localize(
|
|
349
|
-
|
|
321
|
+
8530,
|
|
350
322
|
"Each key pattern may contain a single `*` character which will match any string."
|
|
351
323
|
)),
|
|
352
|
-
type:
|
|
353
|
-
pattern:
|
|
324
|
+
type: "string",
|
|
325
|
+
pattern: "^([^,*]*\\*?[^,*]*)(, ?[^,*]*\\*?[^,*]*)*$"
|
|
354
326
|
}
|
|
355
327
|
},
|
|
356
328
|
additionalProperties: false,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
329
|
+
"default": {
|
|
330
|
+
"*.ts": "${capture}.js",
|
|
331
|
+
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
|
|
332
|
+
"*.jsx": "${capture}.js",
|
|
333
|
+
"*.tsx": "${capture}.ts",
|
|
334
|
+
"tsconfig.json": "tsconfig.*.json",
|
|
335
|
+
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock"
|
|
364
336
|
}
|
|
365
337
|
}
|
|
366
338
|
}
|
|
367
339
|
});
|
|
368
|
-
UndoCommand.addImplementation(110,
|
|
340
|
+
UndoCommand.addImplementation(110, "explorer", accessor => {
|
|
369
341
|
const undoRedoService = accessor.get(IUndoRedoService);
|
|
370
342
|
const explorerService = accessor.get(IExplorerService);
|
|
371
343
|
const configurationService = accessor.get(IConfigurationService);
|
|
@@ -376,7 +348,7 @@ UndoCommand.addImplementation(110, 'explorer', (accessor) => {
|
|
|
376
348
|
}
|
|
377
349
|
return false;
|
|
378
350
|
});
|
|
379
|
-
RedoCommand.addImplementation(110,
|
|
351
|
+
RedoCommand.addImplementation(110, "explorer", accessor => {
|
|
380
352
|
const undoRedoService = accessor.get(IUndoRedoService);
|
|
381
353
|
const explorerService = accessor.get(IExplorerService);
|
|
382
354
|
const configurationService = accessor.get(IConfigurationService);
|