@codingame/monaco-vscode-api 1.83.8 → 1.83.9
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/extensions.js +5 -5
- package/lifecycle.js +21 -1
- package/missing-services.js +187 -24
- package/monaco-editor-treemending.patch +955 -955
- package/package.json +12 -6
- package/services.d.ts +2 -4
- package/services.js +28 -27
- package/vscode/src/vs/base/common/uriIpc.js +22 -1
- package/vscode/src/vs/base/parts/request/common/request.js +7 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +116 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +117 -2
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.js +10 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +42 -0
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +12 -1
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +306 -1
- package/vscode/src/vs/platform/log/common/log.d.ts +27 -2
- package/vscode/src/vs/platform/remote/common/remoteAgentConnection.d.ts +9 -1
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.js +2 -1
- package/vscode/src/vs/platform/request/common/request.js +38 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +2 -1
- package/vscode/src/vs/platform/tunnel/common/tunnel.d.ts +50 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +63 -0
- package/vscode/src/vs/platform/userDataSync/common/ignoredExtensions.js +65 -0
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +2 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +3 -0
- package/vscode/src/vs/platform/workspace/common/workspace.d.ts +16 -1
- package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +6 -2
- package/vscode/src/vs/workbench/api/worker/extensionHostWorker.js +1 -1
- package/vscode/src/vs/workbench/common/theme.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +248 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +3291 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +16 -16
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +45 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +67 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +396 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.d.ts +23 -3
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +4 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +255 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +44 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/services/localization/common/locale.js +4 -0
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +2 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +68 -0
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.d.ts +172 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.js +150 -0
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +3 -1
- package/vscode.proposed.d.ts +4787 -0
- package/workbench.js +0 -1
- package/service-override/bulkEdit.js +0 -9
- package/service-override/environment.js +0 -21
- package/service-override/extensions.js +0 -465
- package/service-override/files.js +0 -471
- package/service-override/keybindings.js +0 -99
- package/service-override/layout.js +0 -229
- package/service-override/output.js +0 -23
- package/service-override/quickaccess.js +0 -98
- package/vscode/src/vs/base/common/console.js +0 -58
- package/vscode/src/vs/base/common/keybindingParser.js +0 -87
- package/vscode/src/vs/base/common/prefixTree.js +0 -130
- package/vscode/src/vs/base/common/tfIdf.js +0 -137
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -23
- package/vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js +0 -404
- package/vscode/src/vs/platform/files/common/fileService.js +0 -957
- package/vscode/src/vs/platform/files/common/files.js +0 -81
- package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +0 -220
- package/vscode/src/vs/platform/files/common/io.js +0 -75
- package/vscode/src/vs/platform/files/common/watcher.js +0 -69
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +0 -48
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardMapper.js +0 -23
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +0 -25
- package/vscode/src/vs/platform/log/common/fileLog.js +0 -105
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -331
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +0 -65
- package/vscode/src/vs/platform/remote/common/managedSocket.js +0 -96
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +0 -33
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +0 -328
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +0 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -172
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +0 -59
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +0 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +0 -105
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +0 -92
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +0 -539
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +0 -33
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -576
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +0 -385
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +0 -100
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +0 -67
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +0 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +0 -73
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -247
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +0 -368
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +0 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +0 -39
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +0 -409
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +0 -473
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +0 -225
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +0 -315
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +0 -278
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +0 -281
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +0 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +0 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +0 -945
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +0 -76
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +0 -33
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +0 -76
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +0 -91
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +0 -116
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -156
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -121
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -186
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -127
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -129
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -339
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -46
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +0 -74
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +0 -36
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +0 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +0 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +0 -183
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +0 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +0 -461
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +0 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +0 -146
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +0 -48
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +0 -51
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +0 -729
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +0 -51
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +0 -410
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +0 -180
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +0 -311
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +0 -221
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -108
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +0 -59
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -281
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +0 -133
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +0 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +0 -271
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +0 -33
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +0 -230
- package/vscode/src/vs/workbench/browser/contextkeys.js +0 -249
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +0 -358
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +0 -362
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +0 -265
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +0 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +0 -215
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +0 -86
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +0 -55
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +0 -49
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +0 -90
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +0 -646
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +0 -295
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +0 -60
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +0 -247
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +0 -107
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.js +0 -107
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +0 -329
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +0 -378
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.js +0 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +0 -1194
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsFilterOptions.js +0 -17
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +0 -332
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +0 -541
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +0 -176
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +0 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +0 -99
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +0 -55
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +0 -143
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +0 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -71
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -81
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +0 -177
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +0 -3
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +0 -28
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +0 -142
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +0 -480
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +0 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +0 -83
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +0 -54
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +0 -108
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +0 -258
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +0 -614
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +0 -307
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +0 -36
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +0 -165
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +0 -78
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +0 -68
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -106
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +0 -487
- package/vscode/src/vs/workbench/contrib/output/browser/outputLinkProvider.js +0 -76
- package/vscode/src/vs/workbench/contrib/output/browser/outputServices.js +0 -166
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +0 -234
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +0 -287
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +0 -167
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +0 -263
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +0 -504
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +0 -130
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +0 -101
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +0 -26
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +0 -23
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +0 -334
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +0 -45
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +0 -1286
- package/vscode/src/vs/workbench/services/commands/common/commandService.js +0 -77
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +0 -141
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -271
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +0 -50
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +0 -1091
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -40
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +0 -23
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +0 -641
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +0 -272
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +0 -56
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +0 -78
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +0 -47
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -218
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +0 -917
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +0 -498
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution.js +0 -13
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/cz.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de-swiss.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.linux.js +0 -180
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/de.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/dk.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/dvorak.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-belgian.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-ext.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-in.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.darwin.js +0 -133
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.linux.js +0 -182
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/en.win.js +0 -167
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es-latin.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.linux.js +0 -180
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/es.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.linux.js +0 -180
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/hu.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/it.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/it.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp-roman.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ko.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.darwin.js +0 -17
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux.js +0 -6
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win.js +0 -23
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/no.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt-br.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.linux.js +0 -180
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/sv.win.js +0 -164
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/thai.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/tr.win.js +0 -162
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/zh-hans.darwin.js +0 -125
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingIO.js +0 -72
- package/vscode/src/vs/workbench/services/keybinding/common/keymapInfo.js +0 -108
- package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +0 -886
- package/vscode/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +0 -350
- package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.js +0 -67
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +0 -4
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +0 -77
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { equals, tieBreakComparators, 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 { splitLines } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
4
|
-
import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
|
|
5
|
-
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
6
|
-
import { LineRangeEdit, RangeEdit } from './editing.js';
|
|
7
|
-
import { MappingAlignment, DetailedLineRangeMapping } from './mapping.js';
|
|
8
|
-
import { concatArrays } from '../utils.js';
|
|
9
|
-
class ModifiedBaseRange {
|
|
10
|
-
static fromDiffs(diffs1, diffs2, baseTextModel, input1TextModel, input2TextModel) {
|
|
11
|
-
const alignments = MappingAlignment.compute(diffs1, diffs2);
|
|
12
|
-
return ( alignments.map((a) => ( new ModifiedBaseRange(
|
|
13
|
-
a.inputRange,
|
|
14
|
-
baseTextModel,
|
|
15
|
-
a.output1Range,
|
|
16
|
-
input1TextModel,
|
|
17
|
-
a.output1LineMappings,
|
|
18
|
-
a.output2Range,
|
|
19
|
-
input2TextModel,
|
|
20
|
-
a.output2LineMappings
|
|
21
|
-
))));
|
|
22
|
-
}
|
|
23
|
-
constructor(baseRange, baseTextModel, input1Range, input1TextModel,
|
|
24
|
-
input1Diffs, input2Range, input2TextModel,
|
|
25
|
-
input2Diffs) {
|
|
26
|
-
this.baseRange = baseRange;
|
|
27
|
-
this.baseTextModel = baseTextModel;
|
|
28
|
-
this.input1Range = input1Range;
|
|
29
|
-
this.input1TextModel = input1TextModel;
|
|
30
|
-
this.input1Diffs = input1Diffs;
|
|
31
|
-
this.input2Range = input2Range;
|
|
32
|
-
this.input2TextModel = input2TextModel;
|
|
33
|
-
this.input2Diffs = input2Diffs;
|
|
34
|
-
this.input1CombinedDiff = DetailedLineRangeMapping.join(this.input1Diffs);
|
|
35
|
-
this.input2CombinedDiff = DetailedLineRangeMapping.join(this.input2Diffs);
|
|
36
|
-
this.isEqualChange = equals(this.input1Diffs, this.input2Diffs, (a, b) => a.getLineEdit().equals(b.getLineEdit()));
|
|
37
|
-
this.smartInput1LineRangeEdit = null;
|
|
38
|
-
this.smartInput2LineRangeEdit = null;
|
|
39
|
-
this.dumbInput1LineRangeEdit = null;
|
|
40
|
-
this.dumbInput2LineRangeEdit = null;
|
|
41
|
-
if (this.input1Diffs.length === 0 && this.input2Diffs.length === 0) {
|
|
42
|
-
throw new BugIndicatingError('must have at least one diff');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
getInputRange(inputNumber) {
|
|
46
|
-
return inputNumber === 1 ? this.input1Range : this.input2Range;
|
|
47
|
-
}
|
|
48
|
-
getInputCombinedDiff(inputNumber) {
|
|
49
|
-
return inputNumber === 1 ? this.input1CombinedDiff : this.input2CombinedDiff;
|
|
50
|
-
}
|
|
51
|
-
getInputDiffs(inputNumber) {
|
|
52
|
-
return inputNumber === 1 ? this.input1Diffs : this.input2Diffs;
|
|
53
|
-
}
|
|
54
|
-
get isConflicting() {
|
|
55
|
-
return this.input1Diffs.length > 0 && this.input2Diffs.length > 0;
|
|
56
|
-
}
|
|
57
|
-
get canBeCombined() {
|
|
58
|
-
return this.smartCombineInputs(1) !== undefined;
|
|
59
|
-
}
|
|
60
|
-
get isOrderRelevant() {
|
|
61
|
-
const input1 = this.smartCombineInputs(1);
|
|
62
|
-
const input2 = this.smartCombineInputs(2);
|
|
63
|
-
if (!input1 || !input2) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
return !input1.equals(input2);
|
|
67
|
-
}
|
|
68
|
-
getEditForBase(state) {
|
|
69
|
-
const diffs = [];
|
|
70
|
-
if (state.includesInput1 && this.input1CombinedDiff) {
|
|
71
|
-
diffs.push({ diff: this.input1CombinedDiff, inputNumber: 1 });
|
|
72
|
-
}
|
|
73
|
-
if (state.includesInput2 && this.input2CombinedDiff) {
|
|
74
|
-
diffs.push({ diff: this.input2CombinedDiff, inputNumber: 2 });
|
|
75
|
-
}
|
|
76
|
-
if (diffs.length === 0) {
|
|
77
|
-
return { edit: undefined, effectiveState: ModifiedBaseRangeState.base };
|
|
78
|
-
}
|
|
79
|
-
if (diffs.length === 1) {
|
|
80
|
-
return { edit: diffs[0].diff.getLineEdit(), effectiveState: ModifiedBaseRangeState.base.withInputValue(diffs[0].inputNumber, true, false) };
|
|
81
|
-
}
|
|
82
|
-
if (state.kind !== ModifiedBaseRangeStateKind.both) {
|
|
83
|
-
throw new BugIndicatingError();
|
|
84
|
-
}
|
|
85
|
-
const smartCombinedEdit = state.smartCombination ? this.smartCombineInputs(state.firstInput) : this.dumbCombineInputs(state.firstInput);
|
|
86
|
-
if (smartCombinedEdit) {
|
|
87
|
-
return { edit: smartCombinedEdit, effectiveState: state };
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
edit: diffs[getOtherInputNumber(state.firstInput) - 1].diff.getLineEdit(),
|
|
91
|
-
effectiveState: ModifiedBaseRangeState.base.withInputValue(getOtherInputNumber(state.firstInput), true, false),
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
smartCombineInputs(firstInput) {
|
|
95
|
-
if (firstInput === 1 && this.smartInput1LineRangeEdit !== null) {
|
|
96
|
-
return this.smartInput1LineRangeEdit;
|
|
97
|
-
}
|
|
98
|
-
else if (firstInput === 2 && this.smartInput2LineRangeEdit !== null) {
|
|
99
|
-
return this.smartInput2LineRangeEdit;
|
|
100
|
-
}
|
|
101
|
-
const combinedDiffs = concatArrays(this.input1Diffs.flatMap((diffs) => ( diffs.rangeMappings.map((diff) => ({ diff, input: 1 })))), this.input2Diffs.flatMap((diffs) => ( diffs.rangeMappings.map((diff) => ({ diff, input: 2 }))))).sort(tieBreakComparators(compareBy((d) => d.diff.inputRange, Range.compareRangesUsingStarts), compareBy((d) => (d.input === firstInput ? 1 : 2), numberComparator)));
|
|
102
|
-
const sortedEdits = ( combinedDiffs.map(d => {
|
|
103
|
-
const sourceTextModel = d.input === 1 ? this.input1TextModel : this.input2TextModel;
|
|
104
|
-
return ( new RangeEdit(d.diff.inputRange, sourceTextModel.getValueInRange(d.diff.outputRange)));
|
|
105
|
-
}));
|
|
106
|
-
const result = editsToLineRangeEdit(this.baseRange, sortedEdits, this.baseTextModel);
|
|
107
|
-
if (firstInput === 1) {
|
|
108
|
-
this.smartInput1LineRangeEdit = result;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
this.smartInput2LineRangeEdit = result;
|
|
112
|
-
}
|
|
113
|
-
return result;
|
|
114
|
-
}
|
|
115
|
-
dumbCombineInputs(firstInput) {
|
|
116
|
-
if (firstInput === 1 && this.dumbInput1LineRangeEdit !== null) {
|
|
117
|
-
return this.dumbInput1LineRangeEdit;
|
|
118
|
-
}
|
|
119
|
-
else if (firstInput === 2 && this.dumbInput2LineRangeEdit !== null) {
|
|
120
|
-
return this.dumbInput2LineRangeEdit;
|
|
121
|
-
}
|
|
122
|
-
let input1Lines = this.input1Range.getLines(this.input1TextModel);
|
|
123
|
-
let input2Lines = this.input2Range.getLines(this.input2TextModel);
|
|
124
|
-
if (firstInput === 2) {
|
|
125
|
-
[input1Lines, input2Lines] = [input2Lines, input1Lines];
|
|
126
|
-
}
|
|
127
|
-
const result = ( new LineRangeEdit(this.baseRange, input1Lines.concat(input2Lines)));
|
|
128
|
-
if (firstInput === 1) {
|
|
129
|
-
this.dumbInput1LineRangeEdit = result;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
this.dumbInput2LineRangeEdit = result;
|
|
133
|
-
}
|
|
134
|
-
return result;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
function editsToLineRangeEdit(range, sortedEdits, textModel) {
|
|
138
|
-
let text = '';
|
|
139
|
-
const startsLineBefore = range.startLineNumber > 1;
|
|
140
|
-
let currentPosition = startsLineBefore
|
|
141
|
-
? ( new Position(
|
|
142
|
-
range.startLineNumber - 1,
|
|
143
|
-
textModel.getLineMaxColumn(range.startLineNumber - 1)
|
|
144
|
-
))
|
|
145
|
-
: ( new Position(range.startLineNumber, 1));
|
|
146
|
-
for (const edit of sortedEdits) {
|
|
147
|
-
const diffStart = edit.range.getStartPosition();
|
|
148
|
-
if (!currentPosition.isBeforeOrEqual(diffStart)) {
|
|
149
|
-
return undefined;
|
|
150
|
-
}
|
|
151
|
-
let originalText = textModel.getValueInRange(Range.fromPositions(currentPosition, diffStart));
|
|
152
|
-
if (diffStart.lineNumber > textModel.getLineCount()) {
|
|
153
|
-
originalText += '\n';
|
|
154
|
-
}
|
|
155
|
-
text += originalText;
|
|
156
|
-
text += edit.newText;
|
|
157
|
-
currentPosition = edit.range.getEndPosition();
|
|
158
|
-
}
|
|
159
|
-
const endsLineAfter = range.endLineNumberExclusive <= textModel.getLineCount();
|
|
160
|
-
const end = endsLineAfter ? ( new Position(range.endLineNumberExclusive, 1)) : ( new Position(
|
|
161
|
-
range.endLineNumberExclusive - 1,
|
|
162
|
-
1073741824
|
|
163
|
-
));
|
|
164
|
-
const originalText = textModel.getValueInRange(Range.fromPositions(currentPosition, end));
|
|
165
|
-
text += originalText;
|
|
166
|
-
const lines = splitLines(text);
|
|
167
|
-
if (startsLineBefore) {
|
|
168
|
-
if (lines[0] !== '') {
|
|
169
|
-
return undefined;
|
|
170
|
-
}
|
|
171
|
-
lines.shift();
|
|
172
|
-
}
|
|
173
|
-
if (endsLineAfter) {
|
|
174
|
-
if (lines[lines.length - 1] !== '') {
|
|
175
|
-
return undefined;
|
|
176
|
-
}
|
|
177
|
-
lines.pop();
|
|
178
|
-
}
|
|
179
|
-
return ( new LineRangeEdit(range, lines));
|
|
180
|
-
}
|
|
181
|
-
var ModifiedBaseRangeStateKind;
|
|
182
|
-
( (function(ModifiedBaseRangeStateKind) {
|
|
183
|
-
ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["base"] = 0] = "base";
|
|
184
|
-
ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["input1"] = 1] = "input1";
|
|
185
|
-
ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["input2"] = 2] = "input2";
|
|
186
|
-
ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["both"] = 3] = "both";
|
|
187
|
-
ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["unrecognized"] = 4] = "unrecognized";
|
|
188
|
-
})(ModifiedBaseRangeStateKind || (ModifiedBaseRangeStateKind = {})));
|
|
189
|
-
function getOtherInputNumber(inputNumber) {
|
|
190
|
-
return inputNumber === 1 ? 2 : 1;
|
|
191
|
-
}
|
|
192
|
-
class AbstractModifiedBaseRangeState {
|
|
193
|
-
constructor() { }
|
|
194
|
-
get includesInput1() { return false; }
|
|
195
|
-
get includesInput2() { return false; }
|
|
196
|
-
includesInput(inputNumber) {
|
|
197
|
-
return inputNumber === 1 ? this.includesInput1 : this.includesInput2;
|
|
198
|
-
}
|
|
199
|
-
isInputIncluded(inputNumber) {
|
|
200
|
-
return inputNumber === 1 ? this.includesInput1 : this.includesInput2;
|
|
201
|
-
}
|
|
202
|
-
toggle(inputNumber) {
|
|
203
|
-
return this.withInputValue(inputNumber, !this.includesInput(inputNumber), true);
|
|
204
|
-
}
|
|
205
|
-
getInput(inputNumber) {
|
|
206
|
-
if (!this.isInputIncluded(inputNumber)) {
|
|
207
|
-
return 0 ;
|
|
208
|
-
}
|
|
209
|
-
return 1 ;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
class ModifiedBaseRangeStateBase extends AbstractModifiedBaseRangeState {
|
|
213
|
-
get kind() { return ModifiedBaseRangeStateKind.base; }
|
|
214
|
-
toString() { return 'base'; }
|
|
215
|
-
swap() { return this; }
|
|
216
|
-
withInputValue(inputNumber, value, smartCombination = false) {
|
|
217
|
-
if (inputNumber === 1) {
|
|
218
|
-
return value ? ( new ModifiedBaseRangeStateInput1()) : this;
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
return value ? ( new ModifiedBaseRangeStateInput2()) : this;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
equals(other) {
|
|
225
|
-
return other.kind === ModifiedBaseRangeStateKind.base;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
class ModifiedBaseRangeStateInput1 extends AbstractModifiedBaseRangeState {
|
|
229
|
-
get kind() { return ModifiedBaseRangeStateKind.input1; }
|
|
230
|
-
get includesInput1() { return true; }
|
|
231
|
-
toString() { return '1✓'; }
|
|
232
|
-
swap() { return ( new ModifiedBaseRangeStateInput2()); }
|
|
233
|
-
withInputValue(inputNumber, value, smartCombination = false) {
|
|
234
|
-
if (inputNumber === 1) {
|
|
235
|
-
return value ? this : ( new ModifiedBaseRangeStateBase());
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
return value ? ( new ModifiedBaseRangeStateBoth(1, smartCombination)) : ( new ModifiedBaseRangeStateInput2());
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
equals(other) {
|
|
242
|
-
return other.kind === ModifiedBaseRangeStateKind.input1;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
class ModifiedBaseRangeStateInput2 extends AbstractModifiedBaseRangeState {
|
|
246
|
-
get kind() { return ModifiedBaseRangeStateKind.input2; }
|
|
247
|
-
get includesInput2() { return true; }
|
|
248
|
-
toString() { return '2✓'; }
|
|
249
|
-
swap() { return ( new ModifiedBaseRangeStateInput1()); }
|
|
250
|
-
withInputValue(inputNumber, value, smartCombination = false) {
|
|
251
|
-
if (inputNumber === 2) {
|
|
252
|
-
return value ? this : ( new ModifiedBaseRangeStateBase());
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
return value ? ( new ModifiedBaseRangeStateBoth(2, smartCombination)) : ( new ModifiedBaseRangeStateInput2());
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
equals(other) {
|
|
259
|
-
return other.kind === ModifiedBaseRangeStateKind.input2;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
class ModifiedBaseRangeStateBoth extends AbstractModifiedBaseRangeState {
|
|
263
|
-
constructor(firstInput, smartCombination) {
|
|
264
|
-
super();
|
|
265
|
-
this.firstInput = firstInput;
|
|
266
|
-
this.smartCombination = smartCombination;
|
|
267
|
-
}
|
|
268
|
-
get kind() { return ModifiedBaseRangeStateKind.both; }
|
|
269
|
-
get includesInput1() { return true; }
|
|
270
|
-
get includesInput2() { return true; }
|
|
271
|
-
toString() {
|
|
272
|
-
return '2✓';
|
|
273
|
-
}
|
|
274
|
-
swap() { return ( new ModifiedBaseRangeStateBoth(getOtherInputNumber(this.firstInput), this.smartCombination)); }
|
|
275
|
-
withInputValue(inputNumber, value, smartCombination = false) {
|
|
276
|
-
if (value) {
|
|
277
|
-
return this;
|
|
278
|
-
}
|
|
279
|
-
return inputNumber === 1 ? ( new ModifiedBaseRangeStateInput2()) : ( new ModifiedBaseRangeStateInput1());
|
|
280
|
-
}
|
|
281
|
-
equals(other) {
|
|
282
|
-
return other.kind === ModifiedBaseRangeStateKind.both && this.firstInput === other.firstInput && this.smartCombination === other.smartCombination;
|
|
283
|
-
}
|
|
284
|
-
getInput(inputNumber) {
|
|
285
|
-
return inputNumber === this.firstInput ? 1 : 2 ;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
class ModifiedBaseRangeStateUnrecognized extends AbstractModifiedBaseRangeState {
|
|
289
|
-
get kind() { return ModifiedBaseRangeStateKind.unrecognized; }
|
|
290
|
-
toString() { return 'unrecognized'; }
|
|
291
|
-
swap() { return this; }
|
|
292
|
-
withInputValue(inputNumber, value, smartCombination = false) {
|
|
293
|
-
if (!value) {
|
|
294
|
-
return this;
|
|
295
|
-
}
|
|
296
|
-
return inputNumber === 1 ? ( new ModifiedBaseRangeStateInput1()) : ( new ModifiedBaseRangeStateInput2());
|
|
297
|
-
}
|
|
298
|
-
equals(other) {
|
|
299
|
-
return other.kind === ModifiedBaseRangeStateKind.unrecognized;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
var ModifiedBaseRangeState;
|
|
303
|
-
( (function(ModifiedBaseRangeState) {
|
|
304
|
-
ModifiedBaseRangeState.base = ( new ModifiedBaseRangeStateBase());
|
|
305
|
-
ModifiedBaseRangeState.unrecognized = ( new ModifiedBaseRangeStateUnrecognized());
|
|
306
|
-
})(ModifiedBaseRangeState || (ModifiedBaseRangeState = {})));
|
|
307
|
-
export { AbstractModifiedBaseRangeState, ModifiedBaseRange, ModifiedBaseRangeState, ModifiedBaseRangeStateBase, ModifiedBaseRangeStateBoth, ModifiedBaseRangeStateInput1, ModifiedBaseRangeStateInput2, ModifiedBaseRangeStateKind, ModifiedBaseRangeStateUnrecognized, getOtherInputNumber };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
|
|
2
|
-
import { LengthObj } from 'monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js';
|
|
3
|
-
function rangeContainsPosition(range, position) {
|
|
4
|
-
if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
function lengthBetweenPositions(position1, position2) {
|
|
16
|
-
if (position1.lineNumber === position2.lineNumber) {
|
|
17
|
-
return ( new LengthObj(0, position2.column - position1.column));
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return ( new LengthObj(position2.lineNumber - position1.lineNumber, position2.column - 1));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function addLength(position, length) {
|
|
24
|
-
if (length.lineCount === 0) {
|
|
25
|
-
return ( new Position(position.lineNumber, position.column + length.columnCount));
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return ( new Position(position.lineNumber + length.lineCount, length.columnCount + 1));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function rangeIsBeforeOrTouching(range, other) {
|
|
32
|
-
return (range.endLineNumber < other.startLineNumber ||
|
|
33
|
-
(range.endLineNumber === other.startLineNumber &&
|
|
34
|
-
range.endColumn <= other.startColumn));
|
|
35
|
-
}
|
|
36
|
-
export { addLength, lengthBetweenPositions, rangeContainsPosition, rangeIsBeforeOrTouching };
|
|
@@ -1,165 +0,0 @@
|
|
|
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 { Disposable, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
-
import { DetailedLineRangeMapping } from './mapping.js';
|
|
5
|
-
import { LineRangeEdit } from './editing.js';
|
|
6
|
-
import { LineRange } from './lineRange.js';
|
|
7
|
-
import { ReentrancyBarrier } from '../utils.js';
|
|
8
|
-
import { observableValue, observableSignal, autorun, transaction } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
9
|
-
class TextModelDiffs extends Disposable {
|
|
10
|
-
get isApplyingChange() {
|
|
11
|
-
return this.barrier.isActive;
|
|
12
|
-
}
|
|
13
|
-
constructor(baseTextModel, textModel, diffComputer) {
|
|
14
|
-
super();
|
|
15
|
-
this.baseTextModel = baseTextModel;
|
|
16
|
-
this.textModel = textModel;
|
|
17
|
-
this.diffComputer = diffComputer;
|
|
18
|
-
this.recomputeCount = 0;
|
|
19
|
-
this._state = observableValue(this, 1 );
|
|
20
|
-
this._diffs = observableValue(this, []);
|
|
21
|
-
this.barrier = ( new ReentrancyBarrier());
|
|
22
|
-
this.isDisposed = false;
|
|
23
|
-
this.isInitializing = true;
|
|
24
|
-
const recomputeSignal = observableSignal('recompute');
|
|
25
|
-
this._register(autorun(reader => {
|
|
26
|
-
recomputeSignal.read(reader);
|
|
27
|
-
this.recompute(reader);
|
|
28
|
-
}));
|
|
29
|
-
this._register(baseTextModel.onDidChangeContent(this.barrier.makeExclusive(() => {
|
|
30
|
-
recomputeSignal.trigger(undefined);
|
|
31
|
-
})));
|
|
32
|
-
this._register(textModel.onDidChangeContent(this.barrier.makeExclusive(() => {
|
|
33
|
-
recomputeSignal.trigger(undefined);
|
|
34
|
-
})));
|
|
35
|
-
this._register(toDisposable(() => {
|
|
36
|
-
this.isDisposed = true;
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
get state() {
|
|
40
|
-
return this._state;
|
|
41
|
-
}
|
|
42
|
-
get diffs() {
|
|
43
|
-
return this._diffs;
|
|
44
|
-
}
|
|
45
|
-
recompute(reader) {
|
|
46
|
-
this.recomputeCount++;
|
|
47
|
-
const currentRecomputeIdx = this.recomputeCount;
|
|
48
|
-
if (this._state.get() === 1 ) {
|
|
49
|
-
this.isInitializing = true;
|
|
50
|
-
}
|
|
51
|
-
transaction(tx => {
|
|
52
|
-
this._state.set(this.isInitializing ? 1 : 3 , tx, 0 );
|
|
53
|
-
});
|
|
54
|
-
const result = this.diffComputer.computeDiff(this.baseTextModel, this.textModel, reader);
|
|
55
|
-
result.then((result) => {
|
|
56
|
-
if (this.isDisposed) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
if (currentRecomputeIdx !== this.recomputeCount) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
transaction(tx => {
|
|
63
|
-
if (result.diffs) {
|
|
64
|
-
this._state.set(2 , tx, 1 );
|
|
65
|
-
this._diffs.set(result.diffs, tx, 1 );
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
this._state.set(4 , tx, 1 );
|
|
69
|
-
}
|
|
70
|
-
this.isInitializing = false;
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
ensureUpToDate() {
|
|
75
|
-
if (this.state.get() !== 2 ) {
|
|
76
|
-
throw new BugIndicatingError('Cannot remove diffs when the model is not up to date');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
removeDiffs(diffToRemoves, transaction, group) {
|
|
80
|
-
this.ensureUpToDate();
|
|
81
|
-
diffToRemoves.sort(compareBy((d) => d.inputRange.startLineNumber, numberComparator));
|
|
82
|
-
diffToRemoves.reverse();
|
|
83
|
-
let diffs = this._diffs.get();
|
|
84
|
-
for (const diffToRemove of diffToRemoves) {
|
|
85
|
-
const len = diffs.length;
|
|
86
|
-
diffs = diffs.filter((d) => d !== diffToRemove);
|
|
87
|
-
if (len === diffs.length) {
|
|
88
|
-
throw new BugIndicatingError();
|
|
89
|
-
}
|
|
90
|
-
this.barrier.runExclusivelyOrThrow(() => {
|
|
91
|
-
const edits = diffToRemove.getReverseLineEdit().toEdits(this.textModel.getLineCount());
|
|
92
|
-
this.textModel.pushEditOperations(null, edits, () => null, group);
|
|
93
|
-
});
|
|
94
|
-
diffs = ( diffs.map((d) => d.outputRange.isAfter(diffToRemove.outputRange)
|
|
95
|
-
? d.addOutputLineDelta(diffToRemove.inputRange.lineCount - diffToRemove.outputRange.lineCount)
|
|
96
|
-
: d));
|
|
97
|
-
}
|
|
98
|
-
this._diffs.set(diffs, transaction, 0 );
|
|
99
|
-
}
|
|
100
|
-
applyEditRelativeToOriginal(edit, transaction, group) {
|
|
101
|
-
this.ensureUpToDate();
|
|
102
|
-
const editMapping = ( new DetailedLineRangeMapping(edit.range, this.baseTextModel, ( new LineRange(edit.range.startLineNumber, edit.newLines.length)), this.textModel));
|
|
103
|
-
let firstAfter = false;
|
|
104
|
-
let delta = 0;
|
|
105
|
-
const newDiffs = ( new Array());
|
|
106
|
-
for (const diff of this.diffs.get()) {
|
|
107
|
-
if (diff.inputRange.touches(edit.range)) {
|
|
108
|
-
throw new BugIndicatingError('Edit must be conflict free.');
|
|
109
|
-
}
|
|
110
|
-
else if (diff.inputRange.isAfter(edit.range)) {
|
|
111
|
-
if (!firstAfter) {
|
|
112
|
-
firstAfter = true;
|
|
113
|
-
newDiffs.push(editMapping.addOutputLineDelta(delta));
|
|
114
|
-
}
|
|
115
|
-
newDiffs.push(diff.addOutputLineDelta(edit.newLines.length - edit.range.lineCount));
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
newDiffs.push(diff);
|
|
119
|
-
}
|
|
120
|
-
if (!firstAfter) {
|
|
121
|
-
delta += diff.outputRange.lineCount - diff.inputRange.lineCount;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
if (!firstAfter) {
|
|
125
|
-
firstAfter = true;
|
|
126
|
-
newDiffs.push(editMapping.addOutputLineDelta(delta));
|
|
127
|
-
}
|
|
128
|
-
this.barrier.runExclusivelyOrThrow(() => {
|
|
129
|
-
const edits = ( new LineRangeEdit(edit.range.delta(delta), edit.newLines)).toEdits(this.textModel.getLineCount());
|
|
130
|
-
this.textModel.pushEditOperations(null, edits, () => null, group);
|
|
131
|
-
});
|
|
132
|
-
this._diffs.set(newDiffs, transaction, 0 );
|
|
133
|
-
}
|
|
134
|
-
findTouchingDiffs(baseRange) {
|
|
135
|
-
return this.diffs.get().filter(d => d.inputRange.touches(baseRange));
|
|
136
|
-
}
|
|
137
|
-
getResultLine(lineNumber, reader) {
|
|
138
|
-
let offset = 0;
|
|
139
|
-
const diffs = reader ? this.diffs.read(reader) : this.diffs.get();
|
|
140
|
-
for (const diff of diffs) {
|
|
141
|
-
if (diff.inputRange.contains(lineNumber) || diff.inputRange.endLineNumberExclusive === lineNumber) {
|
|
142
|
-
return diff;
|
|
143
|
-
}
|
|
144
|
-
else if (diff.inputRange.endLineNumberExclusive < lineNumber) {
|
|
145
|
-
offset = diff.resultingDeltaFromOriginalToModified;
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return lineNumber + offset;
|
|
152
|
-
}
|
|
153
|
-
getResultLineRange(baseRange, reader) {
|
|
154
|
-
let start = this.getResultLine(baseRange.startLineNumber, reader);
|
|
155
|
-
if (typeof start !== 'number') {
|
|
156
|
-
start = start.outputRange.startLineNumber;
|
|
157
|
-
}
|
|
158
|
-
let endExclusive = this.getResultLine(baseRange.endLineNumberExclusive, reader);
|
|
159
|
-
if (typeof endExclusive !== 'number') {
|
|
160
|
-
endExclusive = endExclusive.outputRange.endLineNumberExclusive;
|
|
161
|
-
}
|
|
162
|
-
return LineRange.fromLineNumbers(start, endExclusive);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
export { TextModelDiffs };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
3
|
-
let MergeEditorTelemetry = class MergeEditorTelemetry {
|
|
4
|
-
constructor(telemetryService) {
|
|
5
|
-
this.telemetryService = telemetryService;
|
|
6
|
-
}
|
|
7
|
-
reportMergeEditorOpened(args) {
|
|
8
|
-
this.telemetryService.publicLog2('mergeEditor.opened', {
|
|
9
|
-
conflictCount: args.conflictCount,
|
|
10
|
-
combinableConflictCount: args.combinableConflictCount,
|
|
11
|
-
baseVisible: args.baseVisible,
|
|
12
|
-
isColumnView: args.isColumnView,
|
|
13
|
-
baseTop: args.baseTop,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
reportLayoutChange(args) {
|
|
17
|
-
this.telemetryService.publicLog2('mergeEditor.layoutChanged', {
|
|
18
|
-
baseVisible: args.baseVisible,
|
|
19
|
-
isColumnView: args.isColumnView,
|
|
20
|
-
baseTop: args.baseTop,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
reportMergeEditorClosed(args) {
|
|
24
|
-
this.telemetryService.publicLog2('mergeEditor.closed', {
|
|
25
|
-
conflictCount: args.conflictCount,
|
|
26
|
-
combinableConflictCount: args.combinableConflictCount,
|
|
27
|
-
durationOpenedSecs: args.durationOpenedSecs,
|
|
28
|
-
remainingConflictCount: args.remainingConflictCount,
|
|
29
|
-
accepted: args.accepted,
|
|
30
|
-
conflictsResolvedWithBase: args.conflictsResolvedWithBase,
|
|
31
|
-
conflictsResolvedWithInput1: args.conflictsResolvedWithInput1,
|
|
32
|
-
conflictsResolvedWithInput2: args.conflictsResolvedWithInput2,
|
|
33
|
-
conflictsResolvedWithSmartCombination: args.conflictsResolvedWithSmartCombination,
|
|
34
|
-
manuallySolvedConflictCountThatEqualNone: args.manuallySolvedConflictCountThatEqualNone,
|
|
35
|
-
manuallySolvedConflictCountThatEqualSmartCombine: args.manuallySolvedConflictCountThatEqualSmartCombine,
|
|
36
|
-
manuallySolvedConflictCountThatEqualInput1: args.manuallySolvedConflictCountThatEqualInput1,
|
|
37
|
-
manuallySolvedConflictCountThatEqualInput2: args.manuallySolvedConflictCountThatEqualInput2,
|
|
38
|
-
manuallySolvedConflictCountThatEqualNoneAndStartedWithBase: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithBase,
|
|
39
|
-
manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1,
|
|
40
|
-
manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2,
|
|
41
|
-
manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart,
|
|
42
|
-
manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
reportAcceptInvoked(inputNumber, otherAccepted) {
|
|
46
|
-
this.telemetryService.publicLog2('mergeEditor.action.accept', {
|
|
47
|
-
otherAccepted: otherAccepted,
|
|
48
|
-
isInput1: inputNumber === 1,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
reportSmartCombinationInvoked(otherAccepted) {
|
|
52
|
-
this.telemetryService.publicLog2('mergeEditor.action.smartCombination', {
|
|
53
|
-
otherAccepted: otherAccepted,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
reportRemoveInvoked(inputNumber, otherAccepted) {
|
|
57
|
-
this.telemetryService.publicLog2('mergeEditor.action.remove', {
|
|
58
|
-
otherAccepted: otherAccepted,
|
|
59
|
-
isInput1: inputNumber === 1,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
reportResetToBaseInvoked() {
|
|
63
|
-
this.telemetryService.publicLog2('mergeEditor.action.resetToBase', {});
|
|
64
|
-
}
|
|
65
|
-
reportNavigationToNextConflict() {
|
|
66
|
-
this.telemetryService.publicLog2('mergeEditor.action.goToNextConflict', {});
|
|
67
|
-
}
|
|
68
|
-
reportNavigationToPreviousConflict() {
|
|
69
|
-
this.telemetryService.publicLog2('mergeEditor.action.goToPreviousConflict', {});
|
|
70
|
-
}
|
|
71
|
-
reportConflictCounterClicked() {
|
|
72
|
-
this.telemetryService.publicLog2('mergeEditor.action.conflictCounterClicked', {});
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
MergeEditorTelemetry = ( __decorate([
|
|
76
|
-
( __param(0, ITelemetryService))
|
|
77
|
-
], MergeEditorTelemetry));
|
|
78
|
-
export { MergeEditorTelemetry };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { CompareResult, ArrayQueue } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
2
|
-
import { BugIndicatingError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
3
|
-
import { observableFromEvent } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
4
|
-
class ReentrancyBarrier {
|
|
5
|
-
constructor() {
|
|
6
|
-
this._isActive = false;
|
|
7
|
-
}
|
|
8
|
-
get isActive() {
|
|
9
|
-
return this._isActive;
|
|
10
|
-
}
|
|
11
|
-
makeExclusive(fn) {
|
|
12
|
-
return ((...args) => {
|
|
13
|
-
if (this._isActive) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
this._isActive = true;
|
|
17
|
-
try {
|
|
18
|
-
return fn(...args);
|
|
19
|
-
}
|
|
20
|
-
finally {
|
|
21
|
-
this._isActive = false;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
runExclusively(fn) {
|
|
26
|
-
if (this._isActive) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
this._isActive = true;
|
|
30
|
-
try {
|
|
31
|
-
fn();
|
|
32
|
-
}
|
|
33
|
-
finally {
|
|
34
|
-
this._isActive = false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
runExclusivelyOrThrow(fn) {
|
|
38
|
-
if (this._isActive) {
|
|
39
|
-
throw new BugIndicatingError();
|
|
40
|
-
}
|
|
41
|
-
this._isActive = true;
|
|
42
|
-
try {
|
|
43
|
-
fn();
|
|
44
|
-
}
|
|
45
|
-
finally {
|
|
46
|
-
this._isActive = false;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function* leftJoin(left, right, compare) {
|
|
51
|
-
const rightQueue = ( new ArrayQueue(right));
|
|
52
|
-
for (const leftElement of left) {
|
|
53
|
-
rightQueue.takeWhile(rightElement => CompareResult.isGreaterThan(compare(leftElement, rightElement)));
|
|
54
|
-
const equals = rightQueue.takeWhile(rightElement => CompareResult.isNeitherLessOrGreaterThan(compare(leftElement, rightElement)));
|
|
55
|
-
yield { left: leftElement, rights: equals || [] };
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function concatArrays(...arrays) {
|
|
59
|
-
return [].concat(...arrays);
|
|
60
|
-
}
|
|
61
|
-
function observableConfigValue(key, defaultValue, configurationService) {
|
|
62
|
-
return observableFromEvent((handleChange) => configurationService.onDidChangeConfiguration(e => {
|
|
63
|
-
if (e.affectsConfiguration(key)) {
|
|
64
|
-
handleChange(e);
|
|
65
|
-
}
|
|
66
|
-
}), () => configurationService.getValue(key) ?? defaultValue);
|
|
67
|
-
}
|
|
68
|
-
export { ReentrancyBarrier, concatArrays, leftJoin, observableConfigValue };
|