@codingame/monaco-vscode-view-common-service-override 4.5.1 → 4.5.2
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/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +127 -220
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +43 -44
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -36
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +17 -31
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +215 -764
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +31 -33
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +38 -41
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +17 -20
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +55 -87
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +38 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +12 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +34 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +40 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +12 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +45 -46
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +8 -6
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
|
@@ -11,71 +11,20 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
11
11
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
12
12
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'The background color for changes.'
|
|
18
|
-
)));
|
|
19
|
-
registerColor('mergeEditor.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'The
|
|
23
|
-
)));
|
|
24
|
-
registerColor('mergeEditor.
|
|
25
|
-
|
|
26
|
-
'mergeEditor.changeBase.background',
|
|
27
|
-
'The background color for changes in base.'
|
|
28
|
-
)));
|
|
29
|
-
registerColor('mergeEditor.changeBase.word.background', { dark: '#6F1313FF', light: '#FFA3A3FF', hcDark: '#6F1313FF', hcLight: '#FFA3A3FF', }, ( localizeWithPath(
|
|
30
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
31
|
-
'mergeEditor.changeBase.word.background',
|
|
32
|
-
'The background color for word changes in base.'
|
|
33
|
-
)));
|
|
34
|
-
registerColor('mergeEditor.conflict.unhandledUnfocused.border', { dark: '#ffa6007a', light: '#ffa600FF', hcDark: '#ffa6007a', hcLight: '#ffa6007a', }, ( localizeWithPath(
|
|
35
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
36
|
-
'mergeEditor.conflict.unhandledUnfocused.border',
|
|
37
|
-
'The border color of unhandled unfocused conflicts.'
|
|
38
|
-
)));
|
|
39
|
-
registerColor('mergeEditor.conflict.unhandledFocused.border', { dark: '#ffa600', light: '#ffa600', hcDark: '#ffa600', hcLight: '#ffa600', }, ( localizeWithPath(
|
|
40
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
41
|
-
'mergeEditor.conflict.unhandledFocused.border',
|
|
42
|
-
'The border color of unhandled focused conflicts.'
|
|
43
|
-
)));
|
|
44
|
-
registerColor('mergeEditor.conflict.handledUnfocused.border', { dark: '#86868649', light: '#86868649', hcDark: '#86868649', hcLight: '#86868649', }, ( localizeWithPath(
|
|
45
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
46
|
-
'mergeEditor.conflict.handledUnfocused.border',
|
|
47
|
-
'The border color of handled unfocused conflicts.'
|
|
48
|
-
)));
|
|
49
|
-
registerColor('mergeEditor.conflict.handledFocused.border', { dark: '#c1c1c1cc', light: '#c1c1c1cc', hcDark: '#c1c1c1cc', hcLight: '#c1c1c1cc', }, ( localizeWithPath(
|
|
50
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
51
|
-
'mergeEditor.conflict.handledFocused.border',
|
|
52
|
-
'The border color of handled focused conflicts.'
|
|
53
|
-
)));
|
|
54
|
-
const handledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.handled.minimapOverViewRuler', { dark: '#adaca8ee', light: '#adaca8ee', hcDark: '#adaca8ee', hcLight: '#adaca8ee', }, ( localizeWithPath(
|
|
55
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
56
|
-
'mergeEditor.conflict.handled.minimapOverViewRuler',
|
|
57
|
-
'The foreground color for changes in input 1.'
|
|
58
|
-
)));
|
|
59
|
-
const unhandledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.unhandled.minimapOverViewRuler', { dark: '#fcba03FF', light: '#fcba03FF', hcDark: '#fcba03FF', hcLight: '#fcba03FF', }, ( localizeWithPath(
|
|
60
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
61
|
-
'mergeEditor.conflict.unhandled.minimapOverViewRuler',
|
|
62
|
-
'The foreground color for changes in input 1.'
|
|
63
|
-
)));
|
|
64
|
-
registerColor('mergeEditor.conflictingLines.background', { dark: '#ffea0047', light: '#ffea0047', hcDark: '#ffea0047', hcLight: '#ffea0047', }, ( localizeWithPath(
|
|
65
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
66
|
-
'mergeEditor.conflictingLines.background',
|
|
67
|
-
'The background of the "Conflicting Lines" text.'
|
|
68
|
-
)));
|
|
14
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/view/colors";
|
|
15
|
+
registerColor('mergeEditor.change.background', { dark: '#9bb95533', light: '#9bb95533', hcDark: '#9bb95533', hcLight: '#9bb95533', }, ( localizeWithPath(_moduleId, 0, 'The background color for changes.')));
|
|
16
|
+
registerColor('mergeEditor.change.word.background', { dark: '#9ccc2c33', light: '#9ccc2c66', hcDark: '#9ccc2c33', hcLight: '#9ccc2c66', }, ( localizeWithPath(_moduleId, 1, 'The background color for word changes.')));
|
|
17
|
+
registerColor('mergeEditor.changeBase.background', { dark: '#4B1818FF', light: '#FFCCCCFF', hcDark: '#4B1818FF', hcLight: '#FFCCCCFF', }, ( localizeWithPath(_moduleId, 2, 'The background color for changes in base.')));
|
|
18
|
+
registerColor('mergeEditor.changeBase.word.background', { dark: '#6F1313FF', light: '#FFA3A3FF', hcDark: '#6F1313FF', hcLight: '#FFA3A3FF', }, ( localizeWithPath(_moduleId, 3, 'The background color for word changes in base.')));
|
|
19
|
+
registerColor('mergeEditor.conflict.unhandledUnfocused.border', { dark: '#ffa6007a', light: '#ffa600FF', hcDark: '#ffa6007a', hcLight: '#ffa6007a', }, ( localizeWithPath(_moduleId, 4, 'The border color of unhandled unfocused conflicts.')));
|
|
20
|
+
registerColor('mergeEditor.conflict.unhandledFocused.border', { dark: '#ffa600', light: '#ffa600', hcDark: '#ffa600', hcLight: '#ffa600', }, ( localizeWithPath(_moduleId, 5, 'The border color of unhandled focused conflicts.')));
|
|
21
|
+
registerColor('mergeEditor.conflict.handledUnfocused.border', { dark: '#86868649', light: '#86868649', hcDark: '#86868649', hcLight: '#86868649', }, ( localizeWithPath(_moduleId, 6, 'The border color of handled unfocused conflicts.')));
|
|
22
|
+
registerColor('mergeEditor.conflict.handledFocused.border', { dark: '#c1c1c1cc', light: '#c1c1c1cc', hcDark: '#c1c1c1cc', hcLight: '#c1c1c1cc', }, ( localizeWithPath(_moduleId, 7, 'The border color of handled focused conflicts.')));
|
|
23
|
+
const handledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.handled.minimapOverViewRuler', { dark: '#adaca8ee', light: '#adaca8ee', hcDark: '#adaca8ee', hcLight: '#adaca8ee', }, ( localizeWithPath(_moduleId, 8, 'The foreground color for changes in input 1.')));
|
|
24
|
+
const unhandledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.unhandled.minimapOverViewRuler', { dark: '#fcba03FF', light: '#fcba03FF', hcDark: '#fcba03FF', hcLight: '#fcba03FF', }, ( localizeWithPath(_moduleId, 9, 'The foreground color for changes in input 1.')));
|
|
25
|
+
registerColor('mergeEditor.conflictingLines.background', { dark: '#ffea0047', light: '#ffea0047', hcDark: '#ffea0047', hcLight: '#ffea0047', }, ( localizeWithPath(_moduleId, 10, 'The background of the "Conflicting Lines" text.')));
|
|
69
26
|
const contentTransparency = 0.4;
|
|
70
|
-
registerColor('mergeEditor.conflict.input1.background', { dark: ( transparent(mergeCurrentHeaderBackground, contentTransparency)), light: ( transparent(mergeCurrentHeaderBackground, contentTransparency)), hcDark: ( transparent(mergeCurrentHeaderBackground, contentTransparency)), hcLight: ( transparent(mergeCurrentHeaderBackground, contentTransparency)) }, ( localizeWithPath(
|
|
71
|
-
|
|
72
|
-
'mergeEditor.conflict.input1.background',
|
|
73
|
-
'The background color of decorations in input 1.'
|
|
74
|
-
)));
|
|
75
|
-
registerColor('mergeEditor.conflict.input2.background', { dark: ( transparent(mergeIncomingHeaderBackground, contentTransparency)), light: ( transparent(mergeIncomingHeaderBackground, contentTransparency)), hcDark: ( transparent(mergeIncomingHeaderBackground, contentTransparency)), hcLight: ( transparent(mergeIncomingHeaderBackground, contentTransparency)) }, ( localizeWithPath(
|
|
76
|
-
'vs/workbench/contrib/mergeEditor/browser/view/colors',
|
|
77
|
-
'mergeEditor.conflict.input2.background',
|
|
78
|
-
'The background color of decorations in input 2.'
|
|
79
|
-
)));
|
|
27
|
+
registerColor('mergeEditor.conflict.input1.background', { dark: ( (transparent(mergeCurrentHeaderBackground, contentTransparency))), light: ( (transparent(mergeCurrentHeaderBackground, contentTransparency))), hcDark: ( (transparent(mergeCurrentHeaderBackground, contentTransparency))), hcLight: ( (transparent(mergeCurrentHeaderBackground, contentTransparency))) }, ( localizeWithPath(_moduleId, 11, 'The background color of decorations in input 1.')));
|
|
28
|
+
registerColor('mergeEditor.conflict.input2.background', { dark: ( (transparent(mergeIncomingHeaderBackground, contentTransparency))), light: ( (transparent(mergeIncomingHeaderBackground, contentTransparency))), hcDark: ( (transparent(mergeIncomingHeaderBackground, contentTransparency))), hcLight: ( (transparent(mergeIncomingHeaderBackground, contentTransparency))) }, ( localizeWithPath(_moduleId, 12, 'The background color of decorations in input 2.')));
|
|
80
29
|
|
|
81
30
|
export { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverViewRulerColor };
|
|
@@ -12,6 +12,7 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
12
12
|
import { ModifiedBaseRangeStateKind, ModifiedBaseRangeState } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange';
|
|
13
13
|
import { FixedZoneWidget } from './fixedZoneWidget.js';
|
|
14
14
|
|
|
15
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/view/conflictActions";
|
|
15
16
|
class ConflictActionsFactory extends Disposable {
|
|
16
17
|
constructor(_editor) {
|
|
17
18
|
super();
|
|
@@ -21,7 +22,7 @@ class ConflictActionsFactory extends Disposable {
|
|
|
21
22
|
this._updateLensStyle();
|
|
22
23
|
}
|
|
23
24
|
}));
|
|
24
|
-
this._styleClassName = '_conflictActionsFactory_' + ( hash(this._editor.getId()).toString(16));
|
|
25
|
+
this._styleClassName = '_conflictActionsFactory_' + ( (hash(this._editor.getId()).toString(16)));
|
|
25
26
|
this._styleElement = createStyleSheet(isInShadowDOM(this._editor.getContainerDomNode())
|
|
26
27
|
? this._editor.getContainerDomNode()
|
|
27
28
|
: undefined, undefined, this._store);
|
|
@@ -57,15 +58,17 @@ class ConflictActionsFactory extends Disposable {
|
|
|
57
58
|
}
|
|
58
59
|
createWidget(viewZoneChangeAccessor, lineNumber, items, viewZoneIdsToCleanUp) {
|
|
59
60
|
const layoutInfo = this._getLayoutInfo();
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
return (
|
|
62
|
+
(new ActionsContentWidget(
|
|
63
|
+
this._editor,
|
|
64
|
+
viewZoneChangeAccessor,
|
|
65
|
+
lineNumber,
|
|
66
|
+
layoutInfo.codeLensHeight + 2,
|
|
67
|
+
this._styleClassName,
|
|
68
|
+
items,
|
|
69
|
+
viewZoneIdsToCleanUp
|
|
70
|
+
))
|
|
71
|
+
);
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
74
|
class ActionsSource {
|
|
@@ -82,28 +85,16 @@ class ActionsSource {
|
|
|
82
85
|
const result = [];
|
|
83
86
|
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
84
87
|
result.push({
|
|
85
|
-
text: ( localizeWithPath(
|
|
86
|
-
|
|
87
|
-
'manualResolution',
|
|
88
|
-
"Manual Resolution"
|
|
89
|
-
)),
|
|
90
|
-
tooltip: ( localizeWithPath(
|
|
91
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
92
|
-
'manualResolutionTooltip',
|
|
93
|
-
"This conflict has been resolved manually."
|
|
94
|
-
)),
|
|
88
|
+
text: ( localizeWithPath(_moduleId, 0, "Manual Resolution")),
|
|
89
|
+
tooltip: ( localizeWithPath(_moduleId, 1, "This conflict has been resolved manually.")),
|
|
95
90
|
});
|
|
96
91
|
}
|
|
97
92
|
else if (state.kind === ModifiedBaseRangeStateKind.base) {
|
|
98
93
|
result.push({
|
|
99
|
-
text: ( localizeWithPath(
|
|
100
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
101
|
-
'noChangesAccepted',
|
|
102
|
-
'No Changes Accepted'
|
|
103
|
-
)),
|
|
94
|
+
text: ( localizeWithPath(_moduleId, 2, 'No Changes Accepted')),
|
|
104
95
|
tooltip: ( localizeWithPath(
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
_moduleId,
|
|
97
|
+
3,
|
|
107
98
|
'The current resolution of this conflict equals the common ancestor of both the right and left changes.'
|
|
108
99
|
)),
|
|
109
100
|
});
|
|
@@ -125,40 +116,20 @@ class ActionsSource {
|
|
|
125
116
|
}
|
|
126
117
|
const stateToggles = [];
|
|
127
118
|
if (state.includesInput1) {
|
|
128
|
-
stateToggles.push(command(( localizeWithPath(
|
|
129
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
130
|
-
'remove',
|
|
131
|
-
'Remove {0}',
|
|
132
|
-
model.input1.title
|
|
133
|
-
)), async () => {
|
|
119
|
+
stateToggles.push(command(( localizeWithPath(_moduleId, 4, 'Remove {0}', model.input1.title)), async () => {
|
|
134
120
|
transaction((tx) => {
|
|
135
121
|
model.setState(modifiedBaseRange, state.withInputValue(1, false), true, tx);
|
|
136
122
|
model.telemetry.reportRemoveInvoked(1, state.includesInput(2));
|
|
137
123
|
});
|
|
138
|
-
}, ( localizeWithPath(
|
|
139
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
140
|
-
'removeTooltip',
|
|
141
|
-
'Remove {0} from the result document.',
|
|
142
|
-
model.input1.title
|
|
143
|
-
))));
|
|
124
|
+
}, ( localizeWithPath(_moduleId, 5, 'Remove {0} from the result document.', model.input1.title))));
|
|
144
125
|
}
|
|
145
126
|
if (state.includesInput2) {
|
|
146
|
-
stateToggles.push(command(( localizeWithPath(
|
|
147
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
148
|
-
'remove',
|
|
149
|
-
'Remove {0}',
|
|
150
|
-
model.input2.title
|
|
151
|
-
)), async () => {
|
|
127
|
+
stateToggles.push(command(( localizeWithPath(_moduleId, 4, 'Remove {0}', model.input2.title)), async () => {
|
|
152
128
|
transaction((tx) => {
|
|
153
129
|
model.setState(modifiedBaseRange, state.withInputValue(2, false), true, tx);
|
|
154
130
|
model.telemetry.reportRemoveInvoked(2, state.includesInput(1));
|
|
155
131
|
});
|
|
156
|
-
}, ( localizeWithPath(
|
|
157
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
158
|
-
'removeTooltip',
|
|
159
|
-
'Remove {0} from the result document.',
|
|
160
|
-
model.input2.title
|
|
161
|
-
))));
|
|
132
|
+
}, ( localizeWithPath(_moduleId, 5, 'Remove {0} from the result document.', model.input2.title))));
|
|
162
133
|
}
|
|
163
134
|
if (state.kind === ModifiedBaseRangeStateKind.both &&
|
|
164
135
|
state.firstInput === 2) {
|
|
@@ -166,18 +137,14 @@ class ActionsSource {
|
|
|
166
137
|
}
|
|
167
138
|
result.push(...stateToggles);
|
|
168
139
|
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
169
|
-
result.push(command(( localizeWithPath(
|
|
170
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
171
|
-
'resetToBase',
|
|
172
|
-
'Reset to base'
|
|
173
|
-
)), async () => {
|
|
140
|
+
result.push(command(( localizeWithPath(_moduleId, 6, 'Reset to base')), async () => {
|
|
174
141
|
transaction((tx) => {
|
|
175
142
|
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base, true, tx);
|
|
176
143
|
model.telemetry.reportResetToBaseInvoked();
|
|
177
144
|
});
|
|
178
145
|
}, ( localizeWithPath(
|
|
179
|
-
|
|
180
|
-
|
|
146
|
+
_moduleId,
|
|
147
|
+
7,
|
|
181
148
|
'Reset this conflict to the common ancestor of both the right and left changes.'
|
|
182
149
|
))));
|
|
183
150
|
}
|
|
@@ -209,35 +176,16 @@ class ActionsSource {
|
|
|
209
176
|
const otherInputNumber = inputNumber === 1 ? 2 : 1;
|
|
210
177
|
if (state.kind !== ModifiedBaseRangeStateKind.unrecognized && !state.isInputIncluded(inputNumber)) {
|
|
211
178
|
if (!state.isInputIncluded(otherInputNumber) || !this.viewModel.shouldUseAppendInsteadOfAccept.read(reader)) {
|
|
212
|
-
result.push(command(( localizeWithPath(
|
|
213
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
214
|
-
'accept',
|
|
215
|
-
"Accept {0}",
|
|
216
|
-
inputData.title
|
|
217
|
-
)), async () => {
|
|
179
|
+
result.push(command(( localizeWithPath(_moduleId, 8, "Accept {0}", inputData.title)), async () => {
|
|
218
180
|
transaction((tx) => {
|
|
219
181
|
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, false), inputNumber, tx);
|
|
220
182
|
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
221
183
|
});
|
|
222
|
-
}, ( localizeWithPath(
|
|
223
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
224
|
-
'acceptTooltip',
|
|
225
|
-
"Accept {0} in the result document.",
|
|
226
|
-
inputData.title
|
|
227
|
-
))));
|
|
184
|
+
}, ( localizeWithPath(_moduleId, 9, "Accept {0} in the result document.", inputData.title))));
|
|
228
185
|
if (modifiedBaseRange.canBeCombined) {
|
|
229
186
|
const commandName = modifiedBaseRange.isOrderRelevant
|
|
230
|
-
? ( localizeWithPath(
|
|
231
|
-
|
|
232
|
-
'acceptBoth0First',
|
|
233
|
-
"Accept Combination ({0} First)",
|
|
234
|
-
inputData.title
|
|
235
|
-
))
|
|
236
|
-
: ( localizeWithPath(
|
|
237
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
238
|
-
'acceptBoth',
|
|
239
|
-
"Accept Combination"
|
|
240
|
-
));
|
|
187
|
+
? ( localizeWithPath(_moduleId, 10, "Accept Combination ({0} First)", inputData.title))
|
|
188
|
+
: ( localizeWithPath(_moduleId, 11, "Accept Combination"));
|
|
241
189
|
result.push(command(commandName, async () => {
|
|
242
190
|
transaction((tx) => {
|
|
243
191
|
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base
|
|
@@ -246,61 +194,38 @@ class ActionsSource {
|
|
|
246
194
|
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
247
195
|
});
|
|
248
196
|
}, ( localizeWithPath(
|
|
249
|
-
|
|
250
|
-
|
|
197
|
+
_moduleId,
|
|
198
|
+
12,
|
|
251
199
|
"Accept an automatic combination of both sides in the result document."
|
|
252
200
|
))));
|
|
253
201
|
}
|
|
254
202
|
}
|
|
255
203
|
else {
|
|
256
|
-
result.push(command(( localizeWithPath(
|
|
257
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
258
|
-
'append',
|
|
259
|
-
"Append {0}",
|
|
260
|
-
inputData.title
|
|
261
|
-
)), async () => {
|
|
204
|
+
result.push(command(( localizeWithPath(_moduleId, 13, "Append {0}", inputData.title)), async () => {
|
|
262
205
|
transaction((tx) => {
|
|
263
206
|
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, false), inputNumber, tx);
|
|
264
207
|
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
265
208
|
});
|
|
266
|
-
}, ( localizeWithPath(
|
|
267
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
268
|
-
'appendTooltip',
|
|
269
|
-
"Append {0} to the result document.",
|
|
270
|
-
inputData.title
|
|
271
|
-
))));
|
|
209
|
+
}, ( localizeWithPath(_moduleId, 14, "Append {0} to the result document.", inputData.title))));
|
|
272
210
|
if (modifiedBaseRange.canBeCombined) {
|
|
273
|
-
result.push(command(( localizeWithPath(
|
|
274
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
275
|
-
'combine',
|
|
276
|
-
"Accept Combination",
|
|
277
|
-
inputData.title
|
|
278
|
-
)), async () => {
|
|
211
|
+
result.push(command(( localizeWithPath(_moduleId, 15, "Accept Combination", inputData.title)), async () => {
|
|
279
212
|
transaction((tx) => {
|
|
280
213
|
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, true), inputNumber, tx);
|
|
281
214
|
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
282
215
|
});
|
|
283
216
|
}, ( localizeWithPath(
|
|
284
|
-
|
|
285
|
-
|
|
217
|
+
_moduleId,
|
|
218
|
+
12,
|
|
286
219
|
"Accept an automatic combination of both sides in the result document."
|
|
287
220
|
))));
|
|
288
221
|
}
|
|
289
222
|
}
|
|
290
223
|
if (!model.isInputHandled(modifiedBaseRange, inputNumber).read(reader)) {
|
|
291
|
-
result.push(command(( localizeWithPath(
|
|
292
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
293
|
-
'ignore',
|
|
294
|
-
'Ignore'
|
|
295
|
-
)), async () => {
|
|
224
|
+
result.push(command(( localizeWithPath(_moduleId, 16, 'Ignore')), async () => {
|
|
296
225
|
transaction((tx) => {
|
|
297
226
|
model.setInputHandled(modifiedBaseRange, inputNumber, true, tx);
|
|
298
227
|
});
|
|
299
|
-
}, ( localizeWithPath(
|
|
300
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
301
|
-
'markAsHandledTooltip',
|
|
302
|
-
"Don't take this side of the conflict."
|
|
303
|
-
))));
|
|
228
|
+
}, ( localizeWithPath(_moduleId, 17, "Don't take this side of the conflict."))));
|
|
304
229
|
}
|
|
305
230
|
}
|
|
306
231
|
return result;
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js
CHANGED
|
@@ -16,6 +16,7 @@ import { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverV
|
|
|
16
16
|
import { EditorGutter } from '../editorGutter.js';
|
|
17
17
|
import { CodeEditorView, createSelectionsAutorun, TitleMenu } from './codeEditorView.js';
|
|
18
18
|
|
|
19
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView";
|
|
19
20
|
let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
20
21
|
constructor(viewModel, instantiationService, configurationService) {
|
|
21
22
|
super(instantiationService, viewModel, configurationService);
|
|
@@ -102,10 +103,10 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
102
103
|
this._register(instantiationService.createInstance(TitleMenu, MenuId.MergeBaseToolbar, this.htmlElements.title));
|
|
103
104
|
this._register(autorunWithStore((reader, store) => {
|
|
104
105
|
if (this.checkboxesVisible.read(reader)) {
|
|
105
|
-
store.add(( new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
|
|
106
|
+
store.add(( (new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
|
|
106
107
|
getIntersectingGutterItems: (range, reader) => [],
|
|
107
|
-
createView: (item, target) => { throw new BugIndicatingError(); },
|
|
108
|
-
})));
|
|
108
|
+
createView: (item, target) => { throw ( (new BugIndicatingError())); },
|
|
109
|
+
}))));
|
|
109
110
|
}
|
|
110
111
|
}));
|
|
111
112
|
this._register(autorun(reader => {
|
|
@@ -114,25 +115,17 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
117
|
this.editor.setModel(vm.model.base);
|
|
117
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localizeWithPath(
|
|
118
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView',
|
|
119
|
-
'base',
|
|
120
|
-
'Base'
|
|
121
|
-
))));
|
|
118
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localizeWithPath(_moduleId, 0, 'Base'))));
|
|
122
119
|
const baseShowDiffAgainst = vm.baseShowDiffAgainst.read(reader);
|
|
123
120
|
let node = undefined;
|
|
124
121
|
if (baseShowDiffAgainst) {
|
|
125
122
|
const label = ( localizeWithPath(
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
_moduleId,
|
|
124
|
+
1,
|
|
128
125
|
'Comparing with {0}',
|
|
129
126
|
baseShowDiffAgainst === 1 ? vm.model.input1.title : vm.model.input2.title
|
|
130
127
|
));
|
|
131
|
-
const tooltip = ( localizeWithPath(
|
|
132
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView',
|
|
133
|
-
'compareWithTooltip',
|
|
134
|
-
'Differences are highlighted with a background color.'
|
|
135
|
-
));
|
|
128
|
+
const tooltip = ( localizeWithPath(_moduleId, 2, 'Differences are highlighted with a background color.'));
|
|
136
129
|
node = h('span', { title: tooltip }, [label]).root;
|
|
137
130
|
}
|
|
138
131
|
reset(this.htmlElements.description, ...(node ? [node] : []));
|
|
@@ -140,9 +133,9 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
140
133
|
this._register(applyObservableDecorations(this.editor, this.decorations));
|
|
141
134
|
}
|
|
142
135
|
};
|
|
143
|
-
BaseCodeEditorView = ( __decorate([
|
|
144
|
-
( __param(1, IInstantiationService)),
|
|
145
|
-
( __param(2, IConfigurationService))
|
|
146
|
-
], BaseCodeEditorView));
|
|
136
|
+
BaseCodeEditorView = ( (__decorate([
|
|
137
|
+
( (__param(1, IInstantiationService))),
|
|
138
|
+
( (__param(2, IConfigurationService)))
|
|
139
|
+
], BaseCodeEditorView)));
|
|
147
140
|
|
|
148
141
|
export { BaseCodeEditorView };
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js
CHANGED
|
@@ -25,6 +25,7 @@ import { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverV
|
|
|
25
25
|
import { EditorGutter } from '../editorGutter.js';
|
|
26
26
|
import { CodeEditorView, createSelectionsAutorun, TitleMenu } from './codeEditorView.js';
|
|
27
27
|
|
|
28
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView";
|
|
28
29
|
let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
29
30
|
constructor(inputNumber, viewModel, instantiationService, contextMenuService, configurationService) {
|
|
30
31
|
super(instantiationService, viewModel, configurationService);
|
|
@@ -38,9 +39,13 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
38
39
|
const model = viewModel.model;
|
|
39
40
|
const inputNumber = this.inputNumber;
|
|
40
41
|
const showNonConflictingChanges = viewModel.showNonConflictingChanges.read(reader);
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
return (
|
|
43
|
+
(model.modifiedBaseRanges.read(reader)
|
|
44
|
+
.filter((r) => r.getInputDiffs(this.inputNumber).length > 0 && (showNonConflictingChanges || r.isConflicting || !model.isHandled(r).read(reader)))
|
|
45
|
+
.map(
|
|
46
|
+
(baseRange, idx) => ( (new ModifiedBaseRangeGutterItemModel( (idx.toString()), baseRange, inputNumber, viewModel)))
|
|
47
|
+
))
|
|
48
|
+
);
|
|
44
49
|
});
|
|
45
50
|
this.decorations = derivedOpts({ debugName: `input${this.inputNumber}.decorations` }, reader => {
|
|
46
51
|
const viewModel = this.viewModel.read(reader);
|
|
@@ -50,7 +55,7 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
50
55
|
const model = viewModel.model;
|
|
51
56
|
const textModel = (this.inputNumber === 1 ? model.input1 : model.input2).textModel;
|
|
52
57
|
const activeModifiedBaseRange = viewModel.activeModifiedBaseRange.read(reader);
|
|
53
|
-
const result = ( new Array());
|
|
58
|
+
const result = ( (new Array()));
|
|
54
59
|
const showNonConflictingChanges = viewModel.showNonConflictingChanges.read(reader);
|
|
55
60
|
const showDeletionMarkers = this.showDeletionMarkers.read(reader);
|
|
56
61
|
const diffWithThis = viewModel.baseCodeEditorView.read(reader) !== undefined && viewModel.baseShowDiffAgainst.read(reader) === this.inputNumber;
|
|
@@ -133,7 +138,7 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
133
138
|
return result;
|
|
134
139
|
});
|
|
135
140
|
this.htmlElements.root.classList.add(`input`);
|
|
136
|
-
this._register(( new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
|
|
141
|
+
this._register(( (new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
|
|
137
142
|
getIntersectingGutterItems: (range, reader) => {
|
|
138
143
|
if (this.checkboxesVisible.read(reader)) {
|
|
139
144
|
return this.modifiedBaseRangeGutterItemInfos.read(reader);
|
|
@@ -142,8 +147,8 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
142
147
|
return [];
|
|
143
148
|
}
|
|
144
149
|
},
|
|
145
|
-
createView: (item, target) => ( new MergeConflictGutterItemView(item, target, contextMenuService)),
|
|
146
|
-
})));
|
|
150
|
+
createView: (item, target) => ( (new MergeConflictGutterItemView(item, target, contextMenuService))),
|
|
151
|
+
}))));
|
|
147
152
|
this._register(createSelectionsAutorun(this, (baseRange, viewModel) => viewModel.model.translateBaseRangeToInput(this.inputNumber, baseRange)));
|
|
148
153
|
this._register(instantiationService.createInstance(TitleMenu, inputNumber === 1 ? MenuId.MergeInput1Toolbar : MenuId.MergeInput2Toolbar, this.htmlElements.toolbar));
|
|
149
154
|
this._register(autorunOpts({ debugName: `input${this.inputNumber}: update labels & text model` }, reader => {
|
|
@@ -153,16 +158,8 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
153
158
|
}
|
|
154
159
|
this.editor.setModel(this.inputNumber === 1 ? vm.model.input1.textModel : vm.model.input2.textModel);
|
|
155
160
|
const title = this.inputNumber === 1
|
|
156
|
-
? vm.model.input1.title || ( localizeWithPath(
|
|
157
|
-
'
|
|
158
|
-
'input1',
|
|
159
|
-
'Input 1'
|
|
160
|
-
))
|
|
161
|
-
: vm.model.input2.title || ( localizeWithPath(
|
|
162
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
163
|
-
'input2',
|
|
164
|
-
'Input 2'
|
|
165
|
-
));
|
|
161
|
+
? vm.model.input1.title || ( localizeWithPath(_moduleId, 0, 'Input 1'))
|
|
162
|
+
: vm.model.input2.title || ( localizeWithPath(_moduleId, 1, 'Input 2'));
|
|
166
163
|
const description = this.inputNumber === 1
|
|
167
164
|
? vm.model.input1.description
|
|
168
165
|
: vm.model.input2.description;
|
|
@@ -176,11 +173,11 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
176
173
|
this._register(applyObservableDecorations(this.editor, this.decorations));
|
|
177
174
|
}
|
|
178
175
|
};
|
|
179
|
-
InputCodeEditorView = ( __decorate([
|
|
180
|
-
( __param(2, IInstantiationService)),
|
|
181
|
-
( __param(3, IContextMenuService)),
|
|
182
|
-
( __param(4, IConfigurationService))
|
|
183
|
-
], InputCodeEditorView));
|
|
176
|
+
InputCodeEditorView = ( (__decorate([
|
|
177
|
+
( (__param(2, IInstantiationService))),
|
|
178
|
+
( (__param(3, IContextMenuService))),
|
|
179
|
+
( (__param(4, IConfigurationService)))
|
|
180
|
+
], InputCodeEditorView)));
|
|
184
181
|
class ModifiedBaseRangeGutterItemModel {
|
|
185
182
|
constructor(id, baseRange, inputNumber, viewModel) {
|
|
186
183
|
this.id = id;
|
|
@@ -235,54 +232,32 @@ class ModifiedBaseRangeGutterItemModel {
|
|
|
235
232
|
});
|
|
236
233
|
};
|
|
237
234
|
function action(id, label, targetState, checked) {
|
|
238
|
-
const action = ( new Action(id, label, undefined, true, () => {
|
|
235
|
+
const action = ( (new Action(id, label, undefined, true, () => {
|
|
239
236
|
update(targetState);
|
|
240
|
-
}));
|
|
237
|
+
})));
|
|
241
238
|
action.checked = checked;
|
|
242
239
|
return action;
|
|
243
240
|
}
|
|
244
241
|
const both = state.includesInput1 && state.includesInput2;
|
|
245
242
|
return [
|
|
246
243
|
this.baseRange.input1Diffs.length > 0
|
|
247
|
-
? action('mergeEditor.acceptInput1', ( localizeWithPath(
|
|
248
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
249
|
-
'mergeEditor.accept',
|
|
250
|
-
'Accept {0}',
|
|
251
|
-
this.model.input1.title
|
|
252
|
-
)), state.toggle(1), state.includesInput1)
|
|
244
|
+
? action('mergeEditor.acceptInput1', ( localizeWithPath(_moduleId, 2, 'Accept {0}', this.model.input1.title)), state.toggle(1), state.includesInput1)
|
|
253
245
|
: undefined,
|
|
254
246
|
this.baseRange.input2Diffs.length > 0
|
|
255
|
-
? action('mergeEditor.acceptInput2', ( localizeWithPath(
|
|
256
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
257
|
-
'mergeEditor.accept',
|
|
258
|
-
'Accept {0}',
|
|
259
|
-
this.model.input2.title
|
|
260
|
-
)), state.toggle(2), state.includesInput2)
|
|
247
|
+
? action('mergeEditor.acceptInput2', ( localizeWithPath(_moduleId, 2, 'Accept {0}', this.model.input2.title)), state.toggle(2), state.includesInput2)
|
|
261
248
|
: undefined,
|
|
262
249
|
this.baseRange.isConflicting
|
|
263
|
-
? setFields(action('mergeEditor.acceptBoth', ( localizeWithPath(
|
|
264
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
265
|
-
'mergeEditor.acceptBoth',
|
|
266
|
-
'Accept Both'
|
|
267
|
-
)), state.withInputValue(1, !both).withInputValue(2, !both), both), { enabled: this.baseRange.canBeCombined })
|
|
250
|
+
? setFields(action('mergeEditor.acceptBoth', ( localizeWithPath(_moduleId, 3, 'Accept Both')), state.withInputValue(1, !both).withInputValue(2, !both), both), { enabled: this.baseRange.canBeCombined })
|
|
268
251
|
: undefined,
|
|
269
|
-
( new Separator()),
|
|
252
|
+
( (new Separator())),
|
|
270
253
|
this.baseRange.isConflicting
|
|
271
|
-
? setFields(action('mergeEditor.swap', ( localizeWithPath(
|
|
272
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
273
|
-
'mergeEditor.swap',
|
|
274
|
-
'Swap'
|
|
275
|
-
)), state.swap(), false), { enabled: !state.kind && (!both || this.baseRange.isOrderRelevant) })
|
|
254
|
+
? setFields(action('mergeEditor.swap', ( localizeWithPath(_moduleId, 4, 'Swap')), state.swap(), false), { enabled: !state.kind && (!both || this.baseRange.isOrderRelevant) })
|
|
276
255
|
: undefined,
|
|
277
|
-
setFields(( new Action('mergeEditor.markAsHandled', ( localizeWithPath(
|
|
278
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
279
|
-
'mergeEditor.markAsHandled',
|
|
280
|
-
'Mark as Handled'
|
|
281
|
-
)), undefined, true, () => {
|
|
256
|
+
setFields(( (new Action('mergeEditor.markAsHandled', ( localizeWithPath(_moduleId, 5, 'Mark as Handled')), undefined, true, () => {
|
|
282
257
|
transaction((tx) => {
|
|
283
258
|
this.model.setHandled(this.baseRange, !handled, tx);
|
|
284
259
|
});
|
|
285
|
-
})), { checked: handled }),
|
|
260
|
+
}))), { checked: handled }),
|
|
286
261
|
].filter(isDefined);
|
|
287
262
|
}
|
|
288
263
|
}
|
|
@@ -291,12 +266,12 @@ class MergeConflictGutterItemView extends Disposable {
|
|
|
291
266
|
super();
|
|
292
267
|
this.isMultiLine = observableValue(this, false);
|
|
293
268
|
this.item = observableValue(this, item);
|
|
294
|
-
const checkBox = ( new Toggle({
|
|
269
|
+
const checkBox = ( (new Toggle({
|
|
295
270
|
isChecked: false,
|
|
296
271
|
title: '',
|
|
297
272
|
icon: Codicon.check,
|
|
298
273
|
...defaultToggleStyles
|
|
299
|
-
}));
|
|
274
|
+
})));
|
|
300
275
|
checkBox.domNode.classList.add('accept-conflict-group');
|
|
301
276
|
this._register(addDisposableListener(checkBox.domNode, EventType.MOUSE_DOWN, (e) => {
|
|
302
277
|
const item = this.item.get();
|
|
@@ -321,26 +296,10 @@ class MergeConflictGutterItemView extends Disposable {
|
|
|
321
296
|
const item = this.item.read(reader);
|
|
322
297
|
const value = item.toggleState.read(reader);
|
|
323
298
|
const iconMap = {
|
|
324
|
-
[0 ]: { icon: undefined, checked: false, title: ( localizeWithPath(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
)) },
|
|
329
|
-
[3 ]: { icon: Codicon.circleFilled, checked: false, title: ( localizeWithPath(
|
|
330
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
331
|
-
'accept.conflicting',
|
|
332
|
-
"Accept (result is dirty)"
|
|
333
|
-
)) },
|
|
334
|
-
[1 ]: { icon: Codicon.check, checked: true, title: ( localizeWithPath(
|
|
335
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
336
|
-
'accept.first',
|
|
337
|
-
"Undo accept"
|
|
338
|
-
)) },
|
|
339
|
-
[2 ]: { icon: Codicon.checkAll, checked: true, title: ( localizeWithPath(
|
|
340
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView',
|
|
341
|
-
'accept.second',
|
|
342
|
-
"Undo accept (currently second)"
|
|
343
|
-
)) },
|
|
299
|
+
[0 ]: { icon: undefined, checked: false, title: ( localizeWithPath(_moduleId, 6, "Accept")) },
|
|
300
|
+
[3 ]: { icon: Codicon.circleFilled, checked: false, title: ( localizeWithPath(_moduleId, 7, "Accept (result is dirty)")) },
|
|
301
|
+
[1 ]: { icon: Codicon.check, checked: true, title: ( localizeWithPath(_moduleId, 8, "Undo accept")) },
|
|
302
|
+
[2 ]: { icon: Codicon.checkAll, checked: true, title: ( localizeWithPath(_moduleId, 9, "Undo accept (currently second)")) },
|
|
344
303
|
};
|
|
345
304
|
const state = iconMap[value];
|
|
346
305
|
checkBox.setIcon(state.icon);
|