@codingame/monaco-vscode-api 1.79.1 → 1.79.2-next.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/README.md +11 -2
- package/dist/api.js +10 -8
- package/dist/composite.d.ts +65 -0
- package/dist/configurationRegistry.d.ts +212 -0
- package/dist/contextkey.d.ts +1 -1
- package/dist/default-extensions/json.js +1 -0
- package/dist/default-extensions/theme-defaults.js +2 -2
- package/dist/editorBrowser.d.ts +272 -3
- package/dist/event.d.ts +6 -1
- package/dist/{extension-tools-0c4c1ad7.js → extension-tools-3c2bf0a4.js} +698 -507
- package/dist/extensions.d.ts +3 -2
- package/dist/extensions.d2.ts +6 -17
- package/dist/extensionsRegistry.d.ts +15 -9
- package/dist/files.d.ts +71 -7
- package/dist/jsonSchema.d.ts +1 -1
- package/dist/keybinding.d.ts +2 -2
- package/dist/languageFeatures.d.ts +703 -61
- package/dist/monaco.d.ts +5 -4
- package/dist/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -1
- package/dist/platform.d.ts +11 -0
- package/dist/rollup-extension-directory-plugin.js +1 -1
- package/dist/rollup-vsix-plugin.js +1 -1
- package/dist/service-override/configuration.d.ts +5 -206
- package/dist/service-override/files.d.ts +2 -2
- package/dist/service-override/files.js +1 -1
- package/dist/service-override/markers.d.ts +7 -0
- package/dist/service-override/markers.js +6 -0
- package/dist/service-override/output.d.ts +7 -0
- package/dist/service-override/output.js +22 -0
- package/dist/service-override/preferences.js +7 -1
- package/dist/service-override/quickaccess.js +0 -9
- package/dist/service-override/search.d.ts +7 -0
- package/dist/service-override/search.js +19 -0
- package/dist/service-override/terminal.d.ts +607 -0
- package/dist/service-override/terminal.js +98 -0
- package/dist/service-override/tools/editor.js +1 -1
- package/dist/service-override/views.d.ts +561 -335
- package/dist/service-override/views.js +51 -11
- package/dist/services.d.ts +2627 -108
- package/dist/services.js +3 -0
- package/dist/severity.d.ts +16 -0
- package/dist/uri.d.ts +22 -11
- package/dist/views.d.ts +270 -0
- package/dist/vscode/vs/base/common/processes.js +24 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
- package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
- package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
- package/dist/vscode/vs/platform/files/common/files.js +3 -1
- package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
- package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
- package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
- package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
- package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
- package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
- package/dist/vscode/vs/platform/request/common/request.js +3 -3
- package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
- package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
- package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
- package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
- package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
- package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
- package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
- package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
- package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
- package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
- package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
- package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
- package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
- package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
- package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
- package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
- package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
- package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
- package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
- package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
- package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
- package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
- package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
- package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
- package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
- package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
- package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
- package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
- package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
- package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
- package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
- package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
- package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
- package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
- package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
- package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
- package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
- package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
- package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
- package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
- package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
- package/dist/vscode/vs/workbench/common/configuration.js +8 -1
- package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
- package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
- package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
- package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/dist/vscode/vs/workbench/common/editor.js +1 -5
- package/dist/vscode/vs/workbench/common/resources.js +111 -34
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
- package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
- package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
- package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
- package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
- package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
- package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
- package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
- package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
- package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
- package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
- package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
- package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
- package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
- package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
- package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
- package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
- package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
- package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
- package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
- package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
- package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
- package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
- package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
- package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
- package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
- package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
- package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
- package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
- package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
- package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
- package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
- package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
- package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
- package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
- package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
- package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
- package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
- package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
- package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
- package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
- package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
- package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
- package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
- package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/package.json.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/perl/package.json.js +1 -1
- package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-services/env.js +4 -2
- package/dist/vscode-services/extHost.js +32 -48
- package/dist/vscode-services/missing-services.js +407 -29
- package/dist/vscode-services/window.js +59 -65
- package/dist/vscode-services/workspace.js +19 -5
- package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
- package/dist/workers/outputLinkComputer.worker.js +3 -0
- package/dist/workspace.d.ts +1 -1
- package/monaco-editor-treemending.patch +1305 -1184
- package/package.json +65 -19
- package/dist/activity.d.ts +0 -2802
- package/dist/collections.d.ts +0 -7
- package/dist/colorRegistry.d.ts +0 -710
- package/dist/vscode/vs/platform/product/common/product.js +0 -48
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
- package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { assertFn } from 'monaco-editor/esm/vs/base/common/assert.js';
|
|
3
|
+
import { BugIndicatingError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
4
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
|
+
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
6
|
+
import { observableValue, observableFromEvent, derived } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
7
|
+
import { basename, isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
8
|
+
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
9
|
+
import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
|
|
10
|
+
import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js';
|
|
11
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
12
|
+
import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
|
|
13
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
14
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
15
|
+
import { SaveSourceRegistry } from '../../../common/editor.js';
|
|
16
|
+
import { EditorModel } from '../../../common/editor/editorModel.js';
|
|
17
|
+
import { conflictMarkers } from './mergeMarkers/mergeMarkersController.js';
|
|
18
|
+
import { MergeDiffComputer } from './model/diffComputer.js';
|
|
19
|
+
import { MergeEditorModel } from './model/mergeEditorModel.js';
|
|
20
|
+
import { StorageCloseWithConflicts } from '../common/mergeEditor.js';
|
|
21
|
+
import { IEditorService } from '../../../services/editor/common/editorService.js';
|
|
22
|
+
import { ITextFileService } from '../../../services/textfile/common/textfiles.js';
|
|
23
|
+
let TempFileMergeEditorModeFactory = class TempFileMergeEditorModeFactory {
|
|
24
|
+
constructor(_mergeEditorTelemetry, _instantiationService, _textModelService, _modelService) {
|
|
25
|
+
this._mergeEditorTelemetry = _mergeEditorTelemetry;
|
|
26
|
+
this._instantiationService = _instantiationService;
|
|
27
|
+
this._textModelService = _textModelService;
|
|
28
|
+
this._modelService = _modelService;
|
|
29
|
+
}
|
|
30
|
+
async createInputModel(args) {
|
|
31
|
+
const store = ( new DisposableStore());
|
|
32
|
+
const [base, result, input1Data, input2Data,] = await Promise.all([
|
|
33
|
+
this._textModelService.createModelReference(args.base),
|
|
34
|
+
this._textModelService.createModelReference(args.result),
|
|
35
|
+
toInputData(args.input1, this._textModelService, store),
|
|
36
|
+
toInputData(args.input2, this._textModelService, store),
|
|
37
|
+
]);
|
|
38
|
+
store.add(base);
|
|
39
|
+
store.add(result);
|
|
40
|
+
const tempResultUri = result.object.textEditorModel.uri.with({ scheme: 'merge-result' });
|
|
41
|
+
const temporaryResultModel = this._modelService.createModel('', {
|
|
42
|
+
languageId: result.object.textEditorModel.getLanguageId(),
|
|
43
|
+
onDidChange: Event.None,
|
|
44
|
+
}, tempResultUri);
|
|
45
|
+
store.add(temporaryResultModel);
|
|
46
|
+
const mergeDiffComputer = this._instantiationService.createInstance(MergeDiffComputer);
|
|
47
|
+
const model = this._instantiationService.createInstance(MergeEditorModel, base.object.textEditorModel, input1Data, input2Data, temporaryResultModel, mergeDiffComputer, {
|
|
48
|
+
resetResult: true,
|
|
49
|
+
}, this._mergeEditorTelemetry);
|
|
50
|
+
store.add(model);
|
|
51
|
+
await model.onInitialized;
|
|
52
|
+
return this._instantiationService.createInstance(TempFileMergeEditorInputModel, model, store, result.object, args.result);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
TempFileMergeEditorModeFactory = ( __decorate([
|
|
56
|
+
( __param(1, IInstantiationService)),
|
|
57
|
+
( __param(2, ITextModelService)),
|
|
58
|
+
( __param(3, IModelService))
|
|
59
|
+
], TempFileMergeEditorModeFactory));
|
|
60
|
+
let TempFileMergeEditorInputModel = class TempFileMergeEditorInputModel extends EditorModel {
|
|
61
|
+
constructor(model, disposable, result, resultUri, textFileService, dialogService, editorService) {
|
|
62
|
+
super();
|
|
63
|
+
this.model = model;
|
|
64
|
+
this.disposable = disposable;
|
|
65
|
+
this.result = result;
|
|
66
|
+
this.resultUri = resultUri;
|
|
67
|
+
this.textFileService = textFileService;
|
|
68
|
+
this.dialogService = dialogService;
|
|
69
|
+
this.editorService = editorService;
|
|
70
|
+
this.savedAltVersionId = observableValue('initialAltVersionId', this.model.resultTextModel.getAlternativeVersionId());
|
|
71
|
+
this.altVersionId = observableFromEvent(e => this.model.resultTextModel.onDidChangeContent(e), () =>
|
|
72
|
+
this.model.resultTextModel.getAlternativeVersionId());
|
|
73
|
+
this.isDirty = derived('isDirty', (reader) => this.altVersionId.read(reader) !== this.savedAltVersionId.read(reader));
|
|
74
|
+
this.finished = false;
|
|
75
|
+
}
|
|
76
|
+
dispose() {
|
|
77
|
+
this.disposable.dispose();
|
|
78
|
+
super.dispose();
|
|
79
|
+
}
|
|
80
|
+
async accept() {
|
|
81
|
+
const value = await this.model.resultTextModel.getValue();
|
|
82
|
+
this.result.textEditorModel.setValue(value);
|
|
83
|
+
this.savedAltVersionId.set(this.model.resultTextModel.getAlternativeVersionId(), undefined);
|
|
84
|
+
await this.textFileService.save(this.result.textEditorModel.uri);
|
|
85
|
+
this.finished = true;
|
|
86
|
+
}
|
|
87
|
+
async _discard() {
|
|
88
|
+
await this.textFileService.revert(this.model.resultTextModel.uri);
|
|
89
|
+
this.savedAltVersionId.set(this.model.resultTextModel.getAlternativeVersionId(), undefined);
|
|
90
|
+
this.finished = true;
|
|
91
|
+
}
|
|
92
|
+
shouldConfirmClose() {
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
async confirmClose(inputModels) {
|
|
96
|
+
assertFn(() => ( inputModels.some((m) => m === this)));
|
|
97
|
+
const someDirty = ( inputModels.some((m) => m.isDirty.get()));
|
|
98
|
+
let choice;
|
|
99
|
+
if (someDirty) {
|
|
100
|
+
const isMany = inputModels.length > 1;
|
|
101
|
+
const message = isMany
|
|
102
|
+
? ( localize(
|
|
103
|
+
'messageN',
|
|
104
|
+
'Do you want keep the merge result of {0} files?',
|
|
105
|
+
inputModels.length
|
|
106
|
+
))
|
|
107
|
+
: ( localize(
|
|
108
|
+
'message1',
|
|
109
|
+
'Do you want keep the merge result of {0}?',
|
|
110
|
+
basename(inputModels[0].model.resultTextModel.uri)
|
|
111
|
+
));
|
|
112
|
+
const hasUnhandledConflicts = ( inputModels.some((m) => m.model.hasUnhandledConflicts.get()));
|
|
113
|
+
const buttons = [
|
|
114
|
+
{
|
|
115
|
+
label: hasUnhandledConflicts ?
|
|
116
|
+
( localize(
|
|
117
|
+
{ key: 'saveWithConflict', comment: ['&& denotes a mnemonic'] },
|
|
118
|
+
"&&Save With Conflicts"
|
|
119
|
+
)) :
|
|
120
|
+
( localize({ key: 'save', comment: ['&& denotes a mnemonic'] }, "&&Save")),
|
|
121
|
+
run: () => 0
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: ( localize({ key: 'discard', comment: ['&& denotes a mnemonic'] }, "Do&&n't Save")),
|
|
125
|
+
run: () => 1
|
|
126
|
+
}
|
|
127
|
+
];
|
|
128
|
+
choice = (await this.dialogService.prompt({
|
|
129
|
+
type: Severity.Info,
|
|
130
|
+
message,
|
|
131
|
+
detail: hasUnhandledConflicts
|
|
132
|
+
? isMany
|
|
133
|
+
? ( localize(
|
|
134
|
+
'detailNConflicts',
|
|
135
|
+
"The files contain unhandled conflicts. The merge results will be lost if you don't save them."
|
|
136
|
+
))
|
|
137
|
+
: ( localize(
|
|
138
|
+
'detail1Conflicts',
|
|
139
|
+
"The file contains unhandled conflicts. The merge result will be lost if you don't save it."
|
|
140
|
+
))
|
|
141
|
+
: isMany
|
|
142
|
+
? ( localize('detailN', "The merge results will be lost if you don't save them."))
|
|
143
|
+
: ( localize('detail1', "The merge result will be lost if you don't save it.")),
|
|
144
|
+
buttons,
|
|
145
|
+
cancelButton: {
|
|
146
|
+
run: () => 2
|
|
147
|
+
}
|
|
148
|
+
})).result;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
choice = 1 ;
|
|
152
|
+
}
|
|
153
|
+
if (choice === 0 ) {
|
|
154
|
+
await Promise.all(( inputModels.map(m => m.accept())));
|
|
155
|
+
}
|
|
156
|
+
else if (choice === 1 ) {
|
|
157
|
+
await Promise.all(( inputModels.map(m => m._discard())));
|
|
158
|
+
}
|
|
159
|
+
else ;
|
|
160
|
+
return choice;
|
|
161
|
+
}
|
|
162
|
+
async save(options) {
|
|
163
|
+
if (this.finished) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
(async () => {
|
|
167
|
+
const { confirmed } = await this.dialogService.confirm({
|
|
168
|
+
message: ( localize('saveTempFile.message', "Do you want to accept the merge result?")),
|
|
169
|
+
detail: ( localize(
|
|
170
|
+
'saveTempFile.detail',
|
|
171
|
+
"This will write the merge result to the original file and close the merge editor."
|
|
172
|
+
)),
|
|
173
|
+
primaryButton: ( localize(
|
|
174
|
+
{ key: 'acceptMerge', comment: ['&& denotes a mnemonic'] },
|
|
175
|
+
'&&Accept Merge'
|
|
176
|
+
))
|
|
177
|
+
});
|
|
178
|
+
if (confirmed) {
|
|
179
|
+
await this.accept();
|
|
180
|
+
const editors = this.editorService.findEditors(this.resultUri).filter(e => e.editor.typeId === 'mergeEditor.Input');
|
|
181
|
+
await this.editorService.closeEditors(editors);
|
|
182
|
+
}
|
|
183
|
+
})();
|
|
184
|
+
}
|
|
185
|
+
async revert(options) {
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
TempFileMergeEditorInputModel = ( __decorate([
|
|
189
|
+
( __param(4, ITextFileService)),
|
|
190
|
+
( __param(5, IDialogService)),
|
|
191
|
+
( __param(6, IEditorService))
|
|
192
|
+
], TempFileMergeEditorInputModel));
|
|
193
|
+
let WorkspaceMergeEditorModeFactory = class WorkspaceMergeEditorModeFactory {
|
|
194
|
+
constructor(_mergeEditorTelemetry, _instantiationService, _textModelService, textFileService) {
|
|
195
|
+
this._mergeEditorTelemetry = _mergeEditorTelemetry;
|
|
196
|
+
this._instantiationService = _instantiationService;
|
|
197
|
+
this._textModelService = _textModelService;
|
|
198
|
+
this.textFileService = textFileService;
|
|
199
|
+
}
|
|
200
|
+
async createInputModel(args) {
|
|
201
|
+
const store = ( new DisposableStore());
|
|
202
|
+
let resultTextFileModel = undefined;
|
|
203
|
+
const modelListener = store.add(( new DisposableStore()));
|
|
204
|
+
const handleDidCreate = (model) => {
|
|
205
|
+
if (isEqual(args.result, model.resource)) {
|
|
206
|
+
modelListener.clear();
|
|
207
|
+
resultTextFileModel = model;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
modelListener.add(this.textFileService.files.onDidCreate(handleDidCreate));
|
|
211
|
+
this.textFileService.files.models.forEach(handleDidCreate);
|
|
212
|
+
const [base, result, input1Data, input2Data,] = await Promise.all([
|
|
213
|
+
this._textModelService.createModelReference(args.base),
|
|
214
|
+
this._textModelService.createModelReference(args.result),
|
|
215
|
+
toInputData(args.input1, this._textModelService, store),
|
|
216
|
+
toInputData(args.input2, this._textModelService, store),
|
|
217
|
+
]);
|
|
218
|
+
store.add(base);
|
|
219
|
+
store.add(result);
|
|
220
|
+
if (!resultTextFileModel) {
|
|
221
|
+
throw new BugIndicatingError();
|
|
222
|
+
}
|
|
223
|
+
await resultTextFileModel.save({ source: WorkspaceMergeEditorModeFactory.FILE_SAVED_SOURCE });
|
|
224
|
+
const lines = resultTextFileModel.textEditorModel.getLinesContent();
|
|
225
|
+
const hasConflictMarkers = ( lines.some(l => l.startsWith(conflictMarkers.start)));
|
|
226
|
+
const resetResult = hasConflictMarkers;
|
|
227
|
+
const mergeDiffComputer = this._instantiationService.createInstance(MergeDiffComputer);
|
|
228
|
+
const model = this._instantiationService.createInstance(MergeEditorModel, base.object.textEditorModel, input1Data, input2Data, result.object.textEditorModel, mergeDiffComputer, {
|
|
229
|
+
resetResult
|
|
230
|
+
}, this._mergeEditorTelemetry);
|
|
231
|
+
store.add(model);
|
|
232
|
+
await model.onInitialized;
|
|
233
|
+
return this._instantiationService.createInstance(WorkspaceMergeEditorInputModel, model, store, resultTextFileModel, this._mergeEditorTelemetry);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
WorkspaceMergeEditorModeFactory.FILE_SAVED_SOURCE = SaveSourceRegistry.registerSource('merge-editor.source', ( localize('merge-editor.source', "Before Resolving Conflicts In Merge Editor")));
|
|
237
|
+
WorkspaceMergeEditorModeFactory = ( __decorate([
|
|
238
|
+
( __param(1, IInstantiationService)),
|
|
239
|
+
( __param(2, ITextModelService)),
|
|
240
|
+
( __param(3, ITextFileService))
|
|
241
|
+
], WorkspaceMergeEditorModeFactory));
|
|
242
|
+
let WorkspaceMergeEditorInputModel = class WorkspaceMergeEditorInputModel extends EditorModel {
|
|
243
|
+
constructor(model, disposableStore, resultTextFileModel, telemetry, _dialogService, _storageService) {
|
|
244
|
+
super();
|
|
245
|
+
this.model = model;
|
|
246
|
+
this.disposableStore = disposableStore;
|
|
247
|
+
this.resultTextFileModel = resultTextFileModel;
|
|
248
|
+
this.telemetry = telemetry;
|
|
249
|
+
this._dialogService = _dialogService;
|
|
250
|
+
this._storageService = _storageService;
|
|
251
|
+
this.isDirty = observableFromEvent(Event.any(this.resultTextFileModel.onDidChangeDirty, this.resultTextFileModel.onDidSaveError), () => this.resultTextFileModel.isDirty());
|
|
252
|
+
this.reported = false;
|
|
253
|
+
this.dateTimeOpened = ( new Date());
|
|
254
|
+
}
|
|
255
|
+
dispose() {
|
|
256
|
+
this.disposableStore.dispose();
|
|
257
|
+
super.dispose();
|
|
258
|
+
this.reportClose(false);
|
|
259
|
+
}
|
|
260
|
+
reportClose(accepted) {
|
|
261
|
+
if (!this.reported) {
|
|
262
|
+
const remainingConflictCount = this.model.unhandledConflictsCount.get();
|
|
263
|
+
const durationOpenedMs = ( new Date()).getTime() - this.dateTimeOpened.getTime();
|
|
264
|
+
this.telemetry.reportMergeEditorClosed({
|
|
265
|
+
durationOpenedSecs: durationOpenedMs / 1000,
|
|
266
|
+
remainingConflictCount,
|
|
267
|
+
accepted,
|
|
268
|
+
conflictCount: this.model.conflictCount,
|
|
269
|
+
combinableConflictCount: this.model.combinableConflictCount,
|
|
270
|
+
conflictsResolvedWithBase: this.model.conflictsResolvedWithBase,
|
|
271
|
+
conflictsResolvedWithInput1: this.model.conflictsResolvedWithInput1,
|
|
272
|
+
conflictsResolvedWithInput2: this.model.conflictsResolvedWithInput2,
|
|
273
|
+
conflictsResolvedWithSmartCombination: this.model.conflictsResolvedWithSmartCombination,
|
|
274
|
+
manuallySolvedConflictCountThatEqualNone: this.model.manuallySolvedConflictCountThatEqualNone,
|
|
275
|
+
manuallySolvedConflictCountThatEqualSmartCombine: this.model.manuallySolvedConflictCountThatEqualSmartCombine,
|
|
276
|
+
manuallySolvedConflictCountThatEqualInput1: this.model.manuallySolvedConflictCountThatEqualInput1,
|
|
277
|
+
manuallySolvedConflictCountThatEqualInput2: this.model.manuallySolvedConflictCountThatEqualInput2,
|
|
278
|
+
manuallySolvedConflictCountThatEqualNoneAndStartedWithBase: this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithBase,
|
|
279
|
+
manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1: this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1,
|
|
280
|
+
manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2: this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2,
|
|
281
|
+
manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart: this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart,
|
|
282
|
+
manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart: this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart,
|
|
283
|
+
});
|
|
284
|
+
this.reported = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
async accept() {
|
|
288
|
+
this.reportClose(true);
|
|
289
|
+
await this.resultTextFileModel.save();
|
|
290
|
+
}
|
|
291
|
+
get resultUri() {
|
|
292
|
+
return this.resultTextFileModel.resource;
|
|
293
|
+
}
|
|
294
|
+
async save(options) {
|
|
295
|
+
await this.resultTextFileModel.save(options);
|
|
296
|
+
}
|
|
297
|
+
async revert(options) {
|
|
298
|
+
await this.resultTextFileModel.revert(options);
|
|
299
|
+
}
|
|
300
|
+
shouldConfirmClose() {
|
|
301
|
+
return true;
|
|
302
|
+
}
|
|
303
|
+
async confirmClose(inputModels) {
|
|
304
|
+
const isMany = inputModels.length > 1;
|
|
305
|
+
const someDirty = ( inputModels.some(m => m.isDirty.get()));
|
|
306
|
+
const someUnhandledConflicts = ( inputModels.some(m => m.model.hasUnhandledConflicts.get()));
|
|
307
|
+
if (someDirty) {
|
|
308
|
+
const message = isMany
|
|
309
|
+
? ( localize(
|
|
310
|
+
'workspace.messageN',
|
|
311
|
+
'Do you want to save the changes you made to {0} files?',
|
|
312
|
+
inputModels.length
|
|
313
|
+
))
|
|
314
|
+
: ( localize(
|
|
315
|
+
'workspace.message1',
|
|
316
|
+
'Do you want to save the changes you made to {0}?',
|
|
317
|
+
basename(inputModels[0].resultUri)
|
|
318
|
+
));
|
|
319
|
+
const { result } = await this._dialogService.prompt({
|
|
320
|
+
type: Severity.Info,
|
|
321
|
+
message,
|
|
322
|
+
detail: someUnhandledConflicts ?
|
|
323
|
+
isMany
|
|
324
|
+
? ( localize(
|
|
325
|
+
'workspace.detailN.unhandled',
|
|
326
|
+
"The files contain unhandled conflicts. Your changes will be lost if you don't save them."
|
|
327
|
+
))
|
|
328
|
+
: ( localize(
|
|
329
|
+
'workspace.detail1.unhandled',
|
|
330
|
+
"The file contains unhandled conflicts. Your changes will be lost if you don't save them."
|
|
331
|
+
))
|
|
332
|
+
: isMany
|
|
333
|
+
? ( localize(
|
|
334
|
+
'workspace.detailN.handled',
|
|
335
|
+
"Your changes will be lost if you don't save them."
|
|
336
|
+
))
|
|
337
|
+
: ( localize(
|
|
338
|
+
'workspace.detail1.handled',
|
|
339
|
+
"Your changes will be lost if you don't save them."
|
|
340
|
+
)),
|
|
341
|
+
buttons: [
|
|
342
|
+
{
|
|
343
|
+
label: someUnhandledConflicts
|
|
344
|
+
? ( localize(
|
|
345
|
+
{ key: 'workspace.saveWithConflict', comment: ['&& denotes a mnemonic'] },
|
|
346
|
+
'&&Save with Conflicts'
|
|
347
|
+
))
|
|
348
|
+
: ( localize({ key: 'workspace.save', comment: ['&& denotes a mnemonic'] }, '&&Save')),
|
|
349
|
+
run: () => 0
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
label: ( localize(
|
|
353
|
+
{ key: 'workspace.doNotSave', comment: ['&& denotes a mnemonic'] },
|
|
354
|
+
"Do&&n't Save"
|
|
355
|
+
)),
|
|
356
|
+
run: () => 1
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
cancelButton: {
|
|
360
|
+
run: () => 2
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
return result;
|
|
364
|
+
}
|
|
365
|
+
else if (someUnhandledConflicts && !this._storageService.getBoolean(StorageCloseWithConflicts, 0 , false)) {
|
|
366
|
+
const { confirmed, checkboxChecked } = await this._dialogService.confirm({
|
|
367
|
+
message: isMany
|
|
368
|
+
? ( localize(
|
|
369
|
+
'workspace.messageN.nonDirty',
|
|
370
|
+
'Do you want to close {0} merge editors?',
|
|
371
|
+
inputModels.length
|
|
372
|
+
))
|
|
373
|
+
: ( localize(
|
|
374
|
+
'workspace.message1.nonDirty',
|
|
375
|
+
'Do you want to close the merge editor for {0}?',
|
|
376
|
+
basename(inputModels[0].resultUri)
|
|
377
|
+
)),
|
|
378
|
+
detail: someUnhandledConflicts ?
|
|
379
|
+
isMany
|
|
380
|
+
? ( localize(
|
|
381
|
+
'workspace.detailN.unhandled.nonDirty',
|
|
382
|
+
"The files contain unhandled conflicts."
|
|
383
|
+
))
|
|
384
|
+
: ( localize(
|
|
385
|
+
'workspace.detail1.unhandled.nonDirty',
|
|
386
|
+
"The file contains unhandled conflicts."
|
|
387
|
+
))
|
|
388
|
+
: undefined,
|
|
389
|
+
primaryButton: someUnhandledConflicts
|
|
390
|
+
? ( localize(
|
|
391
|
+
{ key: 'workspace.closeWithConflicts', comment: ['&& denotes a mnemonic'] },
|
|
392
|
+
'&&Close with Conflicts'
|
|
393
|
+
))
|
|
394
|
+
: ( localize({ key: 'workspace.close', comment: ['&& denotes a mnemonic'] }, '&&Close')),
|
|
395
|
+
checkbox: { label: ( localize('noMoreWarn', "Don't ask again")) }
|
|
396
|
+
});
|
|
397
|
+
if (checkboxChecked) {
|
|
398
|
+
this._storageService.store(StorageCloseWithConflicts, true, 0 , 0 );
|
|
399
|
+
}
|
|
400
|
+
return confirmed ? 0 : 2 ;
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
return 0 ;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
WorkspaceMergeEditorInputModel = ( __decorate([
|
|
408
|
+
( __param(4, IDialogService)),
|
|
409
|
+
( __param(5, IStorageService))
|
|
410
|
+
], WorkspaceMergeEditorInputModel));
|
|
411
|
+
async function toInputData(data, textModelService, store) {
|
|
412
|
+
const ref = await textModelService.createModelReference(data.uri);
|
|
413
|
+
store.add(ref);
|
|
414
|
+
return {
|
|
415
|
+
textModel: ref.object.textEditorModel,
|
|
416
|
+
title: data.title,
|
|
417
|
+
description: data.description,
|
|
418
|
+
detail: data.detail,
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
export { TempFileMergeEditorModeFactory, WorkspaceMergeEditorModeFactory };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { assertFn, checkAdjacentItems } from 'monaco-editor/esm/vs/base/common/assert.js';
|
|
3
|
+
import { IEditorWorkerService } from 'monaco-editor/esm/vs/editor/common/services/editorWorker.js';
|
|
4
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
5
|
+
import { LineRange } from './lineRange.js';
|
|
6
|
+
import { DetailedLineRangeMapping, RangeMapping } from './mapping.js';
|
|
7
|
+
import { observableConfigValue } from '../utils.js';
|
|
8
|
+
let MergeDiffComputer = class MergeDiffComputer {
|
|
9
|
+
constructor(editorWorkerService, configurationService) {
|
|
10
|
+
this.editorWorkerService = editorWorkerService;
|
|
11
|
+
this.configurationService = configurationService;
|
|
12
|
+
this.mergeAlgorithm = ( observableConfigValue('mergeEditor.diffAlgorithm', 'advanced', this.configurationService)
|
|
13
|
+
.map(v => v === 'smart' ? 'legacy' : v === 'experimental' ? 'advanced' : v));
|
|
14
|
+
}
|
|
15
|
+
async computeDiff(textModel1, textModel2, reader) {
|
|
16
|
+
const diffAlgorithm = this.mergeAlgorithm.read(reader);
|
|
17
|
+
const result = await this.editorWorkerService.computeDiff(textModel1.uri, textModel2.uri, {
|
|
18
|
+
ignoreTrimWhitespace: false,
|
|
19
|
+
maxComputationTimeMs: 0,
|
|
20
|
+
}, diffAlgorithm);
|
|
21
|
+
if (!result) {
|
|
22
|
+
throw new Error('Diff computation failed');
|
|
23
|
+
}
|
|
24
|
+
if (textModel1.isDisposed() || textModel2.isDisposed()) {
|
|
25
|
+
return { diffs: null };
|
|
26
|
+
}
|
|
27
|
+
const changes = ( result.changes.map(c => ( new DetailedLineRangeMapping(
|
|
28
|
+
toLineRange(c.originalRange),
|
|
29
|
+
textModel1,
|
|
30
|
+
toLineRange(c.modifiedRange),
|
|
31
|
+
textModel2,
|
|
32
|
+
c.innerChanges?.map(ic => toRangeMapping(ic))
|
|
33
|
+
))));
|
|
34
|
+
assertFn(() => {
|
|
35
|
+
return changes.length === 0 || (changes[0].inputRange.startLineNumber === changes[0].outputRange.startLineNumber &&
|
|
36
|
+
checkAdjacentItems(changes, (m1, m2) => m2.inputRange.startLineNumber - m1.inputRange.endLineNumberExclusive === m2.outputRange.startLineNumber - m1.outputRange.endLineNumberExclusive &&
|
|
37
|
+
m1.inputRange.endLineNumberExclusive < m2.inputRange.startLineNumber &&
|
|
38
|
+
m1.outputRange.endLineNumberExclusive < m2.outputRange.startLineNumber));
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
diffs: changes
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
MergeDiffComputer = ( __decorate([
|
|
46
|
+
( __param(0, IEditorWorkerService)),
|
|
47
|
+
( __param(1, IConfigurationService))
|
|
48
|
+
], MergeDiffComputer));
|
|
49
|
+
function toLineRange(range) {
|
|
50
|
+
return ( new LineRange(range.startLineNumber, range.length));
|
|
51
|
+
}
|
|
52
|
+
function toRangeMapping(mapping) {
|
|
53
|
+
return ( new RangeMapping(mapping.originalRange, mapping.modifiedRange));
|
|
54
|
+
}
|
|
55
|
+
export { MergeDiffComputer, toLineRange, toRangeMapping };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
2
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
3
|
+
class LineRangeEdit {
|
|
4
|
+
constructor(range, newLines) {
|
|
5
|
+
this.range = range;
|
|
6
|
+
this.newLines = newLines;
|
|
7
|
+
}
|
|
8
|
+
equals(other) {
|
|
9
|
+
return this.range.equals(other.range) && equals(this.newLines, other.newLines);
|
|
10
|
+
}
|
|
11
|
+
toEdits(modelLineCount) {
|
|
12
|
+
return ( new LineEdits([this])).toEdits(modelLineCount);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
class RangeEdit {
|
|
16
|
+
constructor(range, newText) {
|
|
17
|
+
this.range = range;
|
|
18
|
+
this.newText = newText;
|
|
19
|
+
}
|
|
20
|
+
equals(other) {
|
|
21
|
+
return Range.equalsRange(this.range, other.range) && this.newText === other.newText;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class LineEdits {
|
|
25
|
+
constructor(edits) {
|
|
26
|
+
this.edits = edits;
|
|
27
|
+
}
|
|
28
|
+
toEdits(modelLineCount) {
|
|
29
|
+
return ( this.edits.map((e) => {
|
|
30
|
+
if (e.range.endLineNumberExclusive <= modelLineCount) {
|
|
31
|
+
return {
|
|
32
|
+
range: ( new Range(e.range.startLineNumber, 1, e.range.endLineNumberExclusive, 1)),
|
|
33
|
+
text: ( e.newLines.map(s => s + '\n')).join(''),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (e.range.startLineNumber === 1) {
|
|
37
|
+
return {
|
|
38
|
+
range: ( new Range(1, 1, modelLineCount, Number.MAX_SAFE_INTEGER)),
|
|
39
|
+
text: e.newLines.join('\n'),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
range: ( new Range(
|
|
44
|
+
e.range.startLineNumber - 1,
|
|
45
|
+
Number.MAX_SAFE_INTEGER,
|
|
46
|
+
modelLineCount,
|
|
47
|
+
Number.MAX_SAFE_INTEGER
|
|
48
|
+
)),
|
|
49
|
+
text: ( e.newLines.map(s => '\n' + s)).join(''),
|
|
50
|
+
};
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export { LineEdits, LineRangeEdit, RangeEdit };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { compareBy, numberComparator } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
2
|
+
import { BugIndicatingError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
3
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
4
|
+
class LineRange {
|
|
5
|
+
static join(ranges) {
|
|
6
|
+
if (ranges.length === 0) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
let startLineNumber = Number.MAX_SAFE_INTEGER;
|
|
10
|
+
let endLineNumber = 0;
|
|
11
|
+
for (const range of ranges) {
|
|
12
|
+
startLineNumber = Math.min(startLineNumber, range.startLineNumber);
|
|
13
|
+
endLineNumber = Math.max(endLineNumber, range.startLineNumber + range.lineCount);
|
|
14
|
+
}
|
|
15
|
+
return ( new LineRange(startLineNumber, endLineNumber - startLineNumber));
|
|
16
|
+
}
|
|
17
|
+
static fromLineNumbers(startLineNumber, endExclusiveLineNumber) {
|
|
18
|
+
return ( new LineRange(startLineNumber, endExclusiveLineNumber - startLineNumber));
|
|
19
|
+
}
|
|
20
|
+
constructor(startLineNumber, lineCount) {
|
|
21
|
+
this.startLineNumber = startLineNumber;
|
|
22
|
+
this.lineCount = lineCount;
|
|
23
|
+
if (lineCount < 0) {
|
|
24
|
+
throw new BugIndicatingError();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
join(other) {
|
|
28
|
+
return ( new LineRange(
|
|
29
|
+
Math.min(this.startLineNumber, other.startLineNumber),
|
|
30
|
+
Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive) - this.startLineNumber
|
|
31
|
+
));
|
|
32
|
+
}
|
|
33
|
+
get endLineNumberExclusive() {
|
|
34
|
+
return this.startLineNumber + this.lineCount;
|
|
35
|
+
}
|
|
36
|
+
get isEmpty() {
|
|
37
|
+
return this.lineCount === 0;
|
|
38
|
+
}
|
|
39
|
+
touches(other) {
|
|
40
|
+
return (this.endLineNumberExclusive >= other.startLineNumber &&
|
|
41
|
+
other.endLineNumberExclusive >= this.startLineNumber);
|
|
42
|
+
}
|
|
43
|
+
isAfter(range) {
|
|
44
|
+
return this.startLineNumber >= range.endLineNumberExclusive;
|
|
45
|
+
}
|
|
46
|
+
isBefore(range) {
|
|
47
|
+
return range.startLineNumber >= this.endLineNumberExclusive;
|
|
48
|
+
}
|
|
49
|
+
delta(lineDelta) {
|
|
50
|
+
return ( new LineRange(this.startLineNumber + lineDelta, this.lineCount));
|
|
51
|
+
}
|
|
52
|
+
toString() {
|
|
53
|
+
return `[${this.startLineNumber},${this.endLineNumberExclusive})`;
|
|
54
|
+
}
|
|
55
|
+
equals(originalRange) {
|
|
56
|
+
return this.startLineNumber === originalRange.startLineNumber && this.lineCount === originalRange.lineCount;
|
|
57
|
+
}
|
|
58
|
+
contains(lineNumber) {
|
|
59
|
+
return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;
|
|
60
|
+
}
|
|
61
|
+
deltaEnd(delta) {
|
|
62
|
+
return ( new LineRange(this.startLineNumber, this.lineCount + delta));
|
|
63
|
+
}
|
|
64
|
+
deltaStart(lineDelta) {
|
|
65
|
+
return ( new LineRange(this.startLineNumber + lineDelta, this.lineCount - lineDelta));
|
|
66
|
+
}
|
|
67
|
+
getLines(model) {
|
|
68
|
+
const result = ( new Array(this.lineCount));
|
|
69
|
+
for (let i = 0; i < this.lineCount; i++) {
|
|
70
|
+
result[i] = model.getLineContent(this.startLineNumber + i);
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
containsRange(range) {
|
|
75
|
+
return this.startLineNumber <= range.startLineNumber && range.endLineNumberExclusive <= this.endLineNumberExclusive;
|
|
76
|
+
}
|
|
77
|
+
toRange() {
|
|
78
|
+
return ( new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1));
|
|
79
|
+
}
|
|
80
|
+
toInclusiveRange() {
|
|
81
|
+
if (this.isEmpty) {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
return ( new Range(
|
|
85
|
+
this.startLineNumber,
|
|
86
|
+
1,
|
|
87
|
+
this.endLineNumberExclusive - 1,
|
|
88
|
+
1073741824
|
|
89
|
+
));
|
|
90
|
+
}
|
|
91
|
+
toInclusiveRangeOrEmpty() {
|
|
92
|
+
if (this.isEmpty) {
|
|
93
|
+
return ( new Range(this.startLineNumber, 1, this.startLineNumber, 1));
|
|
94
|
+
}
|
|
95
|
+
return ( new Range(
|
|
96
|
+
this.startLineNumber,
|
|
97
|
+
1,
|
|
98
|
+
this.endLineNumberExclusive - 1,
|
|
99
|
+
1073741824
|
|
100
|
+
));
|
|
101
|
+
}
|
|
102
|
+
intersects(lineRange) {
|
|
103
|
+
return this.startLineNumber <= lineRange.endLineNumberExclusive
|
|
104
|
+
&& lineRange.startLineNumber <= this.endLineNumberExclusive;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
LineRange.compareByStart = compareBy(l => l.startLineNumber, numberComparator);
|
|
108
|
+
export { LineRange };
|