@codingame/monaco-vscode-api 1.79.1 → 1.79.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/api.js +10 -8
- package/dist/composite.d.ts +65 -0
- package/dist/configurationRegistry.d.ts +212 -0
- package/dist/contextkey.d.ts +1 -1
- package/dist/default-extensions/json.js +1 -0
- package/dist/default-extensions/theme-defaults.js +2 -2
- package/dist/editorBrowser.d.ts +272 -3
- package/dist/event.d.ts +6 -1
- package/dist/{extension-tools-0c4c1ad7.js → extension-tools-3c2bf0a4.js} +698 -507
- package/dist/extensions.d.ts +3 -2
- package/dist/extensions.d2.ts +6 -17
- package/dist/extensionsRegistry.d.ts +15 -9
- package/dist/files.d.ts +71 -7
- package/dist/jsonSchema.d.ts +1 -1
- package/dist/keybinding.d.ts +2 -2
- package/dist/languageFeatures.d.ts +703 -61
- package/dist/monaco.d.ts +5 -4
- package/dist/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -1
- package/dist/platform.d.ts +11 -0
- package/dist/rollup-extension-directory-plugin.js +1 -1
- package/dist/rollup-vsix-plugin.js +1 -1
- package/dist/service-override/configuration.d.ts +5 -206
- package/dist/service-override/files.d.ts +2 -2
- package/dist/service-override/files.js +1 -1
- package/dist/service-override/markers.d.ts +7 -0
- package/dist/service-override/markers.js +6 -0
- package/dist/service-override/output.d.ts +7 -0
- package/dist/service-override/output.js +22 -0
- package/dist/service-override/preferences.js +7 -1
- package/dist/service-override/quickaccess.js +0 -9
- package/dist/service-override/search.d.ts +7 -0
- package/dist/service-override/search.js +19 -0
- package/dist/service-override/terminal.d.ts +607 -0
- package/dist/service-override/terminal.js +98 -0
- package/dist/service-override/tools/editor.js +1 -1
- package/dist/service-override/views.d.ts +561 -335
- package/dist/service-override/views.js +51 -11
- package/dist/services.d.ts +2627 -108
- package/dist/services.js +3 -0
- package/dist/severity.d.ts +16 -0
- package/dist/uri.d.ts +22 -11
- package/dist/views.d.ts +270 -0
- package/dist/vscode/vs/base/common/processes.js +24 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
- package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
- package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
- package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
- package/dist/vscode/vs/platform/files/common/files.js +3 -1
- package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
- package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
- package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
- package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
- package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
- package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
- package/dist/vscode/vs/platform/request/common/request.js +3 -3
- package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
- package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
- package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
- package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
- package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
- package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
- package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
- package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
- package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
- package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
- package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
- package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
- package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
- package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
- package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
- package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
- package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
- package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
- package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
- package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
- package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
- package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
- package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
- package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
- package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
- package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
- package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
- package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
- package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
- package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
- package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
- package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
- package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
- package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
- package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
- package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
- package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
- package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
- package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
- package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
- package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
- package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
- package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
- package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
- package/dist/vscode/vs/workbench/common/configuration.js +8 -1
- package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
- package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
- package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
- package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/dist/vscode/vs/workbench/common/editor.js +1 -5
- package/dist/vscode/vs/workbench/common/resources.js +111 -34
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
- package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
- package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
- package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
- package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
- package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
- package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
- package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
- package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
- package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
- package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
- package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
- package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
- package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
- package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
- package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
- package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
- package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
- package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
- package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
- package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
- package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
- package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
- package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
- package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
- package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
- package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
- package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
- package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
- package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
- package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
- package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
- package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
- package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
- package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
- package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
- package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
- package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
- package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
- package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
- package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
- package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
- package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
- package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
- package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
- package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
- package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
- package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
- package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
- package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
- package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
- package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
- package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
- package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
- package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
- package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
- package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
- package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
- package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/package.json.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/perl/package.json.js +1 -1
- package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
- package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
- package/dist/vscode-services/env.js +4 -2
- package/dist/vscode-services/extHost.js +32 -48
- package/dist/vscode-services/missing-services.js +407 -29
- package/dist/vscode-services/window.js +59 -65
- package/dist/vscode-services/workspace.js +19 -5
- package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
- package/dist/workers/outputLinkComputer.worker.js +3 -0
- package/dist/workspace.d.ts +1 -1
- package/monaco-editor-treemending.patch +1305 -1184
- package/package.json +65 -19
- package/dist/activity.d.ts +0 -2802
- package/dist/collections.d.ts +0 -7
- package/dist/colorRegistry.d.ts +0 -710
- package/dist/vscode/vs/platform/product/common/product.js +0 -48
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
- package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
- package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
4
|
+
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
5
|
+
import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
6
|
+
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
7
|
+
import { assertIsDefined, withNullAsUndefined } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
8
|
+
import './media/searchEditor.css.js';
|
|
9
|
+
import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
|
|
10
|
+
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
11
|
+
import { Selection } from 'monaco-editor/esm/vs/editor/common/core/selection.js';
|
|
12
|
+
import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
|
|
13
|
+
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
14
|
+
import { ReferencesController } from 'monaco-editor/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js';
|
|
15
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
16
|
+
import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
17
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
18
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
19
|
+
import { IContextViewService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
20
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
21
|
+
import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
|
|
22
|
+
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
23
|
+
import { LongRunningOperation, IEditorProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
|
|
24
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
25
|
+
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
26
|
+
import { registerColor, inputBorder } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
27
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
28
|
+
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
29
|
+
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
30
|
+
import { AbstractTextCodeEditor } from '../../../browser/parts/editor/textCodeEditor.js';
|
|
31
|
+
import { IncludePatternInputWidget, ExcludePatternInputWidget } from '../../search/browser/patternInputWidget.js';
|
|
32
|
+
import { SearchWidget } from '../../search/browser/searchWidget.js';
|
|
33
|
+
import { InputBoxFocusedKey } from '../../search/common/constants.js';
|
|
34
|
+
import { QueryBuilder } from '../../../services/search/common/queryBuilder.js';
|
|
35
|
+
import { getOutOfWorkspaceEditorResources } from '../../search/common/search.js';
|
|
36
|
+
import { SearchModel } from '../../search/browser/searchModel.js';
|
|
37
|
+
import { SearchEditorID, InSearchEditor, SearchEditorInputTypeId } from './constants.js';
|
|
38
|
+
import { serializeSearchResultForEditor } from './searchEditorSerialization.js';
|
|
39
|
+
import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
|
|
40
|
+
import { IEditorService } from '../../../services/editor/common/editorService.js';
|
|
41
|
+
import { searchDetailsIcon } from '../../search/browser/searchIcons.js';
|
|
42
|
+
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
43
|
+
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
44
|
+
import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
45
|
+
import { renderSearchMessage } from '../../search/browser/searchMessage.js';
|
|
46
|
+
import { EditorExtensionsRegistry } from 'monaco-editor/esm/vs/editor/browser/editorExtensions.js';
|
|
47
|
+
import { UnusualLineTerminatorsDetector } from 'monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js';
|
|
48
|
+
import { getInputBoxStyle, defaultToggleStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
|
|
49
|
+
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
50
|
+
const RESULT_LINE_REGEX = /^(\s+)(\d+)(: | )(\s*)(.*)$/;
|
|
51
|
+
const FILE_LINE_REGEX = /^(\S.*):$/;
|
|
52
|
+
let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
|
|
53
|
+
get searchResultEditor() { return this.editorControl; }
|
|
54
|
+
constructor(telemetryService, themeService, storageService, modelService, contextService, labelService, instantiationService, contextViewService, commandService, openerService, notificationService, progressService, textResourceService, editorGroupService, editorService, configurationService, fileService, logService) {
|
|
55
|
+
super(SearchEditor.ID, telemetryService, instantiationService, storageService, textResourceService, themeService, editorService, editorGroupService, fileService);
|
|
56
|
+
this.modelService = modelService;
|
|
57
|
+
this.contextService = contextService;
|
|
58
|
+
this.labelService = labelService;
|
|
59
|
+
this.contextViewService = contextViewService;
|
|
60
|
+
this.commandService = commandService;
|
|
61
|
+
this.openerService = openerService;
|
|
62
|
+
this.notificationService = notificationService;
|
|
63
|
+
this.configurationService = configurationService;
|
|
64
|
+
this.logService = logService;
|
|
65
|
+
this.runSearchDelayer = ( new Delayer(0));
|
|
66
|
+
this.pauseSearching = false;
|
|
67
|
+
this.showingIncludesExcludes = false;
|
|
68
|
+
this.ongoingOperations = 0;
|
|
69
|
+
this.updatingModelForSearch = false;
|
|
70
|
+
this.container = dom.$('.search-editor');
|
|
71
|
+
this.searchOperation = this._register(( new LongRunningOperation(progressService)));
|
|
72
|
+
this._register(this.messageDisposables = ( new DisposableStore()));
|
|
73
|
+
this.searchHistoryDelayer = ( new Delayer(2000));
|
|
74
|
+
this.searchModel = this._register(this.instantiationService.createInstance(SearchModel));
|
|
75
|
+
}
|
|
76
|
+
createEditor(parent) {
|
|
77
|
+
dom.append(parent, this.container);
|
|
78
|
+
this.queryEditorContainer = dom.append(this.container, dom.$('.query-container'));
|
|
79
|
+
const searchResultContainer = dom.append(this.container, dom.$('.search-results'));
|
|
80
|
+
super.createEditor(searchResultContainer);
|
|
81
|
+
this.registerEditorListeners();
|
|
82
|
+
const scopedContextKeyService = assertIsDefined(this.scopedContextKeyService);
|
|
83
|
+
InSearchEditor.bindTo(scopedContextKeyService).set(true);
|
|
84
|
+
this.createQueryEditor(this.queryEditorContainer, this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, scopedContextKeyService]))), InputBoxFocusedKey.bindTo(scopedContextKeyService));
|
|
85
|
+
}
|
|
86
|
+
createQueryEditor(container, scopedInstantiationService, inputBoxFocusedContextKey) {
|
|
87
|
+
const searchEditorInputboxStyles = getInputBoxStyle({ inputBorder: searchEditorTextInputBorder });
|
|
88
|
+
this.queryEditorWidget = this._register(scopedInstantiationService.createInstance(SearchWidget, container, { _hideReplaceToggle: true, showContextToggle: true, inputBoxStyles: searchEditorInputboxStyles, toggleStyles: defaultToggleStyles }));
|
|
89
|
+
this._register(this.queryEditorWidget.onReplaceToggled(() => this.reLayout()));
|
|
90
|
+
this._register(this.queryEditorWidget.onDidHeightChange(() => this.reLayout()));
|
|
91
|
+
this._register(this.queryEditorWidget.onSearchSubmit(({ delay }) => this.triggerSearch({ delay })));
|
|
92
|
+
if (this.queryEditorWidget.searchInput) {
|
|
93
|
+
this._register(this.queryEditorWidget.searchInput.onDidOptionChange(() => this.triggerSearch({ resetCursor: false })));
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.logService.warn('SearchEditor: SearchWidget.searchInput is undefined, cannot register onDidOptionChange listener');
|
|
97
|
+
}
|
|
98
|
+
this._register(this.queryEditorWidget.onDidToggleContext(() => this.triggerSearch({ resetCursor: false })));
|
|
99
|
+
this.includesExcludesContainer = dom.append(container, dom.$('.includes-excludes'));
|
|
100
|
+
this.toggleQueryDetailsButton = dom.append(this.includesExcludesContainer, dom.$('.expand' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button', title: ( localize('moreSearch', "Toggle Search Details")) }));
|
|
101
|
+
this._register(dom.addDisposableListener(this.toggleQueryDetailsButton, dom.EventType.CLICK, e => {
|
|
102
|
+
dom.EventHelper.stop(e);
|
|
103
|
+
this.toggleIncludesExcludes();
|
|
104
|
+
}));
|
|
105
|
+
this._register(dom.addDisposableListener(this.toggleQueryDetailsButton, dom.EventType.KEY_UP, (e) => {
|
|
106
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
107
|
+
if (event.equals(3 ) || event.equals(10 )) {
|
|
108
|
+
dom.EventHelper.stop(e);
|
|
109
|
+
this.toggleIncludesExcludes();
|
|
110
|
+
}
|
|
111
|
+
}));
|
|
112
|
+
this._register(dom.addDisposableListener(this.toggleQueryDetailsButton, dom.EventType.KEY_DOWN, (e) => {
|
|
113
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
114
|
+
if (event.equals(1024 | 2 )) {
|
|
115
|
+
if (this.queryEditorWidget.isReplaceActive()) {
|
|
116
|
+
this.queryEditorWidget.focusReplaceAllAction();
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
this.queryEditorWidget.isReplaceShown() ? this.queryEditorWidget.replaceInput?.focusOnPreserve() : this.queryEditorWidget.focusRegexAction();
|
|
120
|
+
}
|
|
121
|
+
dom.EventHelper.stop(e);
|
|
122
|
+
}
|
|
123
|
+
}));
|
|
124
|
+
const folderIncludesList = dom.append(this.includesExcludesContainer, dom.$('.file-types.includes'));
|
|
125
|
+
const filesToIncludeTitle = ( localize('searchScope.includes', "files to include"));
|
|
126
|
+
dom.append(folderIncludesList, dom.$('h4', undefined, filesToIncludeTitle));
|
|
127
|
+
this.inputPatternIncludes = this._register(scopedInstantiationService.createInstance(IncludePatternInputWidget, folderIncludesList, this.contextViewService, {
|
|
128
|
+
ariaLabel: ( localize('label.includes', 'Search Include Patterns')),
|
|
129
|
+
inputBoxStyles: searchEditorInputboxStyles
|
|
130
|
+
}));
|
|
131
|
+
this.inputPatternIncludes.onSubmit(triggeredOnType => this.triggerSearch({ resetCursor: false, delay: triggeredOnType ? this.searchConfig.searchOnTypeDebouncePeriod : 0 }));
|
|
132
|
+
this._register(this.inputPatternIncludes.onChangeSearchInEditorsBox(() => this.triggerSearch()));
|
|
133
|
+
const excludesList = dom.append(this.includesExcludesContainer, dom.$('.file-types.excludes'));
|
|
134
|
+
const excludesTitle = ( localize('searchScope.excludes', "files to exclude"));
|
|
135
|
+
dom.append(excludesList, dom.$('h4', undefined, excludesTitle));
|
|
136
|
+
this.inputPatternExcludes = this._register(scopedInstantiationService.createInstance(ExcludePatternInputWidget, excludesList, this.contextViewService, {
|
|
137
|
+
ariaLabel: ( localize('label.excludes', 'Search Exclude Patterns')),
|
|
138
|
+
inputBoxStyles: searchEditorInputboxStyles
|
|
139
|
+
}));
|
|
140
|
+
this.inputPatternExcludes.onSubmit(triggeredOnType => this.triggerSearch({ resetCursor: false, delay: triggeredOnType ? this.searchConfig.searchOnTypeDebouncePeriod : 0 }));
|
|
141
|
+
this._register(this.inputPatternExcludes.onChangeIgnoreBox(() => this.triggerSearch()));
|
|
142
|
+
this.messageBox = dom.append(container, dom.$('.messages.text-search-provider-messages'));
|
|
143
|
+
[this.queryEditorWidget.searchInputFocusTracker, this.queryEditorWidget.replaceInputFocusTracker, this.inputPatternExcludes.inputFocusTracker, this.inputPatternIncludes.inputFocusTracker]
|
|
144
|
+
.forEach(tracker => {
|
|
145
|
+
if (!tracker) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this._register(tracker.onDidFocus(() => setTimeout(() => inputBoxFocusedContextKey.set(true), 0)));
|
|
149
|
+
this._register(tracker.onDidBlur(() => inputBoxFocusedContextKey.set(false)));
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
toggleRunAgainMessage(show) {
|
|
153
|
+
dom.clearNode(this.messageBox);
|
|
154
|
+
this.messageDisposables.clear();
|
|
155
|
+
if (show) {
|
|
156
|
+
const runAgainLink = dom.append(this.messageBox, dom.$('a.pointer.prominent.message', {}, ( localize('runSearch', "Run Search"))));
|
|
157
|
+
this.messageDisposables.add(dom.addDisposableListener(runAgainLink, dom.EventType.CLICK, async () => {
|
|
158
|
+
await this.triggerSearch();
|
|
159
|
+
this.searchResultEditor.focus();
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
_getContributions() {
|
|
164
|
+
const skipContributions = [UnusualLineTerminatorsDetector.ID];
|
|
165
|
+
return EditorExtensionsRegistry.getEditorContributions().filter(c => skipContributions.indexOf(c.id) === -1);
|
|
166
|
+
}
|
|
167
|
+
getCodeEditorWidgetOptions() {
|
|
168
|
+
return { contributions: this._getContributions() };
|
|
169
|
+
}
|
|
170
|
+
registerEditorListeners() {
|
|
171
|
+
this.searchResultEditor.onMouseUp(e => {
|
|
172
|
+
if (e.event.detail === 2) {
|
|
173
|
+
const behaviour = this.searchConfig.searchEditor.doubleClickBehaviour;
|
|
174
|
+
const position = e.target.position;
|
|
175
|
+
if (position && behaviour !== 'selectWord') {
|
|
176
|
+
const line = this.searchResultEditor.getModel()?.getLineContent(position.lineNumber) ?? '';
|
|
177
|
+
if (line.match(RESULT_LINE_REGEX)) {
|
|
178
|
+
this.searchResultEditor.setSelection(Range.fromPositions(position));
|
|
179
|
+
this.commandService.executeCommand(behaviour === 'goToLocation' ? 'editor.action.goToDeclaration' : 'editor.action.openDeclarationToTheSide');
|
|
180
|
+
}
|
|
181
|
+
else if (line.match(FILE_LINE_REGEX)) {
|
|
182
|
+
this.searchResultEditor.setSelection(Range.fromPositions(position));
|
|
183
|
+
this.commandService.executeCommand('editor.action.peekDefinition');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
this._register(this.searchResultEditor.onDidChangeModelContent(() => {
|
|
189
|
+
if (!this.updatingModelForSearch) {
|
|
190
|
+
this.getInput()?.setDirty(true);
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
getControl() {
|
|
195
|
+
return this.searchResultEditor;
|
|
196
|
+
}
|
|
197
|
+
focus() {
|
|
198
|
+
const viewState = this.loadEditorViewState(this.getInput());
|
|
199
|
+
if (viewState && viewState.focused === 'editor') {
|
|
200
|
+
this.searchResultEditor.focus();
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
this.queryEditorWidget.focus();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
focusSearchInput() {
|
|
207
|
+
this.queryEditorWidget.searchInput?.focus();
|
|
208
|
+
}
|
|
209
|
+
focusFilesToIncludeInput() {
|
|
210
|
+
if (!this.showingIncludesExcludes) {
|
|
211
|
+
this.toggleIncludesExcludes(true);
|
|
212
|
+
}
|
|
213
|
+
this.inputPatternIncludes.focus();
|
|
214
|
+
}
|
|
215
|
+
focusFilesToExcludeInput() {
|
|
216
|
+
if (!this.showingIncludesExcludes) {
|
|
217
|
+
this.toggleIncludesExcludes(true);
|
|
218
|
+
}
|
|
219
|
+
this.inputPatternExcludes.focus();
|
|
220
|
+
}
|
|
221
|
+
focusNextInput() {
|
|
222
|
+
if (this.queryEditorWidget.searchInputHasFocus()) {
|
|
223
|
+
if (this.showingIncludesExcludes) {
|
|
224
|
+
this.inputPatternIncludes.focus();
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
this.searchResultEditor.focus();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
else if (this.inputPatternIncludes.inputHasFocus()) {
|
|
231
|
+
this.inputPatternExcludes.focus();
|
|
232
|
+
}
|
|
233
|
+
else if (this.inputPatternExcludes.inputHasFocus()) {
|
|
234
|
+
this.searchResultEditor.focus();
|
|
235
|
+
}
|
|
236
|
+
else if (this.searchResultEditor.hasWidgetFocus()) ;
|
|
237
|
+
}
|
|
238
|
+
focusPrevInput() {
|
|
239
|
+
if (this.queryEditorWidget.searchInputHasFocus()) {
|
|
240
|
+
this.searchResultEditor.focus();
|
|
241
|
+
}
|
|
242
|
+
else if (this.inputPatternIncludes.inputHasFocus()) {
|
|
243
|
+
this.queryEditorWidget.searchInput?.focus();
|
|
244
|
+
}
|
|
245
|
+
else if (this.inputPatternExcludes.inputHasFocus()) {
|
|
246
|
+
this.inputPatternIncludes.focus();
|
|
247
|
+
}
|
|
248
|
+
else if (this.searchResultEditor.hasWidgetFocus()) ;
|
|
249
|
+
}
|
|
250
|
+
setQuery(query) {
|
|
251
|
+
this.queryEditorWidget.searchInput?.setValue(query);
|
|
252
|
+
}
|
|
253
|
+
selectQuery() {
|
|
254
|
+
this.queryEditorWidget.searchInput?.select();
|
|
255
|
+
}
|
|
256
|
+
toggleWholeWords() {
|
|
257
|
+
this.queryEditorWidget.searchInput?.setWholeWords(!this.queryEditorWidget.searchInput.getWholeWords());
|
|
258
|
+
this.triggerSearch({ resetCursor: false });
|
|
259
|
+
}
|
|
260
|
+
toggleRegex() {
|
|
261
|
+
this.queryEditorWidget.searchInput?.setRegex(!this.queryEditorWidget.searchInput.getRegex());
|
|
262
|
+
this.triggerSearch({ resetCursor: false });
|
|
263
|
+
}
|
|
264
|
+
toggleCaseSensitive() {
|
|
265
|
+
this.queryEditorWidget.searchInput?.setCaseSensitive(!this.queryEditorWidget.searchInput.getCaseSensitive());
|
|
266
|
+
this.triggerSearch({ resetCursor: false });
|
|
267
|
+
}
|
|
268
|
+
toggleContextLines() {
|
|
269
|
+
this.queryEditorWidget.toggleContextLines();
|
|
270
|
+
}
|
|
271
|
+
modifyContextLines(increase) {
|
|
272
|
+
this.queryEditorWidget.modifyContextLines(increase);
|
|
273
|
+
}
|
|
274
|
+
toggleQueryDetails() {
|
|
275
|
+
this.toggleIncludesExcludes();
|
|
276
|
+
}
|
|
277
|
+
deleteResultBlock() {
|
|
278
|
+
const linesToDelete = ( new Set());
|
|
279
|
+
const selections = this.searchResultEditor.getSelections();
|
|
280
|
+
const model = this.searchResultEditor.getModel();
|
|
281
|
+
if (!(selections && model)) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const maxLine = model.getLineCount();
|
|
285
|
+
const minLine = 1;
|
|
286
|
+
const deleteUp = (start) => {
|
|
287
|
+
for (let cursor = start; cursor >= minLine; cursor--) {
|
|
288
|
+
const line = model.getLineContent(cursor);
|
|
289
|
+
linesToDelete.add(cursor);
|
|
290
|
+
if (line[0] !== undefined && line[0] !== ' ') {
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
const deleteDown = (start) => {
|
|
296
|
+
linesToDelete.add(start);
|
|
297
|
+
for (let cursor = start + 1; cursor <= maxLine; cursor++) {
|
|
298
|
+
const line = model.getLineContent(cursor);
|
|
299
|
+
if (line[0] !== undefined && line[0] !== ' ') {
|
|
300
|
+
return cursor;
|
|
301
|
+
}
|
|
302
|
+
linesToDelete.add(cursor);
|
|
303
|
+
}
|
|
304
|
+
return;
|
|
305
|
+
};
|
|
306
|
+
const endingCursorLines = [];
|
|
307
|
+
for (const selection of selections) {
|
|
308
|
+
const lineNumber = selection.startLineNumber;
|
|
309
|
+
endingCursorLines.push(deleteDown(lineNumber));
|
|
310
|
+
deleteUp(lineNumber);
|
|
311
|
+
for (let inner = selection.startLineNumber; inner <= selection.endLineNumber; inner++) {
|
|
312
|
+
linesToDelete.add(inner);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (endingCursorLines.length === 0) {
|
|
316
|
+
endingCursorLines.push(1);
|
|
317
|
+
}
|
|
318
|
+
const isDefined = (x) => x !== undefined;
|
|
319
|
+
model.pushEditOperations(this.searchResultEditor.getSelections(), ( [...linesToDelete].map(line => ({ range: ( new Range(line, 1, line + 1, 1)), text: '' }))), () => ( endingCursorLines.filter(isDefined).map(line => ( new Selection(line, 1, line, 1)))));
|
|
320
|
+
}
|
|
321
|
+
cleanState() {
|
|
322
|
+
this.getInput()?.setDirty(false);
|
|
323
|
+
}
|
|
324
|
+
get searchConfig() {
|
|
325
|
+
return this.configurationService.getValue('search');
|
|
326
|
+
}
|
|
327
|
+
iterateThroughMatches(reverse) {
|
|
328
|
+
const model = this.searchResultEditor.getModel();
|
|
329
|
+
if (!model) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
const lastLine = model.getLineCount() ?? 1;
|
|
333
|
+
const lastColumn = model.getLineLength(lastLine);
|
|
334
|
+
const fallbackStart = reverse ? ( new Position(lastLine, lastColumn)) : ( new Position(1, 1));
|
|
335
|
+
const currentPosition = this.searchResultEditor.getSelection()?.getStartPosition() ?? fallbackStart;
|
|
336
|
+
const matchRanges = this.getInput()?.getMatchRanges();
|
|
337
|
+
if (!matchRanges) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
const matchRange = (reverse ? findPrevRange : findNextRange)(matchRanges, currentPosition);
|
|
341
|
+
this.searchResultEditor.setSelection(matchRange);
|
|
342
|
+
this.searchResultEditor.revealLineInCenterIfOutsideViewport(matchRange.startLineNumber);
|
|
343
|
+
this.searchResultEditor.focus();
|
|
344
|
+
const matchLineText = model.getLineContent(matchRange.startLineNumber);
|
|
345
|
+
const matchText = model.getValueInRange(matchRange);
|
|
346
|
+
let file = '';
|
|
347
|
+
for (let line = matchRange.startLineNumber; line >= 1; line--) {
|
|
348
|
+
const lineText = model.getValueInRange(( new Range(line, 1, line, 2)));
|
|
349
|
+
if (lineText !== ' ') {
|
|
350
|
+
file = model.getLineContent(line);
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
alert(( localize(
|
|
355
|
+
'searchResultItem',
|
|
356
|
+
"Matched {0} at {1} in file {2}",
|
|
357
|
+
matchText,
|
|
358
|
+
matchLineText,
|
|
359
|
+
file.slice(0, file.length - 1)
|
|
360
|
+
)));
|
|
361
|
+
}
|
|
362
|
+
focusNextResult() {
|
|
363
|
+
this.iterateThroughMatches(false);
|
|
364
|
+
}
|
|
365
|
+
focusPreviousResult() {
|
|
366
|
+
this.iterateThroughMatches(true);
|
|
367
|
+
}
|
|
368
|
+
focusAllResults() {
|
|
369
|
+
this.searchResultEditor
|
|
370
|
+
.setSelections(( (this.getInput()?.getMatchRanges() ?? []).map(range => ( new Selection(
|
|
371
|
+
range.startLineNumber,
|
|
372
|
+
range.startColumn,
|
|
373
|
+
range.endLineNumber,
|
|
374
|
+
range.endColumn
|
|
375
|
+
)))));
|
|
376
|
+
this.searchResultEditor.focus();
|
|
377
|
+
}
|
|
378
|
+
async triggerSearch(_options) {
|
|
379
|
+
const options = { resetCursor: true, delay: 0, ..._options };
|
|
380
|
+
if (!this.pauseSearching) {
|
|
381
|
+
await this.runSearchDelayer.trigger(async () => {
|
|
382
|
+
this.toggleRunAgainMessage(false);
|
|
383
|
+
await this.doRunSearch();
|
|
384
|
+
if (options.resetCursor) {
|
|
385
|
+
this.searchResultEditor.setPosition(( new Position(1, 1)));
|
|
386
|
+
this.searchResultEditor.setScrollPosition({ scrollTop: 0, scrollLeft: 0 });
|
|
387
|
+
}
|
|
388
|
+
if (options.focusResults) {
|
|
389
|
+
this.searchResultEditor.focus();
|
|
390
|
+
}
|
|
391
|
+
}, options.delay);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
readConfigFromWidget() {
|
|
395
|
+
return {
|
|
396
|
+
isCaseSensitive: this.queryEditorWidget.searchInput?.getCaseSensitive() ?? false,
|
|
397
|
+
contextLines: this.queryEditorWidget.getContextLines(),
|
|
398
|
+
filesToExclude: this.inputPatternExcludes.getValue(),
|
|
399
|
+
filesToInclude: this.inputPatternIncludes.getValue(),
|
|
400
|
+
query: this.queryEditorWidget.searchInput?.getValue() ?? '',
|
|
401
|
+
isRegexp: this.queryEditorWidget.searchInput?.getRegex() ?? false,
|
|
402
|
+
matchWholeWord: this.queryEditorWidget.searchInput?.getWholeWords() ?? false,
|
|
403
|
+
useExcludeSettingsAndIgnoreFiles: this.inputPatternExcludes.useExcludesAndIgnoreFiles(),
|
|
404
|
+
onlyOpenEditors: this.inputPatternIncludes.onlySearchInOpenEditors(),
|
|
405
|
+
showIncludesExcludes: this.showingIncludesExcludes,
|
|
406
|
+
notebookSearchConfig: {
|
|
407
|
+
includeMarkupInput: this.queryEditorWidget.getNotebookFilters().markupInput,
|
|
408
|
+
includeMarkupPreview: this.queryEditorWidget.getNotebookFilters().markupPreview,
|
|
409
|
+
includeCodeInput: this.queryEditorWidget.getNotebookFilters().codeInput,
|
|
410
|
+
includeOutput: this.queryEditorWidget.getNotebookFilters().codeOutput,
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
async doRunSearch() {
|
|
415
|
+
this.searchModel.cancelSearch(true);
|
|
416
|
+
const startInput = this.getInput();
|
|
417
|
+
if (!startInput) {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
this.searchHistoryDelayer.trigger(() => {
|
|
421
|
+
this.queryEditorWidget.searchInput?.onSearchSubmit();
|
|
422
|
+
this.inputPatternExcludes.onSearchSubmit();
|
|
423
|
+
this.inputPatternIncludes.onSearchSubmit();
|
|
424
|
+
});
|
|
425
|
+
const config = this.readConfigFromWidget();
|
|
426
|
+
if (!config.query) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
const content = {
|
|
430
|
+
pattern: config.query,
|
|
431
|
+
isRegExp: config.isRegexp,
|
|
432
|
+
isCaseSensitive: config.isCaseSensitive,
|
|
433
|
+
isWordMatch: config.matchWholeWord,
|
|
434
|
+
};
|
|
435
|
+
const options = {
|
|
436
|
+
_reason: 'searchEditor',
|
|
437
|
+
extraFileResources: this.instantiationService.invokeFunction(getOutOfWorkspaceEditorResources),
|
|
438
|
+
maxResults: withNullAsUndefined(this.searchConfig.maxResults),
|
|
439
|
+
disregardIgnoreFiles: !config.useExcludeSettingsAndIgnoreFiles || undefined,
|
|
440
|
+
disregardExcludeSettings: !config.useExcludeSettingsAndIgnoreFiles || undefined,
|
|
441
|
+
excludePattern: config.filesToExclude,
|
|
442
|
+
includePattern: config.filesToInclude,
|
|
443
|
+
onlyOpenEditors: config.onlyOpenEditors,
|
|
444
|
+
previewOptions: {
|
|
445
|
+
matchLines: 1,
|
|
446
|
+
charsPerLine: 1000
|
|
447
|
+
},
|
|
448
|
+
afterContext: config.contextLines,
|
|
449
|
+
beforeContext: config.contextLines,
|
|
450
|
+
isSmartCase: this.searchConfig.smartCase,
|
|
451
|
+
expandPatterns: true,
|
|
452
|
+
notebookSearchConfig: {
|
|
453
|
+
includeMarkupInput: config.notebookSearchConfig.includeMarkupInput,
|
|
454
|
+
includeMarkupPreview: config.notebookSearchConfig.includeMarkupPreview,
|
|
455
|
+
includeCodeInput: config.notebookSearchConfig.includeCodeInput,
|
|
456
|
+
includeOutput: config.notebookSearchConfig.includeOutput,
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
const folderResources = this.contextService.getWorkspace().folders;
|
|
460
|
+
let query;
|
|
461
|
+
try {
|
|
462
|
+
const queryBuilder = this.instantiationService.createInstance(QueryBuilder);
|
|
463
|
+
query = queryBuilder.text(content, ( folderResources.map(folder => folder.uri)), options);
|
|
464
|
+
}
|
|
465
|
+
catch (err) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
this.searchOperation.start(500);
|
|
469
|
+
this.ongoingOperations++;
|
|
470
|
+
const { configurationModel } = await startInput.resolveModels();
|
|
471
|
+
configurationModel.updateConfig(config);
|
|
472
|
+
startInput.ongoingSearchOperation = this.searchModel.search(query).finally(() => {
|
|
473
|
+
this.ongoingOperations--;
|
|
474
|
+
if (this.ongoingOperations === 0) {
|
|
475
|
+
this.searchOperation.stop();
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
const searchOperation = await startInput.ongoingSearchOperation;
|
|
479
|
+
await this.onSearchComplete(searchOperation, config, startInput);
|
|
480
|
+
}
|
|
481
|
+
async onSearchComplete(searchOperation, startConfig, startInput) {
|
|
482
|
+
const input = this.getInput();
|
|
483
|
+
if (!input ||
|
|
484
|
+
input !== startInput ||
|
|
485
|
+
JSON.stringify(startConfig) !== JSON.stringify(this.readConfigFromWidget())) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
input.ongoingSearchOperation = undefined;
|
|
489
|
+
const sortOrder = this.searchConfig.sortOrder;
|
|
490
|
+
if (sortOrder === "modified" ) {
|
|
491
|
+
await this.retrieveFileStats(this.searchModel.searchResult);
|
|
492
|
+
}
|
|
493
|
+
const controller = ReferencesController.get(this.searchResultEditor);
|
|
494
|
+
controller?.closeWidget(false);
|
|
495
|
+
const labelFormatter = (uri) => this.labelService.getUriLabel(uri, { relative: true });
|
|
496
|
+
const results = serializeSearchResultForEditor(this.searchModel.searchResult, startConfig.filesToInclude, startConfig.filesToExclude, startConfig.contextLines, labelFormatter, sortOrder, searchOperation?.limitHit);
|
|
497
|
+
const { resultsModel } = await input.resolveModels();
|
|
498
|
+
this.updatingModelForSearch = true;
|
|
499
|
+
this.modelService.updateModel(resultsModel, results.text);
|
|
500
|
+
this.updatingModelForSearch = false;
|
|
501
|
+
if (searchOperation && searchOperation.messages) {
|
|
502
|
+
for (const message of searchOperation.messages) {
|
|
503
|
+
this.addMessage(message);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
this.reLayout();
|
|
507
|
+
input.setDirty(!input.hasCapability(4 ));
|
|
508
|
+
input.setMatchRanges(results.matchRanges);
|
|
509
|
+
}
|
|
510
|
+
addMessage(message) {
|
|
511
|
+
let messageBox;
|
|
512
|
+
if (this.messageBox.firstChild) {
|
|
513
|
+
messageBox = this.messageBox.firstChild;
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
messageBox = dom.append(this.messageBox, dom.$('.message'));
|
|
517
|
+
}
|
|
518
|
+
dom.append(messageBox, renderSearchMessage(message, this.instantiationService, this.notificationService, this.openerService, this.commandService, this.messageDisposables, () => this.triggerSearch()));
|
|
519
|
+
}
|
|
520
|
+
async retrieveFileStats(searchResult) {
|
|
521
|
+
const files = ( searchResult.matches().filter(f => !f.fileStat).map(f => f.resolveFileStat(this.fileService)));
|
|
522
|
+
await Promise.all(files);
|
|
523
|
+
}
|
|
524
|
+
layout(dimension) {
|
|
525
|
+
this.dimension = dimension;
|
|
526
|
+
this.reLayout();
|
|
527
|
+
}
|
|
528
|
+
getSelected() {
|
|
529
|
+
const selection = this.searchResultEditor.getSelection();
|
|
530
|
+
if (selection) {
|
|
531
|
+
return this.searchResultEditor.getModel()?.getValueInRange(selection) ?? '';
|
|
532
|
+
}
|
|
533
|
+
return '';
|
|
534
|
+
}
|
|
535
|
+
reLayout() {
|
|
536
|
+
if (this.dimension) {
|
|
537
|
+
this.queryEditorWidget.setWidth(this.dimension.width - 28 );
|
|
538
|
+
this.searchResultEditor.layout({ height: this.dimension.height - dom.getTotalHeight(this.queryEditorContainer), width: this.dimension.width });
|
|
539
|
+
this.inputPatternExcludes.setWidth(this.dimension.width - 28 );
|
|
540
|
+
this.inputPatternIncludes.setWidth(this.dimension.width - 28 );
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
getInput() {
|
|
544
|
+
return this._input;
|
|
545
|
+
}
|
|
546
|
+
setSearchConfig(config) {
|
|
547
|
+
this.priorConfig = config;
|
|
548
|
+
if (config.query !== undefined) {
|
|
549
|
+
this.queryEditorWidget.setValue(config.query);
|
|
550
|
+
}
|
|
551
|
+
if (config.isCaseSensitive !== undefined) {
|
|
552
|
+
this.queryEditorWidget.searchInput?.setCaseSensitive(config.isCaseSensitive);
|
|
553
|
+
}
|
|
554
|
+
if (config.isRegexp !== undefined) {
|
|
555
|
+
this.queryEditorWidget.searchInput?.setRegex(config.isRegexp);
|
|
556
|
+
}
|
|
557
|
+
if (config.matchWholeWord !== undefined) {
|
|
558
|
+
this.queryEditorWidget.searchInput?.setWholeWords(config.matchWholeWord);
|
|
559
|
+
}
|
|
560
|
+
if (config.contextLines !== undefined) {
|
|
561
|
+
this.queryEditorWidget.setContextLines(config.contextLines);
|
|
562
|
+
}
|
|
563
|
+
if (config.filesToExclude !== undefined) {
|
|
564
|
+
this.inputPatternExcludes.setValue(config.filesToExclude);
|
|
565
|
+
}
|
|
566
|
+
if (config.filesToInclude !== undefined) {
|
|
567
|
+
this.inputPatternIncludes.setValue(config.filesToInclude);
|
|
568
|
+
}
|
|
569
|
+
if (config.onlyOpenEditors !== undefined) {
|
|
570
|
+
this.inputPatternIncludes.setOnlySearchInOpenEditors(config.onlyOpenEditors);
|
|
571
|
+
}
|
|
572
|
+
if (config.useExcludeSettingsAndIgnoreFiles !== undefined) {
|
|
573
|
+
this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(config.useExcludeSettingsAndIgnoreFiles);
|
|
574
|
+
}
|
|
575
|
+
if (config.showIncludesExcludes !== undefined) {
|
|
576
|
+
this.toggleIncludesExcludes(config.showIncludesExcludes);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
async setInput(newInput, options, context, token) {
|
|
580
|
+
await super.setInput(newInput, options, context, token);
|
|
581
|
+
if (token.isCancellationRequested) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
const { configurationModel, resultsModel } = await newInput.resolveModels();
|
|
585
|
+
if (token.isCancellationRequested) {
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
this.searchResultEditor.setModel(resultsModel);
|
|
589
|
+
this.pauseSearching = true;
|
|
590
|
+
this.toggleRunAgainMessage(!newInput.ongoingSearchOperation && resultsModel.getLineCount() === 1 && resultsModel.getValue() === '' && configurationModel.config.query !== '');
|
|
591
|
+
this.setSearchConfig(configurationModel.config);
|
|
592
|
+
this._register(configurationModel.onConfigDidUpdate(newConfig => {
|
|
593
|
+
if (newConfig !== this.priorConfig) {
|
|
594
|
+
this.pauseSearching = true;
|
|
595
|
+
this.setSearchConfig(newConfig);
|
|
596
|
+
this.pauseSearching = false;
|
|
597
|
+
}
|
|
598
|
+
}));
|
|
599
|
+
this.restoreViewState(context);
|
|
600
|
+
if (!options?.preserveFocus) {
|
|
601
|
+
this.focus();
|
|
602
|
+
}
|
|
603
|
+
this.pauseSearching = false;
|
|
604
|
+
if (newInput.ongoingSearchOperation) {
|
|
605
|
+
const existingConfig = this.readConfigFromWidget();
|
|
606
|
+
newInput.ongoingSearchOperation.then(complete => {
|
|
607
|
+
this.onSearchComplete(complete, existingConfig, newInput);
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
toggleIncludesExcludes(_shouldShow) {
|
|
612
|
+
const cls = 'expanded';
|
|
613
|
+
const shouldShow = _shouldShow ?? !this.includesExcludesContainer.classList.contains(cls);
|
|
614
|
+
if (shouldShow) {
|
|
615
|
+
this.toggleQueryDetailsButton.setAttribute('aria-expanded', 'true');
|
|
616
|
+
this.includesExcludesContainer.classList.add(cls);
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
this.toggleQueryDetailsButton.setAttribute('aria-expanded', 'false');
|
|
620
|
+
this.includesExcludesContainer.classList.remove(cls);
|
|
621
|
+
}
|
|
622
|
+
this.showingIncludesExcludes = this.includesExcludesContainer.classList.contains(cls);
|
|
623
|
+
this.reLayout();
|
|
624
|
+
}
|
|
625
|
+
toEditorViewStateResource(input) {
|
|
626
|
+
if (input.typeId === SearchEditorInputTypeId) {
|
|
627
|
+
return input.modelUri;
|
|
628
|
+
}
|
|
629
|
+
return undefined;
|
|
630
|
+
}
|
|
631
|
+
computeEditorViewState(resource) {
|
|
632
|
+
const control = this.getControl();
|
|
633
|
+
const editorViewState = control.saveViewState();
|
|
634
|
+
if (!editorViewState) {
|
|
635
|
+
return undefined;
|
|
636
|
+
}
|
|
637
|
+
if (( resource.toString()) !== this.getInput()?.modelUri.toString()) {
|
|
638
|
+
return undefined;
|
|
639
|
+
}
|
|
640
|
+
return { ...editorViewState, focused: this.searchResultEditor.hasWidgetFocus() ? 'editor' : 'input' };
|
|
641
|
+
}
|
|
642
|
+
tracksEditorViewState(input) {
|
|
643
|
+
return input.typeId === SearchEditorInputTypeId;
|
|
644
|
+
}
|
|
645
|
+
restoreViewState(context) {
|
|
646
|
+
const viewState = this.loadEditorViewState(this.getInput(), context);
|
|
647
|
+
if (viewState) {
|
|
648
|
+
this.searchResultEditor.restoreViewState(viewState);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
getAriaLabel() {
|
|
652
|
+
return this.getInput()?.getName() ?? ( localize('searchEditor', "Search"));
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
SearchEditor.ID = SearchEditorID;
|
|
656
|
+
SearchEditor.SEARCH_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'searchEditorViewState';
|
|
657
|
+
SearchEditor = ( __decorate([
|
|
658
|
+
( __param(0, ITelemetryService)),
|
|
659
|
+
( __param(1, IThemeService)),
|
|
660
|
+
( __param(2, IStorageService)),
|
|
661
|
+
( __param(3, IModelService)),
|
|
662
|
+
( __param(4, IWorkspaceContextService)),
|
|
663
|
+
( __param(5, ILabelService)),
|
|
664
|
+
( __param(6, IInstantiationService)),
|
|
665
|
+
( __param(7, IContextViewService)),
|
|
666
|
+
( __param(8, ICommandService)),
|
|
667
|
+
( __param(9, IOpenerService)),
|
|
668
|
+
( __param(10, INotificationService)),
|
|
669
|
+
( __param(11, IEditorProgressService)),
|
|
670
|
+
( __param(12, ITextResourceConfigurationService)),
|
|
671
|
+
( __param(13, IEditorGroupsService)),
|
|
672
|
+
( __param(14, IEditorService)),
|
|
673
|
+
( __param(15, IConfigurationService)),
|
|
674
|
+
( __param(16, IFileService)),
|
|
675
|
+
( __param(17, ILogService))
|
|
676
|
+
], SearchEditor));
|
|
677
|
+
const searchEditorTextInputBorder = registerColor('searchEditor.textInputBorder', { dark: inputBorder, light: inputBorder, hcDark: inputBorder, hcLight: inputBorder }, ( localize('textInputBoxBorder', "Search editor text input box border.")));
|
|
678
|
+
function findNextRange(matchRanges, currentPosition) {
|
|
679
|
+
for (const matchRange of matchRanges) {
|
|
680
|
+
if (Position.isBefore(currentPosition, matchRange.getStartPosition())) {
|
|
681
|
+
return matchRange;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return matchRanges[0];
|
|
685
|
+
}
|
|
686
|
+
function findPrevRange(matchRanges, currentPosition) {
|
|
687
|
+
for (let i = matchRanges.length - 1; i >= 0; i--) {
|
|
688
|
+
const matchRange = matchRanges[i];
|
|
689
|
+
if (Position.isBefore(matchRange.getStartPosition(), currentPosition)) {
|
|
690
|
+
{
|
|
691
|
+
return matchRange;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
return matchRanges[matchRanges.length - 1];
|
|
696
|
+
}
|
|
697
|
+
export { SearchEditor };
|