@codingame/monaco-vscode-api 1.79.0-next.0 → 1.79.1
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/README.md +7 -5
- package/dist/activity.d.ts +8 -108
- package/dist/api.js +3 -3
- package/dist/colorRegistry.d.ts +2 -2
- package/dist/contextkey.d.ts +2 -2
- package/dist/default-extension.js +23 -0
- package/dist/editor.d.ts +4 -320
- package/dist/editorBrowser.d.ts +327 -10
- package/dist/event.d.ts +1 -1
- package/dist/{extension-tools-d0cfdea1.js → extension-tools-0c4c1ad7.js} +345 -210
- package/dist/extensions.d.ts +3 -4
- package/dist/extensions.d2.ts +1 -1
- package/dist/extensions.js +4 -37
- package/dist/extensionsRegistry.d.ts +1 -1
- package/dist/files.d.ts +2 -2
- package/dist/keybinding.d.ts +1 -1
- package/dist/languageFeatures.d.ts +6 -7
- package/dist/log.d.ts +1 -1
- package/dist/monaco-treemending.js +15 -1
- package/dist/monaco.d.ts +31 -32
- package/dist/monaco.js +62 -6
- package/dist/node_modules/rollup-plugin-styles/dist/runtime/inject-css.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +4 -0
- package/dist/rollup-extension-directory-plugin.js +1 -2
- package/dist/rollup-vsix-plugin.js +1 -2
- package/dist/service-override/configuration.d.ts +2 -2
- package/dist/service-override/editor.d.ts +13 -0
- package/dist/service-override/{modelEditor.js → editor.js} +6 -62
- package/dist/service-override/files.d.ts +5 -5
- package/dist/service-override/files.js +14 -2
- package/dist/service-override/keybindings.js +3 -79
- package/dist/service-override/layout.js +6 -2
- package/dist/service-override/model.d.ts +7 -0
- package/dist/service-override/model.js +10 -0
- package/dist/service-override/quickaccess.d.ts +7 -0
- package/dist/service-override/quickaccess.js +80 -0
- package/dist/service-override/snippets.js +5 -1
- package/dist/service-override/textmate.js +7 -2
- package/dist/service-override/theme.d.ts +1 -1
- package/dist/service-override/tools/editor.js +73 -0
- package/dist/service-override/views.d.ts +63 -201
- package/dist/service-override/views.js +102 -8
- package/dist/services.d.ts +116 -19
- package/dist/vscode/vs/base/browser/ui/centered/centeredViewLayout.js +178 -0
- package/dist/vscode/vs/base/browser/ui/grid/grid.js +452 -0
- package/dist/vscode/vs/base/browser/ui/grid/gridview.css.js +4 -0
- package/dist/vscode/vs/base/browser/ui/grid/gridview.js +999 -0
- package/dist/vscode/vs/base/browser/ui/iconLabel/simpleIconLabel.js +14 -0
- package/dist/vscode/vs/base/browser/ui/menu/menubar.css.js +4 -0
- package/dist/vscode/vs/base/browser/ui/menu/menubar.js +1 -1
- package/dist/vscode/vs/base/browser/ui/splitview/paneview.css.js +4 -0
- package/dist/vscode/vs/base/browser/ui/splitview/paneview.js +1 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionStorage.js +1 -1
- package/dist/vscode/vs/platform/product/common/product.js +48 -0
- package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +94 -0
- package/dist/vscode/vs/platform/terminal/common/terminal.js +3 -0
- package/dist/vscode/vs/platform/update/common/update.js +11 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +68 -0
- package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +234 -0
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +6 -1
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +20 -17
- package/dist/vscode/vs/workbench/browser/actions/quickAccessActions.js +204 -0
- package/dist/vscode/vs/workbench/browser/dnd.js +27 -2
- package/dist/vscode/vs/workbench/browser/editor.js +94 -0
- package/dist/vscode/vs/workbench/browser/labels.js +23 -2
- package/dist/vscode/vs/workbench/browser/media/part.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/part.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarActions.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarPart.js +3 -3
- package/dist/vscode/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +14 -26
- package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/binaryDiffEditor.js +43 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/binaryEditor.js +55 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbs.js +330 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsControl.js +690 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsModel.js +142 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +414 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +800 -6
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +56 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorActions.js +1484 -107
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +1121 -4
- package/dist/vscode/vs/workbench/browser/parts/editor/editorDropTarget.js +499 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +1219 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +137 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPane.js +242 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPanes.js +297 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPart.js +841 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPlaceholder.js +235 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1152 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorWithViewState.js +139 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +339 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorplaceholder.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorstatus.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/sidebysideeditor.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/titlecontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +243 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/sideBySideEditor.js +387 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/tabFocus.js +77 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +1504 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textCodeEditor.js +79 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +304 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textEditor.js +220 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +149 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/titleControl.js +284 -0
- package/dist/vscode/vs/workbench/browser/parts/media/compositepart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsActions.js +8 -8
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsCenter.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsList.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/panel/media/basepanelpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/panel/media/panelpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/panel/panelActions.js +19 -5
- package/dist/vscode/vs/workbench/browser/parts/panel/panelPart.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarActions.js +109 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarItem.js +224 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarModel.js +251 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarPart.js +439 -0
- package/dist/vscode/vs/workbench/browser/parts/titlebar/media/menubarControl.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/titlebar/menubarControl.js +76 -3
- package/dist/vscode/vs/workbench/browser/parts/views/media/paneviewlet.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/views/media/views.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/viewPane.js +5 -5
- package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/viewsService.js +4 -4
- package/dist/vscode/vs/workbench/browser/quickaccess.js +6 -2
- package/dist/vscode/vs/workbench/browser/workbench.contribution.js +1108 -0
- package/dist/vscode/vs/workbench/common/contextkeys.js +34 -1
- package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +674 -0
- package/dist/vscode/vs/workbench/common/editor.js +57 -1
- package/dist/vscode/vs/workbench/common/theme.js +35 -35
- package/dist/vscode/vs/workbench/common/views.js +1 -1
- package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +4 -4
- package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +1 -1
- package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +77 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +217 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js +24 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointWidget.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debug.contribution.js +30 -4
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +13 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugIcons.js +77 -127
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugToolBar.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugViewlet.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/disassemblyView.js +620 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugHover.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/repl.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/common/debug.js +2 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +71 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileEditor.js +225 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +5 -4
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +270 -4
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +4 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +24 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +8 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +10 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/media/explorerviewlet.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/openEditorsView.js +608 -0
- package/dist/vscode/vs/workbench/contrib/files/common/files.js +2 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +1 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +1 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +9 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +305 -0
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +6 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +379 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +2 -2
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +33 -1
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +130 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +225 -0
- package/dist/vscode/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/remote/browser/remoteIcons.js +21 -17
- package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +1 -1
- package/dist/vscode/vs/workbench/contrib/search/browser/anythingQuickAccess.js +757 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/media/anythingQuickAccess.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +428 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +219 -0
- package/dist/vscode/vs/workbench/contrib/search/common/cacheState.js +85 -0
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +2 -0
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +119 -1
- package/dist/vscode/vs/workbench/contrib/tasks/browser/taskQuickPick.js +385 -0
- package/dist/vscode/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +108 -0
- package/dist/vscode/vs/workbench/contrib/tasks/common/tasks.js +351 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +44 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +147 -1
- package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +1 -1
- package/dist/vscode/vs/workbench/services/editor/browser/editorDropService.js +3 -0
- package/dist/vscode/vs/workbench/services/editor/browser/editorResolverService.js +619 -0
- package/dist/vscode/vs/workbench/services/editor/browser/editorService.js +720 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorGroupFinder.js +116 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorGroupsService.js +6 -1
- package/dist/vscode/vs/workbench/services/editor/common/editorResolverService.js +34 -1
- package/dist/vscode/vs/workbench/services/history/browser/historyService.js +1451 -0
- package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
- package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +4 -0
- package/dist/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +2 -1
- package/dist/vscode/vs/workbench/services/outline/browser/outline.js +3 -0
- package/dist/vscode/vs/workbench/services/progress/browser/progressIndicator.js +72 -1
- package/dist/vscode/vs/workbench/services/quickinput/browser/quickInputService.js +67 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +2 -112
- package/dist/vscode/vs/workbench/services/semanticSimilarity/common/semanticSimilarityService.js +54 -1
- package/dist/vscode/vs/workbench/services/statusbar/browser/statusbar.js +15 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/worker/textMate.worker.js +90 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/worker/textMateWorkerModel.js +133 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +110 -3
- package/dist/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.js +1 -1
- package/dist/vscode-services/extHost.js +12 -5
- package/dist/vscode-services/missing-services.js +117 -3
- package/dist/vscode-services/window.js +21 -2
- package/dist/vscode-services/workspace.js +2 -1
- package/dist/workbenchThemeService.d.ts +1 -1
- package/dist/workers/textMate.worker.d.ts +2 -0
- package/dist/workers/textMate.worker.js +3 -0
- package/dist/workspace.d.ts +1 -1
- package/monaco-editor-treemending.patch +784 -784
- package/package.json +42 -22
- package/dist/assets/activityaction.css +0 -224
- package/dist/assets/activitybarpart.css +0 -65
- package/dist/assets/basepanelpart.css +0 -221
- package/dist/assets/breakpointWidget.css +0 -31
- package/dist/assets/callHierarchy.css +0 -62
- package/dist/assets/callStackEditorContribution.css +0 -12
- package/dist/assets/compositepart.css +0 -17
- package/dist/assets/debug.contribution.css +0 -138
- package/dist/assets/debugHover.css +0 -80
- package/dist/assets/debugToolBar.css +0 -49
- package/dist/assets/debugViewlet.css +0 -337
- package/dist/assets/editorquickaccess.css +0 -8
- package/dist/assets/exceptionWidget.css +0 -52
- package/dist/assets/explorerviewlet.css +0 -129
- package/dist/assets/hover.css +0 -127
- package/dist/assets/interactiveSession.css +0 -340
- package/dist/assets/menubar.css +0 -111
- package/dist/assets/menubarControl.css +0 -61
- package/dist/assets/notificationsActions.css +0 -14
- package/dist/assets/notificationsCenter.css +0 -69
- package/dist/assets/notificationsList.css +0 -152
- package/dist/assets/notificationsToasts.css +0 -63
- package/dist/assets/panelpart.css +0 -75
- package/dist/assets/paneview.css +0 -148
- package/dist/assets/paneviewlet.css +0 -79
- package/dist/assets/part.css +0 -109
- package/dist/assets/repl.css +0 -145
- package/dist/assets/sidebarpart.css +0 -61
- package/dist/assets/tunnelView.css +0 -107
- package/dist/assets/typeHierarchy.css +0 -62
- package/dist/assets/views.css +0 -297
- package/dist/override/vs/workbench/browser/parts/editor/textEditor.js +0 -2
- package/dist/override/vs/workbench/contrib/files/browser/views/openEditorsView.js +0 -2
- package/dist/service-override/modelEditor.d.ts +0 -14
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -249
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +0 -10
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +0 -72
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +0 -355
|
@@ -12,6 +12,7 @@ import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/li
|
|
|
12
12
|
import { joinPath } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
13
13
|
import { Event, Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
14
14
|
export { HTMLFileSystemProvider } from 'monaco-editor/esm/vs/platform/files/browser/htmlFileSystemProvider.js';
|
|
15
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
15
16
|
import '../vscode/vs/workbench/contrib/files/browser/files.contribution.js';
|
|
16
17
|
class File {
|
|
17
18
|
constructor(getContent) {
|
|
@@ -73,8 +74,7 @@ class SimpleTextFileSystemProvider {
|
|
|
73
74
|
}
|
|
74
75
|
async mkdir() {
|
|
75
76
|
}
|
|
76
|
-
async readdir(
|
|
77
|
-
console.debug('Not implemented: readdir', directory);
|
|
77
|
+
async readdir(_directory) {
|
|
78
78
|
return [];
|
|
79
79
|
}
|
|
80
80
|
delete() {
|
|
@@ -84,6 +84,17 @@ class SimpleTextFileSystemProvider {
|
|
|
84
84
|
throw createFileSystemProviderError('Not allowed', FileSystemProviderErrorCode.NoPermissions);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
+
class TypescriptWorkerFileSystemProvider extends SimpleTextFileSystemProvider {
|
|
88
|
+
async getFileContent(resource) {
|
|
89
|
+
const typescript = monaco.languages.typescript;
|
|
90
|
+
if (typescript == null) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
const path = resource.path.slice(1);
|
|
94
|
+
return typescript.typescriptDefaults.getExtraLibs()[path]?.content ?? typescript.javascriptDefaults.getExtraLibs()[path]?.content;
|
|
95
|
+
}
|
|
96
|
+
async setFileContent() { }
|
|
97
|
+
}
|
|
87
98
|
class ExtensionFileSystemProviderWithFileReadWriteCapability {
|
|
88
99
|
constructor() {
|
|
89
100
|
this.capabilities = 2 | 1024 | 2048 ;
|
|
@@ -263,4 +274,5 @@ function registerExtensionFile(extensionLocation, path, getContent) {
|
|
|
263
274
|
function registerFileSystemOverlay(provider) {
|
|
264
275
|
return fileSystemProvider.register(provider);
|
|
265
276
|
}
|
|
277
|
+
registerFileSystemOverlay(new TypescriptWorkerFileSystemProvider());
|
|
266
278
|
export { FileType, SimpleTextFileSystemProvider, getServiceOverride as default, registerExtensionFile, registerFileSystemOverlay };
|
|
@@ -1,91 +1,15 @@
|
|
|
1
|
-
import { __decorate, __param } from '../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import '../vscode-services/missing-services.js';
|
|
3
|
-
import { StandaloneServices
|
|
2
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
4
3
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
5
4
|
import { WorkbenchKeybindingService } from '../vscode/vs/workbench/services/keybinding/browser/keybindingService.js';
|
|
6
5
|
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
7
6
|
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
8
|
-
import { KeybindingResolver } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js';
|
|
9
|
-
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
10
|
-
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
11
|
-
import { Extensions } from 'monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js';
|
|
12
|
-
import { StandaloneCommandsQuickAccessProvider } from 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js';
|
|
13
|
-
import { CommandsQuickAccessProvider } from '../vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js';
|
|
14
7
|
import { IUserDataProfilesService } from 'monaco-editor/esm/vs/platform/userDataProfile/common/userDataProfile.js';
|
|
15
8
|
import { IKeyboardLayoutService } from '../vscode/vs/platform/keyboardLayout/common/keyboardLayout.js';
|
|
16
9
|
import { BrowserKeyboardLayoutService } from '../vscode/vs/workbench/services/keybinding/browser/keyboardLayoutService.js';
|
|
17
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
18
|
-
import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
19
10
|
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
20
11
|
import getServiceOverride$1 from './files.js';
|
|
21
|
-
import
|
|
22
|
-
let DelegateStandaloneKeybindingService = class DelegateStandaloneKeybindingService extends createInjectedClass(StandaloneKeybindingService) {
|
|
23
|
-
constructor(instantiationService) {
|
|
24
|
-
super(instantiationService);
|
|
25
|
-
this.delegate = instantiationService.createInstance(WorkbenchKeybindingService);
|
|
26
|
-
this._cachedOverridenResolver = null;
|
|
27
|
-
this.onDidUpdateKeybindings(() => {
|
|
28
|
-
this._cachedOverridenResolver = null;
|
|
29
|
-
});
|
|
30
|
-
this.delegate.onDidUpdateKeybindings(() => {
|
|
31
|
-
this._cachedOverridenResolver = null;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
_getResolver() {
|
|
35
|
-
if (this._cachedOverridenResolver == null) {
|
|
36
|
-
const overrides = this['_toNormalizedKeybindingItems'](this['_dynamicKeybindings'], false);
|
|
37
|
-
this._cachedOverridenResolver = new KeybindingResolver(
|
|
38
|
-
[...this.delegate['_getResolver']().getKeybindings()], overrides, (str) => this._log(str));
|
|
39
|
-
}
|
|
40
|
-
return this._cachedOverridenResolver;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
DelegateStandaloneKeybindingService = __decorate([
|
|
44
|
-
( __param(0, IInstantiationService))
|
|
45
|
-
], DelegateStandaloneKeybindingService);
|
|
46
|
-
const quickAccessRegistry = ( Registry.as(Extensions.Quickaccess));
|
|
47
|
-
const provider = quickAccessRegistry.getQuickAccessProviders().find(provider => provider.ctor === StandaloneCommandsQuickAccessProvider);
|
|
48
|
-
if (provider != null) {
|
|
49
|
-
provider.ctor = class extends CommandsQuickAccessProvider {
|
|
50
|
-
get defaultFilterValue() { return undefined; }
|
|
51
|
-
async getCommandPicks(token) {
|
|
52
|
-
return ( (await super.getCommandPicks(token)).map(pick => {
|
|
53
|
-
pick.buttons = [];
|
|
54
|
-
return pick;
|
|
55
|
-
}));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const configurationRegistry = ( Registry.as(Extensions$1.Configuration));
|
|
60
|
-
configurationRegistry.registerConfiguration({
|
|
61
|
-
properties: {
|
|
62
|
-
'workbench.commandPalette.history': {
|
|
63
|
-
type: 'number',
|
|
64
|
-
description: ( localize(
|
|
65
|
-
'commandHistory',
|
|
66
|
-
'Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history.'
|
|
67
|
-
)),
|
|
68
|
-
default: 50,
|
|
69
|
-
minimum: 0
|
|
70
|
-
},
|
|
71
|
-
'workbench.commandPalette.preserveInput': {
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
description: ( localize(
|
|
74
|
-
'preserveInput',
|
|
75
|
-
'Controls whether the last typed input to the command palette should be restored when opening it the next time.'
|
|
76
|
-
)),
|
|
77
|
-
default: false
|
|
78
|
-
},
|
|
79
|
-
'workbench.commandPalette.experimental.suggestCommands': {
|
|
80
|
-
type: 'boolean',
|
|
81
|
-
description: ( localize(
|
|
82
|
-
'suggestCommands',
|
|
83
|
-
'Controls whether the command palette should have a list of commonly used commands.'
|
|
84
|
-
)),
|
|
85
|
-
default: false
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
});
|
|
12
|
+
import '../vscode/vs/workbench/browser/workbench.contribution.js';
|
|
89
13
|
async function updateUserKeybindings(keybindingsJson) {
|
|
90
14
|
const userDataProfilesService = StandaloneServices.get(IUserDataProfilesService);
|
|
91
15
|
await StandaloneServices.get(IFileService).writeFile(userDataProfilesService.defaultProfile.keybindingsResource, VSBuffer.fromString(keybindingsJson));
|
|
@@ -93,7 +17,7 @@ async function updateUserKeybindings(keybindingsJson) {
|
|
|
93
17
|
function getServiceOverride() {
|
|
94
18
|
return {
|
|
95
19
|
...getServiceOverride$1(),
|
|
96
|
-
[( IKeybindingService.toString())]: new SyncDescriptor(
|
|
20
|
+
[( IKeybindingService.toString())]: new SyncDescriptor(WorkbenchKeybindingService),
|
|
97
21
|
[( IKeyboardLayoutService.toString())]: new SyncDescriptor(BrowserKeyboardLayoutService, undefined, true)
|
|
98
22
|
};
|
|
99
23
|
}
|
|
@@ -3,7 +3,7 @@ import '../vscode-services/missing-services.js';
|
|
|
3
3
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
4
4
|
import { IWorkbenchLayoutService } from '../vscode/vs/workbench/services/layout/browser/layoutService.js';
|
|
5
5
|
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|
|
6
|
-
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
+
import { Event, Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
7
7
|
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
8
8
|
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
9
9
|
import { isAncestorUsingFlowTo } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
@@ -13,6 +13,7 @@ let LayoutService = class LayoutService {
|
|
|
13
13
|
constructor(container, paneCompositeService) {
|
|
14
14
|
this.container = container;
|
|
15
15
|
this.paneCompositeService = paneCompositeService;
|
|
16
|
+
this.onDidChangeFullscreen = Event.None;
|
|
16
17
|
this.parts = new Map();
|
|
17
18
|
this.hiddenParts = new Set();
|
|
18
19
|
this._onDidChangePartVisibility = new Emitter();
|
|
@@ -23,6 +24,9 @@ let LayoutService = class LayoutService {
|
|
|
23
24
|
window.addEventListener('resize', () => this.layout());
|
|
24
25
|
this.layout();
|
|
25
26
|
}
|
|
27
|
+
getMaximumEditorDimensions() {
|
|
28
|
+
return new dom.Dimension(Infinity, Infinity);
|
|
29
|
+
}
|
|
26
30
|
isPanelMaximized() {
|
|
27
31
|
return false;
|
|
28
32
|
}
|
|
@@ -112,4 +116,4 @@ function getServiceOverride(container = document.body) {
|
|
|
112
116
|
[( IWorkbenchLayoutService.toString())]: new SyncDescriptor(LayoutService, [container])
|
|
113
117
|
};
|
|
114
118
|
}
|
|
115
|
-
export { getServiceOverride as default };
|
|
119
|
+
export { LayoutService, getServiceOverride as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../vscode-services/missing-services.js';
|
|
2
|
+
import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js';
|
|
3
|
+
import { TextModelResolverService } from '../vscode/vs/workbench/services/textmodelResolver/common/textModelResolverService.js';
|
|
4
|
+
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
5
|
+
function getServiceOverride() {
|
|
6
|
+
return {
|
|
7
|
+
[( ITextModelService.toString())]: new SyncDescriptor(TextModelResolverService, undefined, true)
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export { getServiceOverride as default };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { __decorate, __param } from '../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import '../vscode-services/missing-services.js';
|
|
3
|
+
import { CommandsQuickAccessProvider } from '../vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js';
|
|
4
|
+
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
5
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
6
|
+
import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
7
|
+
import { StandaloneQuickInputService } from 'monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js';
|
|
8
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
9
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
10
|
+
import { QuickInputService } from '../vscode/vs/workbench/services/quickinput/browser/quickInputService.js';
|
|
11
|
+
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
12
|
+
import { StandaloneCodeEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
|
|
13
|
+
import '../vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js';
|
|
14
|
+
import '../vscode/vs/workbench/browser/actions/quickAccessActions.js';
|
|
15
|
+
import '../vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js';
|
|
16
|
+
import '../vscode/vs/workbench/contrib/search/browser/search.contribution.js';
|
|
17
|
+
const originalGetCommandPicks = CommandsQuickAccessProvider.prototype['getCommandPicks'];
|
|
18
|
+
CommandsQuickAccessProvider.prototype['getCommandPicks'] = async function (token) {
|
|
19
|
+
return ( (await originalGetCommandPicks.call(this, token)).map(pick => {
|
|
20
|
+
pick.buttons = [];
|
|
21
|
+
return pick;
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
let DelegateQuickInputService = class DelegateQuickInputService {
|
|
25
|
+
constructor(instantiationService) {
|
|
26
|
+
this.instantiationService = instantiationService;
|
|
27
|
+
this.workbenchQuickInputService = instantiationService.createInstance(QuickInputService);
|
|
28
|
+
}
|
|
29
|
+
get activeService() {
|
|
30
|
+
const activeCodeEditor = StandaloneServices.get(ICodeEditorService).getFocusedCodeEditor();
|
|
31
|
+
if (!(activeCodeEditor instanceof StandaloneCodeEditor)) {
|
|
32
|
+
return this.workbenchQuickInputService;
|
|
33
|
+
}
|
|
34
|
+
this.standaloneQuickInputService ?? (this.standaloneQuickInputService = this.instantiationService.createInstance(StandaloneQuickInputService));
|
|
35
|
+
return this.standaloneQuickInputService;
|
|
36
|
+
}
|
|
37
|
+
get quickAccess() { return this.activeService.quickAccess; }
|
|
38
|
+
get backButton() { return this.activeService.backButton; }
|
|
39
|
+
get onShow() { return this.activeService.onShow; }
|
|
40
|
+
get onHide() { return this.activeService.onHide; }
|
|
41
|
+
pick(picks, options = {}, token = CancellationToken.None) {
|
|
42
|
+
return this.activeService .pick(picks, options, token);
|
|
43
|
+
}
|
|
44
|
+
input(options, token) {
|
|
45
|
+
return this.activeService.input(options, token);
|
|
46
|
+
}
|
|
47
|
+
createQuickPick() {
|
|
48
|
+
return this.activeService.createQuickPick();
|
|
49
|
+
}
|
|
50
|
+
createInputBox() {
|
|
51
|
+
return this.activeService.createInputBox();
|
|
52
|
+
}
|
|
53
|
+
focus() {
|
|
54
|
+
return this.activeService.focus();
|
|
55
|
+
}
|
|
56
|
+
toggle() {
|
|
57
|
+
return this.activeService.toggle();
|
|
58
|
+
}
|
|
59
|
+
navigate(next, quickNavigate) {
|
|
60
|
+
return this.activeService.navigate(next, quickNavigate);
|
|
61
|
+
}
|
|
62
|
+
accept() {
|
|
63
|
+
return this.activeService.accept();
|
|
64
|
+
}
|
|
65
|
+
back() {
|
|
66
|
+
return this.activeService.back();
|
|
67
|
+
}
|
|
68
|
+
cancel() {
|
|
69
|
+
return this.activeService.cancel();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
DelegateQuickInputService = __decorate([
|
|
73
|
+
( __param(0, IInstantiationService))
|
|
74
|
+
], DelegateQuickInputService);
|
|
75
|
+
function getServiceOverride() {
|
|
76
|
+
return {
|
|
77
|
+
[( IQuickInputService.toString())]: new SyncDescriptor(DelegateQuickInputService)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export { getServiceOverride as default };
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import '../vscode-services/missing-services.js';
|
|
2
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
2
3
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
3
4
|
import { ISnippetsService } from '../vscode/vs/workbench/contrib/snippets/browser/snippets.js';
|
|
4
5
|
import { SnippetsService } from '../vscode/vs/workbench/contrib/snippets/browser/snippetsService.js';
|
|
6
|
+
import { ILifecycleService } from '../vscode/vs/workbench/services/lifecycle/common/lifecycle.js';
|
|
5
7
|
import getServiceOverride$1 from './files.js';
|
|
6
8
|
import { registerServiceInitializeParticipant } from '../services.js';
|
|
7
9
|
registerServiceInitializeParticipant(async (accessor) => {
|
|
8
|
-
accessor.get(
|
|
10
|
+
void accessor.get(ILifecycleService).when(2 ).then(() => {
|
|
11
|
+
StandaloneServices.get(ISnippetsService);
|
|
12
|
+
});
|
|
9
13
|
});
|
|
10
14
|
function getServiceOverride() {
|
|
11
15
|
return {
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { __decorate, __param } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import '../vscode-services/missing-services.js';
|
|
3
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
3
4
|
import { ITextMateTokenizationService } from '../vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeature.js';
|
|
4
5
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
5
6
|
import { TextMateTokenizationFeature } from '../vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js';
|
|
6
7
|
import { TokenClassificationExtensionPoints } from '../vscode/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js';
|
|
7
8
|
import { Extensions } from '../vscode/vs/workbench/common/contributions.js';
|
|
8
9
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
10
|
+
import { ILifecycleService } from '../vscode/vs/workbench/services/lifecycle/common/lifecycle.js';
|
|
9
11
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
10
12
|
import _onigWasm from 'vscode-oniguruma/release/onig.wasm';
|
|
11
13
|
import getServiceOverride$1 from './files.js';
|
|
12
14
|
import { registerServiceInitializeParticipant } from '../services.js';
|
|
13
15
|
import { registerAssets } from '../assets.js';
|
|
14
16
|
registerAssets({
|
|
15
|
-
'vscode-oniguruma/../onig.wasm': _onigWasm
|
|
17
|
+
'vscode-oniguruma/../onig.wasm': _onigWasm,
|
|
18
|
+
'vs/../../node_modules/vscode-oniguruma/release/onig.wasm': _onigWasm
|
|
16
19
|
});
|
|
17
20
|
registerServiceInitializeParticipant(async (accessor) => {
|
|
18
|
-
accessor.get(
|
|
21
|
+
void accessor.get(ILifecycleService).when(2 ).then(() => {
|
|
22
|
+
StandaloneServices.get(ITextMateTokenizationService);
|
|
23
|
+
});
|
|
19
24
|
});
|
|
20
25
|
let ExtensionPoints = class ExtensionPoints {
|
|
21
26
|
constructor(instantiationService) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as IThemeExtensionPoint } from '../workbenchThemeService.js';
|
|
2
2
|
import { I as IEditorOverrideServices } from '../standaloneServices.js';
|
|
3
3
|
import '../instantiation.js';
|
|
4
4
|
import 'monaco-editor';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
2
|
+
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
3
|
+
import { isPreferredGroup, SIDE_GROUP } from '../../vscode/vs/workbench/services/editor/common/editorService.js';
|
|
4
|
+
import { isResourceEditorInput, isEditorInput } from '../../vscode/vs/workbench/common/editor.js';
|
|
5
|
+
import { applyTextEditorOptions } from '../../vscode/vs/workbench/common/editor/editorOptions.js';
|
|
6
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
7
|
+
import { DEFAULT_EDITOR_MIN_DIMENSIONS, DEFAULT_EDITOR_MAX_DIMENSIONS } from '../../vscode/vs/workbench/browser/parts/editor/editor.js';
|
|
8
|
+
import { StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
|
|
9
|
+
import { unsupported } from '../../tools.js';
|
|
10
|
+
class SimpleEditorPane {
|
|
11
|
+
constructor(editor) {
|
|
12
|
+
this.editor = editor;
|
|
13
|
+
this.onDidChangeControl = Event.None;
|
|
14
|
+
this.onDidChangeSizeConstraints = Event.None;
|
|
15
|
+
this.onDidFocus = Event.None;
|
|
16
|
+
this.onDidBlur = Event.None;
|
|
17
|
+
this.input = undefined;
|
|
18
|
+
this.options = undefined;
|
|
19
|
+
this.group = undefined;
|
|
20
|
+
this.scopedContextKeyService = undefined;
|
|
21
|
+
this.getViewState = unsupported;
|
|
22
|
+
this.isVisible = unsupported;
|
|
23
|
+
this.hasFocus = unsupported;
|
|
24
|
+
this.getId = unsupported;
|
|
25
|
+
this.getTitle = unsupported;
|
|
26
|
+
this.focus = unsupported;
|
|
27
|
+
}
|
|
28
|
+
get minimumWidth() { return DEFAULT_EDITOR_MIN_DIMENSIONS.width; }
|
|
29
|
+
get maximumWidth() { return DEFAULT_EDITOR_MAX_DIMENSIONS.width; }
|
|
30
|
+
get minimumHeight() { return DEFAULT_EDITOR_MIN_DIMENSIONS.height; }
|
|
31
|
+
get maximumHeight() { return DEFAULT_EDITOR_MAX_DIMENSIONS.height; }
|
|
32
|
+
getControl() {
|
|
33
|
+
return this.editor;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function wrapOpenEditor(textModelService, defaultBehavior, fallbackBahavior) {
|
|
37
|
+
async function openEditor(editor, optionsOrPreferredGroup, preferredGroup) {
|
|
38
|
+
const options = isEditorInput(editor) ? optionsOrPreferredGroup : editor.options;
|
|
39
|
+
if (isPreferredGroup(optionsOrPreferredGroup)) {
|
|
40
|
+
preferredGroup = optionsOrPreferredGroup;
|
|
41
|
+
}
|
|
42
|
+
const resource = isResourceEditorInput(editor) || isEditorInput(editor) ? editor.resource : undefined;
|
|
43
|
+
if (resource == null) {
|
|
44
|
+
return defaultBehavior(editor, optionsOrPreferredGroup, preferredGroup);
|
|
45
|
+
}
|
|
46
|
+
let modelEditor;
|
|
47
|
+
const modelRef = await textModelService.createModelReference(resource);
|
|
48
|
+
const codeEditors = StandaloneServices.get(ICodeEditorService).listCodeEditors();
|
|
49
|
+
modelEditor = codeEditors.find(editor => editor instanceof StandaloneEditor && editor.getModel() === modelRef.object.textEditorModel);
|
|
50
|
+
if (modelEditor == null) {
|
|
51
|
+
const defaultBehaviorResult = await defaultBehavior(editor, optionsOrPreferredGroup, preferredGroup);
|
|
52
|
+
if (defaultBehaviorResult != null) {
|
|
53
|
+
modelRef.dispose();
|
|
54
|
+
return defaultBehaviorResult;
|
|
55
|
+
}
|
|
56
|
+
modelEditor = await fallbackBahavior?.(modelRef, options, preferredGroup === SIDE_GROUP);
|
|
57
|
+
}
|
|
58
|
+
if (modelEditor == null) {
|
|
59
|
+
modelRef.dispose();
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
if (options != null) {
|
|
63
|
+
applyTextEditorOptions(options, modelEditor, 1 );
|
|
64
|
+
}
|
|
65
|
+
if (!(options?.preserveFocus ?? false)) {
|
|
66
|
+
modelEditor.focus();
|
|
67
|
+
modelEditor.getContainerDomNode().scrollIntoView();
|
|
68
|
+
}
|
|
69
|
+
return new SimpleEditorPane(modelEditor);
|
|
70
|
+
}
|
|
71
|
+
return openEditor;
|
|
72
|
+
}
|
|
73
|
+
export { wrapOpenEditor };
|