@codingame/monaco-vscode-view-common-service-override 4.5.1 → 5.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 +3 -6
- 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 +142 -221
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +49 -45
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +25 -38
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +20 -34
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +7 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -765
- 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 +54 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +122 -72
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +44 -44
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +25 -26
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +22 -22
- 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 +59 -88
- 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 +39 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +13 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +35 -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 +41 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +6 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +13 -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/webview/browser/webviewFindWidget.js +5 -3
- 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/webviewViewPane.js +13 -11
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +79 -49
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +9 -7
- 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 };
|
|
@@ -7,11 +7,13 @@ import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived
|
|
|
7
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
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
10
11
|
import { EDITOR_FONT_DEFAULTS } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
11
12
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
12
13
|
import { ModifiedBaseRangeStateKind, ModifiedBaseRangeState } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange';
|
|
13
14
|
import { FixedZoneWidget } from './fixedZoneWidget.js';
|
|
14
15
|
|
|
16
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/view/conflictActions";
|
|
15
17
|
class ConflictActionsFactory extends Disposable {
|
|
16
18
|
constructor(_editor) {
|
|
17
19
|
super();
|
|
@@ -21,7 +23,7 @@ class ConflictActionsFactory extends Disposable {
|
|
|
21
23
|
this._updateLensStyle();
|
|
22
24
|
}
|
|
23
25
|
}));
|
|
24
|
-
this._styleClassName = '_conflictActionsFactory_' + ( hash(this._editor.getId()).toString(16));
|
|
26
|
+
this._styleClassName = '_conflictActionsFactory_' + ( (hash(this._editor.getId()).toString(16)));
|
|
25
27
|
this._styleElement = createStyleSheet(isInShadowDOM(this._editor.getContainerDomNode())
|
|
26
28
|
? this._editor.getContainerDomNode()
|
|
27
29
|
: undefined, undefined, this._store);
|
|
@@ -57,15 +59,17 @@ class ConflictActionsFactory extends Disposable {
|
|
|
57
59
|
}
|
|
58
60
|
createWidget(viewZoneChangeAccessor, lineNumber, items, viewZoneIdsToCleanUp) {
|
|
59
61
|
const layoutInfo = this._getLayoutInfo();
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
return (
|
|
63
|
+
(new ActionsContentWidget(
|
|
64
|
+
this._editor,
|
|
65
|
+
viewZoneChangeAccessor,
|
|
66
|
+
lineNumber,
|
|
67
|
+
layoutInfo.codeLensHeight + 2,
|
|
68
|
+
this._styleClassName,
|
|
69
|
+
items,
|
|
70
|
+
viewZoneIdsToCleanUp
|
|
71
|
+
))
|
|
72
|
+
);
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
75
|
class ActionsSource {
|
|
@@ -82,28 +86,16 @@ class ActionsSource {
|
|
|
82
86
|
const result = [];
|
|
83
87
|
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
84
88
|
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
|
-
)),
|
|
89
|
+
text: ( localizeWithPath(_moduleId, 0, "Manual Resolution")),
|
|
90
|
+
tooltip: ( localizeWithPath(_moduleId, 1, "This conflict has been resolved manually.")),
|
|
95
91
|
});
|
|
96
92
|
}
|
|
97
93
|
else if (state.kind === ModifiedBaseRangeStateKind.base) {
|
|
98
94
|
result.push({
|
|
99
|
-
text: ( localizeWithPath(
|
|
100
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
101
|
-
'noChangesAccepted',
|
|
102
|
-
'No Changes Accepted'
|
|
103
|
-
)),
|
|
95
|
+
text: ( localizeWithPath(_moduleId, 2, 'No Changes Accepted')),
|
|
104
96
|
tooltip: ( localizeWithPath(
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
_moduleId,
|
|
98
|
+
3,
|
|
107
99
|
'The current resolution of this conflict equals the common ancestor of both the right and left changes.'
|
|
108
100
|
)),
|
|
109
101
|
});
|
|
@@ -125,40 +117,20 @@ class ActionsSource {
|
|
|
125
117
|
}
|
|
126
118
|
const stateToggles = [];
|
|
127
119
|
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 () => {
|
|
120
|
+
stateToggles.push(command(( localizeWithPath(_moduleId, 4, 'Remove {0}', model.input1.title)), async () => {
|
|
134
121
|
transaction((tx) => {
|
|
135
122
|
model.setState(modifiedBaseRange, state.withInputValue(1, false), true, tx);
|
|
136
123
|
model.telemetry.reportRemoveInvoked(1, state.includesInput(2));
|
|
137
124
|
});
|
|
138
|
-
}, ( localizeWithPath(
|
|
139
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
140
|
-
'removeTooltip',
|
|
141
|
-
'Remove {0} from the result document.',
|
|
142
|
-
model.input1.title
|
|
143
|
-
))));
|
|
125
|
+
}, ( localizeWithPath(_moduleId, 5, 'Remove {0} from the result document.', model.input1.title))));
|
|
144
126
|
}
|
|
145
127
|
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 () => {
|
|
128
|
+
stateToggles.push(command(( localizeWithPath(_moduleId, 4, 'Remove {0}', model.input2.title)), async () => {
|
|
152
129
|
transaction((tx) => {
|
|
153
130
|
model.setState(modifiedBaseRange, state.withInputValue(2, false), true, tx);
|
|
154
131
|
model.telemetry.reportRemoveInvoked(2, state.includesInput(1));
|
|
155
132
|
});
|
|
156
|
-
}, ( localizeWithPath(
|
|
157
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
158
|
-
'removeTooltip',
|
|
159
|
-
'Remove {0} from the result document.',
|
|
160
|
-
model.input2.title
|
|
161
|
-
))));
|
|
133
|
+
}, ( localizeWithPath(_moduleId, 5, 'Remove {0} from the result document.', model.input2.title))));
|
|
162
134
|
}
|
|
163
135
|
if (state.kind === ModifiedBaseRangeStateKind.both &&
|
|
164
136
|
state.firstInput === 2) {
|
|
@@ -166,18 +138,14 @@ class ActionsSource {
|
|
|
166
138
|
}
|
|
167
139
|
result.push(...stateToggles);
|
|
168
140
|
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 () => {
|
|
141
|
+
result.push(command(( localizeWithPath(_moduleId, 6, 'Reset to base')), async () => {
|
|
174
142
|
transaction((tx) => {
|
|
175
143
|
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base, true, tx);
|
|
176
144
|
model.telemetry.reportResetToBaseInvoked();
|
|
177
145
|
});
|
|
178
146
|
}, ( localizeWithPath(
|
|
179
|
-
|
|
180
|
-
|
|
147
|
+
_moduleId,
|
|
148
|
+
7,
|
|
181
149
|
'Reset this conflict to the common ancestor of both the right and left changes.'
|
|
182
150
|
))));
|
|
183
151
|
}
|
|
@@ -209,35 +177,16 @@ class ActionsSource {
|
|
|
209
177
|
const otherInputNumber = inputNumber === 1 ? 2 : 1;
|
|
210
178
|
if (state.kind !== ModifiedBaseRangeStateKind.unrecognized && !state.isInputIncluded(inputNumber)) {
|
|
211
179
|
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 () => {
|
|
180
|
+
result.push(command(( localizeWithPath(_moduleId, 8, "Accept {0}", inputData.title)), async () => {
|
|
218
181
|
transaction((tx) => {
|
|
219
182
|
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, false), inputNumber, tx);
|
|
220
183
|
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
221
184
|
});
|
|
222
|
-
}, ( localizeWithPath(
|
|
223
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
224
|
-
'acceptTooltip',
|
|
225
|
-
"Accept {0} in the result document.",
|
|
226
|
-
inputData.title
|
|
227
|
-
))));
|
|
185
|
+
}, ( localizeWithPath(_moduleId, 9, "Accept {0} in the result document.", inputData.title))));
|
|
228
186
|
if (modifiedBaseRange.canBeCombined) {
|
|
229
187
|
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
|
-
));
|
|
188
|
+
? ( localizeWithPath(_moduleId, 10, "Accept Combination ({0} First)", inputData.title))
|
|
189
|
+
: ( localizeWithPath(_moduleId, 11, "Accept Combination"));
|
|
241
190
|
result.push(command(commandName, async () => {
|
|
242
191
|
transaction((tx) => {
|
|
243
192
|
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base
|
|
@@ -246,61 +195,38 @@ class ActionsSource {
|
|
|
246
195
|
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
247
196
|
});
|
|
248
197
|
}, ( localizeWithPath(
|
|
249
|
-
|
|
250
|
-
|
|
198
|
+
_moduleId,
|
|
199
|
+
12,
|
|
251
200
|
"Accept an automatic combination of both sides in the result document."
|
|
252
201
|
))));
|
|
253
202
|
}
|
|
254
203
|
}
|
|
255
204
|
else {
|
|
256
|
-
result.push(command(( localizeWithPath(
|
|
257
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
258
|
-
'append',
|
|
259
|
-
"Append {0}",
|
|
260
|
-
inputData.title
|
|
261
|
-
)), async () => {
|
|
205
|
+
result.push(command(( localizeWithPath(_moduleId, 13, "Append {0}", inputData.title)), async () => {
|
|
262
206
|
transaction((tx) => {
|
|
263
207
|
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, false), inputNumber, tx);
|
|
264
208
|
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
265
209
|
});
|
|
266
|
-
}, ( localizeWithPath(
|
|
267
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
268
|
-
'appendTooltip',
|
|
269
|
-
"Append {0} to the result document.",
|
|
270
|
-
inputData.title
|
|
271
|
-
))));
|
|
210
|
+
}, ( localizeWithPath(_moduleId, 14, "Append {0} to the result document.", inputData.title))));
|
|
272
211
|
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 () => {
|
|
212
|
+
result.push(command(( localizeWithPath(_moduleId, 15, "Accept Combination", inputData.title)), async () => {
|
|
279
213
|
transaction((tx) => {
|
|
280
214
|
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, true), inputNumber, tx);
|
|
281
215
|
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
282
216
|
});
|
|
283
217
|
}, ( localizeWithPath(
|
|
284
|
-
|
|
285
|
-
|
|
218
|
+
_moduleId,
|
|
219
|
+
12,
|
|
286
220
|
"Accept an automatic combination of both sides in the result document."
|
|
287
221
|
))));
|
|
288
222
|
}
|
|
289
223
|
}
|
|
290
224
|
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 () => {
|
|
225
|
+
result.push(command(( localizeWithPath(_moduleId, 16, 'Ignore')), async () => {
|
|
296
226
|
transaction((tx) => {
|
|
297
227
|
model.setInputHandled(modifiedBaseRange, inputNumber, true, tx);
|
|
298
228
|
});
|
|
299
|
-
}, ( localizeWithPath(
|
|
300
|
-
'vs/workbench/contrib/mergeEditor/browser/view/conflictActions',
|
|
301
|
-
'markAsHandledTooltip',
|
|
302
|
-
"Don't take this side of the conflict."
|
|
303
|
-
))));
|
|
229
|
+
}, ( localizeWithPath(_moduleId, 17, "Don't take this side of the conflict."))));
|
|
304
230
|
}
|
|
305
231
|
}
|
|
306
232
|
return result;
|
|
@@ -5,6 +5,7 @@ import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
|
5
5
|
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
6
6
|
import { observableFromEvent, observableSignalFromEvent, observableSignal } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
7
7
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
8
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
8
9
|
import { LineRange } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange';
|
|
9
10
|
|
|
10
11
|
class EditorGutter extends Disposable {
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js
CHANGED
|
@@ -2,6 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
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
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
5
6
|
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
6
7
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
7
8
|
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
@@ -16,6 +17,7 @@ import { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverV
|
|
|
16
17
|
import { EditorGutter } from '../editorGutter.js';
|
|
17
18
|
import { CodeEditorView, createSelectionsAutorun, TitleMenu } from './codeEditorView.js';
|
|
18
19
|
|
|
20
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView";
|
|
19
21
|
let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
20
22
|
constructor(viewModel, instantiationService, configurationService) {
|
|
21
23
|
super(instantiationService, viewModel, configurationService);
|
|
@@ -102,10 +104,10 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
102
104
|
this._register(instantiationService.createInstance(TitleMenu, MenuId.MergeBaseToolbar, this.htmlElements.title));
|
|
103
105
|
this._register(autorunWithStore((reader, store) => {
|
|
104
106
|
if (this.checkboxesVisible.read(reader)) {
|
|
105
|
-
store.add(( new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
|
|
107
|
+
store.add(( (new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
|
|
106
108
|
getIntersectingGutterItems: (range, reader) => [],
|
|
107
|
-
createView: (item, target) => { throw new BugIndicatingError(); },
|
|
108
|
-
})));
|
|
109
|
+
createView: (item, target) => { throw ( (new BugIndicatingError())); },
|
|
110
|
+
}))));
|
|
109
111
|
}
|
|
110
112
|
}));
|
|
111
113
|
this._register(autorun(reader => {
|
|
@@ -114,25 +116,17 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
116
118
|
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
|
-
))));
|
|
119
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localizeWithPath(_moduleId, 0, 'Base'))));
|
|
122
120
|
const baseShowDiffAgainst = vm.baseShowDiffAgainst.read(reader);
|
|
123
121
|
let node = undefined;
|
|
124
122
|
if (baseShowDiffAgainst) {
|
|
125
123
|
const label = ( localizeWithPath(
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
_moduleId,
|
|
125
|
+
1,
|
|
128
126
|
'Comparing with {0}',
|
|
129
127
|
baseShowDiffAgainst === 1 ? vm.model.input1.title : vm.model.input2.title
|
|
130
128
|
));
|
|
131
|
-
const tooltip = ( localizeWithPath(
|
|
132
|
-
'vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView',
|
|
133
|
-
'compareWithTooltip',
|
|
134
|
-
'Differences are highlighted with a background color.'
|
|
135
|
-
));
|
|
129
|
+
const tooltip = ( localizeWithPath(_moduleId, 2, 'Differences are highlighted with a background color.'));
|
|
136
130
|
node = h('span', { title: tooltip }, [label]).root;
|
|
137
131
|
}
|
|
138
132
|
reset(this.htmlElements.description, ...(node ? [node] : []));
|
|
@@ -140,9 +134,9 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
140
134
|
this._register(applyObservableDecorations(this.editor, this.decorations));
|
|
141
135
|
}
|
|
142
136
|
};
|
|
143
|
-
BaseCodeEditorView = ( __decorate([
|
|
144
|
-
( __param(1, IInstantiationService)),
|
|
145
|
-
( __param(2, IConfigurationService))
|
|
146
|
-
], BaseCodeEditorView));
|
|
137
|
+
BaseCodeEditorView = ( (__decorate([
|
|
138
|
+
( (__param(1, IInstantiationService))),
|
|
139
|
+
( (__param(2, IConfigurationService)))
|
|
140
|
+
], BaseCodeEditorView)));
|
|
147
141
|
|
|
148
142
|
export { BaseCodeEditorView };
|
|
@@ -2,6 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
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
|
+
import 'vscode/vscode/vs/base/common/arrays';
|
|
5
6
|
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
6
7
|
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
7
8
|
import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|