@codingame/monaco-vscode-view-common-service-override 8.0.4 → 9.0.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/workbench/api/browser/viewsExtensionPoint.js +58 -58
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +21 -21
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +159 -159
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +19 -4
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +5 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +12 -12
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +22 -19
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +27 -27
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +11 -11
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +5 -5
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +11 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +20 -16
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +8 -8
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +2 -2
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +0 -271
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +0 -41
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { createStyleSheet, isInShadowDOM, h, $, reset } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
|
-
import { renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
3
|
-
import { hash } from 'vscode/vscode/vs/base/common/hash';
|
|
4
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { transaction } from 'vscode/vscode/vs/base/common/observableInternal/base';
|
|
6
|
-
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
7
|
-
import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
8
|
-
import 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
9
|
-
import 'vscode/vscode/vs/base/common/cancellation';
|
|
10
|
-
import 'vscode/vscode/vs/base/common/arrays';
|
|
11
|
-
import { EditorOption, EDITOR_FONT_DEFAULTS } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
12
|
-
import { localize } from 'vscode/vscode/vs/nls';
|
|
13
|
-
import { ModifiedBaseRangeStateKind, ModifiedBaseRangeState } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange';
|
|
14
|
-
import { FixedZoneWidget } from './fixedZoneWidget.js';
|
|
15
|
-
|
|
16
|
-
class ConflictActionsFactory extends Disposable {
|
|
17
|
-
constructor(_editor) {
|
|
18
|
-
super();
|
|
19
|
-
this._editor = _editor;
|
|
20
|
-
this._register(this._editor.onDidChangeConfiguration((e) => {
|
|
21
|
-
if (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.codeLensFontSize) || e.hasChanged(EditorOption.codeLensFontFamily)) {
|
|
22
|
-
this._updateLensStyle();
|
|
23
|
-
}
|
|
24
|
-
}));
|
|
25
|
-
this._styleClassName = '_conflictActionsFactory_' + ( (hash(this._editor.getId()).toString(16)));
|
|
26
|
-
this._styleElement = createStyleSheet(isInShadowDOM(this._editor.getContainerDomNode())
|
|
27
|
-
? this._editor.getContainerDomNode()
|
|
28
|
-
: undefined, undefined, this._store);
|
|
29
|
-
this._updateLensStyle();
|
|
30
|
-
}
|
|
31
|
-
_updateLensStyle() {
|
|
32
|
-
const { codeLensHeight, fontSize } = this._getLayoutInfo();
|
|
33
|
-
const fontFamily = this._editor.getOption(EditorOption.codeLensFontFamily);
|
|
34
|
-
const editorFontInfo = this._editor.getOption(EditorOption.fontInfo);
|
|
35
|
-
const fontFamilyVar = `--codelens-font-family${this._styleClassName}`;
|
|
36
|
-
const fontFeaturesVar = `--codelens-font-features${this._styleClassName}`;
|
|
37
|
-
let newStyle = `
|
|
38
|
-
.${this._styleClassName} { line-height: ${codeLensHeight}px; font-size: ${fontSize}px; padding-right: ${Math.round(fontSize * 0.5)}px; font-feature-settings: var(${fontFeaturesVar}) }
|
|
39
|
-
.monaco-workbench .${this._styleClassName} span.codicon { line-height: ${codeLensHeight}px; font-size: ${fontSize}px; }
|
|
40
|
-
`;
|
|
41
|
-
if (fontFamily) {
|
|
42
|
-
newStyle += `${this._styleClassName} { font-family: var(${fontFamilyVar}), ${EDITOR_FONT_DEFAULTS.fontFamily}}`;
|
|
43
|
-
}
|
|
44
|
-
this._styleElement.textContent = newStyle;
|
|
45
|
-
this._editor.getContainerDomNode().style.setProperty(fontFamilyVar, fontFamily ?? 'inherit');
|
|
46
|
-
this._editor.getContainerDomNode().style.setProperty(fontFeaturesVar, editorFontInfo.fontFeatureSettings);
|
|
47
|
-
}
|
|
48
|
-
_getLayoutInfo() {
|
|
49
|
-
const lineHeightFactor = Math.max(1.3, this._editor.getOption(EditorOption.lineHeight) / this._editor.getOption(EditorOption.fontSize));
|
|
50
|
-
let fontSize = this._editor.getOption(EditorOption.codeLensFontSize);
|
|
51
|
-
if (!fontSize || fontSize < 5) {
|
|
52
|
-
fontSize = (this._editor.getOption(EditorOption.fontSize) * .9) | 0;
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
fontSize,
|
|
56
|
-
codeLensHeight: (fontSize * lineHeightFactor) | 0,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
createWidget(viewZoneChangeAccessor, lineNumber, items, viewZoneIdsToCleanUp) {
|
|
60
|
-
const layoutInfo = this._getLayoutInfo();
|
|
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
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
class ActionsSource {
|
|
75
|
-
constructor(viewModel, modifiedBaseRange) {
|
|
76
|
-
this.viewModel = viewModel;
|
|
77
|
-
this.modifiedBaseRange = modifiedBaseRange;
|
|
78
|
-
this.itemsInput1 = this.getItemsInput(1);
|
|
79
|
-
this.itemsInput2 = this.getItemsInput(2);
|
|
80
|
-
this.resultItems = derived(this, reader => {
|
|
81
|
-
const viewModel = this.viewModel;
|
|
82
|
-
const modifiedBaseRange = this.modifiedBaseRange;
|
|
83
|
-
const state = viewModel.model.getState(modifiedBaseRange).read(reader);
|
|
84
|
-
const model = viewModel.model;
|
|
85
|
-
const result = [];
|
|
86
|
-
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
87
|
-
result.push({
|
|
88
|
-
text: ( localize(11483, "Manual Resolution")),
|
|
89
|
-
tooltip: ( localize(11484, "This conflict has been resolved manually.")),
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else if (state.kind === ModifiedBaseRangeStateKind.base) {
|
|
93
|
-
result.push({
|
|
94
|
-
text: ( localize(11485, 'No Changes Accepted')),
|
|
95
|
-
tooltip: ( localize(
|
|
96
|
-
11486,
|
|
97
|
-
'The current resolution of this conflict equals the common ancestor of both the right and left changes.'
|
|
98
|
-
)),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
const labels = [];
|
|
103
|
-
if (state.includesInput1) {
|
|
104
|
-
labels.push(model.input1.title);
|
|
105
|
-
}
|
|
106
|
-
if (state.includesInput2) {
|
|
107
|
-
labels.push(model.input2.title);
|
|
108
|
-
}
|
|
109
|
-
if (state.kind === ModifiedBaseRangeStateKind.both && state.firstInput === 2) {
|
|
110
|
-
labels.reverse();
|
|
111
|
-
}
|
|
112
|
-
result.push({
|
|
113
|
-
text: `${labels.join(' + ')}`
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
const stateToggles = [];
|
|
117
|
-
if (state.includesInput1) {
|
|
118
|
-
stateToggles.push(command(( localize(11487, 'Remove {0}', model.input1.title)), async () => {
|
|
119
|
-
transaction((tx) => {
|
|
120
|
-
model.setState(modifiedBaseRange, state.withInputValue(1, false), true, tx);
|
|
121
|
-
model.telemetry.reportRemoveInvoked(1, state.includesInput(2));
|
|
122
|
-
});
|
|
123
|
-
}, ( localize(11488, 'Remove {0} from the result document.', model.input1.title))));
|
|
124
|
-
}
|
|
125
|
-
if (state.includesInput2) {
|
|
126
|
-
stateToggles.push(command(( localize(11487, 'Remove {0}', model.input2.title)), async () => {
|
|
127
|
-
transaction((tx) => {
|
|
128
|
-
model.setState(modifiedBaseRange, state.withInputValue(2, false), true, tx);
|
|
129
|
-
model.telemetry.reportRemoveInvoked(2, state.includesInput(1));
|
|
130
|
-
});
|
|
131
|
-
}, ( localize(11488, 'Remove {0} from the result document.', model.input2.title))));
|
|
132
|
-
}
|
|
133
|
-
if (state.kind === ModifiedBaseRangeStateKind.both &&
|
|
134
|
-
state.firstInput === 2) {
|
|
135
|
-
stateToggles.reverse();
|
|
136
|
-
}
|
|
137
|
-
result.push(...stateToggles);
|
|
138
|
-
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
139
|
-
result.push(command(( localize(11489, 'Reset to base')), async () => {
|
|
140
|
-
transaction((tx) => {
|
|
141
|
-
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base, true, tx);
|
|
142
|
-
model.telemetry.reportResetToBaseInvoked();
|
|
143
|
-
});
|
|
144
|
-
}, ( localize(
|
|
145
|
-
11490,
|
|
146
|
-
'Reset this conflict to the common ancestor of both the right and left changes.'
|
|
147
|
-
))));
|
|
148
|
-
}
|
|
149
|
-
return result;
|
|
150
|
-
});
|
|
151
|
-
this.isEmpty = derived(this, reader => {
|
|
152
|
-
return this.itemsInput1.read(reader).length + this.itemsInput2.read(reader).length + this.resultItems.read(reader).length === 0;
|
|
153
|
-
});
|
|
154
|
-
this.inputIsEmpty = derived(this, reader => {
|
|
155
|
-
return this.itemsInput1.read(reader).length + this.itemsInput2.read(reader).length === 0;
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
getItemsInput(inputNumber) {
|
|
159
|
-
return derived(reader => {
|
|
160
|
-
const viewModel = this.viewModel;
|
|
161
|
-
const modifiedBaseRange = this.modifiedBaseRange;
|
|
162
|
-
if (!viewModel.model.hasBaseRange(modifiedBaseRange)) {
|
|
163
|
-
return [];
|
|
164
|
-
}
|
|
165
|
-
const state = viewModel.model.getState(modifiedBaseRange).read(reader);
|
|
166
|
-
const handled = viewModel.model.isHandled(modifiedBaseRange).read(reader);
|
|
167
|
-
const model = viewModel.model;
|
|
168
|
-
const result = [];
|
|
169
|
-
const inputData = inputNumber === 1 ? viewModel.model.input1 : viewModel.model.input2;
|
|
170
|
-
const showNonConflictingChanges = viewModel.showNonConflictingChanges.read(reader);
|
|
171
|
-
if (!modifiedBaseRange.isConflicting && handled && !showNonConflictingChanges) {
|
|
172
|
-
return [];
|
|
173
|
-
}
|
|
174
|
-
const otherInputNumber = inputNumber === 1 ? 2 : 1;
|
|
175
|
-
if (state.kind !== ModifiedBaseRangeStateKind.unrecognized && !state.isInputIncluded(inputNumber)) {
|
|
176
|
-
if (!state.isInputIncluded(otherInputNumber) || !this.viewModel.shouldUseAppendInsteadOfAccept.read(reader)) {
|
|
177
|
-
result.push(command(( localize(11491, "Accept {0}", inputData.title)), async () => {
|
|
178
|
-
transaction((tx) => {
|
|
179
|
-
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, false), inputNumber, tx);
|
|
180
|
-
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
181
|
-
});
|
|
182
|
-
}, ( localize(11492, "Accept {0} in the result document.", inputData.title))));
|
|
183
|
-
if (modifiedBaseRange.canBeCombined) {
|
|
184
|
-
const commandName = modifiedBaseRange.isOrderRelevant
|
|
185
|
-
? ( localize(11493, "Accept Combination ({0} First)", inputData.title))
|
|
186
|
-
: ( localize(11494, "Accept Combination"));
|
|
187
|
-
result.push(command(commandName, async () => {
|
|
188
|
-
transaction((tx) => {
|
|
189
|
-
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base
|
|
190
|
-
.withInputValue(inputNumber, true)
|
|
191
|
-
.withInputValue(otherInputNumber, true, true), true, tx);
|
|
192
|
-
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
193
|
-
});
|
|
194
|
-
}, ( localize(
|
|
195
|
-
11495,
|
|
196
|
-
"Accept an automatic combination of both sides in the result document."
|
|
197
|
-
))));
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
result.push(command(( localize(11496, "Append {0}", inputData.title)), async () => {
|
|
202
|
-
transaction((tx) => {
|
|
203
|
-
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, false), inputNumber, tx);
|
|
204
|
-
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
205
|
-
});
|
|
206
|
-
}, ( localize(11497, "Append {0} to the result document.", inputData.title))));
|
|
207
|
-
if (modifiedBaseRange.canBeCombined) {
|
|
208
|
-
result.push(command(( localize(11498, "Accept Combination", inputData.title)), async () => {
|
|
209
|
-
transaction((tx) => {
|
|
210
|
-
model.setState(modifiedBaseRange, state.withInputValue(inputNumber, true, true), inputNumber, tx);
|
|
211
|
-
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
212
|
-
});
|
|
213
|
-
}, ( localize(
|
|
214
|
-
11495,
|
|
215
|
-
"Accept an automatic combination of both sides in the result document."
|
|
216
|
-
))));
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
if (!model.isInputHandled(modifiedBaseRange, inputNumber).read(reader)) {
|
|
220
|
-
result.push(command(( localize(11499, 'Ignore')), async () => {
|
|
221
|
-
transaction((tx) => {
|
|
222
|
-
model.setInputHandled(modifiedBaseRange, inputNumber, true, tx);
|
|
223
|
-
});
|
|
224
|
-
}, ( localize(11500, "Don't take this side of the conflict."))));
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return result;
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function command(title, action, tooltip) {
|
|
232
|
-
return {
|
|
233
|
-
text: title,
|
|
234
|
-
action,
|
|
235
|
-
tooltip,
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
class ActionsContentWidget extends FixedZoneWidget {
|
|
239
|
-
constructor(editor, viewZoneAccessor, afterLineNumber, height, className, items, viewZoneIdsToCleanUp) {
|
|
240
|
-
super(editor, viewZoneAccessor, afterLineNumber, height, viewZoneIdsToCleanUp);
|
|
241
|
-
this._domNode = h('div.merge-editor-conflict-actions').root;
|
|
242
|
-
this.widgetDomNode.appendChild(this._domNode);
|
|
243
|
-
this._domNode.classList.add(className);
|
|
244
|
-
this._register(autorun(reader => {
|
|
245
|
-
const i = items.read(reader);
|
|
246
|
-
this.setState(i);
|
|
247
|
-
}));
|
|
248
|
-
}
|
|
249
|
-
setState(items) {
|
|
250
|
-
const children = [];
|
|
251
|
-
let isFirst = true;
|
|
252
|
-
for (const item of items) {
|
|
253
|
-
if (isFirst) {
|
|
254
|
-
isFirst = false;
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
children.push($('span', undefined, '\u00a0|\u00a0'));
|
|
258
|
-
}
|
|
259
|
-
const title = renderLabelWithIcons(item.text);
|
|
260
|
-
if (item.action) {
|
|
261
|
-
children.push($('a', { title: item.tooltip, role: 'button', onclick: () => item.action() }, ...title));
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
children.push($('span', { title: item.tooltip }, ...title));
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
reset(this._domNode, ...children);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export { ActionsSource, ConflictActionsFactory };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { h } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
|
-
|
|
5
|
-
class FixedZoneWidget extends Disposable {
|
|
6
|
-
static { this.counter = 0; }
|
|
7
|
-
constructor(editor, viewZoneAccessor, afterLineNumber, height, viewZoneIdsToCleanUp) {
|
|
8
|
-
super();
|
|
9
|
-
this.editor = editor;
|
|
10
|
-
this.overlayWidgetId = `fixedZoneWidget-${FixedZoneWidget.counter++}`;
|
|
11
|
-
this.widgetDomNode = h('div.fixed-zone-widget').root;
|
|
12
|
-
this.overlayWidget = {
|
|
13
|
-
getId: () => this.overlayWidgetId,
|
|
14
|
-
getDomNode: () => this.widgetDomNode,
|
|
15
|
-
getPosition: () => null
|
|
16
|
-
};
|
|
17
|
-
this.viewZoneId = viewZoneAccessor.addZone({
|
|
18
|
-
domNode: document.createElement('div'),
|
|
19
|
-
afterLineNumber: afterLineNumber,
|
|
20
|
-
heightInPx: height,
|
|
21
|
-
onComputedHeight: (height) => {
|
|
22
|
-
this.widgetDomNode.style.height = `${height}px`;
|
|
23
|
-
},
|
|
24
|
-
onDomNodeTop: (top) => {
|
|
25
|
-
this.widgetDomNode.style.top = `${top}px`;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
viewZoneIdsToCleanUp.push(this.viewZoneId);
|
|
29
|
-
this._register(Event.runAndSubscribe(this.editor.onDidLayoutChange, () => {
|
|
30
|
-
this.widgetDomNode.style.left = this.editor.getLayoutInfo().contentLeft + 'px';
|
|
31
|
-
}));
|
|
32
|
-
this.editor.addOverlayWidget(this.overlayWidget);
|
|
33
|
-
this._register({
|
|
34
|
-
dispose: () => {
|
|
35
|
-
this.editor.removeOverlayWidget(this.overlayWidget);
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { FixedZoneWidget };
|