@codingame/monaco-vscode-api 1.85.0 → 1.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -10
- package/contributions.js +1 -0
- package/missing-services.js +91 -5
- package/monaco-editor-treemending.patch +957 -950
- package/package.json +6 -6
- package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
- package/assets/break.mp3 +0 -0
- package/assets/chatRequestSent.mp3 +0 -0
- package/assets/chatResponsePending.mp3 +0 -0
- package/assets/chatResponseReceived1.mp3 +0 -0
- package/assets/chatResponseReceived2.mp3 +0 -0
- package/assets/chatResponseReceived3.mp3 +0 -0
- package/assets/chatResponseReceived4.mp3 +0 -0
- package/assets/clear.mp3 +0 -0
- package/assets/defaultIcon.png +0 -0
- package/assets/diffLineDeleted.mp3 +0 -0
- package/assets/diffLineInserted.mp3 +0 -0
- package/assets/diffLineModified.mp3 +0 -0
- package/assets/error.mp3 +0 -0
- package/assets/fake.html +0 -10
- package/assets/foldedAreas.mp3 +0 -0
- package/assets/format.mp3 +0 -0
- package/assets/index-no-csp.html +0 -1226
- package/assets/index.html +0 -1227
- package/assets/quickFixes.mp3 +0 -0
- package/assets/save.mp3 +0 -0
- package/assets/service-worker.js +0 -457
- package/assets/taskCompleted.mp3 +0 -0
- package/assets/taskFailed.mp3 +0 -0
- package/assets/terminalBell.mp3 +0 -0
- package/assets/warning.mp3 +0 -0
- package/assets/webWorkerExtensionHostIframe.html +0 -123
- package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { CompareResult, ArrayQueue } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
3
|
+
import { onUnexpectedError, BugIndicatingError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
4
|
+
import { toDisposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
|
+
import { observableFromEvent, autorunOpts } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
6
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
7
|
+
class ReentrancyBarrier {
|
|
8
|
+
constructor() {
|
|
9
|
+
this._isActive = false;
|
|
10
|
+
}
|
|
11
|
+
get isActive() {
|
|
12
|
+
return this._isActive;
|
|
13
|
+
}
|
|
14
|
+
makeExclusive(fn) {
|
|
15
|
+
return ((...args) => {
|
|
16
|
+
if (this._isActive) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
this._isActive = true;
|
|
20
|
+
try {
|
|
21
|
+
return fn(...args);
|
|
22
|
+
}
|
|
23
|
+
finally {
|
|
24
|
+
this._isActive = false;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
runExclusively(fn) {
|
|
29
|
+
if (this._isActive) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
this._isActive = true;
|
|
33
|
+
try {
|
|
34
|
+
fn();
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
this._isActive = false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
runExclusivelyOrThrow(fn) {
|
|
41
|
+
if (this._isActive) {
|
|
42
|
+
throw new BugIndicatingError();
|
|
43
|
+
}
|
|
44
|
+
this._isActive = true;
|
|
45
|
+
try {
|
|
46
|
+
fn();
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
this._isActive = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function setStyle(element, style) {
|
|
54
|
+
Object.entries(style).forEach(([key, value]) => {
|
|
55
|
+
element.style.setProperty(key, toSize(value));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function toSize(value) {
|
|
59
|
+
return typeof value === 'number' ? `${value}px` : value;
|
|
60
|
+
}
|
|
61
|
+
function applyObservableDecorations(editor, decorations) {
|
|
62
|
+
const d = ( new DisposableStore());
|
|
63
|
+
let decorationIds = [];
|
|
64
|
+
d.add(autorunOpts({ debugName: () => `Apply decorations from ${decorations.debugName}` }, reader => {
|
|
65
|
+
const d = decorations.read(reader);
|
|
66
|
+
editor.changeDecorations(a => {
|
|
67
|
+
decorationIds = a.deltaDecorations(decorationIds, d);
|
|
68
|
+
});
|
|
69
|
+
}));
|
|
70
|
+
d.add({
|
|
71
|
+
dispose: () => {
|
|
72
|
+
editor.changeDecorations(a => {
|
|
73
|
+
decorationIds = a.deltaDecorations(decorationIds, []);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return d;
|
|
78
|
+
}
|
|
79
|
+
function* leftJoin(left, right, compare) {
|
|
80
|
+
const rightQueue = ( new ArrayQueue(right));
|
|
81
|
+
for (const leftElement of left) {
|
|
82
|
+
rightQueue.takeWhile(rightElement => CompareResult.isGreaterThan(compare(leftElement, rightElement)));
|
|
83
|
+
const equals = rightQueue.takeWhile(rightElement => CompareResult.isNeitherLessOrGreaterThan(compare(leftElement, rightElement)));
|
|
84
|
+
yield { left: leftElement, rights: equals || [] };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function* join(left, right, compare) {
|
|
88
|
+
const rightQueue = ( new ArrayQueue(right));
|
|
89
|
+
for (const leftElement of left) {
|
|
90
|
+
const skipped = rightQueue.takeWhile(rightElement => CompareResult.isGreaterThan(compare(leftElement, rightElement)));
|
|
91
|
+
if (skipped) {
|
|
92
|
+
yield { rights: skipped };
|
|
93
|
+
}
|
|
94
|
+
const equals = rightQueue.takeWhile(rightElement => CompareResult.isNeitherLessOrGreaterThan(compare(leftElement, rightElement)));
|
|
95
|
+
yield { left: leftElement, rights: equals || [] };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function concatArrays(...arrays) {
|
|
99
|
+
return [].concat(...arrays);
|
|
100
|
+
}
|
|
101
|
+
function thenIfNotDisposed(promise, then) {
|
|
102
|
+
let disposed = false;
|
|
103
|
+
promise.then(() => {
|
|
104
|
+
if (disposed) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
then();
|
|
108
|
+
});
|
|
109
|
+
return toDisposable(() => {
|
|
110
|
+
disposed = true;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function setFields(obj, fields) {
|
|
114
|
+
return Object.assign(obj, fields);
|
|
115
|
+
}
|
|
116
|
+
function deepMerge(source1, source2) {
|
|
117
|
+
const result = {};
|
|
118
|
+
for (const key in source1) {
|
|
119
|
+
result[key] = source1[key];
|
|
120
|
+
}
|
|
121
|
+
for (const key in source2) {
|
|
122
|
+
const source2Value = source2[key];
|
|
123
|
+
if (typeof result[key] === 'object' && source2Value && typeof source2Value === 'object') {
|
|
124
|
+
result[key] = deepMerge(result[key], source2Value);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
result[key] = source2Value;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
let PersistentStore = class PersistentStore {
|
|
133
|
+
constructor(key, storageService) {
|
|
134
|
+
this.key = key;
|
|
135
|
+
this.storageService = storageService;
|
|
136
|
+
this.hasValue = false;
|
|
137
|
+
this.value = undefined;
|
|
138
|
+
}
|
|
139
|
+
get() {
|
|
140
|
+
if (!this.hasValue) {
|
|
141
|
+
const value = this.storageService.get(this.key, 0 );
|
|
142
|
+
if (value !== undefined) {
|
|
143
|
+
try {
|
|
144
|
+
this.value = JSON.parse(value);
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
onUnexpectedError(e);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
this.hasValue = true;
|
|
151
|
+
}
|
|
152
|
+
return this.value;
|
|
153
|
+
}
|
|
154
|
+
set(newValue) {
|
|
155
|
+
this.value = newValue;
|
|
156
|
+
this.storageService.store(this.key, JSON.stringify(this.value), 0 , 0 );
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
PersistentStore = ( __decorate([
|
|
160
|
+
( __param(1, IStorageService))
|
|
161
|
+
], PersistentStore));
|
|
162
|
+
function observableConfigValue(key, defaultValue, configurationService) {
|
|
163
|
+
return observableFromEvent((handleChange) => configurationService.onDidChangeConfiguration(e => {
|
|
164
|
+
if (e.affectsConfiguration(key)) {
|
|
165
|
+
handleChange(e);
|
|
166
|
+
}
|
|
167
|
+
}), () => configurationService.getValue(key) ?? defaultValue);
|
|
168
|
+
}
|
|
169
|
+
export { PersistentStore, ReentrancyBarrier, applyObservableDecorations, concatArrays, deepMerge, join, leftJoin, observableConfigValue, setFields, setStyle, thenIfNotDisposed };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
import { RawContextKey } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
3
|
+
const ctxIsMergeEditor = ( new RawContextKey('isMergeEditor', false, { type: 'boolean', description: ( localizeWithPath(
|
|
4
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
5
|
+
'is',
|
|
6
|
+
'The editor is a merge editor'
|
|
7
|
+
)) }));
|
|
8
|
+
const ctxIsMergeResultEditor = ( new RawContextKey(
|
|
9
|
+
'isMergeResultEditor',
|
|
10
|
+
false,
|
|
11
|
+
{ type: 'boolean', description: ( localizeWithPath(
|
|
12
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
13
|
+
'isr',
|
|
14
|
+
'The editor is a the result editor of a merge editor.'
|
|
15
|
+
)) }
|
|
16
|
+
));
|
|
17
|
+
const ctxMergeEditorLayout = ( new RawContextKey(
|
|
18
|
+
'mergeEditorLayout',
|
|
19
|
+
'mixed',
|
|
20
|
+
{ type: 'string', description: ( localizeWithPath(
|
|
21
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
22
|
+
'editorLayout',
|
|
23
|
+
'The layout mode of a merge editor'
|
|
24
|
+
)) }
|
|
25
|
+
));
|
|
26
|
+
const ctxMergeEditorShowBase = ( new RawContextKey(
|
|
27
|
+
'mergeEditorShowBase',
|
|
28
|
+
false,
|
|
29
|
+
{ type: 'boolean', description: ( localizeWithPath(
|
|
30
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
31
|
+
'showBase',
|
|
32
|
+
'If the merge editor shows the base version'
|
|
33
|
+
)) }
|
|
34
|
+
));
|
|
35
|
+
const ctxMergeEditorShowBaseAtTop = ( new RawContextKey(
|
|
36
|
+
'mergeEditorShowBaseAtTop',
|
|
37
|
+
false,
|
|
38
|
+
{ type: 'boolean', description: ( localizeWithPath(
|
|
39
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
40
|
+
'showBaseAtTop',
|
|
41
|
+
'If base should be shown at the top'
|
|
42
|
+
)) }
|
|
43
|
+
));
|
|
44
|
+
const ctxMergeEditorShowNonConflictingChanges = ( new RawContextKey(
|
|
45
|
+
'mergeEditorShowNonConflictingChanges',
|
|
46
|
+
false,
|
|
47
|
+
{ type: 'boolean', description: ( localizeWithPath(
|
|
48
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
49
|
+
'showNonConflictingChanges',
|
|
50
|
+
'If the merge editor shows non-conflicting changes'
|
|
51
|
+
)) }
|
|
52
|
+
));
|
|
53
|
+
const ctxMergeBaseUri = ( new RawContextKey('mergeEditorBaseUri', '', { type: 'string', description: ( localizeWithPath(
|
|
54
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
55
|
+
'baseUri',
|
|
56
|
+
'The uri of the baser of a merge editor'
|
|
57
|
+
)) }));
|
|
58
|
+
const ctxMergeResultUri = ( new RawContextKey('mergeEditorResultUri', '', { type: 'string', description: ( localizeWithPath(
|
|
59
|
+
'vs/workbench/contrib/mergeEditor/common/mergeEditor',
|
|
60
|
+
'resultUri',
|
|
61
|
+
'The uri of the result of a merge editor'
|
|
62
|
+
)) }));
|
|
63
|
+
const StorageCloseWithConflicts = 'mergeEditorCloseWithConflicts';
|
|
64
|
+
export { StorageCloseWithConflicts, ctxIsMergeEditor, ctxIsMergeResultEditor, ctxMergeBaseUri, ctxMergeEditorLayout, ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop, ctxMergeEditorShowNonConflictingChanges, ctxMergeResultUri };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isTextStreamMime } from '../../../common/notebookCommon.js';
|
|
2
|
+
async function copyCellOutput(mimeType, outputViewModel, clipboardService, logService) {
|
|
3
|
+
const cellOutput = outputViewModel.model;
|
|
4
|
+
const output = mimeType && TEXT_BASED_MIMETYPES.includes(mimeType) ?
|
|
5
|
+
cellOutput.outputs.find(output => output.mime === mimeType) :
|
|
6
|
+
cellOutput.outputs.find(output => TEXT_BASED_MIMETYPES.includes(output.mime));
|
|
7
|
+
mimeType = output?.mime;
|
|
8
|
+
if (!mimeType || !output) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const decoder = ( new TextDecoder());
|
|
12
|
+
let text = decoder.decode(output.data.buffer);
|
|
13
|
+
if (isTextStreamMime(mimeType)) {
|
|
14
|
+
const cellViewModel = outputViewModel.cellViewModel;
|
|
15
|
+
let index = cellViewModel.outputsViewModels.indexOf(outputViewModel) + 1;
|
|
16
|
+
while (index < cellViewModel.model.outputs.length) {
|
|
17
|
+
const nextCellOutput = cellViewModel.model.outputs[index];
|
|
18
|
+
const nextOutput = nextCellOutput.outputs.find(output => isTextStreamMime(output.mime));
|
|
19
|
+
if (!nextOutput) {
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
text = text + decoder.decode(nextOutput.data.buffer);
|
|
23
|
+
index = index + 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (mimeType.endsWith('error')) {
|
|
27
|
+
text = text.replace(/\\u001b\[[0-9;]*m/gi, '').replaceAll('\\n', '\n');
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
await clipboardService.writeText(text);
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
logService.error(`Failed to copy content: ${e}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const TEXT_BASED_MIMETYPES = [
|
|
37
|
+
'text/latex',
|
|
38
|
+
'text/html',
|
|
39
|
+
'application/vnd.code.notebook.error',
|
|
40
|
+
'application/vnd.code.notebook.stdout',
|
|
41
|
+
'application/x.notebook.stdout',
|
|
42
|
+
'application/x.notebook.stream',
|
|
43
|
+
'application/vnd.code.notebook.stderr',
|
|
44
|
+
'application/x.notebook.stderr',
|
|
45
|
+
'text/plain',
|
|
46
|
+
'text/markdown',
|
|
47
|
+
'application/json'
|
|
48
|
+
];
|
|
49
|
+
export { TEXT_BASED_MIMETYPES, copyCellOutput };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
2
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
|
+
class NotebookFindFilters extends Disposable {
|
|
4
|
+
get markupInput() {
|
|
5
|
+
return this._markupInput;
|
|
6
|
+
}
|
|
7
|
+
set markupInput(value) {
|
|
8
|
+
if (this._markupInput !== value) {
|
|
9
|
+
this._markupInput = value;
|
|
10
|
+
this._onDidChange.fire({ markupInput: value });
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
get markupPreview() {
|
|
14
|
+
return this._markupPreview;
|
|
15
|
+
}
|
|
16
|
+
set markupPreview(value) {
|
|
17
|
+
if (this._markupPreview !== value) {
|
|
18
|
+
this._markupPreview = value;
|
|
19
|
+
this._onDidChange.fire({ markupPreview: value });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
get codeInput() {
|
|
23
|
+
return this._codeInput;
|
|
24
|
+
}
|
|
25
|
+
set codeInput(value) {
|
|
26
|
+
if (this._codeInput !== value) {
|
|
27
|
+
this._codeInput = value;
|
|
28
|
+
this._onDidChange.fire({ codeInput: value });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
get codeOutput() {
|
|
32
|
+
return this._codeOutput;
|
|
33
|
+
}
|
|
34
|
+
set codeOutput(value) {
|
|
35
|
+
if (this._codeOutput !== value) {
|
|
36
|
+
this._codeOutput = value;
|
|
37
|
+
this._onDidChange.fire({ codeOutput: value });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
constructor(markupInput, markupPreview, codeInput, codeOutput) {
|
|
41
|
+
super();
|
|
42
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
43
|
+
this.onDidChange = this._onDidChange.event;
|
|
44
|
+
this._markupInput = true;
|
|
45
|
+
this._markupPreview = true;
|
|
46
|
+
this._codeInput = true;
|
|
47
|
+
this._codeOutput = true;
|
|
48
|
+
this._markupInput = markupInput;
|
|
49
|
+
this._markupPreview = markupPreview;
|
|
50
|
+
this._codeInput = codeInput;
|
|
51
|
+
this._codeOutput = codeOutput;
|
|
52
|
+
this._initialMarkupInput = markupInput;
|
|
53
|
+
this._initialMarkupPreview = markupPreview;
|
|
54
|
+
this._initialCodeInput = codeInput;
|
|
55
|
+
this._initialCodeOutput = codeOutput;
|
|
56
|
+
}
|
|
57
|
+
isModified() {
|
|
58
|
+
return (this._markupInput !== this._initialMarkupInput
|
|
59
|
+
|| this._markupPreview !== this._initialMarkupPreview
|
|
60
|
+
|| this._codeInput !== this._initialCodeInput
|
|
61
|
+
|| this._codeOutput !== this._initialCodeOutput);
|
|
62
|
+
}
|
|
63
|
+
update(v) {
|
|
64
|
+
this._markupInput = v.markupInput;
|
|
65
|
+
this._markupPreview = v.markupPreview;
|
|
66
|
+
this._codeInput = v.codeInput;
|
|
67
|
+
this._codeOutput = v.codeOutput;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export { NotebookFindFilters };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
2
|
+
import { FindDecorations } from 'monaco-editor/esm/vs/editor/contrib/find/browser/findDecorations.js';
|
|
3
|
+
import { overviewRulerSelectionHighlightForeground, overviewRulerFindMatchForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
|
+
import { NotebookOverviewRulerLane } from '../../notebookBrowser.js';
|
|
5
|
+
class FindMatchDecorationModel extends Disposable {
|
|
6
|
+
constructor(_notebookEditor, ownerID) {
|
|
7
|
+
super();
|
|
8
|
+
this._notebookEditor = _notebookEditor;
|
|
9
|
+
this.ownerID = ownerID;
|
|
10
|
+
this._allMatchesDecorations = [];
|
|
11
|
+
this._currentMatchCellDecorations = [];
|
|
12
|
+
this._allMatchesCellDecorations = [];
|
|
13
|
+
this._currentMatchDecorations = null;
|
|
14
|
+
}
|
|
15
|
+
get currentMatchDecorations() {
|
|
16
|
+
return this._currentMatchDecorations;
|
|
17
|
+
}
|
|
18
|
+
clearDecorations() {
|
|
19
|
+
this.clearCurrentFindMatchDecoration();
|
|
20
|
+
this.setAllFindMatchesDecorations([]);
|
|
21
|
+
}
|
|
22
|
+
async highlightCurrentFindMatchDecorationInCell(cell, cellRange) {
|
|
23
|
+
this.clearCurrentFindMatchDecoration();
|
|
24
|
+
this._notebookEditor.changeModelDecorations(accessor => {
|
|
25
|
+
const findMatchesOptions = FindDecorations._CURRENT_FIND_MATCH_DECORATION;
|
|
26
|
+
const decorations = [
|
|
27
|
+
{ range: cellRange, options: findMatchesOptions }
|
|
28
|
+
];
|
|
29
|
+
const deltaDecoration = {
|
|
30
|
+
ownerId: cell.handle,
|
|
31
|
+
decorations: decorations
|
|
32
|
+
};
|
|
33
|
+
this._currentMatchDecorations = {
|
|
34
|
+
kind: 'input',
|
|
35
|
+
decorations: accessor.deltaDecorations(this._currentMatchDecorations?.kind === 'input' ? this._currentMatchDecorations.decorations : [], [deltaDecoration])
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
this._currentMatchCellDecorations = this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations, [{
|
|
39
|
+
ownerId: cell.handle,
|
|
40
|
+
handle: cell.handle,
|
|
41
|
+
options: {
|
|
42
|
+
overviewRuler: {
|
|
43
|
+
color: overviewRulerSelectionHighlightForeground,
|
|
44
|
+
modelRanges: [cellRange],
|
|
45
|
+
includeOutput: false,
|
|
46
|
+
position: NotebookOverviewRulerLane.Center
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}]);
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
async highlightCurrentFindMatchDecorationInWebview(cell, index) {
|
|
53
|
+
this.clearCurrentFindMatchDecoration();
|
|
54
|
+
const offset = await this._notebookEditor.findHighlightCurrent(index, this.ownerID);
|
|
55
|
+
this._currentMatchDecorations = { kind: 'output', index: index };
|
|
56
|
+
this._currentMatchCellDecorations = this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations, [{
|
|
57
|
+
ownerId: cell.handle,
|
|
58
|
+
handle: cell.handle,
|
|
59
|
+
options: {
|
|
60
|
+
overviewRuler: {
|
|
61
|
+
color: overviewRulerSelectionHighlightForeground,
|
|
62
|
+
modelRanges: [],
|
|
63
|
+
includeOutput: true,
|
|
64
|
+
position: NotebookOverviewRulerLane.Center
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}]);
|
|
68
|
+
return offset;
|
|
69
|
+
}
|
|
70
|
+
clearCurrentFindMatchDecoration() {
|
|
71
|
+
if (this._currentMatchDecorations?.kind === 'input') {
|
|
72
|
+
this._notebookEditor.changeModelDecorations(accessor => {
|
|
73
|
+
accessor.deltaDecorations(this._currentMatchDecorations?.kind === 'input' ? this._currentMatchDecorations.decorations : [], []);
|
|
74
|
+
this._currentMatchDecorations = null;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else if (this._currentMatchDecorations?.kind === 'output') {
|
|
78
|
+
this._notebookEditor.findUnHighlightCurrent(this._currentMatchDecorations.index, this.ownerID);
|
|
79
|
+
}
|
|
80
|
+
this._currentMatchCellDecorations = this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations, []);
|
|
81
|
+
}
|
|
82
|
+
setAllFindMatchesDecorations(cellFindMatches) {
|
|
83
|
+
this._notebookEditor.changeModelDecorations((accessor) => {
|
|
84
|
+
const findMatchesOptions = FindDecorations._FIND_MATCH_DECORATION;
|
|
85
|
+
const deltaDecorations = ( cellFindMatches.map(cellFindMatch => {
|
|
86
|
+
const newFindMatchesDecorations = ( new Array(cellFindMatch.contentMatches.length));
|
|
87
|
+
for (let i = 0; i < cellFindMatch.contentMatches.length; i++) {
|
|
88
|
+
newFindMatchesDecorations[i] = {
|
|
89
|
+
range: cellFindMatch.contentMatches[i].range,
|
|
90
|
+
options: findMatchesOptions
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return { ownerId: cellFindMatch.cell.handle, decorations: newFindMatchesDecorations };
|
|
94
|
+
}));
|
|
95
|
+
this._allMatchesDecorations = accessor.deltaDecorations(this._allMatchesDecorations, deltaDecorations);
|
|
96
|
+
});
|
|
97
|
+
this._allMatchesCellDecorations = this._notebookEditor.deltaCellDecorations(this._allMatchesCellDecorations, ( cellFindMatches.map(cellFindMatch => {
|
|
98
|
+
return {
|
|
99
|
+
ownerId: cellFindMatch.cell.handle,
|
|
100
|
+
handle: cellFindMatch.cell.handle,
|
|
101
|
+
options: {
|
|
102
|
+
overviewRuler: {
|
|
103
|
+
color: overviewRulerFindMatchForeground,
|
|
104
|
+
modelRanges: ( cellFindMatch.contentMatches.map(match => match.range)),
|
|
105
|
+
includeOutput: cellFindMatch.webviewMatches.length > 0,
|
|
106
|
+
position: NotebookOverviewRulerLane.Center
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
})));
|
|
111
|
+
}
|
|
112
|
+
stopWebviewFind() {
|
|
113
|
+
this._notebookEditor.findStop(this.ownerID);
|
|
114
|
+
}
|
|
115
|
+
dispose() {
|
|
116
|
+
this.clearDecorations();
|
|
117
|
+
super.dispose();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export { FindMatchDecorationModel };
|