Skip to content

Commit 8bf1d2f

Browse files
committed
Keep MultiDiffEditorWidget methods in the monaco-editor build
1 parent 12dcb6b commit 8bf1d2f

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

build/monaco/monaco.usage.recipe

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { IObservable } from './vs/base/common/observable.js';
66
import { ServiceIdentifier } from './vs/platform/instantiation/common/instantiation.js';
77
import { start } from './vs/editor/editor.worker.start.js';
88
import { SyncDescriptor0 } from './vs/platform/instantiation/common/descriptors.js';
9+
import { MultiDiffEditorWidget } from './vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.js';
10+
import { MultiDiffEditorViewModel } from './vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.js';
911
import * as editorAPI from './vs/editor/editor.api.js';
1012

1113
(function () {
@@ -35,4 +37,30 @@ import * as editorAPI from './vs/editor/editor.api.js';
3537

3638
const o: IObservable<number> = null!;
3739
o.TChange;
40+
41+
// the widget returned by editor.createMultiFileDiffEditor (which has return type `any`,
42+
// so its members are not referenced by the generated api usages) — see microsoft/monaco-editor#4584
43+
const mdw: MultiDiffEditorWidget = null!;
44+
a = mdw.createViewModel;
45+
a = mdw.setViewModel;
46+
a = mdw.layout;
47+
a = mdw.reveal;
48+
a = mdw.setRenderSideBySide;
49+
a = mdw.toggleRenderSideBySide;
50+
a = mdw.getActiveControl;
51+
a = mdw.getViewState;
52+
a = mdw.setViewState;
53+
a = mdw.tryGetCodeEditor;
54+
a = mdw.getRootElement;
55+
a = mdw.getContextKeyService;
56+
a = mdw.getScopedInstantiationService;
57+
a = mdw.findDocumentDiffItem;
58+
a = mdw.goToNextChange;
59+
a = mdw.goToPreviousChange;
60+
const mdvm: MultiDiffEditorViewModel = null!;
61+
a = mdvm.waitForDiffOr1s;
62+
a = mdvm.collapseAll;
63+
a = mdvm.expandAll;
64+
a = mdvm.collapse;
65+
a = mdvm.expand;
3866
})();

src/vs/editor/standalone/browser/standaloneEditor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ export function createDiffEditor(domElement: HTMLElement, options?: IStandaloneD
102102

103103
export function createMultiFileDiffEditor(domElement: HTMLElement, override?: IEditorOverrideServices) {
104104
const instantiationService = StandaloneServices.initialize(override || {});
105+
const themeService = <StandaloneThemeService>StandaloneServices.get(IStandaloneThemeService);
106+
themeService.registerEditorContainer(domElement);
105107
return new MultiDiffEditorWidget(domElement, {}, undefined, instantiationService);
106108
}
107109

0 commit comments

Comments
 (0)