@codingame/monaco-vscode-view-common-service-override 5.3.0 → 6.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 +3 -3
- package/viewCommon.js +1 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -1
- package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -24
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +35 -34
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +9 -60
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +119 -79
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +76 -64
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -71
- 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 -18
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +11 -8
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +112 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +36 -30
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +75 -69
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +143 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +20 -16
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +13 -11
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +8 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +9 -6
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +51 -37
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +28 -25
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +2 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +34 -23
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +7 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +3 -2
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +17 -15
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +9 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +11 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +24 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +3 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +5 -4
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +26 -23
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +8 -6
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +4 -3
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -19
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +73 -63
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +19 -15
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +1 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +23 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +20 -14
- package/vscode/src/vs/base/browser/deviceAccess.js +0 -61
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +0 -13
- package/vscode/src/vs/workbench/browser/window.js +0 -330
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +0 -371
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +0 -188
|
@@ -8,7 +8,7 @@ import { extname, isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
|
8
8
|
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
9
9
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
10
10
|
import { UndoCommand, RedoCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
11
|
-
import {
|
|
11
|
+
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
12
12
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
13
13
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
14
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
@@ -26,7 +26,7 @@ import { ContributedCustomEditors } from '../common/contributedCustomEditors.js'
|
|
|
26
26
|
import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
27
27
|
|
|
28
28
|
let CustomEditorService = class CustomEditorService extends Disposable {
|
|
29
|
-
constructor(
|
|
29
|
+
constructor(fileService, storageService, editorService, editorGroupService, instantiationService, uriIdentityService, editorResolverService) {
|
|
30
30
|
super();
|
|
31
31
|
this.editorService = editorService;
|
|
32
32
|
this.editorGroupService = editorGroupService;
|
|
@@ -40,18 +40,26 @@ let CustomEditorService = class CustomEditorService extends Disposable {
|
|
|
40
40
|
this._onDidChangeEditorTypes = this._register(( new Emitter()));
|
|
41
41
|
this.onDidChangeEditorTypes = this._onDidChangeEditorTypes.event;
|
|
42
42
|
this._fileEditorFactory = ( Registry.as(EditorExtensions.EditorFactory)).getFileEditorFactory();
|
|
43
|
-
this._activeCustomEditorId = CONTEXT_ACTIVE_CUSTOM_EDITOR_ID.bindTo(contextKeyService);
|
|
44
|
-
this._focusedCustomEditorIsEditable = CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE.bindTo(contextKeyService);
|
|
45
43
|
this._contributedEditors = this._register(( new ContributedCustomEditors(storageService)));
|
|
46
44
|
this.editorResolverService.bufferChangeEvents(this.registerContributionPoints.bind(this));
|
|
47
45
|
this._register(this._contributedEditors.onChange(() => {
|
|
48
46
|
this.editorResolverService.bufferChangeEvents(this.registerContributionPoints.bind(this));
|
|
49
|
-
this.updateContexts();
|
|
50
47
|
this._onDidChangeEditorTypes.fire();
|
|
51
48
|
}));
|
|
52
|
-
|
|
49
|
+
const activeCustomEditorContextKeyProvider = {
|
|
50
|
+
contextKey: CONTEXT_ACTIVE_CUSTOM_EDITOR_ID,
|
|
51
|
+
getGroupContextKeyValue: group => this.getActiveCustomEditorId(group),
|
|
52
|
+
onDidChange: this.onDidChangeEditorTypes
|
|
53
|
+
};
|
|
54
|
+
const customEditorIsEditableContextKeyProvider = {
|
|
55
|
+
contextKey: CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE,
|
|
56
|
+
getGroupContextKeyValue: group => this.getCustomEditorIsEditable(group),
|
|
57
|
+
onDidChange: this.onDidChangeEditorTypes
|
|
58
|
+
};
|
|
59
|
+
this._register(this.editorGroupService.registerContextKeyProvider(activeCustomEditorContextKeyProvider));
|
|
60
|
+
this._register(this.editorGroupService.registerContextKeyProvider(customEditorIsEditableContextKeyProvider));
|
|
53
61
|
this._register(fileService.onDidRunOperation(e => {
|
|
54
|
-
if (e.isOperation(
|
|
62
|
+
if (e.isOperation(FileOperation.MOVE)) {
|
|
55
63
|
this.handleMovedFileInOpenedFileEditors(e.resource, this.uriIdentityService.asCanonicalUri(e.target.resource));
|
|
56
64
|
}
|
|
57
65
|
}));
|
|
@@ -62,7 +70,6 @@ let CustomEditorService = class CustomEditorService extends Disposable {
|
|
|
62
70
|
this._register(RedoCommand.addImplementation(PRIORITY, 'custom-editor', () => {
|
|
63
71
|
return this.withActiveCustomEditor(editor => editor.redo());
|
|
64
72
|
}));
|
|
65
|
-
this.updateContexts();
|
|
66
73
|
}
|
|
67
74
|
getEditorTypes() {
|
|
68
75
|
return [...this._contributedEditors];
|
|
@@ -143,16 +150,21 @@ let CustomEditorService = class CustomEditorService extends Disposable {
|
|
|
143
150
|
getCustomEditorCapabilities(viewType) {
|
|
144
151
|
return this._editorCapabilities.get(viewType);
|
|
145
152
|
}
|
|
146
|
-
|
|
147
|
-
const activeEditorPane =
|
|
153
|
+
getActiveCustomEditorId(group) {
|
|
154
|
+
const activeEditorPane = group.activeEditorPane;
|
|
148
155
|
const resource = activeEditorPane?.input?.resource;
|
|
149
156
|
if (!resource) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
157
|
+
return '';
|
|
158
|
+
}
|
|
159
|
+
return activeEditorPane?.input instanceof CustomEditorInput ? activeEditorPane.input.viewType : '';
|
|
160
|
+
}
|
|
161
|
+
getCustomEditorIsEditable(group) {
|
|
162
|
+
const activeEditorPane = group.activeEditorPane;
|
|
163
|
+
const resource = activeEditorPane?.input?.resource;
|
|
164
|
+
if (!resource) {
|
|
165
|
+
return false;
|
|
153
166
|
}
|
|
154
|
-
|
|
155
|
-
this._focusedCustomEditorIsEditable.set(activeEditorPane?.input instanceof CustomEditorInput);
|
|
167
|
+
return activeEditorPane?.input instanceof CustomEditorInput;
|
|
156
168
|
}
|
|
157
169
|
async handleMovedFileInOpenedFileEditors(oldResource, newResource) {
|
|
158
170
|
if (extname(oldResource).toLowerCase() === extname(newResource).toLowerCase()) {
|
|
@@ -202,14 +214,13 @@ let CustomEditorService = class CustomEditorService extends Disposable {
|
|
|
202
214
|
}
|
|
203
215
|
};
|
|
204
216
|
CustomEditorService = ( __decorate([
|
|
205
|
-
( __param(0,
|
|
206
|
-
( __param(1,
|
|
207
|
-
( __param(2,
|
|
208
|
-
( __param(3,
|
|
209
|
-
( __param(4,
|
|
210
|
-
( __param(5,
|
|
211
|
-
( __param(6,
|
|
212
|
-
( __param(7, IEditorResolverService))
|
|
217
|
+
( __param(0, IFileService)),
|
|
218
|
+
( __param(1, IStorageService)),
|
|
219
|
+
( __param(2, IEditorService)),
|
|
220
|
+
( __param(3, IEditorGroupsService)),
|
|
221
|
+
( __param(4, IInstantiationService)),
|
|
222
|
+
( __param(5, IUriIdentityService)),
|
|
223
|
+
( __param(6, IEditorResolverService))
|
|
213
224
|
], CustomEditorService));
|
|
214
225
|
|
|
215
226
|
export { CustomEditorService };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
4
5
|
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
5
6
|
import { CustomEditorInfo } from './customEditor.js';
|
|
6
7
|
import { customEditorsExtensionPoint } from './extensionPoint.js';
|
|
@@ -16,7 +17,7 @@ class ContributedCustomEditors extends Disposable {
|
|
|
16
17
|
this._onChange = this._register(( (new Emitter())));
|
|
17
18
|
this.onChange = this._onChange.event;
|
|
18
19
|
this._memento = ( (new Memento(ContributedCustomEditors.CUSTOM_EDITORS_STORAGE_ID, storageService)));
|
|
19
|
-
const mementoObject = this._memento.getMemento(
|
|
20
|
+
const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
20
21
|
for (const info of (mementoObject[ContributedCustomEditors.CUSTOM_EDITORS_ENTRY_ID] || [])) {
|
|
21
22
|
this.add(( (new CustomEditorInfo(info))));
|
|
22
23
|
}
|
|
@@ -37,7 +38,7 @@ class ContributedCustomEditors extends Disposable {
|
|
|
37
38
|
}))));
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
const mementoObject = this._memento.getMemento(
|
|
41
|
+
const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
41
42
|
mementoObject[ContributedCustomEditors.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( (this._editors.values())));
|
|
42
43
|
this._memento.saveMemento();
|
|
43
44
|
this._onChange.fire();
|
|
@@ -9,6 +9,12 @@ const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID = ( (new RawContextKey('activeCustomEditor
|
|
|
9
9
|
description: ( localizeWithPath(_moduleId, 0, "The viewType of the currently active custom editor.")),
|
|
10
10
|
})));
|
|
11
11
|
const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE = ( (new RawContextKey('focusedCustomEditorIsEditable', false)));
|
|
12
|
+
var CustomEditorPriority;
|
|
13
|
+
( ((function(CustomEditorPriority) {
|
|
14
|
+
CustomEditorPriority["default"] = "default";
|
|
15
|
+
CustomEditorPriority["builtin"] = "builtin";
|
|
16
|
+
CustomEditorPriority["option"] = "option";
|
|
17
|
+
})(CustomEditorPriority || (CustomEditorPriority = {}))));
|
|
12
18
|
class CustomEditorInfo {
|
|
13
19
|
constructor(descriptor) {
|
|
14
20
|
this.id = descriptor.id;
|
|
@@ -52,4 +58,4 @@ function isLowerPriority(otherEditor, editor) {
|
|
|
52
58
|
return priorityToRank(otherEditor.priority) < priorityToRank(editor.priority);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
export { CONTEXT_ACTIVE_CUSTOM_EDITOR_ID, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorInfo, CustomEditorInfoCollection };
|
|
61
|
+
export { CONTEXT_ACTIVE_CUSTOM_EDITOR_ID, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorInfo, CustomEditorInfoCollection, CustomEditorPriority };
|
|
@@ -3,6 +3,7 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
|
3
3
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
5
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
|
+
import { CustomEditorPriority } from './customEditor.js';
|
|
6
7
|
import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
7
8
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
8
9
|
import { languagesExtPoint } from 'vscode/vscode/vs/workbench/services/language/common/languageService';
|
|
@@ -76,8 +77,8 @@ const CustomEditorsContribution = {
|
|
|
76
77
|
'Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting.'
|
|
77
78
|
)),
|
|
78
79
|
enum: [
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
CustomEditorPriority.default,
|
|
81
|
+
CustomEditorPriority.option,
|
|
81
82
|
],
|
|
82
83
|
markdownEnumDescriptions: [
|
|
83
84
|
( localizeWithPath(
|
package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
2
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
2
3
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
3
4
|
import { externalUriOpenersConfigurationNode } from 'vscode/vscode/vs/workbench/contrib/externalUriOpener/common/configuration';
|
|
4
5
|
import 'vscode/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService';
|
package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import './media/languageStatus.css.js';
|
|
3
|
-
import { getWindow, addDisposableListener, append } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
|
+
import { getWindow, isHTMLElement, addDisposableListener, append } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
4
|
import { renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
5
5
|
import { Disposable, DisposableStore, dispose, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
@@ -11,7 +11,8 @@ import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
|
11
11
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
12
12
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
13
|
import { ILanguageStatusService } from 'vscode/vscode/vs/workbench/services/languageStatus/common/languageStatusService.service';
|
|
14
|
-
import {
|
|
14
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
15
|
+
import { ShowTooltipCommand, StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
15
16
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
16
17
|
import { parseLinkedText } from 'vscode/vscode/vs/base/common/linkedText';
|
|
17
18
|
import { Link } from 'vscode/vscode/vs/platform/opener/browser/link';
|
|
@@ -20,6 +21,7 @@ import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
|
20
21
|
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
21
22
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
22
23
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
24
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
23
25
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
24
26
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
25
27
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -48,11 +50,11 @@ let StoredCounter = class StoredCounter {
|
|
|
48
50
|
this._key = _key;
|
|
49
51
|
}
|
|
50
52
|
get value() {
|
|
51
|
-
return this._storageService.getNumber(this._key,
|
|
53
|
+
return this._storageService.getNumber(this._key, StorageScope.PROFILE, 0);
|
|
52
54
|
}
|
|
53
55
|
increment() {
|
|
54
56
|
const n = this.value + 1;
|
|
55
|
-
this._storageService.store(this._key, n,
|
|
57
|
+
this._storageService.store(this._key, n, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
56
58
|
return n;
|
|
57
59
|
}
|
|
58
60
|
};
|
|
@@ -62,7 +64,7 @@ StoredCounter = ( (__decorate([
|
|
|
62
64
|
let LanguageStatusContribution = class LanguageStatusContribution extends Disposable {
|
|
63
65
|
constructor(instantiationService, editorGroupService, editorService) {
|
|
64
66
|
super();
|
|
65
|
-
const mainInstantiationService = instantiationService.createChild(( (new ServiceCollection([IEditorService, editorService.createScoped('main', this._store)]))));
|
|
67
|
+
const mainInstantiationService = this._register(instantiationService.createChild(( (new ServiceCollection([IEditorService, editorService.createScoped('main', this._store)])))));
|
|
66
68
|
this._register(mainInstantiationService.createInstance(LanguageStatus));
|
|
67
69
|
this._register(editorGroupService.onDidCreateAuxiliaryEditorPart(({ instantiationService, disposables }) => {
|
|
68
70
|
disposables.add(instantiationService.createInstance(LanguageStatus));
|
|
@@ -89,7 +91,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
89
91
|
this._dedicated = ( (new Set()));
|
|
90
92
|
this._dedicatedEntries = ( (new Map()));
|
|
91
93
|
this._renderDisposables = ( (new DisposableStore()));
|
|
92
|
-
_storageService.onDidChangeValue(
|
|
94
|
+
_storageService.onDidChangeValue(StorageScope.PROFILE, LanguageStatus_1._keyDedicatedItems, this._disposables)(this._handleStorageChange, this, this._disposables);
|
|
93
95
|
this._restoreState();
|
|
94
96
|
this._interactionCounter = ( (new StoredCounter(_storageService, 'languageStatus.interactCount')));
|
|
95
97
|
_languageStatusService.onDidChange(this._update, this, this._disposables);
|
|
@@ -114,7 +116,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
114
116
|
this._update();
|
|
115
117
|
}
|
|
116
118
|
_restoreState() {
|
|
117
|
-
const raw = this._storageService.get(LanguageStatus_1._keyDedicatedItems,
|
|
119
|
+
const raw = this._storageService.get(LanguageStatus_1._keyDedicatedItems, StorageScope.PROFILE, '[]');
|
|
118
120
|
try {
|
|
119
121
|
const ids = JSON.parse(raw);
|
|
120
122
|
this._dedicated = ( (new Set(ids)));
|
|
@@ -125,11 +127,11 @@ let LanguageStatus = class LanguageStatus {
|
|
|
125
127
|
}
|
|
126
128
|
_storeState() {
|
|
127
129
|
if (this._dedicated.size === 0) {
|
|
128
|
-
this._storageService.remove(LanguageStatus_1._keyDedicatedItems,
|
|
130
|
+
this._storageService.remove(LanguageStatus_1._keyDedicatedItems, StorageScope.PROFILE);
|
|
129
131
|
}
|
|
130
132
|
else {
|
|
131
133
|
const raw = JSON.stringify(Array.from(( (this._dedicated.keys()))));
|
|
132
|
-
this._storageService.store(LanguageStatus_1._keyDedicatedItems, raw,
|
|
134
|
+
this._storageService.store(LanguageStatus_1._keyDedicatedItems, raw, StorageScope.PROFILE, StorageTarget.USER);
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
_createViewModel(editor) {
|
|
@@ -185,7 +187,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
185
187
|
text: isOneBusy ? `${text}\u00A0\u00A0$(sync~spin)` : text,
|
|
186
188
|
};
|
|
187
189
|
if (!this._combinedEntry) {
|
|
188
|
-
this._combinedEntry = this._statusBarService.addEntry(props, LanguageStatus_1._id,
|
|
190
|
+
this._combinedEntry = this._statusBarService.addEntry(props, LanguageStatus_1._id, StatusbarAlignment.RIGHT, { id: 'status.editor.mode', alignment: StatusbarAlignment.LEFT, compact: true });
|
|
189
191
|
}
|
|
190
192
|
else {
|
|
191
193
|
this._combinedEntry.update(props);
|
|
@@ -194,7 +196,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
194
196
|
const targetWindow = getWindow(editor?.getContainerDomNode());
|
|
195
197
|
const node = targetWindow.document.querySelector('.monaco-workbench .statusbar DIV#status\\.languageStatus A>SPAN.codicon');
|
|
196
198
|
const container = targetWindow.document.querySelector('.monaco-workbench .statusbar DIV#status\\.languageStatus');
|
|
197
|
-
if (node
|
|
199
|
+
if (isHTMLElement(node) && container) {
|
|
198
200
|
const _wiggle = 'wiggle';
|
|
199
201
|
const _flash = 'flash';
|
|
200
202
|
if (!isOneBusy) {
|
|
@@ -210,7 +212,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
210
212
|
}
|
|
211
213
|
if (!userHasInteractedWithStatus) {
|
|
212
214
|
const hoverTarget = targetWindow.document.querySelector('.monaco-workbench .context-view');
|
|
213
|
-
if (hoverTarget
|
|
215
|
+
if (isHTMLElement(hoverTarget)) {
|
|
214
216
|
const observer = ( (new MutationObserver(() => {
|
|
215
217
|
if (targetWindow.document.contains(element)) {
|
|
216
218
|
this._interactionCounter.increment();
|
|
@@ -227,7 +229,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
227
229
|
const props = LanguageStatus_1._asStatusbarEntry(status);
|
|
228
230
|
let entry = this._dedicatedEntries.get(status.id);
|
|
229
231
|
if (!entry) {
|
|
230
|
-
entry = this._statusBarService.addEntry(props, status.id,
|
|
232
|
+
entry = this._statusBarService.addEntry(props, status.id, StatusbarAlignment.RIGHT, { id: 'status.editor.mode', alignment: StatusbarAlignment.RIGHT });
|
|
231
233
|
}
|
|
232
234
|
else {
|
|
233
235
|
entry.update(props);
|
|
@@ -363,7 +365,7 @@ LanguageStatus = LanguageStatus_1 = ( (__decorate([
|
|
|
363
365
|
( (__param(4, IOpenerService))),
|
|
364
366
|
( (__param(5, IStorageService)))
|
|
365
367
|
], LanguageStatus)));
|
|
366
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(LanguageStatusContribution,
|
|
368
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(LanguageStatusContribution, LifecyclePhase.Restored);
|
|
367
369
|
registerAction2(class extends Action2 {
|
|
368
370
|
constructor() {
|
|
369
371
|
super({
|
|
@@ -374,6 +376,6 @@ registerAction2(class extends Action2 {
|
|
|
374
376
|
});
|
|
375
377
|
}
|
|
376
378
|
run(accessor) {
|
|
377
|
-
accessor.get(IStorageService).remove('languageStatus.interactCount',
|
|
379
|
+
accessor.get(IStorageService).remove('languageStatus.interactCount', StorageScope.PROFILE);
|
|
378
380
|
}
|
|
379
381
|
});
|
package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js
CHANGED
|
@@ -6,6 +6,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
6
6
|
import { ILanguageStatusService } from 'vscode/vscode/vs/workbench/services/languageStatus/common/languageStatusService.service';
|
|
7
7
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
8
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
9
10
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
10
11
|
import { FoldingController } from 'vscode/vscode/vs/editor/contrib/folding/browser/folding';
|
|
11
12
|
import { ColorDetector } from 'vscode/vscode/vs/editor/contrib/colorPicker/browser/colorDetector';
|
|
@@ -112,6 +113,6 @@ class LanguageStatusEntry {
|
|
|
112
113
|
this._indicatorChangeListener = undefined;
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(LimitIndicatorContribution,
|
|
116
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(LimitIndicatorContribution, LifecyclePhase.Restored);
|
|
116
117
|
|
|
117
118
|
export { LimitIndicatorContribution };
|
|
@@ -6,6 +6,7 @@ import { Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/action
|
|
|
6
6
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
7
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
8
8
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
9
|
+
import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
9
10
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
10
11
|
import { MergeEditorInputData } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
11
12
|
import { MergeEditor } from '../view/mergeEditor.js';
|
|
@@ -502,7 +503,7 @@ class ResetCloseWithConflictsChoice extends Action2 {
|
|
|
502
503
|
});
|
|
503
504
|
}
|
|
504
505
|
run(accessor) {
|
|
505
|
-
accessor.get(IStorageService).remove(StorageCloseWithConflicts,
|
|
506
|
+
accessor.get(IStorageService).remove(StorageCloseWithConflicts, StorageScope.PROFILE);
|
|
506
507
|
}
|
|
507
508
|
}
|
|
508
509
|
class AcceptMerge extends MergeEditorAction2 {
|
|
@@ -4,12 +4,13 @@ import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/confi
|
|
|
4
4
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
5
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
6
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
7
|
-
import { Extensions as Extensions$1, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
7
|
+
import { Extensions as Extensions$1, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
8
8
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
9
9
|
import { OpenResultResource, SetMixedLayout, SetColumnLayout, OpenMergeEditor, OpenBaseFile, ShowNonConflictingChanges, ShowHideBase, ShowHideTopBase, ShowHideCenterBase, GoToNextUnhandledConflict, GoToPreviousUnhandledConflict, ToggleActiveConflictInput1, ToggleActiveConflictInput2, CompareInput1WithBaseCommand, CompareInput2WithBaseCommand, AcceptAllInput1, AcceptAllInput2, ResetToBaseAndAutoMergeCommand, AcceptMerge, ResetCloseWithConflictsChoice } from './commands/commands.js';
|
|
10
10
|
import { MergeEditorCopyContentsToJSON, MergeEditorSaveContentsToFolder, MergeEditorLoadContentsFromFolder } from './commands/devCommands.js';
|
|
11
11
|
import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
12
12
|
import { MergeEditor, MergeEditorOpenHandlerContribution, MergeEditorResolverContribution } from './view/mergeEditor.js';
|
|
13
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
13
14
|
import { MergeEditorSerializer } from './mergeEditorSerializer.js';
|
|
14
15
|
|
|
15
16
|
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution";
|
|
@@ -60,5 +61,5 @@ registerAction2(MergeEditorSaveContentsToFolder);
|
|
|
60
61
|
registerAction2(MergeEditorLoadContentsFromFolder);
|
|
61
62
|
( (Registry
|
|
62
63
|
.as(Extensions$1.Workbench)))
|
|
63
|
-
.registerWorkbenchContribution(MergeEditorOpenHandlerContribution,
|
|
64
|
-
registerWorkbenchContribution2(MergeEditorResolverContribution.ID, MergeEditorResolverContribution,
|
|
64
|
+
.registerWorkbenchContribution(MergeEditorOpenHandlerContribution, LifecyclePhase.Restored);
|
|
65
|
+
registerWorkbenchContribution2(MergeEditorResolverContribution.ID, MergeEditorResolverContribution, WorkbenchPhase.BlockStartup );
|
|
@@ -8,7 +8,7 @@ import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun
|
|
|
8
8
|
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
9
9
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
10
10
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
11
|
-
import { EDITOR_FONT_DEFAULTS } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
11
|
+
import { EditorOption, EDITOR_FONT_DEFAULTS } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
12
12
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
13
13
|
import { ModifiedBaseRangeStateKind, ModifiedBaseRangeState } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange';
|
|
14
14
|
import { FixedZoneWidget } from './fixedZoneWidget.js';
|
|
@@ -19,7 +19,7 @@ class ConflictActionsFactory extends Disposable {
|
|
|
19
19
|
super();
|
|
20
20
|
this._editor = _editor;
|
|
21
21
|
this._register(this._editor.onDidChangeConfiguration((e) => {
|
|
22
|
-
if (e.hasChanged(
|
|
22
|
+
if (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.codeLensFontSize) || e.hasChanged(EditorOption.codeLensFontFamily)) {
|
|
23
23
|
this._updateLensStyle();
|
|
24
24
|
}
|
|
25
25
|
}));
|
|
@@ -31,8 +31,8 @@ class ConflictActionsFactory extends Disposable {
|
|
|
31
31
|
}
|
|
32
32
|
_updateLensStyle() {
|
|
33
33
|
const { codeLensHeight, fontSize } = this._getLayoutInfo();
|
|
34
|
-
const fontFamily = this._editor.getOption(
|
|
35
|
-
const editorFontInfo = this._editor.getOption(
|
|
34
|
+
const fontFamily = this._editor.getOption(EditorOption.codeLensFontFamily);
|
|
35
|
+
const editorFontInfo = this._editor.getOption(EditorOption.fontInfo);
|
|
36
36
|
const fontFamilyVar = `--codelens-font-family${this._styleClassName}`;
|
|
37
37
|
const fontFeaturesVar = `--codelens-font-features${this._styleClassName}`;
|
|
38
38
|
let newStyle = `
|
|
@@ -47,10 +47,10 @@ class ConflictActionsFactory extends Disposable {
|
|
|
47
47
|
this._editor.getContainerDomNode().style.setProperty(fontFeaturesVar, editorFontInfo.fontFeatureSettings);
|
|
48
48
|
}
|
|
49
49
|
_getLayoutInfo() {
|
|
50
|
-
const lineHeightFactor = Math.max(1.3, this._editor.getOption(
|
|
51
|
-
let fontSize = this._editor.getOption(
|
|
50
|
+
const lineHeightFactor = Math.max(1.3, this._editor.getOption(EditorOption.lineHeight) / this._editor.getOption(EditorOption.fontSize));
|
|
51
|
+
let fontSize = this._editor.getOption(EditorOption.codeLensFontSize);
|
|
52
52
|
if (!fontSize || fontSize < 5) {
|
|
53
|
-
fontSize = (this._editor.getOption(
|
|
53
|
+
fontSize = (this._editor.getOption(EditorOption.fontSize) * .9) | 0;
|
|
54
54
|
}
|
|
55
55
|
return {
|
|
56
56
|
fontSize,
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js
CHANGED
|
@@ -7,7 +7,7 @@ import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived
|
|
|
7
7
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
8
8
|
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
9
9
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
10
|
-
import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
10
|
+
import { MinimapPosition, OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
11
11
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
12
12
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
13
13
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -88,7 +88,7 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
88
88
|
blockIsAfterEnd: range.startLineNumber > textModel.getLineCount(),
|
|
89
89
|
description: 'Merge Editor',
|
|
90
90
|
minimap: {
|
|
91
|
-
position:
|
|
91
|
+
position: MinimapPosition.Gutter,
|
|
92
92
|
color: { id: isHandled ? handledConflictMinimapOverViewRulerColor : unhandledConflictMinimapOverViewRulerColor },
|
|
93
93
|
},
|
|
94
94
|
overviewRuler: modifiedBaseRange.isConflicting ? {
|
|
@@ -15,7 +15,8 @@ import { FoldingController } from 'vscode/vscode/vs/editor/contrib/folding/brows
|
|
|
15
15
|
import { MenuWorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
16
16
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
17
|
import { DEFAULT_EDITOR_MIN_DIMENSIONS, DEFAULT_EDITOR_MAX_DIMENSIONS } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
|
|
18
|
-
import { setStyle
|
|
18
|
+
import { setStyle } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/utils';
|
|
19
|
+
import { observableConfigValue } from 'vscode/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
19
20
|
|
|
20
21
|
class CodeEditorView extends Disposable {
|
|
21
22
|
updateOptions(newOptions) {
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js
CHANGED
|
@@ -14,13 +14,14 @@ import 'vscode/vscode/vs/base/common/cancellation';
|
|
|
14
14
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
15
15
|
import { noBreakWhitespace } from 'vscode/vscode/vs/base/common/strings';
|
|
16
16
|
import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
17
|
-
import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
17
|
+
import { MinimapPosition, OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
18
18
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
19
19
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
20
20
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
21
21
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
22
22
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
23
23
|
import { defaultToggleStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
24
|
+
import { InputState } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange';
|
|
24
25
|
import { applyObservableDecorations, setFields } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/utils';
|
|
25
26
|
import { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverViewRulerColor } from '../colors.js';
|
|
26
27
|
import { EditorGutter } from '../editorGutter.js';
|
|
@@ -96,7 +97,7 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
96
97
|
blockIsAfterEnd: range.startLineNumber > textModel.getLineCount(),
|
|
97
98
|
description: 'Merge Editor',
|
|
98
99
|
minimap: {
|
|
99
|
-
position:
|
|
100
|
+
position: MinimapPosition.Gutter,
|
|
100
101
|
color: { id: isHandled ? handledConflictMinimapOverViewRulerColor : unhandledConflictMinimapOverViewRulerColor },
|
|
101
102
|
},
|
|
102
103
|
overviewRuler: modifiedBaseRange.isConflicting ? {
|
|
@@ -193,8 +194,8 @@ class ModifiedBaseRangeGutterItemModel {
|
|
|
193
194
|
.getState(this.baseRange)
|
|
194
195
|
.read(reader)
|
|
195
196
|
.getInput(this.inputNumber);
|
|
196
|
-
return input ===
|
|
197
|
-
?
|
|
197
|
+
return input === InputState.second && !this.baseRange.isOrderRelevant
|
|
198
|
+
? InputState.first
|
|
198
199
|
: input;
|
|
199
200
|
});
|
|
200
201
|
this.state = derived(this, reader => {
|
|
@@ -297,10 +298,10 @@ class MergeConflictGutterItemView extends Disposable {
|
|
|
297
298
|
const item = this.item.read(reader);
|
|
298
299
|
const value = item.toggleState.read(reader);
|
|
299
300
|
const iconMap = {
|
|
300
|
-
[
|
|
301
|
-
[
|
|
302
|
-
[
|
|
303
|
-
[
|
|
301
|
+
[InputState.excluded]: { icon: undefined, checked: false, title: ( localizeWithPath(_moduleId, 6, "Accept")) },
|
|
302
|
+
[InputState.unrecognized]: { icon: Codicon.circleFilled, checked: false, title: ( localizeWithPath(_moduleId, 7, "Accept (result is dirty)")) },
|
|
303
|
+
[InputState.first]: { icon: Codicon.check, checked: true, title: ( localizeWithPath(_moduleId, 8, "Undo accept")) },
|
|
304
|
+
[InputState.second]: { icon: Codicon.checkAll, checked: true, title: ( localizeWithPath(_moduleId, 9, "Undo accept (currently second)")) },
|
|
304
305
|
};
|
|
305
306
|
const state = iconMap[value];
|
|
306
307
|
checkBox.setIcon(state.icon);
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js
CHANGED
|
@@ -9,7 +9,7 @@ import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived
|
|
|
9
9
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
10
10
|
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
11
11
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
12
|
-
import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
12
|
+
import { MinimapPosition, OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
13
13
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
14
14
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
15
15
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -71,7 +71,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
71
71
|
blockIsAfterEnd: range.startLineNumber > textModel.getLineCount(),
|
|
72
72
|
description: 'Result Diff',
|
|
73
73
|
minimap: {
|
|
74
|
-
position:
|
|
74
|
+
position: MinimapPosition.Gutter,
|
|
75
75
|
color: { id: isHandled ? handledConflictMinimapOverViewRulerColor : unhandledConflictMinimapOverViewRulerColor },
|
|
76
76
|
},
|
|
77
77
|
overviewRuler: modifiedBaseRange.isConflicting ? {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { reset } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
3
|
import { SerializableGrid } from '../../../../../base/browser/ui/grid/grid.js';
|
|
4
|
+
import 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
4
5
|
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
5
6
|
import { BugIndicatingError, onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
6
7
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -15,12 +16,14 @@ import { isEqual, basename } from 'vscode/vscode/vs/base/common/resources';
|
|
|
15
16
|
import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
16
17
|
import './media/mergeEditor.css.js';
|
|
17
18
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
19
|
+
import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
|
|
18
20
|
import { ITextResourceConfigurationService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
|
|
19
21
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
20
22
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
21
23
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
22
24
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
23
25
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
26
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
24
27
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
25
28
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
26
29
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
@@ -29,7 +32,8 @@ import { DEFAULT_EDITOR_ASSOCIATION } from 'vscode/vscode/vs/workbench/common/ed
|
|
|
29
32
|
import { applyTextEditorOptions } from 'vscode/vscode/vs/workbench/common/editor/editorOptions';
|
|
30
33
|
import { readTransientState, writeTransientState } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/toggleWordWrap';
|
|
31
34
|
import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
32
|
-
import {
|
|
35
|
+
import { PersistentStore, deepMerge, thenIfNotDisposed } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/utils';
|
|
36
|
+
import { observableConfigValue } from 'vscode/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
33
37
|
import { BaseCodeEditorView } from './editors/baseCodeEditorView.js';
|
|
34
38
|
import { ScrollSynchronizer } from './scrollSynchronizer.js';
|
|
35
39
|
import { MergeEditorViewModel } from './viewModel.js';
|
|
@@ -43,6 +47,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
43
47
|
import './colors.js';
|
|
44
48
|
import { InputCodeEditorView } from './editors/inputCodeEditorView.js';
|
|
45
49
|
import { ResultCodeEditorView } from './editors/resultCodeEditorView.js';
|
|
50
|
+
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
46
51
|
import { AbstractTextEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/textEditor';
|
|
47
52
|
|
|
48
53
|
var MergeEditor_1, MergeEditorLayoutStore_1;
|
|
@@ -314,7 +319,7 @@ let MergeEditor = class MergeEditor extends AbstractTextEditor {
|
|
|
314
319
|
setOptions(options) {
|
|
315
320
|
super.setOptions(options);
|
|
316
321
|
if (options) {
|
|
317
|
-
applyTextEditorOptions(options, this.inputResultView.editor,
|
|
322
|
+
applyTextEditorOptions(options, this.inputResultView.editor, ScrollType.Smooth);
|
|
318
323
|
}
|
|
319
324
|
}
|
|
320
325
|
clearInput() {
|
|
@@ -460,7 +465,7 @@ let MergeEditor = class MergeEditor extends AbstractTextEditor {
|
|
|
460
465
|
height = this._grid.value.height;
|
|
461
466
|
}
|
|
462
467
|
this._grid.value = SerializableGrid.from({
|
|
463
|
-
orientation:
|
|
468
|
+
orientation: Orientation.VERTICAL,
|
|
464
469
|
size: 100,
|
|
465
470
|
groups: descriptor,
|
|
466
471
|
}, {
|
|
@@ -529,7 +534,7 @@ let MergeEditorLayoutStore = class MergeEditorLayoutStore {
|
|
|
529
534
|
constructor(_storageService) {
|
|
530
535
|
this._storageService = _storageService;
|
|
531
536
|
this._value = { kind: 'mixed', showBase: false, showBaseAtTop: true };
|
|
532
|
-
const value = _storageService.get(MergeEditorLayoutStore_1._key,
|
|
537
|
+
const value = _storageService.get(MergeEditorLayoutStore_1._key, StorageScope.PROFILE, 'mixed');
|
|
533
538
|
if (value === 'mixed' || value === 'columns') {
|
|
534
539
|
this._value = { kind: value, showBase: false, showBaseAtTop: true };
|
|
535
540
|
}
|
|
@@ -548,7 +553,7 @@ let MergeEditorLayoutStore = class MergeEditorLayoutStore {
|
|
|
548
553
|
set value(value) {
|
|
549
554
|
if (this._value !== value) {
|
|
550
555
|
this._value = value;
|
|
551
|
-
this._storageService.store(MergeEditorLayoutStore_1._key, JSON.stringify(this._value),
|
|
556
|
+
this._storageService.store(MergeEditorLayoutStore_1._key, JSON.stringify(this._value), StorageScope.PROFILE, StorageTarget.USER);
|
|
552
557
|
}
|
|
553
558
|
}
|
|
554
559
|
};
|
|
@@ -570,7 +575,7 @@ let MergeEditorOpenHandlerContribution = class MergeEditorOpenHandlerContributio
|
|
|
570
575
|
&& activePane.input instanceof MergeEditorInput
|
|
571
576
|
&& isEqual(input.resource, activePane.input.result)) {
|
|
572
577
|
const targetEditor = activePane.getControl();
|
|
573
|
-
applyTextEditorOptions(input.options, targetEditor,
|
|
578
|
+
applyTextEditorOptions(input.options, targetEditor, ScrollType.Smooth);
|
|
574
579
|
return targetEditor;
|
|
575
580
|
}
|
|
576
581
|
return null;
|