@codingame/monaco-vscode-api 2.0.3-improve-modularity.1 → 2.1.0-update-vscode-1.86.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/api.js +15 -12
- package/extensions.d.ts +4 -7
- package/external/@xterm/xterm/typings/xterm.d.ts +22 -0
- package/missing-services.js +62 -6
- package/package.json +8 -8
- package/service-override/tools/editor.js +14 -0
- package/services.d.ts +3 -2
- package/services.js +6 -4
- package/vscode/src/vs/base/browser/browser.js +45 -30
- package/vscode/src/vs/base/browser/canIUse.js +1 -1
- package/vscode/src/vs/base/browser/defaultWorkerFactory.js +12 -5
- package/vscode/src/vs/base/browser/dom.js +104 -14
- package/vscode/src/vs/base/browser/indexedDB.js +3 -3
- package/vscode/src/vs/base/browser/markdownRenderer.js +29 -1
- package/vscode/src/vs/base/browser/mouseEvent.js +17 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +3 -3
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +287 -0
- package/vscode/src/vs/base/browser/ui/button/button.js +9 -0
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/dialog/dialog.js +1 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabelHover.js +16 -5
- package/vscode/src/vs/base/browser/ui/list/listView.js +31 -11
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +35 -21
- package/vscode/src/vs/base/browser/ui/menu/menu.js +10 -1
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +8 -4
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +6 -5
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +469 -95
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +22 -7
- package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +0 -5
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +70 -4
- package/vscode/src/vs/base/common/assert.js +6 -1
- package/vscode/src/vs/base/common/async.js +31 -6
- package/vscode/src/vs/base/common/codicons.js +5 -0
- package/vscode/src/vs/base/common/event.d.ts +0 -5
- package/vscode/src/vs/base/common/event.js +0 -15
- package/vscode/src/vs/base/common/filters.d.ts +1 -18
- package/vscode/src/vs/base/common/htmlContent.js +12 -6
- package/vscode/src/vs/base/common/iterator.js +8 -0
- package/vscode/src/vs/base/common/labels.js +2 -1
- package/vscode/src/vs/base/common/map.js +20 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/base.js +16 -8
- package/vscode/src/vs/base/common/observableInternal/derived.js +4 -6
- package/vscode/src/vs/base/common/observableInternal/utils.js +60 -5
- package/vscode/src/vs/base/common/platform.js +20 -20
- package/vscode/src/vs/base/common/prefixTree.js +4 -3
- package/vscode/src/vs/base/common/product.d.ts +5 -2
- package/vscode/src/vs/base/common/strings.js +23 -7
- package/vscode/src/vs/base/common/themables.js +4 -1
- package/vscode/src/vs/base/common/uri.js +11 -1
- package/vscode/src/vs/base/common/worker/simpleWorker.js +1 -1
- package/vscode/src/vs/editor/browser/config/migrateOptions.js +5 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +1 -0
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +14 -8
- package/vscode/src/vs/editor/browser/controller/pointerHandler.js +18 -11
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
- package/vscode/src/vs/editor/browser/controller/textAreaInput.js +3 -3
- package/vscode/src/vs/{workbench/services/hover/browser → editor/browser/services}/hoverService.d.ts +7 -6
- package/vscode/src/vs/editor/browser/services/hoverService.js +195 -0
- package/vscode/src/vs/editor/browser/view.js +29 -39
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +41 -19
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +30 -23
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +23 -8
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +8 -1
- package/vscode/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js +7 -1
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +30 -3
- package/vscode/src/vs/editor/browser/widget/codeEditorWidget.js +39 -15
- package/vscode/src/vs/editor/browser/widget/diffEditor/{accessibleDiffViewer.css.js → components/accessibleDiffViewer.css.js} +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/{accessibleDiffViewer.js → components/accessibleDiffViewer.js} +43 -43
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +89 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/{diffEditorEditors.js → components/diffEditorEditors.js} +14 -14
- package/vscode/src/vs/editor/browser/widget/diffEditor/{diffEditorSash.js → components/diffEditorSash.js} +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/{lineAlignment.js → components/diffEditorViewZones/diffEditorViewZones.js} +38 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/{inlineDiffDeletedCodeMargin.js → components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js} +14 -14
- package/vscode/src/vs/editor/browser/widget/diffEditor/{renderLines.js → components/diffEditorViewZones/renderLines.js} +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +29 -38
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +150 -38
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +17 -16
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +104 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/{hideUnchangedRegionsFeature.js → features/hideUnchangedRegionsFeature.js} +51 -78
- package/vscode/src/vs/editor/browser/widget/diffEditor/{movedBlocksLines.js → features/movedBlocksLinesFeature.js} +23 -23
- package/vscode/src/vs/editor/browser/widget/diffEditor/{overviewRulerPart.js → features/overviewRulerFeature.js} +28 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +145 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/{decorations.js → registrations.contribution.js} +18 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +10 -2
- package/vscode/src/vs/editor/browser/widget/hoverWidget/hover.css.js +4 -0
- package/vscode/src/vs/editor/browser/widget/hoverWidget/hoverWidget.js +527 -0
- package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/markdownRenderer.js +11 -11
- package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/renderedMarkdown.css.js +1 -1
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +11 -10
- package/vscode/src/vs/editor/common/config/editorOptions.js +46 -42
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +3 -3
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +2 -0
- package/vscode/src/vs/editor/common/core/offsetRange.js +8 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js +9 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +50 -47
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js +4 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +2 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +13 -2
- package/vscode/src/vs/editor/common/languages.d.ts +10 -2
- package/vscode/src/vs/editor/common/model/textModel.js +19 -13
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +1 -1
- package/vscode/src/vs/editor/common/model.d.ts +19 -1
- package/vscode/src/vs/editor/common/model.js +2 -1
- package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +2 -1
- package/vscode/src/vs/editor/common/services/getIconClasses.js +4 -1
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +3 -3
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +9 -8
- package/vscode/src/vs/editor/common/standaloneStrings.js +18 -18
- package/vscode/src/vs/editor/common/viewEvents.js +2 -0
- package/vscode/src/vs/editor/common/viewModel/glyphLanesModel.js +55 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +4 -1
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +5 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +46 -20
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +38 -11
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +56 -101
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.js +3 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +10 -29
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +51 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +19 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +38 -10
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +29 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/edit.js +10 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +3 -17
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +3 -35
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +26 -6
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +6 -6
- package/vscode/src/vs/editor/contrib/format/browser/format.js +9 -9
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +5 -5
- package/vscode/src/vs/editor/contrib/gotoError/browser/media/gotoErrorWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +85 -76
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +120 -90
- package/vscode/src/vs/editor/contrib/hover/browser/marginHover.js +18 -6
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHints.js +4 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +56 -38
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +12 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +2 -2
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +50 -53
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +5 -2
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +5 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +8 -5
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +58 -46
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +34 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +30 -38
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +11 -3
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +18 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +8 -10
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +7 -6
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -0
- package/vscode/src/vs/editor/editor.api.d.ts +82 -11
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +8 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +4 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +22 -11
- package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +1 -1
- package/vscode/src/vs/nls.d.ts +6 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +4 -1
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +2 -16
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +1 -2
- package/vscode/src/vs/platform/action/common/actionCommonCategories.d.ts +7 -20
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +8 -8
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +0 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -0
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +5 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +9 -1
- package/vscode/src/vs/platform/actions/common/actions.js +12 -1
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +11 -1
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.js +174 -28
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +38 -5
- package/vscode/src/vs/platform/configuration/common/configuration.d.ts +0 -1
- package/vscode/src/vs/platform/environment/common/environmentService.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +5 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +24 -5
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +6 -1
- package/vscode/src/vs/{workbench/services → platform}/hover/browser/hover.d.ts +6 -8
- package/vscode/src/vs/platform/hover/browser/hover.js +3 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +14 -4
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +11 -4
- package/vscode/src/vs/platform/keybinding/common/keybinding.d.ts +7 -0
- package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +6 -0
- package/vscode/src/vs/platform/list/browser/listService.js +7 -5
- package/vscode/src/vs/platform/log/common/bufferLog.js +1 -0
- package/vscode/src/vs/platform/log/common/log.d.ts +0 -1
- package/vscode/src/vs/platform/log/common/log.js +1 -2
- package/vscode/src/vs/platform/notification/common/notification.d.ts +36 -19
- package/vscode/src/vs/platform/notification/common/notification.js +9 -3
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +4 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +50 -48
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +3 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +49 -66
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +11 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +16 -2
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +230 -26
- package/vscode/src/vs/platform/remote/common/remoteAuthorityResolver.d.ts +1 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +5 -3
- package/vscode/src/vs/platform/theme/common/colorRegistry.js +28 -9
- package/vscode/src/vs/platform/tunnel/common/tunnel.d.ts +2 -0
- package/vscode/src/vs/platform/window/common/window.js +14 -8
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +97 -78
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +1 -22
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -6
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +31 -36
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostComments.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostConsoleForwarder.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +130 -6
- package/vscode/src/vs/workbench/api/common/extHostDocumentContentProviders.js +28 -15
- package/vscode/src/vs/workbench/api/common/extHostDocuments.js +4 -5
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +5 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystem.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostFileSystemConsumer.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +35 -33
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +40 -13
- package/vscode/src/vs/workbench/api/common/extHostMessageService.js +10 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +11 -7
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditors.js +2 -3
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +29 -4
- package/vscode/src/vs/workbench/api/common/extHostProfileContentHandler.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +1 -7
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +49 -93
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +21 -0
- package/vscode/src/vs/workbench/api/common/extHostTask.js +18 -22
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +55 -36
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +5 -2
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +6 -7
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -3
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +74 -12
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +27 -8
- package/vscode/src/vs/workbench/api/worker/extHostConsoleForwarder.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +172 -103
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +13 -17
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +34 -34
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
- package/vscode/src/vs/workbench/browser/dnd.js +2 -2
- package/vscode/src/vs/workbench/browser/labels.js +34 -4
- package/vscode/src/vs/workbench/browser/part.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +801 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +140 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +410 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +1 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +304 -303
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +101 -47
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +114 -47
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +1313 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +190 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +344 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +152 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortitlecontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +1626 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +150 -0
- package/vscode/src/vs/workbench/browser/parts/editor/noEditorTabsControl.js +52 -0
- package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +260 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +39 -36
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +68 -28
- package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +15 -14
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +18 -17
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +7 -10
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +18 -17
- package/vscode/src/vs/workbench/browser/quickaccess.js +33 -1
- package/vscode/src/vs/workbench/browser/web.api.d.ts +6 -0
- package/vscode/src/vs/workbench/browser/window.js +92 -9
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +114 -65
- package/vscode/src/vs/workbench/common/component.d.ts +5 -1
- package/vscode/src/vs/workbench/common/component.js +6 -0
- package/vscode/src/vs/workbench/common/configuration.js +11 -1
- package/vscode/src/vs/workbench/common/contextkeys.js +8 -4
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +6 -0
- package/vscode/src/vs/workbench/common/editor/editorInput.js +3 -0
- package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +107 -0
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +6 -3
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +21 -3
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/vscode/src/vs/workbench/common/editor.d.ts +16 -4
- package/vscode/src/vs/workbench/common/editor.js +7 -1
- package/vscode/src/vs/workbench/common/memento.js +33 -12
- package/vscode/src/vs/workbench/common/notifications.js +30 -7
- package/vscode/src/vs/workbench/common/theme.js +61 -1
- package/vscode/src/vs/workbench/common/views.d.ts +1 -28
- package/vscode/src/vs/workbench/common/views.js +1 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +232 -19
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +9 -9
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +19 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +57 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +93 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +30 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +24 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +21 -43
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +0 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/{comments.contribution.js → commentsAccessibility.js} +36 -128
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +41 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +202 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +27 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +165 -52
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +48 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +6 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +40 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +28 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.js +14 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +52 -23
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +164 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +285 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +123 -78
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +10 -0
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +326 -0
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +1 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +8 -9
- package/vscode/src/vs/workbench/contrib/files/browser/files.configuration.contribution.js +70 -2
- package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/files/browser/files.fileEditorFactory.contribution.js +13 -0
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +34 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +5 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +48 -14
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +16 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +317 -321
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +17 -24
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +306 -130
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +3 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +385 -613
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +69 -64
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +71 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -44
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +5 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +38 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +36 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +32 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +24 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +264 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +60 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +12 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +12 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +188 -155
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +10 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +9 -7
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +29 -14
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +15 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +22 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +16 -17
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +78 -50
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +15 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +25 -45
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +12 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +33 -36
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +5 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +15 -27
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +38 -22
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +5 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +60 -40
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +15 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +26 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +24 -23
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +1 -1
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +124 -26
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +68 -0
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +76 -36
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +15 -3
- package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.js +10 -1
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +51 -43
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +13 -8
- package/vscode/src/vs/workbench/services/editor/common/editorService.js +2 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +7 -7
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -0
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.d.ts +29 -9
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +160 -63
- package/vscode/src/vs/workbench/services/host/browser/host.d.ts +8 -0
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +60 -72
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +0 -4
- package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.js +56 -0
- package/vscode/src/vs/workbench/services/output/common/output.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +10 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +10 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +2 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +5 -4
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +21 -8
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +4 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +3 -0
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +4 -4
- package/vscode/src/vs/workbench/{browser/parts/views → services/views/browser}/viewsService.js +20 -15
- package/vscode/src/vs/workbench/services/views/common/viewsService.d.ts +34 -0
- package/vscode/src/vs/workbench/services/{hover/browser/hover.js → views/common/viewsService.js} +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.d.ts +6 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +5 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +1 -0
- package/vscode-dts/vscode.proposed.chatAgents2.d.ts +112 -47
- package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +68 -9
- package/vscode-dts/{vscode.proposed.scmInputBoxActionButton.d.ts → vscode.proposed.codeActionRanges.d.ts} +8 -10
- package/vscode-dts/{vscode.proposed.readonlyMessage.d.ts → vscode.proposed.commentReactor.d.ts} +3 -4
- package/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemGroupMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.debugVisualization.d.ts +100 -0
- package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +1 -1
- package/vscode-dts/vscode.proposed.interactive.d.ts +13 -16
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +4 -1
- package/vscode-dts/vscode.proposed.resolvers.d.ts +4 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -10
- package/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts +34 -0
- package/vscode-dts/vscode.proposed.speech.d.ts +17 -3
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +7 -1
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +4 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/colors.js +0 -17
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.js +0 -231
- package/vscode/src/vs/editor/browser/widget/diffEditor/outlineModel.js +0 -299
- package/vscode/src/vs/editor/browser/widget/diffEditor/workerBasedDocumentDiffProvider.js +0 -101
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +0 -390
- package/vscode/src/vs/workbench/services/editor/common/editorGroupColumn.d.ts +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +0 -4
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.d.ts +0 -28
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.d.ts +0 -30
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +0 -98
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.d.ts +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +0 -428
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +0 -83
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +0 -39
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +0 -77
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +0 -35
- package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +0 -25
- package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +0 -21
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { DEFAULT_EDITOR_ASSOCIATION, findViewStateForEditor, isResourceEditorInput } from '../../../../common/editor.js';
|
|
3
|
+
import { AbstractTextResourceEditorInput } from '../../../../common/editor/textResourceEditorInput.js';
|
|
4
|
+
import { BinaryEditorModel } from '../../../../common/editor/binaryEditorModel.js';
|
|
5
|
+
import { IFileService } from '../../../../../platform/files/common/files.js';
|
|
6
|
+
import { ITextFileService } from '../../../../services/textfile/common/textfiles.js';
|
|
7
|
+
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
|
|
8
|
+
import { DisposableStore, dispose } from '../../../../../base/common/lifecycle.js';
|
|
9
|
+
import { ITextModelService } from '../../../../../editor/common/services/resolverService.js';
|
|
10
|
+
import { FILE_EDITOR_INPUT_ID, BINARY_FILE_EDITOR_ID, TEXT_FILE_EDITOR_ID } from '../../common/files.js';
|
|
11
|
+
import { ILabelService } from '../../../../../platform/label/common/label.js';
|
|
12
|
+
import { IFilesConfigurationService } from '../../../../services/filesConfiguration/common/filesConfigurationService.js';
|
|
13
|
+
import { IEditorService } from '../../../../services/editor/common/editorService.js';
|
|
14
|
+
import { isEqual } from '../../../../../base/common/resources.js';
|
|
15
|
+
import { Event } from '../../../../../base/common/event.js';
|
|
16
|
+
import { Schemas } from '../../../../../base/common/network.js';
|
|
17
|
+
import { createTextBufferFactory } from '../../../../../editor/common/model/textModel.js';
|
|
18
|
+
import { IPathService } from '../../../../services/path/common/pathService.js';
|
|
19
|
+
import { ITextResourceConfigurationService } from '../../../../../editor/common/services/textResourceConfiguration.js';
|
|
20
|
+
var FileEditorInput_1;
|
|
21
|
+
let FileEditorInput = FileEditorInput_1 = class FileEditorInput extends AbstractTextResourceEditorInput {
|
|
22
|
+
get typeId() {
|
|
23
|
+
return FILE_EDITOR_INPUT_ID;
|
|
24
|
+
}
|
|
25
|
+
get editorId() {
|
|
26
|
+
return DEFAULT_EDITOR_ASSOCIATION.id;
|
|
27
|
+
}
|
|
28
|
+
get capabilities() {
|
|
29
|
+
let capabilities = 32 ;
|
|
30
|
+
if (this.model) {
|
|
31
|
+
if (this.model.isReadonly()) {
|
|
32
|
+
capabilities |= 2 ;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (this.fileService.hasProvider(this.resource)) {
|
|
37
|
+
if (this.filesConfigurationService.isReadonly(this.resource)) {
|
|
38
|
+
capabilities |= 2 ;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
capabilities |= 4 ;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (!((capabilities & 2) )) {
|
|
46
|
+
capabilities |= 128 ;
|
|
47
|
+
}
|
|
48
|
+
return capabilities;
|
|
49
|
+
}
|
|
50
|
+
constructor(resource, preferredResource, preferredName, preferredDescription, preferredEncoding, preferredLanguageId, preferredContents, instantiationService, textFileService, textModelService, labelService, fileService, filesConfigurationService, editorService, pathService, textResourceConfigurationService) {
|
|
51
|
+
super(resource, preferredResource, editorService, textFileService, labelService, fileService, filesConfigurationService, textResourceConfigurationService);
|
|
52
|
+
this.instantiationService = instantiationService;
|
|
53
|
+
this.textModelService = textModelService;
|
|
54
|
+
this.pathService = pathService;
|
|
55
|
+
this.forceOpenAs = 0 ;
|
|
56
|
+
this.model = undefined;
|
|
57
|
+
this.cachedTextFileModelReference = undefined;
|
|
58
|
+
this.modelListeners = this._register(( new DisposableStore()));
|
|
59
|
+
this.model = this.textFileService.files.get(resource);
|
|
60
|
+
if (preferredName) {
|
|
61
|
+
this.setPreferredName(preferredName);
|
|
62
|
+
}
|
|
63
|
+
if (preferredDescription) {
|
|
64
|
+
this.setPreferredDescription(preferredDescription);
|
|
65
|
+
}
|
|
66
|
+
if (preferredEncoding) {
|
|
67
|
+
this.setPreferredEncoding(preferredEncoding);
|
|
68
|
+
}
|
|
69
|
+
if (preferredLanguageId) {
|
|
70
|
+
this.setPreferredLanguageId(preferredLanguageId);
|
|
71
|
+
}
|
|
72
|
+
if (typeof preferredContents === 'string') {
|
|
73
|
+
this.setPreferredContents(preferredContents);
|
|
74
|
+
}
|
|
75
|
+
this._register(this.textFileService.files.onDidCreate(model => this.onDidCreateTextFileModel(model)));
|
|
76
|
+
if (this.model) {
|
|
77
|
+
this.registerModelListeners(this.model);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
onDidCreateTextFileModel(model) {
|
|
81
|
+
if (isEqual(model.resource, this.resource)) {
|
|
82
|
+
this.model = model;
|
|
83
|
+
this.registerModelListeners(model);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
registerModelListeners(model) {
|
|
87
|
+
this.modelListeners.clear();
|
|
88
|
+
this.modelListeners.add(model.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
|
89
|
+
this.modelListeners.add(model.onDidChangeReadonly(() => this._onDidChangeCapabilities.fire()));
|
|
90
|
+
this.modelListeners.add(model.onDidSaveError(() => this._onDidChangeDirty.fire()));
|
|
91
|
+
this.modelListeners.add(Event.once(model.onWillDispose)(() => {
|
|
92
|
+
this.modelListeners.clear();
|
|
93
|
+
this.model = undefined;
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
getName() {
|
|
97
|
+
return this.preferredName || super.getName();
|
|
98
|
+
}
|
|
99
|
+
setPreferredName(name) {
|
|
100
|
+
if (!this.allowLabelOverride()) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (this.preferredName !== name) {
|
|
104
|
+
this.preferredName = name;
|
|
105
|
+
this._onDidChangeLabel.fire();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
allowLabelOverride() {
|
|
109
|
+
return this.resource.scheme !== this.pathService.defaultUriScheme &&
|
|
110
|
+
this.resource.scheme !== Schemas.vscodeUserData &&
|
|
111
|
+
this.resource.scheme !== Schemas.file &&
|
|
112
|
+
this.resource.scheme !== Schemas.vscodeRemote;
|
|
113
|
+
}
|
|
114
|
+
getPreferredName() {
|
|
115
|
+
return this.preferredName;
|
|
116
|
+
}
|
|
117
|
+
isReadonly() {
|
|
118
|
+
return this.model ? this.model.isReadonly() : this.filesConfigurationService.isReadonly(this.resource);
|
|
119
|
+
}
|
|
120
|
+
getDescription(verbosity) {
|
|
121
|
+
return this.preferredDescription || super.getDescription(verbosity);
|
|
122
|
+
}
|
|
123
|
+
setPreferredDescription(description) {
|
|
124
|
+
if (!this.allowLabelOverride()) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (this.preferredDescription !== description) {
|
|
128
|
+
this.preferredDescription = description;
|
|
129
|
+
this._onDidChangeLabel.fire();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
getPreferredDescription() {
|
|
133
|
+
return this.preferredDescription;
|
|
134
|
+
}
|
|
135
|
+
getTitle(verbosity) {
|
|
136
|
+
let title = super.getTitle(verbosity);
|
|
137
|
+
const preferredTitle = this.getPreferredTitle();
|
|
138
|
+
if (preferredTitle) {
|
|
139
|
+
title = `${preferredTitle} (${title})`;
|
|
140
|
+
}
|
|
141
|
+
return title;
|
|
142
|
+
}
|
|
143
|
+
getPreferredTitle() {
|
|
144
|
+
if (this.preferredName && this.preferredDescription) {
|
|
145
|
+
return `${this.preferredName} ${this.preferredDescription}`;
|
|
146
|
+
}
|
|
147
|
+
if (this.preferredName || this.preferredDescription) {
|
|
148
|
+
return this.preferredName ?? this.preferredDescription;
|
|
149
|
+
}
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
getEncoding() {
|
|
153
|
+
if (this.model) {
|
|
154
|
+
return this.model.getEncoding();
|
|
155
|
+
}
|
|
156
|
+
return this.preferredEncoding;
|
|
157
|
+
}
|
|
158
|
+
getPreferredEncoding() {
|
|
159
|
+
return this.preferredEncoding;
|
|
160
|
+
}
|
|
161
|
+
async setEncoding(encoding, mode) {
|
|
162
|
+
this.setPreferredEncoding(encoding);
|
|
163
|
+
return this.model?.setEncoding(encoding, mode);
|
|
164
|
+
}
|
|
165
|
+
setPreferredEncoding(encoding) {
|
|
166
|
+
this.preferredEncoding = encoding;
|
|
167
|
+
this.setForceOpenAsText();
|
|
168
|
+
}
|
|
169
|
+
getLanguageId() {
|
|
170
|
+
if (this.model) {
|
|
171
|
+
return this.model.getLanguageId();
|
|
172
|
+
}
|
|
173
|
+
return this.preferredLanguageId;
|
|
174
|
+
}
|
|
175
|
+
getPreferredLanguageId() {
|
|
176
|
+
return this.preferredLanguageId;
|
|
177
|
+
}
|
|
178
|
+
setLanguageId(languageId, source) {
|
|
179
|
+
this.setPreferredLanguageId(languageId);
|
|
180
|
+
this.model?.setLanguageId(languageId, source);
|
|
181
|
+
}
|
|
182
|
+
setPreferredLanguageId(languageId) {
|
|
183
|
+
this.preferredLanguageId = languageId;
|
|
184
|
+
this.setForceOpenAsText();
|
|
185
|
+
}
|
|
186
|
+
setPreferredContents(contents) {
|
|
187
|
+
this.preferredContents = contents;
|
|
188
|
+
this.setForceOpenAsText();
|
|
189
|
+
}
|
|
190
|
+
setForceOpenAsText() {
|
|
191
|
+
this.forceOpenAs = 1 ;
|
|
192
|
+
}
|
|
193
|
+
setForceOpenAsBinary() {
|
|
194
|
+
this.forceOpenAs = 2 ;
|
|
195
|
+
}
|
|
196
|
+
isDirty() {
|
|
197
|
+
return !!(this.model?.isDirty());
|
|
198
|
+
}
|
|
199
|
+
isSaving() {
|
|
200
|
+
if (this.model?.hasState(0 ) || this.model?.hasState(3 ) || this.model?.hasState(5 )) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
if (this.filesConfigurationService.hasShortAutoSaveDelay(this)) {
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
return super.isSaving();
|
|
207
|
+
}
|
|
208
|
+
prefersEditorPane(editorPanes) {
|
|
209
|
+
if (this.forceOpenAs === 2 ) {
|
|
210
|
+
return editorPanes.find(editorPane => editorPane.typeId === BINARY_FILE_EDITOR_ID);
|
|
211
|
+
}
|
|
212
|
+
return editorPanes.find(editorPane => editorPane.typeId === TEXT_FILE_EDITOR_ID);
|
|
213
|
+
}
|
|
214
|
+
resolve(options) {
|
|
215
|
+
if (this.forceOpenAs === 2 ) {
|
|
216
|
+
return this.doResolveAsBinary();
|
|
217
|
+
}
|
|
218
|
+
return this.doResolveAsText(options);
|
|
219
|
+
}
|
|
220
|
+
async doResolveAsText(options) {
|
|
221
|
+
try {
|
|
222
|
+
const preferredContents = this.preferredContents;
|
|
223
|
+
this.preferredContents = undefined;
|
|
224
|
+
await this.textFileService.files.resolve(this.resource, {
|
|
225
|
+
languageId: this.preferredLanguageId,
|
|
226
|
+
encoding: this.preferredEncoding,
|
|
227
|
+
contents: typeof preferredContents === 'string' ? createTextBufferFactory(preferredContents) : undefined,
|
|
228
|
+
reload: { async: true },
|
|
229
|
+
allowBinary: this.forceOpenAs === 1 ,
|
|
230
|
+
reason: 1 ,
|
|
231
|
+
limits: this.ensureLimits(options)
|
|
232
|
+
});
|
|
233
|
+
if (!this.cachedTextFileModelReference) {
|
|
234
|
+
this.cachedTextFileModelReference = await this.textModelService.createModelReference(this.resource);
|
|
235
|
+
}
|
|
236
|
+
const model = this.cachedTextFileModelReference.object;
|
|
237
|
+
if (this.isDisposed()) {
|
|
238
|
+
this.disposeModelReference();
|
|
239
|
+
}
|
|
240
|
+
return model;
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
if (error.textFileOperationResult === 0 ) {
|
|
244
|
+
return this.doResolveAsBinary();
|
|
245
|
+
}
|
|
246
|
+
throw error;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
async doResolveAsBinary() {
|
|
250
|
+
const model = this.instantiationService.createInstance(BinaryEditorModel, this.preferredResource, this.getName());
|
|
251
|
+
await model.resolve();
|
|
252
|
+
return model;
|
|
253
|
+
}
|
|
254
|
+
isResolved() {
|
|
255
|
+
return !!this.model;
|
|
256
|
+
}
|
|
257
|
+
async rename(group, target) {
|
|
258
|
+
return {
|
|
259
|
+
editor: {
|
|
260
|
+
resource: target,
|
|
261
|
+
encoding: this.getEncoding(),
|
|
262
|
+
options: {
|
|
263
|
+
viewState: findViewStateForEditor(this, group, this.editorService)
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
toUntyped(options) {
|
|
269
|
+
const untypedInput = {
|
|
270
|
+
resource: this.preferredResource,
|
|
271
|
+
forceFile: true,
|
|
272
|
+
options: {
|
|
273
|
+
override: this.editorId
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
if (typeof options?.preserveViewState === 'number') {
|
|
277
|
+
untypedInput.encoding = this.getEncoding();
|
|
278
|
+
untypedInput.languageId = this.getLanguageId();
|
|
279
|
+
untypedInput.contents = (() => {
|
|
280
|
+
const model = this.textFileService.files.get(this.resource);
|
|
281
|
+
if (model?.isDirty() && !model.textEditorModel.isTooLargeForHeapOperation()) {
|
|
282
|
+
return model.textEditorModel.getValue();
|
|
283
|
+
}
|
|
284
|
+
return undefined;
|
|
285
|
+
})();
|
|
286
|
+
untypedInput.options = {
|
|
287
|
+
...untypedInput.options,
|
|
288
|
+
viewState: findViewStateForEditor(this, options.preserveViewState, this.editorService)
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
return untypedInput;
|
|
292
|
+
}
|
|
293
|
+
matches(otherInput) {
|
|
294
|
+
if (this === otherInput) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
if (otherInput instanceof FileEditorInput_1) {
|
|
298
|
+
return isEqual(otherInput.resource, this.resource);
|
|
299
|
+
}
|
|
300
|
+
if (isResourceEditorInput(otherInput)) {
|
|
301
|
+
return super.matches(otherInput);
|
|
302
|
+
}
|
|
303
|
+
return false;
|
|
304
|
+
}
|
|
305
|
+
dispose() {
|
|
306
|
+
this.model = undefined;
|
|
307
|
+
this.disposeModelReference();
|
|
308
|
+
super.dispose();
|
|
309
|
+
}
|
|
310
|
+
disposeModelReference() {
|
|
311
|
+
dispose(this.cachedTextFileModelReference);
|
|
312
|
+
this.cachedTextFileModelReference = undefined;
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
FileEditorInput = FileEditorInput_1 = ( __decorate([
|
|
316
|
+
( __param(7, IInstantiationService)),
|
|
317
|
+
( __param(8, ITextFileService)),
|
|
318
|
+
( __param(9, ITextModelService)),
|
|
319
|
+
( __param(10, ILabelService)),
|
|
320
|
+
( __param(11, IFileService)),
|
|
321
|
+
( __param(12, IFilesConfigurationService)),
|
|
322
|
+
( __param(13, IEditorService)),
|
|
323
|
+
( __param(14, IPathService)),
|
|
324
|
+
( __param(15, ITextResourceConfigurationService))
|
|
325
|
+
], FileEditorInput));
|
|
326
|
+
export { FileEditorInput };
|
|
@@ -30,7 +30,7 @@ import { OpenRecentAction } from '../../../browser/actions/windowActions.js';
|
|
|
30
30
|
import { isMacintosh, isWeb } from '../../../../base/common/platform.js';
|
|
31
31
|
import { Codicon } from '../../../../base/common/codicons.js';
|
|
32
32
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
33
|
-
import { isMouseEvent
|
|
33
|
+
import { isMouseEvent } from '../../../../base/browser/dom.js';
|
|
34
34
|
const explorerViewIcon = registerIcon('explorer-view-icon', Codicon.files, ( localizeWithPath(
|
|
35
35
|
'vs/workbench/contrib/files/browser/explorerViewlet',
|
|
36
36
|
'explorerViewIcon',
|
|
@@ -193,7 +193,6 @@ let ExplorerViewPaneContainer = class ExplorerViewPaneContainer extends ViewPane
|
|
|
193
193
|
explorerView.setExpanded(true);
|
|
194
194
|
}
|
|
195
195
|
if (explorerView?.isExpanded()) {
|
|
196
|
-
focusWindow(explorerView.element);
|
|
197
196
|
explorerView.focus();
|
|
198
197
|
}
|
|
199
198
|
else {
|
|
@@ -36,7 +36,7 @@ import { timeout } from '../../../../base/common/async.js';
|
|
|
36
36
|
import { IWorkingCopyFileService } from '../../../services/workingCopy/common/workingCopyFileService.js';
|
|
37
37
|
import { Codicon } from '../../../../base/common/codicons.js';
|
|
38
38
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
39
|
-
import { IViewsService } from '../../../common/
|
|
39
|
+
import { IViewsService } from '../../../services/views/common/viewsService.js';
|
|
40
40
|
import { trim, rtrim } from '../../../../base/common/strings.js';
|
|
41
41
|
import { IUriIdentityService } from '../../../../platform/uriIdentity/common/uriIdentity.js';
|
|
42
42
|
import { ResourceFileEdit } from '../../../../editor/browser/services/bulkEditService.js';
|
|
@@ -726,20 +726,19 @@ class ShowActiveFileInExplorer extends Action2 {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
class
|
|
729
|
+
class OpenActiveFileInEmptyWorkspace extends Action2 {
|
|
730
730
|
static { this.ID = 'workbench.action.files.showOpenedFileInNewWindow'; }
|
|
731
731
|
static { this.LABEL = ( localizeWithPath(
|
|
732
732
|
'vs/workbench/contrib/files/browser/fileActions',
|
|
733
|
-
'
|
|
734
|
-
"Open Active File in New
|
|
733
|
+
'openFileInEmptyWorkspace',
|
|
734
|
+
"Open Active File in New Empty Workspace"
|
|
735
735
|
)); }
|
|
736
736
|
constructor() {
|
|
737
737
|
super({
|
|
738
|
-
id:
|
|
739
|
-
title: { value:
|
|
738
|
+
id: OpenActiveFileInEmptyWorkspace.ID,
|
|
739
|
+
title: { value: OpenActiveFileInEmptyWorkspace.LABEL, original: 'Open Active File in New Empty Workspace' },
|
|
740
740
|
f1: true,
|
|
741
741
|
category: Categories.File,
|
|
742
|
-
keybinding: { primary: KeyChord(2048 | 41 , 45 ), weight: 200 },
|
|
743
742
|
precondition: EmptyWorkspaceSupportContext
|
|
744
743
|
});
|
|
745
744
|
}
|
|
@@ -1165,7 +1164,7 @@ const pasteFileHandler = async (accessor, fileList) => {
|
|
|
1165
1164
|
const hasNativeFilesToPaste = fileList && fileList.length > 0;
|
|
1166
1165
|
const confirmPasteNative = hasNativeFilesToPaste && configurationService.getValue('explorer.confirmPasteNative');
|
|
1167
1166
|
const toPaste = await getFilesToPaste(fileList, clipboardService);
|
|
1168
|
-
if (confirmPasteNative) {
|
|
1167
|
+
if (confirmPasteNative && toPaste?.length >= 1) {
|
|
1169
1168
|
const message = toPaste.length > 1 ?
|
|
1170
1169
|
( localizeWithPath(
|
|
1171
1170
|
'vs/workbench/contrib/files/browser/fileActions',
|
|
@@ -1403,4 +1402,4 @@ class ResetActiveEditorReadonlyInSession extends BaseSetActiveEditorReadonlyInSe
|
|
|
1403
1402
|
super(ResetActiveEditorReadonlyInSession.ID, { value: ResetActiveEditorReadonlyInSession.LABEL, original: 'Reset Active Editor Readonly in Session' }, 'reset');
|
|
1404
1403
|
}
|
|
1405
1404
|
}
|
|
1406
|
-
export { COPY_FILE_LABEL, CloseGroupAction, CompareNewUntitledTextFilesAction, CompareWithClipboardAction, DOWNLOAD_COMMAND_ID, DOWNLOAD_LABEL, FileCopiedContext, FocusFilesExplorer, GlobalCompareResourcesAction, MOVE_FILE_TO_TRASH_LABEL, NEW_FILE_COMMAND_ID, NEW_FILE_LABEL, NEW_FOLDER_COMMAND_ID, NEW_FOLDER_LABEL, PASTE_FILE_LABEL, ResetActiveEditorReadonlyInSession, SaveAllInGroupAction, SetActiveEditorReadonlyInSession, SetActiveEditorWriteableInSession, ShowActiveFileInExplorer,
|
|
1405
|
+
export { COPY_FILE_LABEL, CloseGroupAction, CompareNewUntitledTextFilesAction, CompareWithClipboardAction, DOWNLOAD_COMMAND_ID, DOWNLOAD_LABEL, FileCopiedContext, FocusFilesExplorer, GlobalCompareResourcesAction, MOVE_FILE_TO_TRASH_LABEL, NEW_FILE_COMMAND_ID, NEW_FILE_LABEL, NEW_FOLDER_COMMAND_ID, NEW_FOLDER_LABEL, OpenActiveFileInEmptyWorkspace, PASTE_FILE_LABEL, ResetActiveEditorReadonlyInSession, SaveAllInGroupAction, SetActiveEditorReadonlyInSession, SetActiveEditorWriteableInSession, ShowActiveFileInExplorer, TRIGGER_RENAME_LABEL, ToggleActiveEditorReadonlyInSession, ToggleAutoSaveAction, UPLOAD_COMMAND_ID, UPLOAD_LABEL, copyFileHandler, cutFileHandler, deleteFileHandler, findValidPasteFileTarget, incrementFileName, moveFileToTrashHandler, openFilePreserveFocusHandler, pasteFileHandler, renameHandler, validateFileName };
|
|
@@ -262,7 +262,8 @@ configurationRegistry.registerConfiguration({
|
|
|
262
262
|
AutoSaveConfiguration.ON_FOCUS_CHANGE,
|
|
263
263
|
AutoSaveConfiguration.ON_WINDOW_CHANGE,
|
|
264
264
|
AutoSaveConfiguration.AFTER_DELAY
|
|
265
|
-
))
|
|
265
|
+
)),
|
|
266
|
+
scope: 5
|
|
266
267
|
},
|
|
267
268
|
'files.autoSaveDelay': {
|
|
268
269
|
'type': 'number',
|
|
@@ -273,7 +274,28 @@ configurationRegistry.registerConfiguration({
|
|
|
273
274
|
{ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveDelay' },
|
|
274
275
|
"Controls the delay in milliseconds after which an editor with unsaved changes is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.",
|
|
275
276
|
AutoSaveConfiguration.AFTER_DELAY
|
|
276
|
-
))
|
|
277
|
+
)),
|
|
278
|
+
scope: 5
|
|
279
|
+
},
|
|
280
|
+
'files.autoSaveWorkspaceFilesOnly': {
|
|
281
|
+
'type': 'boolean',
|
|
282
|
+
'default': false,
|
|
283
|
+
'markdownDescription': ( localizeWithPath(
|
|
284
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
285
|
+
{ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveWorkspaceFilesOnly' },
|
|
286
|
+
"When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that are inside the opened workspace. Only applies when `#files.autoSave#` is enabled."
|
|
287
|
+
)),
|
|
288
|
+
scope: 5
|
|
289
|
+
},
|
|
290
|
+
'files.autoSaveWhenNoErrors': {
|
|
291
|
+
'type': 'boolean',
|
|
292
|
+
'default': false,
|
|
293
|
+
'markdownDescription': ( localizeWithPath(
|
|
294
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
295
|
+
{ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveWhenNoErrors' },
|
|
296
|
+
"When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that have no errors reported in them at the time the auto save is triggered. Only applies when `#files.autoSave#` is enabled."
|
|
297
|
+
)),
|
|
298
|
+
scope: 5
|
|
277
299
|
},
|
|
278
300
|
'files.watcherExclude': {
|
|
279
301
|
'type': 'object',
|
|
@@ -461,3 +483,49 @@ configurationRegistry.registerConfiguration({
|
|
|
461
483
|
},
|
|
462
484
|
}
|
|
463
485
|
});
|
|
486
|
+
configurationRegistry.registerConfiguration({
|
|
487
|
+
...editorConfigurationBaseNode,
|
|
488
|
+
properties: {
|
|
489
|
+
'editor.formatOnSave': {
|
|
490
|
+
'type': 'boolean',
|
|
491
|
+
'description': ( localizeWithPath(
|
|
492
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
493
|
+
'formatOnSave',
|
|
494
|
+
"Format a file on save. A formatter must be available, the file must not be saved after delay, and the editor must not be shutting down."
|
|
495
|
+
)),
|
|
496
|
+
'scope': 5 ,
|
|
497
|
+
},
|
|
498
|
+
'editor.formatOnSaveMode': {
|
|
499
|
+
'type': 'string',
|
|
500
|
+
'default': 'file',
|
|
501
|
+
'enum': [
|
|
502
|
+
'file',
|
|
503
|
+
'modifications',
|
|
504
|
+
'modificationsIfAvailable'
|
|
505
|
+
],
|
|
506
|
+
'enumDescriptions': [
|
|
507
|
+
( localizeWithPath(
|
|
508
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
509
|
+
{ key: 'everything', comment: ['This is the description of an option'] },
|
|
510
|
+
"Format the whole file."
|
|
511
|
+
)),
|
|
512
|
+
( localizeWithPath(
|
|
513
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
514
|
+
{ key: 'modification', comment: ['This is the description of an option'] },
|
|
515
|
+
"Format modifications (requires source control)."
|
|
516
|
+
)),
|
|
517
|
+
( localizeWithPath(
|
|
518
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
519
|
+
{ key: 'modificationIfAvailable', comment: ['This is the description of an option'] },
|
|
520
|
+
"Will attempt to format modifications only (requires source control). If source control can't be used, then the whole file will be formatted."
|
|
521
|
+
)),
|
|
522
|
+
],
|
|
523
|
+
'markdownDescription': ( localizeWithPath(
|
|
524
|
+
'vs/workbench/contrib/files/browser/files.configuration.contribution',
|
|
525
|
+
'formatOnSaveMode',
|
|
526
|
+
"Controls if format on save formats the whole file or only modifications. Only applies when `#editor.formatOnSave#` is enabled."
|
|
527
|
+
)),
|
|
528
|
+
'scope': 5 ,
|
|
529
|
+
},
|
|
530
|
+
}
|
|
531
|
+
});
|
|
@@ -42,14 +42,17 @@ declare const IExplorerService: ServiceIdentifier<IExplorerService>;
|
|
|
42
42
|
interface IExplorerView {
|
|
43
43
|
autoReveal: boolean | 'force' | 'focusNoScroll';
|
|
44
44
|
getContext(respectMultiSelection: boolean): ExplorerItem[];
|
|
45
|
-
refresh(recursive: boolean, item?: ExplorerItem): Promise<void>;
|
|
46
|
-
selectResource(resource: URI | undefined, reveal?: boolean | string): Promise<void>;
|
|
45
|
+
refresh(recursive: boolean, item?: ExplorerItem, cancelEditing?: boolean): Promise<void>;
|
|
46
|
+
selectResource(resource: URI | undefined, reveal?: boolean | string, retry?: number): Promise<void>;
|
|
47
47
|
setTreeInput(): Promise<void>;
|
|
48
48
|
itemsCopied(tats: ExplorerItem[], cut: boolean, previousCut: ExplorerItem[] | undefined): void;
|
|
49
49
|
setEditable(stat: ExplorerItem, isEditing: boolean): Promise<void>;
|
|
50
50
|
isItemVisible(item: ExplorerItem): boolean;
|
|
51
51
|
isItemCollapsed(item: ExplorerItem): boolean;
|
|
52
52
|
hasFocus(): boolean;
|
|
53
|
+
getFocus(): ExplorerItem[];
|
|
54
|
+
focusNext(): void;
|
|
55
|
+
focusLast(): void;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
export { IExplorerService, type IExplorerView };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
2
|
+
import { EditorExtensions } from '../../../common/editor.js';
|
|
3
|
+
import { FileEditorInput } from './editors/fileEditorInput.js';
|
|
4
|
+
import { FILE_EDITOR_INPUT_ID } from '../common/files.js';
|
|
5
|
+
( Registry.as(EditorExtensions.EditorFactory)).registerFileEditorFactory({
|
|
6
|
+
typeId: FILE_EDITOR_INPUT_ID,
|
|
7
|
+
createFileEditor: (resource, preferredResource, preferredName, preferredDescription, preferredEncoding, preferredLanguageId, preferredContents, instantiationService) => {
|
|
8
|
+
return instantiationService.createInstance(FileEditorInput, resource, preferredResource, preferredName, preferredDescription, preferredEncoding, preferredLanguageId, preferredContents);
|
|
9
|
+
},
|
|
10
|
+
isFileEditor: (obj) => {
|
|
11
|
+
return obj instanceof FileEditorInput;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -8,7 +8,7 @@ import { isTemporaryWorkspace, IWorkspaceContextService } from '../../../../../p
|
|
|
8
8
|
import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';
|
|
9
9
|
import { ViewPane } from '../../../../browser/parts/views/viewPane.js';
|
|
10
10
|
import { ResourcesDropHandler } from '../../../../browser/dnd.js';
|
|
11
|
-
import {
|
|
11
|
+
import { listDropOverBackground } from '../../../../../platform/theme/common/colorRegistry.js';
|
|
12
12
|
import { ILabelService } from '../../../../../platform/label/common/label.js';
|
|
13
13
|
import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';
|
|
14
14
|
import { IViewDescriptorService } from '../../../../common/views.js';
|
|
@@ -45,7 +45,7 @@ let EmptyView = class EmptyView extends ViewPane {
|
|
|
45
45
|
dropHandler.handleDrop(e, getWindow(container));
|
|
46
46
|
},
|
|
47
47
|
onDragEnter: () => {
|
|
48
|
-
const color = this.themeService.getColorTheme().getColor(
|
|
48
|
+
const color = this.themeService.getColorTheme().getColor(listDropOverBackground);
|
|
49
49
|
container.style.backgroundColor = color ? ( color.toString()) : '';
|
|
50
50
|
},
|
|
51
51
|
onDragEnd: () => {
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../../../external/tslib/tsli
|
|
|
2
2
|
import { localizeWithPath } from '../../../../../nls.js';
|
|
3
3
|
import { mark } from '../../../../../base/common/performance.js';
|
|
4
4
|
import { memoize } from '../../../../../base/common/decorators.js';
|
|
5
|
-
import { ExplorerFolderContext, ExplorerResourceReadonlyContext, ExplorerResourceAvailableEditorIdsContext, ExplorerRootContext, ExplorerResourceMoveableToTrash, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, ViewHasSomeCollapsibleRootItemContext, FoldersViewVisibleContext, ExplorerResourceCut, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerResourceNotReadonlyContext, VIEW_ID
|
|
5
|
+
import { ExplorerFolderContext, ExplorerResourceReadonlyContext, ExplorerResourceAvailableEditorIdsContext, ExplorerRootContext, ExplorerResourceMoveableToTrash, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, ViewHasSomeCollapsibleRootItemContext, FoldersViewVisibleContext, ExplorerResourceCut, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerResourceNotReadonlyContext, VIEW_ID } from '../../common/files.js';
|
|
6
6
|
import { FileCopiedContext, NEW_FILE_COMMAND_ID, NEW_FOLDER_COMMAND_ID } from '../fileActions.js';
|
|
7
7
|
import { append, $, addDisposableListener, getWindow, isAncestorOfActiveElement, isKeyboardEvent, getLargestChildWidth, EventType } from '../../../../../base/browser/dom.js';
|
|
8
8
|
import { IWorkbenchLayoutService } from '../../../../services/layout/browser/layoutService.js';
|
|
@@ -32,7 +32,8 @@ import { IClipboardService } from '../../../../../platform/clipboard/common/clip
|
|
|
32
32
|
import { IFileService } from '../../../../../platform/files/common/files.js';
|
|
33
33
|
import { Event } from '../../../../../base/common/event.js';
|
|
34
34
|
import { SIDE_BAR_BACKGROUND } from '../../../../common/theme.js';
|
|
35
|
-
import { IViewDescriptorService
|
|
35
|
+
import { IViewDescriptorService } from '../../../../common/views.js';
|
|
36
|
+
import { IViewsService } from '../../../../services/views/common/viewsService.js';
|
|
36
37
|
import { IOpenerService } from '../../../../../platform/opener/common/opener.js';
|
|
37
38
|
import { IUriIdentityService } from '../../../../../platform/uriIdentity/common/uriIdentity.js';
|
|
38
39
|
import { EditorResourceAccessor, SideBySideEditor } from '../../../../common/editor.js';
|
|
@@ -40,7 +41,6 @@ import { IExplorerService } from '../files.js';
|
|
|
40
41
|
import { Codicon } from '../../../../../base/common/codicons.js';
|
|
41
42
|
import { ICommandService } from '../../../../../platform/commands/common/commands.js';
|
|
42
43
|
import { IEditorResolverService } from '../../../../services/editor/common/editorResolverService.js';
|
|
43
|
-
import { IPaneCompositePartService } from '../../../../services/panecomposite/browser/panecomposite.js';
|
|
44
44
|
import { EditorOpenSource } from '../../../../../platform/editor/common/editor.js';
|
|
45
45
|
import { ResourceMap } from '../../../../../base/common/map.js';
|
|
46
46
|
import { isInputElement } from '../../../../../base/browser/ui/list/listWidget.js';
|
|
@@ -227,16 +227,30 @@ let ExplorerView = class ExplorerView extends ViewPane {
|
|
|
227
227
|
focus() {
|
|
228
228
|
super.focus();
|
|
229
229
|
this.tree.domFocus();
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
if (this.tree.getFocusedPart() === 0 ) {
|
|
231
|
+
const focused = this.tree.getFocus();
|
|
232
|
+
if (focused.length === 1 && this._autoReveal) {
|
|
233
|
+
this.tree.reveal(focused[0], 0.5);
|
|
234
|
+
}
|
|
233
235
|
}
|
|
234
236
|
}
|
|
235
237
|
hasFocus() {
|
|
236
238
|
return isAncestorOfActiveElement(this.container);
|
|
237
239
|
}
|
|
240
|
+
getFocus() {
|
|
241
|
+
return this.tree.getFocus();
|
|
242
|
+
}
|
|
243
|
+
focusNext() {
|
|
244
|
+
this.tree.focusNext();
|
|
245
|
+
}
|
|
246
|
+
focusLast() {
|
|
247
|
+
this.tree.focusLast();
|
|
248
|
+
}
|
|
238
249
|
getContext(respectMultiSelection) {
|
|
239
|
-
|
|
250
|
+
const focusedItems = this.tree.getFocusedPart() === 1 ?
|
|
251
|
+
this.tree.getStickyScrollFocus() :
|
|
252
|
+
this.tree.getFocus();
|
|
253
|
+
return getContext(focusedItems, this.tree.getSelection(), respectMultiSelection, this.renderer);
|
|
240
254
|
}
|
|
241
255
|
isItemVisible(item) {
|
|
242
256
|
if (!this.filter) {
|
|
@@ -500,9 +514,7 @@ let ExplorerView = class ExplorerView extends ViewPane {
|
|
|
500
514
|
this.tree.domFocus();
|
|
501
515
|
}
|
|
502
516
|
const toRefresh = item || this.tree.getInput();
|
|
503
|
-
return this.tree.updateChildren(toRefresh, recursive, !!item
|
|
504
|
-
diffIdentityProvider: identityProvider
|
|
505
|
-
});
|
|
517
|
+
return this.tree.updateChildren(toRefresh, recursive, !!item);
|
|
506
518
|
}
|
|
507
519
|
getOptimalWidth() {
|
|
508
520
|
const parentNode = this.tree.getHTMLElement();
|
|
@@ -594,13 +606,18 @@ let ExplorerView = class ExplorerView extends ViewPane {
|
|
|
594
606
|
catch (e) {
|
|
595
607
|
return this.selectResource(resource, reveal, retry + 1);
|
|
596
608
|
}
|
|
597
|
-
|
|
598
|
-
if (this.uriIdentityService.extUri.isEqualOrParent(resource, child.resource)) {
|
|
599
|
-
item = child;
|
|
600
|
-
break;
|
|
601
|
-
}
|
|
609
|
+
if (!item.children.size) {
|
|
602
610
|
item = null;
|
|
603
611
|
}
|
|
612
|
+
else {
|
|
613
|
+
for (const child of ( item.children.values())) {
|
|
614
|
+
if (this.uriIdentityService.extUri.isEqualOrParent(resource, child.resource)) {
|
|
615
|
+
item = child;
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
item = null;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
604
621
|
}
|
|
605
622
|
if (item) {
|
|
606
623
|
if (item === this.tree.getInput()) {
|
|
@@ -824,9 +841,9 @@ registerAction2(class extends Action2 {
|
|
|
824
841
|
});
|
|
825
842
|
}
|
|
826
843
|
async run(accessor) {
|
|
827
|
-
const
|
|
844
|
+
const viewsService = accessor.get(IViewsService);
|
|
828
845
|
const explorerService = accessor.get(IExplorerService);
|
|
829
|
-
await
|
|
846
|
+
await viewsService.openView(VIEW_ID);
|
|
830
847
|
await explorerService.refresh();
|
|
831
848
|
}
|
|
832
849
|
});
|