@codingame/monaco-vscode-view-common-service-override 9.0.2 → 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
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js
CHANGED
|
@@ -3,11 +3,13 @@ import { reset, h } from 'vscode/vscode/vs/base/browser/dom';
|
|
|
3
3
|
import { renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
4
4
|
import { BugIndicatingError } from 'vscode/vscode/vs/base/common/errors';
|
|
5
5
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
6
|
-
import
|
|
6
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
7
|
+
import 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
8
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
8
|
-
import 'vscode/vscode/vs/base/common/observableInternal/
|
|
9
|
+
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
9
10
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
10
|
-
import
|
|
11
|
+
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
12
|
+
import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
11
13
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
12
14
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
13
15
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -87,7 +89,7 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
87
89
|
blockIsAfterEnd: range.startLineNumber > textModel.getLineCount(),
|
|
88
90
|
description: 'Merge Editor',
|
|
89
91
|
minimap: {
|
|
90
|
-
position:
|
|
92
|
+
position: 2 ,
|
|
91
93
|
color: { id: isHandled ? handledConflictMinimapOverViewRulerColor : unhandledConflictMinimapOverViewRulerColor },
|
|
92
94
|
},
|
|
93
95
|
overviewRuler: modifiedBaseRange.isConflicting ? {
|
|
@@ -115,16 +117,16 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
115
117
|
return;
|
|
116
118
|
}
|
|
117
119
|
this.editor.setModel(vm.model.base);
|
|
118
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(
|
|
120
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(11365, 'Base'))));
|
|
119
121
|
const baseShowDiffAgainst = vm.baseShowDiffAgainst.read(reader);
|
|
120
122
|
let node = undefined;
|
|
121
123
|
if (baseShowDiffAgainst) {
|
|
122
124
|
const label = ( localize(
|
|
123
|
-
|
|
125
|
+
11366,
|
|
124
126
|
'Comparing with {0}',
|
|
125
127
|
baseShowDiffAgainst === 1 ? vm.model.input1.title : vm.model.input2.title
|
|
126
128
|
));
|
|
127
|
-
const tooltip = ( localize(
|
|
129
|
+
const tooltip = ( localize(11367, 'Differences are highlighted with a background color.'));
|
|
128
130
|
node = h('span', { title: tooltip }, [label]).root;
|
|
129
131
|
}
|
|
130
132
|
reset(this.htmlElements.description, ...(node ? [node] : []));
|
|
@@ -3,10 +3,10 @@ import { h } from 'vscode/vscode/vs/base/browser/dom';
|
|
|
3
3
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
6
|
-
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
7
6
|
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
8
|
-
import {
|
|
7
|
+
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
9
8
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
9
|
+
import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
10
10
|
import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
11
11
|
import { CodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
12
12
|
import { Selection } from 'vscode/vscode/vs/editor/common/core/selection';
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js
CHANGED
|
@@ -7,21 +7,21 @@ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
|
7
7
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
8
|
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
9
9
|
import { transaction, observableValue } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
10
|
-
import
|
|
10
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
11
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
11
12
|
import { autorunOpts, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
12
|
-
import 'vscode/vscode/vs/base/common/observableInternal/
|
|
13
|
+
import { derivedOpts, derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
13
14
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
14
|
-
import 'vscode/vscode/vs/base/common/
|
|
15
|
+
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
15
16
|
import { noBreakWhitespace } from 'vscode/vscode/vs/base/common/strings';
|
|
16
17
|
import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
17
|
-
import {
|
|
18
|
+
import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
18
19
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
19
20
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
20
21
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
21
22
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
22
23
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
23
24
|
import { defaultToggleStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
24
|
-
import { InputState } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange';
|
|
25
25
|
import { applyObservableDecorations, setFields } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/utils';
|
|
26
26
|
import { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverViewRulerColor } from '../colors.js';
|
|
27
27
|
import { EditorGutter } from '../editorGutter.js';
|
|
@@ -96,7 +96,7 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
96
96
|
blockIsAfterEnd: range.startLineNumber > textModel.getLineCount(),
|
|
97
97
|
description: 'Merge Editor',
|
|
98
98
|
minimap: {
|
|
99
|
-
position:
|
|
99
|
+
position: 2 ,
|
|
100
100
|
color: { id: isHandled ? handledConflictMinimapOverViewRulerColor : unhandledConflictMinimapOverViewRulerColor },
|
|
101
101
|
},
|
|
102
102
|
overviewRuler: modifiedBaseRange.isConflicting ? {
|
|
@@ -159,8 +159,8 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
159
159
|
}
|
|
160
160
|
this.editor.setModel(this.inputNumber === 1 ? vm.model.input1.textModel : vm.model.input2.textModel);
|
|
161
161
|
const title = this.inputNumber === 1
|
|
162
|
-
? vm.model.input1.title || ( localize(
|
|
163
|
-
: vm.model.input2.title || ( localize(
|
|
162
|
+
? vm.model.input1.title || ( localize(11382, 'Input 1'))
|
|
163
|
+
: vm.model.input2.title || ( localize(11383, 'Input 2'));
|
|
164
164
|
const description = this.inputNumber === 1
|
|
165
165
|
? vm.model.input1.description
|
|
166
166
|
: vm.model.input2.description;
|
|
@@ -193,8 +193,8 @@ class ModifiedBaseRangeGutterItemModel {
|
|
|
193
193
|
.getState(this.baseRange)
|
|
194
194
|
.read(reader)
|
|
195
195
|
.getInput(this.inputNumber);
|
|
196
|
-
return input ===
|
|
197
|
-
?
|
|
196
|
+
return input === 2 && !this.baseRange.isOrderRelevant
|
|
197
|
+
? 1
|
|
198
198
|
: input;
|
|
199
199
|
});
|
|
200
200
|
this.state = derived(this, reader => {
|
|
@@ -242,19 +242,19 @@ class ModifiedBaseRangeGutterItemModel {
|
|
|
242
242
|
const both = state.includesInput1 && state.includesInput2;
|
|
243
243
|
return [
|
|
244
244
|
this.baseRange.input1Diffs.length > 0
|
|
245
|
-
? action('mergeEditor.acceptInput1', ( localize(
|
|
245
|
+
? action('mergeEditor.acceptInput1', ( localize(11384, 'Accept {0}', this.model.input1.title)), state.toggle(1), state.includesInput1)
|
|
246
246
|
: undefined,
|
|
247
247
|
this.baseRange.input2Diffs.length > 0
|
|
248
|
-
? action('mergeEditor.acceptInput2', ( localize(
|
|
248
|
+
? action('mergeEditor.acceptInput2', ( localize(11384, 'Accept {0}', this.model.input2.title)), state.toggle(2), state.includesInput2)
|
|
249
249
|
: undefined,
|
|
250
250
|
this.baseRange.isConflicting
|
|
251
|
-
? setFields(action('mergeEditor.acceptBoth', ( localize(
|
|
251
|
+
? setFields(action('mergeEditor.acceptBoth', ( localize(11385, 'Accept Both')), state.withInputValue(1, !both).withInputValue(2, !both), both), { enabled: this.baseRange.canBeCombined })
|
|
252
252
|
: undefined,
|
|
253
253
|
( (new Separator())),
|
|
254
254
|
this.baseRange.isConflicting
|
|
255
|
-
? setFields(action('mergeEditor.swap', ( localize(
|
|
255
|
+
? setFields(action('mergeEditor.swap', ( localize(11386, 'Swap')), state.swap(), false), { enabled: !state.kind && (!both || this.baseRange.isOrderRelevant) })
|
|
256
256
|
: undefined,
|
|
257
|
-
setFields(( (new Action('mergeEditor.markAsHandled', ( localize(
|
|
257
|
+
setFields(( (new Action('mergeEditor.markAsHandled', ( localize(11387, 'Mark as Handled')), undefined, true, () => {
|
|
258
258
|
transaction((tx) => {
|
|
259
259
|
this.model.setHandled(this.baseRange, !handled, tx);
|
|
260
260
|
});
|
|
@@ -297,10 +297,10 @@ class MergeConflictGutterItemView extends Disposable {
|
|
|
297
297
|
const item = this.item.read(reader);
|
|
298
298
|
const value = item.toggleState.read(reader);
|
|
299
299
|
const iconMap = {
|
|
300
|
-
[
|
|
301
|
-
[
|
|
302
|
-
[
|
|
303
|
-
[
|
|
300
|
+
[0 ]: { icon: undefined, checked: false, title: ( localize(11388, "Accept")) },
|
|
301
|
+
[3 ]: { icon: Codicon.circleFilled, checked: false, title: ( localize(11389, "Accept (result is dirty)")) },
|
|
302
|
+
[1 ]: { icon: Codicon.check, checked: true, title: ( localize(11390, "Undo accept")) },
|
|
303
|
+
[2 ]: { icon: Codicon.checkAll, checked: true, title: ( localize(11391, "Undo accept (currently second)")) },
|
|
304
304
|
};
|
|
305
305
|
const state = iconMap[value];
|
|
306
306
|
checkBox.setIcon(state.icon);
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js
CHANGED
|
@@ -5,11 +5,12 @@ import { renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel
|
|
|
5
5
|
import { CompareResult } from 'vscode/vscode/vs/base/common/arrays';
|
|
6
6
|
import { BugIndicatingError } from 'vscode/vscode/vs/base/common/errors';
|
|
7
7
|
import { toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
|
-
import
|
|
8
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
9
9
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
10
|
-
import 'vscode/vscode/vs/base/common/observableInternal/
|
|
10
|
+
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
11
11
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
12
|
-
import
|
|
12
|
+
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
13
|
+
import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
|
|
13
14
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
14
15
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
15
16
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -70,7 +71,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
70
71
|
blockIsAfterEnd: range.startLineNumber > textModel.getLineCount(),
|
|
71
72
|
description: 'Result Diff',
|
|
72
73
|
minimap: {
|
|
73
|
-
position:
|
|
74
|
+
position: 2 ,
|
|
74
75
|
color: { id: isHandled ? handledConflictMinimapOverViewRulerColor : unhandledConflictMinimapOverViewRulerColor },
|
|
75
76
|
},
|
|
76
77
|
overviewRuler: modifiedBaseRange.isConflicting ? {
|
|
@@ -131,7 +132,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
133
134
|
this.editor.setModel(vm.model.resultTextModel);
|
|
134
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(
|
|
135
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(11392, 'Result'))));
|
|
135
136
|
reset(this.htmlElements.description, ...renderLabelWithIcons(this._labelService.getUriLabel(vm.model.resultTextModel.uri, { relative: true })));
|
|
136
137
|
}));
|
|
137
138
|
const remainingConflictsActionBar = this._register(( (new ActionBar(this.htmlElements.detail))));
|
|
@@ -146,8 +147,8 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
146
147
|
}
|
|
147
148
|
const count = model.unhandledConflictsCount.read(reader);
|
|
148
149
|
const text = count === 1
|
|
149
|
-
? ( localize(
|
|
150
|
-
: ( localize(
|
|
150
|
+
? ( localize(11393, '{0} Conflict Remaining', count))
|
|
151
|
+
: ( localize(11394, '{0} Conflicts Remaining ', count));
|
|
151
152
|
remainingConflictsActionBar.clear();
|
|
152
153
|
remainingConflictsActionBar.push({
|
|
153
154
|
class: undefined,
|
|
@@ -159,8 +160,8 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
159
160
|
vm.goToNextModifiedBaseRange(m => !model.isHandled(m).get());
|
|
160
161
|
},
|
|
161
162
|
tooltip: count > 0
|
|
162
|
-
? ( localize(
|
|
163
|
-
: ( localize(
|
|
163
|
+
? ( localize(11395, 'Go to next conflict'))
|
|
164
|
+
: ( localize(11396, 'All conflicts handled, the merge can be completed now.')),
|
|
164
165
|
});
|
|
165
166
|
}));
|
|
166
167
|
this._register(applyObservableDecorations(this.editor, this.decorations));
|
|
@@ -1,29 +1,26 @@
|
|
|
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';
|
|
5
4
|
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
6
5
|
import { BugIndicatingError, onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
7
6
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
8
7
|
import { DisposableStore, MutableDisposable, toDisposable, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
8
|
import { observableValue, transaction } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
10
|
-
import 'vscode/vscode/vs/base/common/
|
|
9
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
11
10
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
12
|
-
import 'vscode/vscode/vs/base/common/observableInternal/
|
|
11
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
13
12
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
14
|
-
import 'vscode/vscode/vs/base/common/
|
|
13
|
+
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
15
14
|
import { isEqual, basename } from 'vscode/vscode/vs/base/common/resources';
|
|
16
15
|
import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
17
16
|
import './media/mergeEditor.css.js';
|
|
18
17
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
19
|
-
import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
|
|
20
18
|
import { ITextResourceConfigurationService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
|
|
21
19
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
22
20
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
23
21
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
24
22
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
25
23
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
26
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
27
24
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
28
25
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
29
26
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
@@ -47,7 +44,6 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
47
44
|
import './colors.js';
|
|
48
45
|
import { InputCodeEditorView } from './editors/inputCodeEditorView.js';
|
|
49
46
|
import { ResultCodeEditorView } from './editors/resultCodeEditorView.js';
|
|
50
|
-
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
51
47
|
import { AbstractTextEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/textEditor';
|
|
52
48
|
|
|
53
49
|
var MergeEditor_1, MergeEditorLayoutStore_1;
|
|
@@ -126,7 +122,7 @@ let MergeEditor = class MergeEditor extends AbstractTextEditor {
|
|
|
126
122
|
if (this.input) {
|
|
127
123
|
return this.input.getName();
|
|
128
124
|
}
|
|
129
|
-
return ( localize(
|
|
125
|
+
return ( localize(9885, "Text Merge Editor"));
|
|
130
126
|
}
|
|
131
127
|
createEditorControl(parent, initialOptions) {
|
|
132
128
|
this.rootHtmlElement = parent;
|
|
@@ -318,7 +314,7 @@ let MergeEditor = class MergeEditor extends AbstractTextEditor {
|
|
|
318
314
|
setOptions(options) {
|
|
319
315
|
super.setOptions(options);
|
|
320
316
|
if (options) {
|
|
321
|
-
applyTextEditorOptions(options, this.inputResultView.editor,
|
|
317
|
+
applyTextEditorOptions(options, this.inputResultView.editor, 0 );
|
|
322
318
|
}
|
|
323
319
|
}
|
|
324
320
|
clearInput() {
|
|
@@ -464,7 +460,7 @@ let MergeEditor = class MergeEditor extends AbstractTextEditor {
|
|
|
464
460
|
height = this._grid.value.height;
|
|
465
461
|
}
|
|
466
462
|
this._grid.value = SerializableGrid.from({
|
|
467
|
-
orientation:
|
|
463
|
+
orientation: 0 ,
|
|
468
464
|
size: 100,
|
|
469
465
|
groups: descriptor,
|
|
470
466
|
}, {
|
|
@@ -533,7 +529,7 @@ let MergeEditorLayoutStore = class MergeEditorLayoutStore {
|
|
|
533
529
|
constructor(_storageService) {
|
|
534
530
|
this._storageService = _storageService;
|
|
535
531
|
this._value = { kind: 'mixed', showBase: false, showBaseAtTop: true };
|
|
536
|
-
const value = _storageService.get(MergeEditorLayoutStore_1._key,
|
|
532
|
+
const value = _storageService.get(MergeEditorLayoutStore_1._key, 0 , 'mixed');
|
|
537
533
|
if (value === 'mixed' || value === 'columns') {
|
|
538
534
|
this._value = { kind: value, showBase: false, showBaseAtTop: true };
|
|
539
535
|
}
|
|
@@ -552,7 +548,7 @@ let MergeEditorLayoutStore = class MergeEditorLayoutStore {
|
|
|
552
548
|
set value(value) {
|
|
553
549
|
if (this._value !== value) {
|
|
554
550
|
this._value = value;
|
|
555
|
-
this._storageService.store(MergeEditorLayoutStore_1._key, JSON.stringify(this._value),
|
|
551
|
+
this._storageService.store(MergeEditorLayoutStore_1._key, JSON.stringify(this._value), 0 , 0 );
|
|
556
552
|
}
|
|
557
553
|
}
|
|
558
554
|
};
|
|
@@ -574,7 +570,7 @@ let MergeEditorOpenHandlerContribution = class MergeEditorOpenHandlerContributio
|
|
|
574
570
|
&& activePane.input instanceof MergeEditorInput
|
|
575
571
|
&& isEqual(input.resource, activePane.input.result)) {
|
|
576
572
|
const targetEditor = activePane.getControl();
|
|
577
|
-
applyTextEditorOptions(input.options, targetEditor,
|
|
573
|
+
applyTextEditorOptions(input.options, targetEditor, 0 );
|
|
578
574
|
return targetEditor;
|
|
579
575
|
}
|
|
580
576
|
return null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
2
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
3
|
-
import 'vscode/vscode/vs/base/common/
|
|
3
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { autorunWithStore } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
5
|
-
import 'vscode/vscode/vs/base/common/observableInternal/
|
|
5
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
6
6
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
7
|
-
import
|
|
7
|
+
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
8
8
|
import { DocumentLineRangeMap } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping';
|
|
9
9
|
import { ReentrancyBarrier } from 'vscode/vscode/vs/base/common/controlFlow';
|
|
10
10
|
|
|
@@ -25,9 +25,9 @@ class ScrollSynchronizer extends Disposable {
|
|
|
25
25
|
if (!this.model) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
this.input2View.editor.setScrollTop(this.input1View.editor.getScrollTop(),
|
|
28
|
+
this.input2View.editor.setScrollTop(this.input1View.editor.getScrollTop(), 1 );
|
|
29
29
|
if (this.shouldAlignResult) {
|
|
30
|
-
this.inputResultView.editor.setScrollTop(this.input1View.editor.getScrollTop(),
|
|
30
|
+
this.inputResultView.editor.setScrollTop(this.input1View.editor.getScrollTop(), 1 );
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
const mappingInput1Result = this.model.input1ResultMapping.get();
|
|
@@ -36,7 +36,7 @@ class ScrollSynchronizer extends Disposable {
|
|
|
36
36
|
const baseView = this.baseView.get();
|
|
37
37
|
if (baseView) {
|
|
38
38
|
if (this.shouldAlignBase) {
|
|
39
|
-
this.baseView.get()?.editor.setScrollTop(this.input1View.editor.getScrollTop(),
|
|
39
|
+
this.baseView.get()?.editor.setScrollTop(this.input1View.editor.getScrollTop(), 1 );
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
42
|
const mapping = ( new DocumentLineRangeMap(this.model.baseInput1Diffs.get(), -1)).reverse();
|
|
@@ -49,9 +49,9 @@ class ScrollSynchronizer extends Disposable {
|
|
|
49
49
|
handleInput1OnScroll();
|
|
50
50
|
}
|
|
51
51
|
if (c.scrollLeftChanged) {
|
|
52
|
-
this.baseView.get()?.editor.setScrollLeft(c.scrollLeft,
|
|
53
|
-
this.input2View.editor.setScrollLeft(c.scrollLeft,
|
|
54
|
-
this.inputResultView.editor.setScrollLeft(c.scrollLeft,
|
|
52
|
+
this.baseView.get()?.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
53
|
+
this.input2View.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
54
|
+
this.inputResultView.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
55
55
|
}
|
|
56
56
|
})));
|
|
57
57
|
this._store.add(this.input2View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusiveOrSkip((c) => {
|
|
@@ -59,9 +59,9 @@ class ScrollSynchronizer extends Disposable {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (c.scrollTopChanged) {
|
|
62
|
-
this.input1View.editor.setScrollTop(c.scrollTop,
|
|
62
|
+
this.input1View.editor.setScrollTop(c.scrollTop, 1 );
|
|
63
63
|
if (this.shouldAlignResult) {
|
|
64
|
-
this.inputResultView.editor.setScrollTop(this.input2View.editor.getScrollTop(),
|
|
64
|
+
this.inputResultView.editor.setScrollTop(this.input2View.editor.getScrollTop(), 1 );
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
67
|
const mappingInput2Result = this.model.input2ResultMapping.get();
|
|
@@ -70,7 +70,7 @@ class ScrollSynchronizer extends Disposable {
|
|
|
70
70
|
const baseView = this.baseView.get();
|
|
71
71
|
if (baseView && this.model) {
|
|
72
72
|
if (this.shouldAlignBase) {
|
|
73
|
-
this.baseView.get()?.editor.setScrollTop(c.scrollTop,
|
|
73
|
+
this.baseView.get()?.editor.setScrollTop(c.scrollTop, 1 );
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
const mapping = ( new DocumentLineRangeMap(this.model.baseInput2Diffs.get(), -1)).reverse();
|
|
@@ -79,16 +79,16 @@ class ScrollSynchronizer extends Disposable {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
if (c.scrollLeftChanged) {
|
|
82
|
-
this.baseView.get()?.editor.setScrollLeft(c.scrollLeft,
|
|
83
|
-
this.input1View.editor.setScrollLeft(c.scrollLeft,
|
|
84
|
-
this.inputResultView.editor.setScrollLeft(c.scrollLeft,
|
|
82
|
+
this.baseView.get()?.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
83
|
+
this.input1View.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
84
|
+
this.inputResultView.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
85
85
|
}
|
|
86
86
|
})));
|
|
87
87
|
this._store.add(this.inputResultView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusiveOrSkip((c) => {
|
|
88
88
|
if (c.scrollTopChanged) {
|
|
89
89
|
if (this.shouldAlignResult) {
|
|
90
|
-
this.input1View.editor.setScrollTop(c.scrollTop,
|
|
91
|
-
this.input2View.editor.setScrollTop(c.scrollTop,
|
|
90
|
+
this.input1View.editor.setScrollTop(c.scrollTop, 1 );
|
|
91
|
+
this.input2View.editor.setScrollTop(c.scrollTop, 1 );
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
const mapping1 = this.model?.resultInput1Mapping.get();
|
|
@@ -103,9 +103,9 @@ class ScrollSynchronizer extends Disposable {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
if (c.scrollLeftChanged) {
|
|
106
|
-
this.baseView.get()?.editor?.setScrollLeft(c.scrollLeft,
|
|
107
|
-
this.input1View.editor.setScrollLeft(c.scrollLeft,
|
|
108
|
-
this.input2View.editor.setScrollLeft(c.scrollLeft,
|
|
106
|
+
this.baseView.get()?.editor?.setScrollLeft(c.scrollLeft, 1 );
|
|
107
|
+
this.input1View.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
108
|
+
this.input2View.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
109
109
|
}
|
|
110
110
|
})));
|
|
111
111
|
this._store.add(autorunWithStore((reader, store) => {
|
|
@@ -117,8 +117,8 @@ class ScrollSynchronizer extends Disposable {
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
if (this.shouldAlignBase) {
|
|
120
|
-
this.input1View.editor.setScrollTop(c.scrollTop,
|
|
121
|
-
this.input2View.editor.setScrollTop(c.scrollTop,
|
|
120
|
+
this.input1View.editor.setScrollTop(c.scrollTop, 1 );
|
|
121
|
+
this.input2View.editor.setScrollTop(c.scrollTop, 1 );
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
const baseInput1Mapping = ( new DocumentLineRangeMap(this.model.baseInput1Diffs.get(), -1));
|
|
@@ -130,9 +130,9 @@ class ScrollSynchronizer extends Disposable {
|
|
|
130
130
|
this.synchronizeScrolling(baseView.editor, this.inputResultView.editor, baseMapping);
|
|
131
131
|
}
|
|
132
132
|
if (c.scrollLeftChanged) {
|
|
133
|
-
this.inputResultView.editor.setScrollLeft(c.scrollLeft,
|
|
134
|
-
this.input1View.editor.setScrollLeft(c.scrollLeft,
|
|
135
|
-
this.input2View.editor.setScrollLeft(c.scrollLeft,
|
|
133
|
+
this.inputResultView.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
134
|
+
this.input1View.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
135
|
+
this.input2View.editor.setScrollLeft(c.scrollLeft, 1 );
|
|
136
136
|
}
|
|
137
137
|
})));
|
|
138
138
|
}
|
|
@@ -156,7 +156,7 @@ class ScrollSynchronizer extends Disposable {
|
|
|
156
156
|
const sourceEndPx = scrollingEditor.getTopForLineNumber(sourceRange.endLineNumberExclusive);
|
|
157
157
|
const factor = Math.min((scrollingEditor.getScrollTop() - sourceStartTopPx) / (sourceEndPx - sourceStartTopPx), 1);
|
|
158
158
|
const resultScrollPosition = resultStartTopPx + (resultEndPx - resultStartTopPx) * factor;
|
|
159
|
-
targetEditor.setScrollTop(resultScrollPosition,
|
|
159
|
+
targetEditor.setScrollTop(resultScrollPosition, 1 );
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -2,13 +2,13 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { findLast } from 'vscode/vscode/vs/base/common/arraysFind';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { observableValue, transaction } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
5
|
-
import
|
|
5
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
6
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
6
7
|
import 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
7
|
-
import {
|
|
8
|
+
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
8
9
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
9
|
-
import 'vscode/vscode/vs/base/common/
|
|
10
|
+
import { derivedObservableWithWritableCache } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
10
11
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
11
|
-
import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
|
|
12
12
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
13
13
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
14
14
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
@@ -186,7 +186,7 @@ let MergeEditorViewModel = class MergeEditorViewModel extends Disposable {
|
|
|
186
186
|
lineNumber: startLineNumber,
|
|
187
187
|
column: editor.editor.getModel().getLineFirstNonWhitespaceColumn(startLineNumber),
|
|
188
188
|
});
|
|
189
|
-
editor.editor.revealLinesNearTop(startLineNumber, endLineNumberExclusive,
|
|
189
|
+
editor.editor.revealLinesNearTop(startLineNumber, endLineNumberExclusive, 0 );
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
goToNextModifiedBaseRange(predicate) {
|
|
@@ -206,7 +206,7 @@ let MergeEditorViewModel = class MergeEditorViewModel extends Disposable {
|
|
|
206
206
|
toggleActiveConflict(inputNumber) {
|
|
207
207
|
const activeModifiedBaseRange = this.activeModifiedBaseRange.get();
|
|
208
208
|
if (!activeModifiedBaseRange) {
|
|
209
|
-
this.notificationService.error(( localize(
|
|
209
|
+
this.notificationService.error(( localize(11368, "There is currently no conflict focused that can be toggled.")));
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
transaction(tx => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
|
-
import { CompareResult
|
|
2
|
+
import { CompareResult } from 'vscode/vscode/vs/base/common/arrays';
|
|
3
3
|
import { LineRange } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange';
|
|
4
4
|
import { join } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/utils';
|
|
5
5
|
import { ConflictActionsFactory, ActionsSource } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/view/conflictActions';
|
|
@@ -53,7 +53,7 @@ class ViewZoneComputer {
|
|
|
53
53
|
const afterLineNumber = m.left.baseRange.startLineNumber + (lastBaseResultDiff?.resultingDeltaFromOriginalToModified ?? 0) - 1;
|
|
54
54
|
resultViewZones.push(( new CommandViewZone(this.conflictActionsFactoryResult, afterLineNumber, actions.resultItems)));
|
|
55
55
|
}
|
|
56
|
-
const lastResultDiff =
|
|
56
|
+
const lastResultDiff = m.rights.at(-1);
|
|
57
57
|
if (lastResultDiff) {
|
|
58
58
|
lastBaseResultDiff = lastResultDiff;
|
|
59
59
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
4
3
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
5
4
|
import { Disposable, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
5
|
import { parseKeyboardLayoutDescription, areKeyboardLayoutsEqual, getKeyboardLayoutId } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout';
|
|
7
6
|
import { IKeyboardLayoutService } from 'vscode/vscode/vs/platform/keyboardLayout/common/keyboardLayout.service';
|
|
8
|
-
import { registerWorkbenchContribution2
|
|
7
|
+
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
8
|
import { KEYBOARD_LAYOUT_OPEN_PICKER } from 'vscode/vscode/vs/workbench/contrib/preferences/common/preferences';
|
|
10
9
|
import { isMacintosh, isWindows } from 'vscode/vscode/vs/base/common/platform';
|
|
11
10
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
@@ -23,23 +22,23 @@ let KeyboardLayoutPickerContribution = class KeyboardLayoutPickerContribution ex
|
|
|
23
22
|
this.keyboardLayoutService = keyboardLayoutService;
|
|
24
23
|
this.statusbarService = statusbarService;
|
|
25
24
|
this.pickerElement = this._register(( (new MutableDisposable())));
|
|
26
|
-
const name = ( localize(
|
|
25
|
+
const name = ( localize(4454, "Keyboard Layout"));
|
|
27
26
|
const layout = this.keyboardLayoutService.getCurrentKeyboardLayout();
|
|
28
27
|
if (layout) {
|
|
29
28
|
const layoutInfo = parseKeyboardLayoutDescription(layout);
|
|
30
|
-
const text = ( localize(
|
|
29
|
+
const text = ( localize(4455, "Layout: {0}", layoutInfo.label));
|
|
31
30
|
this.pickerElement.value = this.statusbarService.addEntry({
|
|
32
31
|
name,
|
|
33
32
|
text,
|
|
34
33
|
ariaLabel: text,
|
|
35
34
|
command: KEYBOARD_LAYOUT_OPEN_PICKER
|
|
36
|
-
}, 'status.workbench.keyboardLayout',
|
|
35
|
+
}, 'status.workbench.keyboardLayout', 1 );
|
|
37
36
|
}
|
|
38
37
|
this._register(this.keyboardLayoutService.onDidChangeKeyboardLayout(() => {
|
|
39
38
|
const layout = this.keyboardLayoutService.getCurrentKeyboardLayout();
|
|
40
39
|
const layoutInfo = parseKeyboardLayoutDescription(layout);
|
|
41
40
|
if (this.pickerElement.value) {
|
|
42
|
-
const text = ( localize(
|
|
41
|
+
const text = ( localize(4455, "Layout: {0}", layoutInfo.label));
|
|
43
42
|
this.pickerElement.value.update({
|
|
44
43
|
name,
|
|
45
44
|
text,
|
|
@@ -48,13 +47,13 @@ let KeyboardLayoutPickerContribution = class KeyboardLayoutPickerContribution ex
|
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
49
|
else {
|
|
51
|
-
const text = ( localize(
|
|
50
|
+
const text = ( localize(4455, "Layout: {0}", layoutInfo.label));
|
|
52
51
|
this.pickerElement.value = this.statusbarService.addEntry({
|
|
53
52
|
name,
|
|
54
53
|
text,
|
|
55
54
|
ariaLabel: text,
|
|
56
55
|
command: KEYBOARD_LAYOUT_OPEN_PICKER
|
|
57
|
-
}, 'status.workbench.keyboardLayout',
|
|
56
|
+
}, 'status.workbench.keyboardLayout', 1 );
|
|
58
57
|
}
|
|
59
58
|
}));
|
|
60
59
|
}
|
|
@@ -63,14 +62,14 @@ KeyboardLayoutPickerContribution = ( (__decorate([
|
|
|
63
62
|
( (__param(0, IKeyboardLayoutService))),
|
|
64
63
|
( (__param(1, IStatusbarService)))
|
|
65
64
|
], KeyboardLayoutPickerContribution)));
|
|
66
|
-
registerWorkbenchContribution2(KeyboardLayoutPickerContribution.ID, KeyboardLayoutPickerContribution,
|
|
65
|
+
registerWorkbenchContribution2(KeyboardLayoutPickerContribution.ID, KeyboardLayoutPickerContribution, 1 );
|
|
67
66
|
const DEFAULT_CONTENT = [
|
|
68
67
|
`// ${( localize(
|
|
69
|
-
|
|
68
|
+
4456,
|
|
70
69
|
'Defines the keyboard layout used in VS Code in the browser environment.'
|
|
71
70
|
))}`,
|
|
72
71
|
`// ${( localize(
|
|
73
|
-
|
|
72
|
+
4457,
|
|
74
73
|
'Open VS Code and run "Developer: Inspect Key Mappings (JSON)" from Command Palette.'
|
|
75
74
|
))}`,
|
|
76
75
|
``,
|
|
@@ -81,7 +80,7 @@ registerAction2(class extends Action2 {
|
|
|
81
80
|
constructor() {
|
|
82
81
|
super({
|
|
83
82
|
id: KEYBOARD_LAYOUT_OPEN_PICKER,
|
|
84
|
-
title: ( localize2(
|
|
83
|
+
title: ( localize2(4458, "Change Keyboard Layout")),
|
|
85
84
|
f1: true
|
|
86
85
|
});
|
|
87
86
|
}
|
|
@@ -111,17 +110,17 @@ registerAction2(class extends Action2 {
|
|
|
111
110
|
});
|
|
112
111
|
if (picks.length > 0) {
|
|
113
112
|
const platform = isMacintosh ? 'Mac' : isWindows ? 'Win' : 'Linux';
|
|
114
|
-
picks.unshift({ type: 'separator', label: ( localize(
|
|
113
|
+
picks.unshift({ type: 'separator', label: ( localize(4459, "Keyboard Layouts ({0})", platform)) });
|
|
115
114
|
}
|
|
116
|
-
const configureKeyboardLayout = { label: ( localize(
|
|
115
|
+
const configureKeyboardLayout = { label: ( localize(4460, "Configure Keyboard Layout")) };
|
|
117
116
|
picks.unshift(configureKeyboardLayout);
|
|
118
117
|
const autoDetectMode = {
|
|
119
|
-
label: ( localize(
|
|
118
|
+
label: ( localize(4461, "Auto Detect")),
|
|
120
119
|
description: isAutoDetect ? `Current: ${parseKeyboardLayoutDescription(currentLayout).label}` : undefined,
|
|
121
120
|
picked: isAutoDetect ? true : undefined
|
|
122
121
|
};
|
|
123
122
|
picks.unshift(autoDetectMode);
|
|
124
|
-
const pick = await quickInputService.pick(picks, { placeHolder: ( localize(
|
|
123
|
+
const pick = await quickInputService.pick(picks, { placeHolder: ( localize(4462, "Select Keyboard Layout")), matchOnDescription: true });
|
|
125
124
|
if (!pick) {
|
|
126
125
|
return;
|
|
127
126
|
}
|
|
@@ -144,7 +143,7 @@ registerAction2(class extends Action2 {
|
|
|
144
143
|
});
|
|
145
144
|
}, (error) => {
|
|
146
145
|
throw ( (new Error(
|
|
147
|
-
localize(
|
|
146
|
+
localize(4463, "Unable to create '{0}' ({1}).", ( (file.toString())), error)
|
|
148
147
|
)));
|
|
149
148
|
});
|
|
150
149
|
return Promise.resolve();
|