@codingame/monaco-vscode-timeline-service-override 23.2.2 → 24.1.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 -7
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryCommands.js +35 -35
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryTimeline.js +3 -3
- package/vscode/src/vs/workbench/contrib/timeline/browser/timeline.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/timeline/browser/timelinePane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/timeline/browser/timelinePane.js +24 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-timeline-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - timeline service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,12 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "23.2.2",
|
|
20
|
-
"@codingame/monaco-vscode-af7aa6ff-f023-5da1-803d-a085ef0e5dc3-common": "23.2.2",
|
|
21
|
-
"@codingame/monaco-vscode-api": "23.2.2",
|
|
22
|
-
"@codingame/monaco-vscode-b71b5434-ce96-5581-8993-e8da380bd63f-common": "23.2.2",
|
|
23
|
-
"@codingame/monaco-vscode-f24e325c-2ce0-5bba-8236-bfc4f53180ab-common": "23.2.2"
|
|
18
|
+
"@codingame/monaco-vscode-api": "24.1.0"
|
|
24
19
|
},
|
|
25
20
|
"main": "index.js",
|
|
26
21
|
"module": "index.js",
|
|
@@ -6,7 +6,7 @@ import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/netw
|
|
|
6
6
|
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
7
7
|
import { CancellationToken, CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
8
8
|
import { IWorkingCopyHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyHistory.service';
|
|
9
|
-
import { API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-
|
|
9
|
+
import { API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
10
10
|
import { LocalHistoryFileSystemProvider } from './localHistoryFileSystemProvider.js';
|
|
11
11
|
import { ContextKeyExpr, RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
12
12
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -25,15 +25,15 @@ import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/com
|
|
|
25
25
|
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
26
26
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
27
27
|
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
28
|
-
import { LOCAL_HISTORY_MENU_CONTEXT_KEY, LOCAL_HISTORY_ICON_RESTORE, getLocalHistoryDateFormatter } from '@codingame/monaco-vscode-
|
|
28
|
+
import { LOCAL_HISTORY_MENU_CONTEXT_KEY, LOCAL_HISTORY_ICON_RESTORE, getLocalHistoryDateFormatter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/localHistory/browser/localHistory';
|
|
29
29
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
30
30
|
import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
31
31
|
import { IHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service';
|
|
32
32
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
33
33
|
|
|
34
|
-
const LOCAL_HISTORY_CATEGORY = ( localize2(
|
|
34
|
+
const LOCAL_HISTORY_CATEGORY = ( localize2(8508, 'Local History'));
|
|
35
35
|
const CTX_LOCAL_HISTORY_ENABLED = ( ContextKeyExpr.has('config.workbench.localHistory.enabled'));
|
|
36
|
-
const COMPARE_WITH_FILE_LABEL = ( localize2(
|
|
36
|
+
const COMPARE_WITH_FILE_LABEL = ( localize2(8509, 'Compare with File'));
|
|
37
37
|
registerAction2(class extends Action2 {
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
@@ -60,7 +60,7 @@ registerAction2(class extends Action2 {
|
|
|
60
60
|
constructor() {
|
|
61
61
|
super({
|
|
62
62
|
id: 'workbench.action.localHistory.compareWithPrevious',
|
|
63
|
-
title: ( localize2(
|
|
63
|
+
title: ( localize2(8510, 'Compare with Previous')),
|
|
64
64
|
menu: {
|
|
65
65
|
id: MenuId.TimelineItemContext,
|
|
66
66
|
group: '1_compare',
|
|
@@ -88,7 +88,7 @@ registerAction2(class extends Action2 {
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super({
|
|
90
90
|
id: 'workbench.action.localHistory.selectForCompare',
|
|
91
|
-
title: ( localize2(
|
|
91
|
+
title: ( localize2(8511, 'Select for Compare')),
|
|
92
92
|
menu: {
|
|
93
93
|
id: MenuId.TimelineItemContext,
|
|
94
94
|
group: '2_compare_with',
|
|
@@ -111,7 +111,7 @@ registerAction2(class extends Action2 {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: 'workbench.action.localHistory.compareWithSelected',
|
|
114
|
-
title: ( localize2(
|
|
114
|
+
title: ( localize2(8512, 'Compare with Selected')),
|
|
115
115
|
menu: {
|
|
116
116
|
id: MenuId.TimelineItemContext,
|
|
117
117
|
group: '2_compare_with',
|
|
@@ -140,7 +140,7 @@ registerAction2(class extends Action2 {
|
|
|
140
140
|
constructor() {
|
|
141
141
|
super({
|
|
142
142
|
id: 'workbench.action.localHistory.open',
|
|
143
|
-
title: ( localize2(
|
|
143
|
+
title: ( localize2(8513, 'Show Contents')),
|
|
144
144
|
menu: {
|
|
145
145
|
id: MenuId.TimelineItemContext,
|
|
146
146
|
group: '3_contents',
|
|
@@ -158,7 +158,7 @@ registerAction2(class extends Action2 {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
|
-
const RESTORE_CONTENTS_LABEL = ( localize2(
|
|
161
|
+
const RESTORE_CONTENTS_LABEL = ( localize2(8514, 'Restore Contents'));
|
|
162
162
|
registerAction2(class extends Action2 {
|
|
163
163
|
constructor() {
|
|
164
164
|
super({
|
|
@@ -195,7 +195,7 @@ registerAction2(class extends Action2 {
|
|
|
195
195
|
return restore(accessor, item);
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
|
-
const restoreSaveSource = SaveSourceRegistry.registerSource('localHistoryRestore.source', ( localize(
|
|
198
|
+
const restoreSaveSource = SaveSourceRegistry.registerSource('localHistoryRestore.source', ( localize(8515, "File Restored")));
|
|
199
199
|
async function restore(accessor, item) {
|
|
200
200
|
const fileService = accessor.get(IFileService);
|
|
201
201
|
const dialogService = accessor.get(IDialogService);
|
|
@@ -207,12 +207,12 @@ async function restore(accessor, item) {
|
|
|
207
207
|
const { confirmed } = await dialogService.confirm({
|
|
208
208
|
type: 'warning',
|
|
209
209
|
message: ( localize(
|
|
210
|
-
|
|
210
|
+
8516,
|
|
211
211
|
"Do you want to restore the contents of '{0}'?",
|
|
212
212
|
basename(entry.workingCopy.resource)
|
|
213
213
|
)),
|
|
214
|
-
detail: ( localize(
|
|
215
|
-
primaryButton: ( localize(
|
|
214
|
+
detail: ( localize(8517, "Restoring will discard any unsaved changes.")),
|
|
215
|
+
primaryButton: ( localize(8518, "&&Restore"))
|
|
216
216
|
});
|
|
217
217
|
if (!confirmed) {
|
|
218
218
|
return;
|
|
@@ -229,7 +229,7 @@ async function restore(accessor, item) {
|
|
|
229
229
|
await fileService.cloneFile(entry.location, entry.workingCopy.resource);
|
|
230
230
|
}
|
|
231
231
|
catch (error) {
|
|
232
|
-
await dialogService.error(( localize(
|
|
232
|
+
await dialogService.error(( localize(8519, "Unable to restore '{0}'.", basename(entry.workingCopy.resource))), toErrorMessage(error));
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
if (workingCopies) {
|
|
@@ -249,7 +249,7 @@ registerAction2(class extends Action2 {
|
|
|
249
249
|
constructor() {
|
|
250
250
|
super({
|
|
251
251
|
id: 'workbench.action.localHistory.restoreViaPicker',
|
|
252
|
-
title: ( localize2(
|
|
252
|
+
title: ( localize2(8520, 'Find Entry to Restore')),
|
|
253
253
|
f1: true,
|
|
254
254
|
category: LOCAL_HISTORY_CATEGORY,
|
|
255
255
|
precondition: CTX_LOCAL_HISTORY_ENABLED
|
|
@@ -282,7 +282,7 @@ registerAction2(class extends Action2 {
|
|
|
282
282
|
}
|
|
283
283
|
resourcesSortedByRecency.push(...[...resources].sort((r1, r2) => r1.fsPath < r2.fsPath ? -1 : 1));
|
|
284
284
|
resourcePicker.busy = false;
|
|
285
|
-
resourcePicker.placeholder = ( localize(
|
|
285
|
+
resourcePicker.placeholder = ( localize(8521, "Select the file to show local history for"));
|
|
286
286
|
resourcePicker.matchOnLabel = true;
|
|
287
287
|
resourcePicker.matchOnDescription = true;
|
|
288
288
|
resourcePicker.items = ( [...resourcesSortedByRecency].map(resource => ({
|
|
@@ -306,7 +306,7 @@ registerAction2(class extends Action2 {
|
|
|
306
306
|
const entries = await workingCopyHistoryService.getEntries(resource, cts.token);
|
|
307
307
|
entryPicker.busy = false;
|
|
308
308
|
entryPicker.canAcceptInBackground = true;
|
|
309
|
-
entryPicker.placeholder = ( localize(
|
|
309
|
+
entryPicker.placeholder = ( localize(8522, "Select the local history entry to open"));
|
|
310
310
|
entryPicker.matchOnLabel = true;
|
|
311
311
|
entryPicker.matchOnDescription = true;
|
|
312
312
|
entryPicker.items = ( Array.from(entries).reverse().map(entry => ({
|
|
@@ -330,12 +330,12 @@ registerAction2(class extends Action2 {
|
|
|
330
330
|
}));
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
|
-
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, { command: { id: 'workbench.action.localHistory.restoreViaPicker', title: ( localize2(
|
|
333
|
+
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, { command: { id: 'workbench.action.localHistory.restoreViaPicker', title: ( localize2(8523, 'Local History: Find Entry to Restore...')) }, group: 'submenu', order: 1, when: CTX_LOCAL_HISTORY_ENABLED });
|
|
334
334
|
registerAction2(class extends Action2 {
|
|
335
335
|
constructor() {
|
|
336
336
|
super({
|
|
337
337
|
id: 'workbench.action.localHistory.rename',
|
|
338
|
-
title: ( localize2(
|
|
338
|
+
title: ( localize2(8524, 'Rename')),
|
|
339
339
|
menu: {
|
|
340
340
|
id: MenuId.TimelineItemContext,
|
|
341
341
|
group: '5_edit',
|
|
@@ -351,9 +351,9 @@ registerAction2(class extends Action2 {
|
|
|
351
351
|
if (entry) {
|
|
352
352
|
const disposables = ( new DisposableStore());
|
|
353
353
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
354
|
-
inputBox.title = ( localize(
|
|
354
|
+
inputBox.title = ( localize(8525, "Rename Local History Entry"));
|
|
355
355
|
inputBox.ignoreFocusOut = true;
|
|
356
|
-
inputBox.placeholder = ( localize(
|
|
356
|
+
inputBox.placeholder = ( localize(8526, "Enter the new name of the local history entry"));
|
|
357
357
|
inputBox.value = SaveSourceRegistry.getSourceLabel(entry.source);
|
|
358
358
|
inputBox.show();
|
|
359
359
|
disposables.add(inputBox.onDidAccept(() => {
|
|
@@ -369,7 +369,7 @@ registerAction2(class extends Action2 {
|
|
|
369
369
|
constructor() {
|
|
370
370
|
super({
|
|
371
371
|
id: 'workbench.action.localHistory.delete',
|
|
372
|
-
title: ( localize2(
|
|
372
|
+
title: ( localize2(8527, 'Delete')),
|
|
373
373
|
menu: {
|
|
374
374
|
id: MenuId.TimelineItemContext,
|
|
375
375
|
group: '5_edit',
|
|
@@ -387,13 +387,13 @@ registerAction2(class extends Action2 {
|
|
|
387
387
|
const { confirmed } = await dialogService.confirm({
|
|
388
388
|
type: 'warning',
|
|
389
389
|
message: ( localize(
|
|
390
|
-
|
|
390
|
+
8528,
|
|
391
391
|
"Do you want to delete the local history entry of '{0}' from {1}?",
|
|
392
392
|
entry.workingCopy.name,
|
|
393
393
|
toLocalHistoryEntryDateLabel(entry.timestamp)
|
|
394
394
|
)),
|
|
395
|
-
detail: ( localize(
|
|
396
|
-
primaryButton: ( localize(
|
|
395
|
+
detail: ( localize(8529, "This action is irreversible!")),
|
|
396
|
+
primaryButton: ( localize(8530, "&&Delete")),
|
|
397
397
|
});
|
|
398
398
|
if (!confirmed) {
|
|
399
399
|
return;
|
|
@@ -407,7 +407,7 @@ registerAction2(class extends Action2 {
|
|
|
407
407
|
constructor() {
|
|
408
408
|
super({
|
|
409
409
|
id: 'workbench.action.localHistory.deleteAll',
|
|
410
|
-
title: ( localize2(
|
|
410
|
+
title: ( localize2(8531, 'Delete All')),
|
|
411
411
|
f1: true,
|
|
412
412
|
category: LOCAL_HISTORY_CATEGORY,
|
|
413
413
|
precondition: CTX_LOCAL_HISTORY_ENABLED
|
|
@@ -418,9 +418,9 @@ registerAction2(class extends Action2 {
|
|
|
418
418
|
const workingCopyHistoryService = accessor.get(IWorkingCopyHistoryService);
|
|
419
419
|
const { confirmed } = await dialogService.confirm({
|
|
420
420
|
type: 'warning',
|
|
421
|
-
message: ( localize(
|
|
422
|
-
detail: ( localize(
|
|
423
|
-
primaryButton: ( localize(
|
|
421
|
+
message: ( localize(8532, "Do you want to delete all entries of all files in local history?")),
|
|
422
|
+
detail: ( localize(8533, "This action is irreversible!")),
|
|
423
|
+
primaryButton: ( localize(8534, "&&Delete All")),
|
|
424
424
|
});
|
|
425
425
|
if (!confirmed) {
|
|
426
426
|
return;
|
|
@@ -432,7 +432,7 @@ registerAction2(class extends Action2 {
|
|
|
432
432
|
constructor() {
|
|
433
433
|
super({
|
|
434
434
|
id: 'workbench.action.localHistory.create',
|
|
435
|
-
title: ( localize2(
|
|
435
|
+
title: ( localize2(8535, 'Create Entry')),
|
|
436
436
|
f1: true,
|
|
437
437
|
category: LOCAL_HISTORY_CATEGORY,
|
|
438
438
|
precondition: ( ContextKeyExpr.and(CTX_LOCAL_HISTORY_ENABLED, ActiveEditorContext))
|
|
@@ -450,10 +450,10 @@ registerAction2(class extends Action2 {
|
|
|
450
450
|
}
|
|
451
451
|
const disposables = ( new DisposableStore());
|
|
452
452
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
453
|
-
inputBox.title = ( localize(
|
|
453
|
+
inputBox.title = ( localize(8536, "Create Local History Entry"));
|
|
454
454
|
inputBox.ignoreFocusOut = true;
|
|
455
455
|
inputBox.placeholder = ( localize(
|
|
456
|
-
|
|
456
|
+
8537,
|
|
457
457
|
"Enter the new name of the local history entry for '{0}'",
|
|
458
458
|
labelService.getUriBasenameLabel(resource)
|
|
459
459
|
));
|
|
@@ -472,7 +472,7 @@ async function openEntry(entry, editorService, options) {
|
|
|
472
472
|
await editorService.openEditor({
|
|
473
473
|
resource,
|
|
474
474
|
label: ( localize(
|
|
475
|
-
|
|
475
|
+
8538,
|
|
476
476
|
"{0} ({1} • {2})",
|
|
477
477
|
entry.workingCopy.name,
|
|
478
478
|
SaveSourceRegistry.getSourceLabel(entry.source),
|
|
@@ -494,7 +494,7 @@ function toDiffEditorArguments(arg1, arg2, options) {
|
|
|
494
494
|
const resource = arg2;
|
|
495
495
|
modifiedResource = resource;
|
|
496
496
|
label = ( localize(
|
|
497
|
-
|
|
497
|
+
8539,
|
|
498
498
|
"{0} ({1} • {2}) ↔ {3}",
|
|
499
499
|
arg1.workingCopy.name,
|
|
500
500
|
SaveSourceRegistry.getSourceLabel(arg1.source),
|
|
@@ -506,7 +506,7 @@ function toDiffEditorArguments(arg1, arg2, options) {
|
|
|
506
506
|
const modified = arg2;
|
|
507
507
|
modifiedResource = LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({ location: modified.location, associatedResource: modified.workingCopy.resource });
|
|
508
508
|
label = ( localize(
|
|
509
|
-
|
|
509
|
+
8540,
|
|
510
510
|
"{0} ({1} • {2}) ↔ {3} ({4} • {5})",
|
|
511
511
|
arg1.workingCopy.name,
|
|
512
512
|
SaveSourceRegistry.getSourceLabel(arg1.source),
|
|
@@ -7,7 +7,7 @@ import { ITimelineService } from '@codingame/monaco-vscode-api/vscode/vs/workben
|
|
|
7
7
|
import { IWorkingCopyHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyHistory.service';
|
|
8
8
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
9
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
10
|
-
import { API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-
|
|
10
|
+
import { API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
11
11
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
12
12
|
import { LocalHistoryFileSystemProvider } from './localHistoryFileSystemProvider.js';
|
|
13
13
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
@@ -15,7 +15,7 @@ import { SaveSourceRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workb
|
|
|
15
15
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
16
16
|
import { toDiffEditorArguments, COMPARE_WITH_FILE_LABEL } from './localHistoryCommands.js';
|
|
17
17
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
18
|
-
import { LOCAL_HISTORY_MENU_CONTEXT_VALUE, LOCAL_HISTORY_ICON_ENTRY, getLocalHistoryDateFormatter } from '@codingame/monaco-vscode-
|
|
18
|
+
import { LOCAL_HISTORY_MENU_CONTEXT_VALUE, LOCAL_HISTORY_ICON_ENTRY, getLocalHistoryDateFormatter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/localHistory/browser/localHistory';
|
|
19
19
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
20
20
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
21
21
|
import { getVirtualWorkspaceAuthority } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/virtualWorkspace';
|
|
@@ -35,7 +35,7 @@ let LocalHistoryTimeline = class LocalHistoryTimeline extends Disposable {
|
|
|
35
35
|
this.configurationService = configurationService;
|
|
36
36
|
this.contextService = contextService;
|
|
37
37
|
this.id = 'timeline.localHistory';
|
|
38
|
-
this.label = ( localize(
|
|
38
|
+
this.label = ( localize(8541, "Local History"));
|
|
39
39
|
this.scheme = '*';
|
|
40
40
|
this._onDidChange = this._register(( new Emitter()));
|
|
41
41
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -4,7 +4,7 @@ import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
4
4
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
5
5
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
6
6
|
import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
7
|
-
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-
|
|
7
|
+
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/explorerViewlet';
|
|
8
8
|
import { TimelinePaneId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/timeline/common/timeline';
|
|
9
9
|
import { ITimelineService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/timeline/common/timeline.service';
|
|
10
10
|
import { TimelineHasProviderContext } from '../common/timelineService.js';
|
|
@@ -13,14 +13,14 @@ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/conf
|
|
|
13
13
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
14
14
|
import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
15
15
|
import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
|
|
16
|
-
import { ExplorerFolderContext } from '@codingame/monaco-vscode-
|
|
16
|
+
import { ExplorerFolderContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/common/files';
|
|
17
17
|
import { ResourceContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
18
18
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
19
19
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
20
20
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
21
21
|
|
|
22
|
-
const timelineViewIcon = registerIcon('timeline-view-icon', Codicon.history, ( localize(
|
|
23
|
-
const timelineOpenIcon = registerIcon('timeline-open', Codicon.history, ( localize(
|
|
22
|
+
const timelineViewIcon = registerIcon('timeline-view-icon', Codicon.history, ( localize(12763, 'View icon of the timeline view.')));
|
|
23
|
+
const timelineOpenIcon = registerIcon('timeline-open', Codicon.history, ( localize(12764, 'Icon for the open timeline action.')));
|
|
24
24
|
class TimelinePaneDescriptor {
|
|
25
25
|
constructor() {
|
|
26
26
|
this.id = TimelinePaneId;
|
|
@@ -41,14 +41,14 @@ const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
|
41
41
|
configurationRegistry.registerConfiguration({
|
|
42
42
|
id: 'timeline',
|
|
43
43
|
order: 1001,
|
|
44
|
-
title: ( localize(
|
|
44
|
+
title: ( localize(12765, "Timeline")),
|
|
45
45
|
type: 'object',
|
|
46
46
|
properties: {
|
|
47
47
|
'timeline.pageSize': {
|
|
48
48
|
type: ['number', 'null'],
|
|
49
49
|
default: 50,
|
|
50
50
|
markdownDescription: ( localize(
|
|
51
|
-
|
|
51
|
+
12766,
|
|
52
52
|
"The number of items to show in the Timeline view by default and when loading more items. Setting to `null` will automatically choose a page size based on the visible area of the Timeline view."
|
|
53
53
|
)),
|
|
54
54
|
},
|
|
@@ -56,7 +56,7 @@ configurationRegistry.registerConfiguration({
|
|
|
56
56
|
type: 'boolean',
|
|
57
57
|
default: true,
|
|
58
58
|
description: ( localize(
|
|
59
|
-
|
|
59
|
+
12767,
|
|
60
60
|
"Controls whether the Timeline view will load the next page of items when you scroll to the end of the list."
|
|
61
61
|
)),
|
|
62
62
|
},
|
|
@@ -66,7 +66,7 @@ configurationRegistry.registerConfiguration({
|
|
|
66
66
|
var OpenTimelineAction;
|
|
67
67
|
(function (OpenTimelineAction) {
|
|
68
68
|
OpenTimelineAction.ID = 'files.openTimeline';
|
|
69
|
-
OpenTimelineAction.LABEL = ( localize(
|
|
69
|
+
OpenTimelineAction.LABEL = ( localize(12768, "Open Timeline"));
|
|
70
70
|
function handler() {
|
|
71
71
|
return (accessor, arg) => {
|
|
72
72
|
const service = accessor.get(ITimelineService);
|
|
@@ -88,10 +88,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
|
|
|
88
88
|
},
|
|
89
89
|
when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, TimelineHasProviderContext))
|
|
90
90
|
}));
|
|
91
|
-
const timelineFilter = registerIcon('timeline-filter', Codicon.filter, ( localize(
|
|
91
|
+
const timelineFilter = registerIcon('timeline-filter', Codicon.filter, ( localize(12769, 'Icon for the filter timeline action.')));
|
|
92
92
|
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, {
|
|
93
93
|
submenu: MenuId.TimelineFilterSubMenu,
|
|
94
|
-
title: ( localize(
|
|
94
|
+
title: ( localize(12770, "Filter Timeline")),
|
|
95
95
|
group: 'navigation',
|
|
96
96
|
order: 100,
|
|
97
97
|
icon: timelineFilter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { IListVirtualDelegate, IIdentityProvider, IKeyboardNavigationLabelProvider } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/list";
|
|
4
|
-
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-
|
|
4
|
+
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
5
5
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
6
6
|
import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
|
|
7
7
|
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
@@ -18,7 +18,7 @@ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
|
|
|
18
18
|
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
19
19
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
20
20
|
import { IconLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabel';
|
|
21
|
-
import { ViewPane } from '@codingame/monaco-vscode-
|
|
21
|
+
import { ViewPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
22
22
|
import { WorkbenchObjectTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
23
23
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
24
24
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
@@ -45,7 +45,7 @@ import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/brow
|
|
|
45
45
|
import { isDark } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
|
|
46
46
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
47
47
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
48
|
-
import { API_OPEN_EDITOR_COMMAND_ID, API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-
|
|
48
|
+
import { API_OPEN_EDITOR_COMMAND_ID, API_OPEN_DIFF_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
49
49
|
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
50
50
|
import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
51
51
|
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
@@ -180,7 +180,7 @@ class LoadMoreCommand {
|
|
|
180
180
|
return this.label;
|
|
181
181
|
}
|
|
182
182
|
get label() {
|
|
183
|
-
return this.loading ? ( localize(
|
|
183
|
+
return this.loading ? ( localize(12771, "Loading...")) : ( localize(12772, "Load more"));
|
|
184
184
|
}
|
|
185
185
|
get themeIcon() {
|
|
186
186
|
return undefined;
|
|
@@ -190,7 +190,7 @@ const TimelineFollowActiveEditorContext = ( new RawContextKey('timelineFollowAct
|
|
|
190
190
|
const TimelineExcludeSources = ( new RawContextKey('timelineExcludeSources', '[]', true));
|
|
191
191
|
const TimelineViewFocusedContext = ( new RawContextKey('timelineFocused', true));
|
|
192
192
|
let TimelinePane = class TimelinePane extends ViewPane {
|
|
193
|
-
static { this.TITLE = ( localize2(
|
|
193
|
+
static { this.TITLE = ( localize2(12773, "Timeline")); }
|
|
194
194
|
constructor(options, keybindingService, contextMenuService, contextKeyService, configurationService, storageService, viewDescriptorService, instantiationService, editorService, commandService, progressService, timelineService, openerService, themeService, hoverService, labelService, uriIdentityService, extensionService) {
|
|
195
195
|
super({ ...options, titleMenuId: MenuId.TimelineTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
|
|
196
196
|
this.storageService = storageService;
|
|
@@ -633,7 +633,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
633
633
|
this._isEmpty = !this.hasVisibleItems;
|
|
634
634
|
if (this.uri === undefined) {
|
|
635
635
|
this.updateFilename(undefined);
|
|
636
|
-
this.message = ( localize(
|
|
636
|
+
this.message = ( localize(12774, "The active editor cannot provide timeline information."));
|
|
637
637
|
}
|
|
638
638
|
else if (this._isEmpty) {
|
|
639
639
|
if (this.pendingRequests.size !== 0) {
|
|
@@ -643,24 +643,24 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
643
643
|
this.updateFilename(this.labelService.getUriBasenameLabel(this.uri));
|
|
644
644
|
const scmProviderCount = this.contextKeyService.getContextKeyValue('scm.providerCount');
|
|
645
645
|
if (this.timelineService.getSources().filter(({ id }) => !( this.excludedSources.has(id))).length === 0) {
|
|
646
|
-
this.message = ( localize(
|
|
646
|
+
this.message = ( localize(12775, "All timeline sources have been filtered out."));
|
|
647
647
|
}
|
|
648
648
|
else {
|
|
649
649
|
if (this.configurationService.getValue('workbench.localHistory.enabled') && !( this.excludedSources.has('timeline.localHistory'))) {
|
|
650
650
|
this.message = ( localize(
|
|
651
|
-
|
|
651
|
+
12776,
|
|
652
652
|
"Local History will track recent changes as you save them unless the file has been excluded or is too large."
|
|
653
653
|
));
|
|
654
654
|
}
|
|
655
655
|
else if (this.excludedSources.size > 0) {
|
|
656
|
-
this.message = ( localize(
|
|
656
|
+
this.message = ( localize(12777, "No filtered timeline information was provided."));
|
|
657
657
|
}
|
|
658
658
|
else {
|
|
659
|
-
this.message = ( localize(
|
|
659
|
+
this.message = ( localize(12778, "No timeline information was provided."));
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
if (!scmProviderCount || scmProviderCount === 0) {
|
|
663
|
-
this.message += ' ' + ( localize(
|
|
663
|
+
this.message += ' ' + ( localize(12779, "Source Control has not been configured."));
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
}
|
|
@@ -717,7 +717,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
717
717
|
container.classList.add('tree-explorer-viewlet-tree-view', 'timeline-tree-view');
|
|
718
718
|
this.$message = append(this.$container, $('.message'));
|
|
719
719
|
this.$message.classList.add('timeline-subtle');
|
|
720
|
-
this.message = ( localize(
|
|
720
|
+
this.message = ( localize(12774, "The active editor cannot provide timeline information."));
|
|
721
721
|
this.$tree = createElement('div');
|
|
722
722
|
this.$tree.classList.add('customview-tree', 'file-icon-themable-tree', 'hide-arrows');
|
|
723
723
|
container.appendChild(this.$tree);
|
|
@@ -734,7 +734,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
734
734
|
if (isLoadMoreCommand(element)) {
|
|
735
735
|
return element.ariaLabel;
|
|
736
736
|
}
|
|
737
|
-
return element.accessibilityInformation ? element.accessibilityInformation.label : ( localize(
|
|
737
|
+
return element.accessibilityInformation ? element.accessibilityInformation.label : ( localize(12780, "{0}: {1}", element.relativeTimeFullWord ?? '', element.label));
|
|
738
738
|
},
|
|
739
739
|
getRole(element) {
|
|
740
740
|
if (isLoadMoreCommand(element)) {
|
|
@@ -743,7 +743,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
743
743
|
return element.accessibilityInformation && element.accessibilityInformation.role ? element.accessibilityInformation.role : 'treeitem';
|
|
744
744
|
},
|
|
745
745
|
getWidgetAriaLabel() {
|
|
746
|
-
return localize(
|
|
746
|
+
return localize(12773, "Timeline");
|
|
747
747
|
}
|
|
748
748
|
},
|
|
749
749
|
keyboardNavigationLabelProvider: ( new TimelineKeyboardNavigationLabelProvider()),
|
|
@@ -803,7 +803,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
803
803
|
setLoadingUriMessage() {
|
|
804
804
|
const file = this.uri && this.labelService.getUriBasenameLabel(this.uri);
|
|
805
805
|
this.updateFilename(file);
|
|
806
|
-
this.message = file ? ( localize(
|
|
806
|
+
this.message = file ? ( localize(12781, "Loading timeline for {0}...", file)) : '';
|
|
807
807
|
}
|
|
808
808
|
onContextMenu(commands, treeEvent) {
|
|
809
809
|
const item = treeEvent.element;
|
|
@@ -996,9 +996,9 @@ TimelineTreeRenderer = ( __decorate([
|
|
|
996
996
|
( __param(2, IInstantiationService)),
|
|
997
997
|
( __param(3, IThemeService))
|
|
998
998
|
], TimelineTreeRenderer));
|
|
999
|
-
const timelineRefresh = registerIcon('timeline-refresh', Codicon.refresh, ( localize(
|
|
1000
|
-
const timelinePin = registerIcon('timeline-pin', Codicon.pin, ( localize(
|
|
1001
|
-
const timelineUnpin = registerIcon('timeline-unpin', Codicon.pinned, ( localize(
|
|
999
|
+
const timelineRefresh = registerIcon('timeline-refresh', Codicon.refresh, ( localize(12782, 'Icon for the refresh timeline action.')));
|
|
1000
|
+
const timelinePin = registerIcon('timeline-pin', Codicon.pin, ( localize(12783, 'Icon for the pin timeline action.')));
|
|
1001
|
+
const timelineUnpin = registerIcon('timeline-unpin', Codicon.pinned, ( localize(12784, 'Icon for the unpin timeline action.')));
|
|
1002
1002
|
let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
1003
1003
|
constructor(pane, timelineService, storageService, contextKeyService, menuService) {
|
|
1004
1004
|
super();
|
|
@@ -1012,9 +1012,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1012
1012
|
constructor() {
|
|
1013
1013
|
super({
|
|
1014
1014
|
id: 'timeline.refresh',
|
|
1015
|
-
title: ( localize2(
|
|
1015
|
+
title: ( localize2(12785, "Refresh")),
|
|
1016
1016
|
icon: timelineRefresh,
|
|
1017
|
-
category: ( localize2(
|
|
1017
|
+
category: ( localize2(12773, "Timeline")),
|
|
1018
1018
|
menu: {
|
|
1019
1019
|
id: MenuId.TimelineTitle,
|
|
1020
1020
|
group: 'navigation',
|
|
@@ -1030,9 +1030,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1030
1030
|
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
|
|
1031
1031
|
command: {
|
|
1032
1032
|
id: 'timeline.toggleFollowActiveEditor',
|
|
1033
|
-
title: ( localize2(
|
|
1033
|
+
title: ( localize2(12786, 'Pin the Current Timeline')),
|
|
1034
1034
|
icon: timelinePin,
|
|
1035
|
-
category: ( localize2(
|
|
1035
|
+
category: ( localize2(12773, "Timeline")),
|
|
1036
1036
|
},
|
|
1037
1037
|
group: 'navigation',
|
|
1038
1038
|
order: 98,
|
|
@@ -1041,9 +1041,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1041
1041
|
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
|
|
1042
1042
|
command: {
|
|
1043
1043
|
id: 'timeline.toggleFollowActiveEditor',
|
|
1044
|
-
title: ( localize2(
|
|
1044
|
+
title: ( localize2(12787, 'Unpin the Current Timeline')),
|
|
1045
1045
|
icon: timelineUnpin,
|
|
1046
|
-
category: ( localize2(
|
|
1046
|
+
category: ( localize2(12773, "Timeline")),
|
|
1047
1047
|
},
|
|
1048
1048
|
group: 'navigation',
|
|
1049
1049
|
order: 98,
|
|
@@ -1085,10 +1085,7 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
1087
|
run(accessor, ...args) {
|
|
1088
|
-
if (
|
|
1089
|
-
excluded.delete(source.id);
|
|
1090
|
-
}
|
|
1091
|
-
else {
|
|
1088
|
+
if (!excluded.delete(source.id)) {
|
|
1092
1089
|
excluded.add(source.id);
|
|
1093
1090
|
}
|
|
1094
1091
|
const storageService = accessor.get(IStorageService);
|