@codingame/monaco-vscode-view-common-service-override 9.0.3 → 10.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/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
- package/package.json +3 -3
- package/viewCommon.js +4 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +1 -2
- package/vscode/src/vs/base/browser/ui/grid/grid.js +24 -34
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +34 -35
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +38 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +65 -65
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +85 -85
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +74 -80
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +73 -69
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +77 -59
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +9 -11
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +3 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +172 -173
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +16 -18
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +55 -61
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +19 -22
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +76 -65
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +37 -18
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +4 -5
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +20 -15
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +6 -10
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +31 -45
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +37 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +18 -28
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +8 -8
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -4
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +2 -8
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +14 -15
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -1
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +21 -21
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +28 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +6 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +9 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +19 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +10 -9
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +9 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +26 -26
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +16 -17
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +33 -36
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +18 -28
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +8 -8
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +13 -15
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +3 -4
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +0 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +28 -30
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +71 -74
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +22 -26
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +0 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +16 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +9 -10
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
|
|
3
3
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
4
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
6
5
|
import { ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID } from 'vscode/vscode/vs/workbench/common/activity';
|
|
7
6
|
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
2
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
3
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
4
3
|
|
|
5
4
|
class EditorPaneService {
|
|
6
5
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { isRelativePattern } from 'vscode/vscode/vs/base/common/glob';
|
|
3
|
-
import { insert, distinct
|
|
3
|
+
import { insert, distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
4
4
|
import { Disposable, toDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { isEqual, extname, basename } from 'vscode/vscode/vs/base/common/resources';
|
|
6
6
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -9,15 +9,13 @@ import { EditorResolution, EditorActivation } from 'vscode/vscode/vs/platform/ed
|
|
|
9
9
|
import { isResourceSideBySideEditorInput, EditorResourceAccessor, SideBySideEditor, isEditorInputWithOptions, DEFAULT_EDITOR_ASSOCIATION, isResourceDiffEditorInput, isEditorInputWithOptionsAndGroup, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isUntitledResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
|
|
10
10
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
11
11
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
12
|
-
import {
|
|
12
|
+
import { globMatchesResource, editorsAssociationsSettingId, RegisteredEditorPriority, priorityToRank } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
13
13
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
14
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
15
15
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
16
16
|
import 'vscode/vscode/vs/platform/notification/common/notification';
|
|
17
17
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
18
18
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
19
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
20
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
21
19
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
22
20
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
23
21
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -49,9 +47,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
49
47
|
this._flattenedEditors = ( (new Map()));
|
|
50
48
|
this._shouldReFlattenEditors = true;
|
|
51
49
|
this.cache = ( (new Set(
|
|
52
|
-
JSON.parse(this.storageService.get(EditorResolverService_1.cacheStorageID,
|
|
50
|
+
JSON.parse(this.storageService.get(EditorResolverService_1.cacheStorageID, 0 , JSON.stringify([])))
|
|
53
51
|
)));
|
|
54
|
-
this.storageService.remove(EditorResolverService_1.cacheStorageID,
|
|
52
|
+
this.storageService.remove(EditorResolverService_1.cacheStorageID, 0 );
|
|
55
53
|
this._register(this.storageService.onWillSaveState(() => {
|
|
56
54
|
this.cacheEditors();
|
|
57
55
|
}));
|
|
@@ -84,7 +82,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
84
82
|
resolvedUntypedAndGroup = resolvedUntypedAndGroupResult;
|
|
85
83
|
}
|
|
86
84
|
if (!resolvedUntypedAndGroup) {
|
|
87
|
-
return
|
|
85
|
+
return 2 ;
|
|
88
86
|
}
|
|
89
87
|
const [untypedEditor, group, activation] = resolvedUntypedAndGroup;
|
|
90
88
|
if (activation) {
|
|
@@ -98,25 +96,25 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
98
96
|
resource = ( (URI.from({ scheme: Schemas.untitled })));
|
|
99
97
|
}
|
|
100
98
|
else if (resource.scheme === undefined || resource === null) {
|
|
101
|
-
return
|
|
99
|
+
return 2 ;
|
|
102
100
|
}
|
|
103
101
|
if (untypedEditor.options?.override === EditorResolution.PICK) {
|
|
104
102
|
const picked = await this.doPickEditor(untypedEditor);
|
|
105
103
|
if (!picked) {
|
|
106
|
-
return
|
|
104
|
+
return 1 ;
|
|
107
105
|
}
|
|
108
106
|
untypedEditor.options = picked;
|
|
109
107
|
}
|
|
110
108
|
let { editor: selectedEditor, conflictingDefault } = this.getEditor(resource, untypedEditor.options?.override);
|
|
111
109
|
if (!selectedEditor && (untypedEditor.options?.override || isEditorInputWithOptions(editor))) {
|
|
112
|
-
return
|
|
110
|
+
return 2 ;
|
|
113
111
|
}
|
|
114
112
|
else if (!selectedEditor) {
|
|
115
113
|
const resolvedEditor = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id);
|
|
116
114
|
selectedEditor = resolvedEditor?.editor;
|
|
117
115
|
conflictingDefault = resolvedEditor?.conflictingDefault;
|
|
118
116
|
if (!selectedEditor) {
|
|
119
|
-
return
|
|
117
|
+
return 2 ;
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
120
|
if (isResourceDiffEditorInput(untypedEditor) && untypedEditor.options?.override === undefined) {
|
|
@@ -131,12 +129,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
131
129
|
conflictingDefault = conflictingDefaultDiff;
|
|
132
130
|
}
|
|
133
131
|
if (!selectedEditor) {
|
|
134
|
-
return
|
|
132
|
+
return 2 ;
|
|
135
133
|
}
|
|
136
134
|
}
|
|
137
135
|
untypedEditor.options = { override: selectedEditor.editorInfo.id, ...untypedEditor.options };
|
|
138
136
|
if (selectedEditor.editorFactoryObject.createDiffEditorInput === undefined && isResourceDiffEditorInput(untypedEditor)) {
|
|
139
|
-
return
|
|
137
|
+
return 2 ;
|
|
140
138
|
}
|
|
141
139
|
const input = await this.doResolveEditor(untypedEditor, group, selectedEditor);
|
|
142
140
|
if (conflictingDefault && input) {
|
|
@@ -149,16 +147,16 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
149
147
|
}
|
|
150
148
|
return { ...input, group };
|
|
151
149
|
}
|
|
152
|
-
return
|
|
150
|
+
return 1 ;
|
|
153
151
|
}
|
|
154
152
|
async doResolveSideBySideEditor(editor, preferredGroup) {
|
|
155
153
|
const primaryResolvedEditor = await this.resolveEditor(editor.primary, preferredGroup);
|
|
156
154
|
if (!isEditorInputWithOptionsAndGroup(primaryResolvedEditor)) {
|
|
157
|
-
return
|
|
155
|
+
return 2 ;
|
|
158
156
|
}
|
|
159
157
|
const secondaryResolvedEditor = await this.resolveEditor(editor.secondary, primaryResolvedEditor.group ?? preferredGroup);
|
|
160
158
|
if (!isEditorInputWithOptionsAndGroup(secondaryResolvedEditor)) {
|
|
161
|
-
return
|
|
159
|
+
return 2 ;
|
|
162
160
|
}
|
|
163
161
|
return {
|
|
164
162
|
group: primaryResolvedEditor.group ?? secondaryResolvedEditor.group,
|
|
@@ -440,18 +438,18 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
440
438
|
}
|
|
441
439
|
async doHandleConflictingDefaults(resource, editorName, untypedInput, currentEditor, group) {
|
|
442
440
|
const editors = this.findMatchingEditors(resource);
|
|
443
|
-
const storedChoices = JSON.parse(this.storageService.get(EditorResolverService_1.conflictingDefaultsStorageID,
|
|
441
|
+
const storedChoices = JSON.parse(this.storageService.get(EditorResolverService_1.conflictingDefaultsStorageID, 0 , '{}'));
|
|
444
442
|
const globForResource = `*${extname(resource)}`;
|
|
445
443
|
const writeCurrentEditorsToStorage = () => {
|
|
446
444
|
storedChoices[globForResource] = [];
|
|
447
445
|
editors.forEach(editor => storedChoices[globForResource].push(editor.editorInfo.id));
|
|
448
|
-
this.storageService.store(EditorResolverService_1.conflictingDefaultsStorageID, JSON.stringify(storedChoices),
|
|
446
|
+
this.storageService.store(EditorResolverService_1.conflictingDefaultsStorageID, JSON.stringify(storedChoices), 0 , 1 );
|
|
449
447
|
};
|
|
450
448
|
if (storedChoices[globForResource] && storedChoices[globForResource].find(editorID => editorID === currentEditor.editorId)) {
|
|
451
449
|
return;
|
|
452
450
|
}
|
|
453
|
-
const handle = this.notificationService.prompt(Severity$1.Warning, ( localize(
|
|
454
|
-
label: ( localize(
|
|
451
|
+
const handle = this.notificationService.prompt(Severity$1.Warning, ( localize(4151, 'There are multiple default editors available for the resource.')), [{
|
|
452
|
+
label: ( localize(4152, 'Configure Default')),
|
|
455
453
|
run: async () => {
|
|
456
454
|
const picked = await this.doPickEditor(untypedInput, true);
|
|
457
455
|
if (!picked) {
|
|
@@ -459,7 +457,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
459
457
|
}
|
|
460
458
|
untypedInput.options = picked;
|
|
461
459
|
const replacementEditor = await this.resolveEditor(untypedInput, group);
|
|
462
|
-
if (replacementEditor ===
|
|
460
|
+
if (replacementEditor === 1 || replacementEditor === 2 ) {
|
|
463
461
|
return;
|
|
464
462
|
}
|
|
465
463
|
group.replaceEditors([
|
|
@@ -472,7 +470,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
472
470
|
}
|
|
473
471
|
},
|
|
474
472
|
{
|
|
475
|
-
label: ( localize(
|
|
473
|
+
label: ( localize(4153, 'Keep {0}', editorName)),
|
|
476
474
|
run: writeCurrentEditorsToStorage
|
|
477
475
|
}
|
|
478
476
|
]);
|
|
@@ -482,7 +480,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
482
480
|
});
|
|
483
481
|
}
|
|
484
482
|
mapEditorsToQuickPickEntry(resource, showDefaultPicker) {
|
|
485
|
-
const currentEditor =
|
|
483
|
+
const currentEditor = this.editorGroupService.activeGroup.findEditors(resource).at(0);
|
|
486
484
|
let registeredEditors = resource.scheme === Schemas.untitled ? this._registeredEditors.filter(e => e.editorInfo.priority !== RegisteredEditorPriority.exclusive) : this.findMatchingEditors(resource);
|
|
487
485
|
registeredEditors = distinct(registeredEditors, c => c.editorInfo.id);
|
|
488
486
|
const defaultSetting = this.getAssociationsForResource(resource)[0]?.viewType;
|
|
@@ -498,9 +496,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
498
496
|
}
|
|
499
497
|
});
|
|
500
498
|
const quickPickEntries = [];
|
|
501
|
-
const currentlyActiveLabel = ( localize(
|
|
502
|
-
const currentDefaultLabel = ( localize(
|
|
503
|
-
const currentDefaultAndActiveLabel = ( localize(
|
|
499
|
+
const currentlyActiveLabel = ( localize(4154, "Active"));
|
|
500
|
+
const currentDefaultLabel = ( localize(4155, "Default"));
|
|
501
|
+
const currentDefaultAndActiveLabel = ( localize(4156, "Active and Default"));
|
|
504
502
|
let defaultViewType = defaultSetting;
|
|
505
503
|
if (!defaultViewType && registeredEditors.length > 2 && registeredEditors[1]?.editorInfo.priority !== RegisteredEditorPriority.option) {
|
|
506
504
|
defaultViewType = registeredEditors[1]?.editorInfo.id;
|
|
@@ -525,7 +523,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
525
523
|
quickPickEntries.push(separator);
|
|
526
524
|
const configureDefaultEntry = {
|
|
527
525
|
id: EditorResolverService_1.configureDefaultID,
|
|
528
|
-
label: ( localize(
|
|
526
|
+
label: ( localize(4157, "Configure default editor for '{0}'...", `*${extname(resource)}`)),
|
|
529
527
|
};
|
|
530
528
|
quickPickEntries.push(configureDefaultEntry);
|
|
531
529
|
}
|
|
@@ -540,8 +538,8 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
540
538
|
const disposables = ( (new DisposableStore()));
|
|
541
539
|
const editorPicker = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
|
|
542
540
|
const placeHolderMessage = showDefaultPicker ?
|
|
543
|
-
( localize(
|
|
544
|
-
( localize(
|
|
541
|
+
( localize(4158, "Select new default editor for '{0}'", `*${extname(resource)}`)) :
|
|
542
|
+
( localize(4159, "Select editor for '{0}'", basename(resource)));
|
|
545
543
|
editorPicker.placeholder = placeHolderMessage;
|
|
546
544
|
editorPicker.canAcceptInBackground = true;
|
|
547
545
|
editorPicker.items = editorPicks;
|
|
@@ -615,7 +613,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
615
613
|
cacheStorage.add(association.filenamePattern);
|
|
616
614
|
}
|
|
617
615
|
}
|
|
618
|
-
this.storageService.store(EditorResolverService_1.cacheStorageID, JSON.stringify(Array.from(cacheStorage)),
|
|
616
|
+
this.storageService.store(EditorResolverService_1.cacheStorageID, JSON.stringify(Array.from(cacheStorage)), 0 , 1 );
|
|
619
617
|
}
|
|
620
618
|
resourceMatchesCache(resource) {
|
|
621
619
|
if (!this.cache) {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
|
-
import {
|
|
4
|
+
import { isEditorPaneWithSelection, isEditorInput, EditorResourceAccessor, EditorCloseContext, SideBySideEditor, isSideBySideEditorInput, isResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
|
|
5
5
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
6
|
-
import { GoScope, GoFilter } from 'vscode/vscode/vs/workbench/services/history/common/history';
|
|
7
6
|
import { IHistoryService } from 'vscode/vscode/vs/workbench/services/history/common/history.service';
|
|
8
|
-
import { FILES_EXCLUDE_CONFIG, FileChangesEvent,
|
|
7
|
+
import { FILES_EXCLUDE_CONFIG, FileChangesEvent, FileOperationEvent } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
8
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
10
9
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
11
10
|
import { Disposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
12
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
13
11
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
14
12
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
15
13
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -20,7 +18,7 @@ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/lay
|
|
|
20
18
|
import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
21
19
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
22
20
|
import { coalesce, remove } from 'vscode/vscode/vs/base/common/arrays';
|
|
23
|
-
import { registerSingleton
|
|
21
|
+
import { registerSingleton } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
24
22
|
import { WindowIdleValue, addDisposableListener, EventType, EventHelper } from 'vscode/vscode/vs/base/browser/dom';
|
|
25
23
|
import { IWorkspacesService } from 'vscode/vscode/vs/platform/workspaces/common/workspaces.service';
|
|
26
24
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
@@ -28,7 +26,6 @@ import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
|
28
26
|
import { ResourceGlobMatcher } from 'vscode/vscode/vs/workbench/common/resources';
|
|
29
27
|
import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
|
|
30
28
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
31
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
32
29
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
33
30
|
import { LogLevel } from 'vscode/vscode/vs/platform/log/common/log';
|
|
34
31
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -55,39 +52,39 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
55
52
|
this.activeEditorListeners = this._register(( (new DisposableStore())));
|
|
56
53
|
this.lastActiveEditor = undefined;
|
|
57
54
|
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
58
|
-
this.canNavigateBackContextKey = (( (new RawContextKey('canNavigateBack', false, ( localize(
|
|
59
|
-
this.canNavigateForwardContextKey = (( (new RawContextKey('canNavigateForward', false, ( localize(
|
|
55
|
+
this.canNavigateBackContextKey = (( (new RawContextKey('canNavigateBack', false, ( localize(4201, "Whether it is possible to navigate back in editor history")))))).bindTo(this.contextKeyService);
|
|
56
|
+
this.canNavigateForwardContextKey = (( (new RawContextKey('canNavigateForward', false, ( localize(4202, "Whether it is possible to navigate forward in editor history")))))).bindTo(this.contextKeyService);
|
|
60
57
|
this.canNavigateBackInNavigationsContextKey = (( (new RawContextKey('canNavigateBackInNavigationLocations', false, ( localize(
|
|
61
|
-
|
|
58
|
+
4203,
|
|
62
59
|
"Whether it is possible to navigate back in editor navigation locations history"
|
|
63
60
|
)))))).bindTo(this.contextKeyService);
|
|
64
61
|
this.canNavigateForwardInNavigationsContextKey = (( (new RawContextKey('canNavigateForwardInNavigationLocations', false, ( localize(
|
|
65
|
-
|
|
62
|
+
4204,
|
|
66
63
|
"Whether it is possible to navigate forward in editor navigation locations history"
|
|
67
64
|
)))))).bindTo(this.contextKeyService);
|
|
68
65
|
this.canNavigateToLastNavigationLocationContextKey = (( (new RawContextKey('canNavigateToLastNavigationLocation', false, ( localize(
|
|
69
|
-
|
|
66
|
+
4205,
|
|
70
67
|
"Whether it is possible to navigate to the last editor navigation location"
|
|
71
68
|
)))))).bindTo(this.contextKeyService);
|
|
72
69
|
this.canNavigateBackInEditsContextKey = (( (new RawContextKey('canNavigateBackInEditLocations', false, ( localize(
|
|
73
|
-
|
|
70
|
+
4206,
|
|
74
71
|
"Whether it is possible to navigate back in editor edit locations history"
|
|
75
72
|
)))))).bindTo(this.contextKeyService);
|
|
76
73
|
this.canNavigateForwardInEditsContextKey = (( (new RawContextKey('canNavigateForwardInEditLocations', false, ( localize(
|
|
77
|
-
|
|
74
|
+
4207,
|
|
78
75
|
"Whether it is possible to navigate forward in editor edit locations history"
|
|
79
76
|
)))))).bindTo(this.contextKeyService);
|
|
80
77
|
this.canNavigateToLastEditLocationContextKey = (( (new RawContextKey('canNavigateToLastEditLocation', false, ( localize(
|
|
81
|
-
|
|
78
|
+
4208,
|
|
82
79
|
"Whether it is possible to navigate to the last editor edit location"
|
|
83
80
|
)))))).bindTo(this.contextKeyService);
|
|
84
|
-
this.canReopenClosedEditorContextKey = (( (new RawContextKey('canReopenClosedEditor', false, ( localize(
|
|
81
|
+
this.canReopenClosedEditorContextKey = (( (new RawContextKey('canReopenClosedEditor', false, ( localize(4209, "Whether it is possible to reopen the last closed editor")))))).bindTo(this.contextKeyService);
|
|
85
82
|
this._onDidChangeEditorNavigationStack = this._register(( (new Emitter())));
|
|
86
83
|
this.onDidChangeEditorNavigationStack = this._onDidChangeEditorNavigationStack.event;
|
|
87
84
|
this.defaultScopedEditorNavigationStack = undefined;
|
|
88
85
|
this.editorGroupScopedNavigationStacks = ( (new Map()));
|
|
89
86
|
this.editorScopedNavigationStacks = ( (new Map()));
|
|
90
|
-
this.editorNavigationScope =
|
|
87
|
+
this.editorNavigationScope = 0 ;
|
|
91
88
|
this.recentlyUsedEditorsStack = undefined;
|
|
92
89
|
this.recentlyUsedEditorsStackIndex = 0;
|
|
93
90
|
this.recentlyUsedEditorsInGroupStack = undefined;
|
|
@@ -179,7 +176,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
179
176
|
else {
|
|
180
177
|
this.logService.trace(`[History]: ignoring transient editor change until becoming non-transient (editor: ${activeEditorPane.input?.resource?.toString()}})`);
|
|
181
178
|
const transientListener = activeEditorGroup.onDidModelChange(e => {
|
|
182
|
-
if (e.kind ===
|
|
179
|
+
if (e.kind === 12 && e.editor === activeEditorPane.input && !activeEditorPane.group.isTransient(activeEditorPane.input)) {
|
|
183
180
|
transientListener.dispose();
|
|
184
181
|
this.handleActiveEditorChange(activeEditorGroup, activeEditorPane);
|
|
185
182
|
}
|
|
@@ -205,10 +202,10 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
205
202
|
}
|
|
206
203
|
}
|
|
207
204
|
else {
|
|
208
|
-
if (event.isOperation(
|
|
205
|
+
if (event.isOperation(1 )) {
|
|
209
206
|
this.remove(event);
|
|
210
207
|
}
|
|
211
|
-
else if (event.isOperation(
|
|
208
|
+
else if (event.isOperation(2 ) && event.target.isFile) {
|
|
212
209
|
this.move(event);
|
|
213
210
|
}
|
|
214
211
|
}
|
|
@@ -252,14 +249,14 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
252
249
|
updateContextKeys() {
|
|
253
250
|
this.contextKeyService.bufferChangeEvents(() => {
|
|
254
251
|
const activeStack = this.getStack();
|
|
255
|
-
this.canNavigateBackContextKey.set(activeStack.canGoBack(
|
|
256
|
-
this.canNavigateForwardContextKey.set(activeStack.canGoForward(
|
|
257
|
-
this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(
|
|
258
|
-
this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(
|
|
259
|
-
this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(
|
|
260
|
-
this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(
|
|
261
|
-
this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(
|
|
262
|
-
this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(
|
|
252
|
+
this.canNavigateBackContextKey.set(activeStack.canGoBack(0 ));
|
|
253
|
+
this.canNavigateForwardContextKey.set(activeStack.canGoForward(0 ));
|
|
254
|
+
this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(2 ));
|
|
255
|
+
this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(2 ));
|
|
256
|
+
this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(2 ));
|
|
257
|
+
this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(1 ));
|
|
258
|
+
this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(1 ));
|
|
259
|
+
this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(1 ));
|
|
263
260
|
this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
|
|
264
261
|
});
|
|
265
262
|
}
|
|
@@ -268,13 +265,13 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
268
265
|
this.disposeEditorNavigationStacks();
|
|
269
266
|
const configuredScope = this.configurationService.getValue(HistoryService_1.NAVIGATION_SCOPE_SETTING);
|
|
270
267
|
if (configuredScope === 'editorGroup') {
|
|
271
|
-
this.editorNavigationScope =
|
|
268
|
+
this.editorNavigationScope = 1 ;
|
|
272
269
|
}
|
|
273
270
|
else if (configuredScope === 'editor') {
|
|
274
|
-
this.editorNavigationScope =
|
|
271
|
+
this.editorNavigationScope = 2 ;
|
|
275
272
|
}
|
|
276
273
|
else {
|
|
277
|
-
this.editorNavigationScope =
|
|
274
|
+
this.editorNavigationScope = 0 ;
|
|
278
275
|
}
|
|
279
276
|
};
|
|
280
277
|
this._register(this.configurationService.onDidChangeConfiguration(event => {
|
|
@@ -286,7 +283,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
286
283
|
}
|
|
287
284
|
getStack(group = this.editorGroupService.activeGroup, editor = group.activeEditor) {
|
|
288
285
|
switch (this.editorNavigationScope) {
|
|
289
|
-
case
|
|
286
|
+
case 2 : {
|
|
290
287
|
if (!editor) {
|
|
291
288
|
return (
|
|
292
289
|
(new NoOpEditorNavigationStacks())
|
|
@@ -300,25 +297,25 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
300
297
|
let stack = stacksForGroup.get(editor)?.stack;
|
|
301
298
|
if (!stack) {
|
|
302
299
|
const disposable = ( (new DisposableStore()));
|
|
303
|
-
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks,
|
|
300
|
+
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 2 ));
|
|
304
301
|
disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
305
302
|
stacksForGroup.set(editor, { stack, disposable });
|
|
306
303
|
}
|
|
307
304
|
return stack;
|
|
308
305
|
}
|
|
309
|
-
case
|
|
306
|
+
case 1 : {
|
|
310
307
|
let stack = this.editorGroupScopedNavigationStacks.get(group.id)?.stack;
|
|
311
308
|
if (!stack) {
|
|
312
309
|
const disposable = ( (new DisposableStore()));
|
|
313
|
-
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks,
|
|
310
|
+
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 1 ));
|
|
314
311
|
disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
315
312
|
this.editorGroupScopedNavigationStacks.set(group.id, { stack, disposable });
|
|
316
313
|
}
|
|
317
314
|
return stack;
|
|
318
315
|
}
|
|
319
|
-
case
|
|
316
|
+
case 0 : {
|
|
320
317
|
if (!this.defaultScopedEditorNavigationStack) {
|
|
321
|
-
this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks,
|
|
318
|
+
this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks, 0 ));
|
|
322
319
|
this._register(this.defaultScopedEditorNavigationStack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
323
320
|
}
|
|
324
321
|
return this.defaultScopedEditorNavigationStack;
|
|
@@ -436,11 +433,11 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
436
433
|
let index;
|
|
437
434
|
const group = typeof groupId === 'number' ? this.editorGroupService.getGroup(groupId) : undefined;
|
|
438
435
|
if (!group) {
|
|
439
|
-
editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(
|
|
436
|
+
editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(0 );
|
|
440
437
|
index = this.recentlyUsedEditorsStackIndex;
|
|
441
438
|
}
|
|
442
439
|
else {
|
|
443
|
-
editors = this.recentlyUsedEditorsInGroupStack || ( (group.getEditors(
|
|
440
|
+
editors = this.recentlyUsedEditorsInGroupStack || ( (group.getEditors(0 ).map(editor => ({ groupId: group.id, editor }))));
|
|
444
441
|
index = this.recentlyUsedEditorsInGroupStackIndex;
|
|
445
442
|
}
|
|
446
443
|
let newIndex = indexModifier(index);
|
|
@@ -627,7 +624,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
627
624
|
});
|
|
628
625
|
}
|
|
629
626
|
moveInHistory(event) {
|
|
630
|
-
if (event.isOperation(
|
|
627
|
+
if (event.isOperation(2 )) {
|
|
631
628
|
const removed = this.removeFromHistory(event);
|
|
632
629
|
if (removed) {
|
|
633
630
|
this.addToHistory({ resource: event.target.resource });
|
|
@@ -696,7 +693,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
696
693
|
loadHistory() {
|
|
697
694
|
this.history = [];
|
|
698
695
|
const storedEditorHistory = this.loadHistoryFromStorage();
|
|
699
|
-
const openedEditorsLru = [...this.editorService.getEditors(
|
|
696
|
+
const openedEditorsLru = [...this.editorService.getEditors(0 )].reverse();
|
|
700
697
|
const handledEditors = ( (new Set()));
|
|
701
698
|
for (const { editor } of openedEditorsLru) {
|
|
702
699
|
if (!this.includeInHistory(editor)) {
|
|
@@ -718,7 +715,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
718
715
|
}
|
|
719
716
|
loadHistoryFromStorage() {
|
|
720
717
|
const entries = [];
|
|
721
|
-
const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY,
|
|
718
|
+
const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY, 1 );
|
|
722
719
|
if (entriesRaw) {
|
|
723
720
|
try {
|
|
724
721
|
const entriesParsed = JSON.parse(entriesRaw);
|
|
@@ -762,7 +759,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
762
759
|
}
|
|
763
760
|
});
|
|
764
761
|
}
|
|
765
|
-
this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries),
|
|
762
|
+
this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries), 1 , 1 );
|
|
766
763
|
}
|
|
767
764
|
getLastActiveWorkspaceRoot(schemeFilter, authorityFilter) {
|
|
768
765
|
const folders = this.contextService.getWorkspace().folders;
|
|
@@ -842,7 +839,7 @@ HistoryService = HistoryService_1 = ( (__decorate([
|
|
|
842
839
|
( (__param(9, IContextKeyService))),
|
|
843
840
|
( (__param(10, ILogService)))
|
|
844
841
|
], HistoryService)));
|
|
845
|
-
( (registerSingleton(IHistoryService, HistoryService,
|
|
842
|
+
( (registerSingleton(IHistoryService, HistoryService, 0 )));
|
|
846
843
|
class EditorSelectionState {
|
|
847
844
|
constructor(editorIdentifier, selection, reason) {
|
|
848
845
|
this.editorIdentifier = editorIdentifier;
|
|
@@ -860,10 +857,10 @@ class EditorSelectionState {
|
|
|
860
857
|
return true;
|
|
861
858
|
}
|
|
862
859
|
const result = this.selection.compare(other.selection);
|
|
863
|
-
if (result ===
|
|
860
|
+
if (result === 2 && ((other.reason === 4 || other.reason === 5) )) {
|
|
864
861
|
return true;
|
|
865
862
|
}
|
|
866
|
-
return result ===
|
|
863
|
+
return result === 3 ;
|
|
867
864
|
}
|
|
868
865
|
}
|
|
869
866
|
let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
@@ -871,9 +868,9 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
871
868
|
super();
|
|
872
869
|
this.scope = scope;
|
|
873
870
|
this.instantiationService = instantiationService;
|
|
874
|
-
this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack,
|
|
875
|
-
this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack,
|
|
876
|
-
this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack,
|
|
871
|
+
this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 0 , this.scope));
|
|
872
|
+
this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 1 , this.scope));
|
|
873
|
+
this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 2 , this.scope));
|
|
877
874
|
this.stacks = [
|
|
878
875
|
this.selectionsStack,
|
|
879
876
|
this.editsStack,
|
|
@@ -902,11 +899,11 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
902
899
|
goLast(filter) {
|
|
903
900
|
return this.getStack(filter).goLast();
|
|
904
901
|
}
|
|
905
|
-
getStack(filter =
|
|
902
|
+
getStack(filter = 0 ) {
|
|
906
903
|
switch (filter) {
|
|
907
|
-
case
|
|
908
|
-
case
|
|
909
|
-
case
|
|
904
|
+
case 0 : return this.selectionsStack;
|
|
905
|
+
case 1 : return this.editsStack;
|
|
906
|
+
case 2 : return this.navigationsStack;
|
|
910
907
|
}
|
|
911
908
|
}
|
|
912
909
|
handleActiveEditorChange(editorPane) {
|
|
@@ -915,12 +912,12 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
915
912
|
handleActiveEditorSelectionChange(editorPane, event) {
|
|
916
913
|
const previous = this.selectionsStack.current;
|
|
917
914
|
this.selectionsStack.notifyNavigation(editorPane, event);
|
|
918
|
-
if (event.reason ===
|
|
915
|
+
if (event.reason === 3 ) {
|
|
919
916
|
this.editsStack.notifyNavigation(editorPane, event);
|
|
920
917
|
}
|
|
921
|
-
else if ((event.reason ===
|
|
918
|
+
else if (((event.reason === 4 || event.reason === 5) ) &&
|
|
922
919
|
!this.selectionsStack.isNavigating()) {
|
|
923
|
-
if (event.reason ===
|
|
920
|
+
if (event.reason === 5 && !this.navigationsStack.isNavigating()) {
|
|
924
921
|
if (previous) {
|
|
925
922
|
this.navigationsStack.addOrReplace(previous.groupId, previous.editor, previous.selection);
|
|
926
923
|
}
|
|
@@ -1028,25 +1025,25 @@ ${entryLabels.join('\n')}
|
|
|
1028
1025
|
}
|
|
1029
1026
|
let filterLabel;
|
|
1030
1027
|
switch (this.filter) {
|
|
1031
|
-
case
|
|
1028
|
+
case 0 :
|
|
1032
1029
|
filterLabel = 'global';
|
|
1033
1030
|
break;
|
|
1034
|
-
case
|
|
1031
|
+
case 1 :
|
|
1035
1032
|
filterLabel = 'edits';
|
|
1036
1033
|
break;
|
|
1037
|
-
case
|
|
1034
|
+
case 2 :
|
|
1038
1035
|
filterLabel = 'navigation';
|
|
1039
1036
|
break;
|
|
1040
1037
|
}
|
|
1041
1038
|
let scopeLabel;
|
|
1042
1039
|
switch (this.scope) {
|
|
1043
|
-
case
|
|
1040
|
+
case 0 :
|
|
1044
1041
|
scopeLabel = 'default';
|
|
1045
1042
|
break;
|
|
1046
|
-
case
|
|
1043
|
+
case 1 :
|
|
1047
1044
|
scopeLabel = 'editorGroup';
|
|
1048
1045
|
break;
|
|
1049
|
-
case
|
|
1046
|
+
case 2 :
|
|
1050
1047
|
scopeLabel = 'editor';
|
|
1051
1048
|
break;
|
|
1052
1049
|
}
|
|
@@ -1062,11 +1059,11 @@ ${entryLabels.join('\n')}
|
|
|
1062
1059
|
return '<none>';
|
|
1063
1060
|
}
|
|
1064
1061
|
switch (event.reason) {
|
|
1065
|
-
case
|
|
1066
|
-
case
|
|
1067
|
-
case
|
|
1068
|
-
case
|
|
1069
|
-
case
|
|
1062
|
+
case 3 : return 'edit';
|
|
1063
|
+
case 4 : return 'navigation';
|
|
1064
|
+
case 5 : return 'jump';
|
|
1065
|
+
case 1 : return 'programmatic';
|
|
1066
|
+
case 2 : return 'user';
|
|
1070
1067
|
}
|
|
1071
1068
|
}
|
|
1072
1069
|
registerGroupListeners(groupId) {
|
|
@@ -1079,7 +1076,7 @@ ${entryLabels.join('\n')}
|
|
|
1079
1076
|
}
|
|
1080
1077
|
onWillMoveEditor(e) {
|
|
1081
1078
|
this.trace('onWillMoveEditor()', e.editor);
|
|
1082
|
-
if (this.scope ===
|
|
1079
|
+
if (this.scope === 1 ) {
|
|
1083
1080
|
return;
|
|
1084
1081
|
}
|
|
1085
1082
|
for (const entry of this.stack) {
|
|
@@ -1223,10 +1220,10 @@ ${entryLabels.join('\n')}
|
|
|
1223
1220
|
if (!candidate.selection) {
|
|
1224
1221
|
return false;
|
|
1225
1222
|
}
|
|
1226
|
-
return entry.selection.compare(candidate.selection) ===
|
|
1223
|
+
return entry.selection.compare(candidate.selection) === 1 ;
|
|
1227
1224
|
}
|
|
1228
1225
|
move(event) {
|
|
1229
|
-
if (event.isOperation(
|
|
1226
|
+
if (event.isOperation(2 )) {
|
|
1230
1227
|
for (const entry of this.stack) {
|
|
1231
1228
|
if (this.editorHelper.matchesEditor(event, entry.editor)) {
|
|
1232
1229
|
entry.editor = { resource: event.target.resource };
|
|
@@ -1334,7 +1331,7 @@ ${entryLabels.join('\n')}
|
|
|
1334
1331
|
return this.navigate();
|
|
1335
1332
|
}
|
|
1336
1333
|
async maybeGoCurrent() {
|
|
1337
|
-
if (this.filter ===
|
|
1334
|
+
if (this.filter === 0 ) {
|
|
1338
1335
|
return false;
|
|
1339
1336
|
}
|
|
1340
1337
|
if (this.isCurrentSelectionActive()) {
|
|
@@ -1361,7 +1358,7 @@ ${entryLabels.join('\n')}
|
|
|
1361
1358
|
if (!paneSelection) {
|
|
1362
1359
|
return false;
|
|
1363
1360
|
}
|
|
1364
|
-
return paneSelection.compare(this.current.selection) ===
|
|
1361
|
+
return paneSelection.compare(this.current.selection) === 1 ;
|
|
1365
1362
|
}
|
|
1366
1363
|
setIndex(newIndex, skipEvent) {
|
|
1367
1364
|
this.previousIndex = this.index;
|
|
@@ -1439,7 +1436,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1439
1436
|
return false;
|
|
1440
1437
|
}
|
|
1441
1438
|
if (arg1 instanceof FileChangesEvent) {
|
|
1442
|
-
return arg1.contains(inputB.resource,
|
|
1439
|
+
return arg1.contains(inputB.resource, 2 );
|
|
1443
1440
|
}
|
|
1444
1441
|
return this.matchesFile(inputB.resource, arg1);
|
|
1445
1442
|
}
|
|
@@ -1456,7 +1453,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1456
1453
|
}
|
|
1457
1454
|
matchesFile(resource, arg2) {
|
|
1458
1455
|
if (arg2 instanceof FileChangesEvent) {
|
|
1459
|
-
return arg2.contains(resource,
|
|
1456
|
+
return arg2.contains(resource, 2 );
|
|
1460
1457
|
}
|
|
1461
1458
|
if (arg2 instanceof FileOperationEvent) {
|
|
1462
1459
|
return this.uriIdentityService.extUri.isEqualOrParent(resource, arg2.resource);
|
|
@@ -1466,7 +1463,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1466
1463
|
if (!inputResource) {
|
|
1467
1464
|
return false;
|
|
1468
1465
|
}
|
|
1469
|
-
if (this.lifecycleService.phase >=
|
|
1466
|
+
if (this.lifecycleService.phase >= 3 && !this.fileService.hasProvider(inputResource)) {
|
|
1470
1467
|
return false;
|
|
1471
1468
|
}
|
|
1472
1469
|
return this.uriIdentityService.extUri.isEqual(inputResource, resource);
|