monaco-editor-core 0.55.0-dev-20251106 → 0.55.0-rc
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/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +0 -6
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js +24 -83
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +13 -17
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +81 -9
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +54 -54
- package/esm/vs/editor/common/config/editorOptions.js +407 -407
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/editorContextKeys.js +47 -47
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/textModelEditSource.js +2 -2
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/format.js +3 -7
- package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +10 -10
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +29 -29
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/format/browser/format.ts","vs/editor/contrib/format/browser/format.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAA2B,MAAM,yCAAyC,CAAC;AACrG,OAAO,EAAE,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AAC","file":"format.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { asArray, isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedExternalError } from '../../../../base/common/errors.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../../base/common/linkedList.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport { CodeEditorStateFlag, EditorStateCancellationTokenSource, TextModelCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { IActiveCodeEditor, isCodeEditor } from '../../../browser/editorBrowser.js';\nimport { ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, FormattingOptions, TextEdit } from '../../../common/languages.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { FormattingEdit } from './formattingEdit.js';\nimport { CommandsRegistry } from '../../../../platform/commands/common/commands.js';\nimport { ExtensionIdentifierSet } from '../../../../platform/extensions/common/extensions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IProgress } from '../../../../platform/progress/common/progress.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\n\nexport function getRealAndSyntheticDocumentFormattersOrdered(\n\tdocumentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>,\n\tdocumentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>,\n\tmodel: ITextModel\n): DocumentFormattingEditProvider[] {\n\tconst result: DocumentFormattingEditProvider[] = [];\n\tconst seen = new ExtensionIdentifierSet();\n\n\t// (1) add all document formatter\n\tconst docFormatter = documentFormattingEditProvider.ordered(model);\n\tfor (const formatter of docFormatter) {\n\t\tresult.push(formatter);\n\t\tif (formatter.extensionId) {\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t}\n\n\t// (2) add all range formatter as document formatter (unless the same extension already did that)\n\tconst rangeFormatter = documentRangeFormattingEditProvider.ordered(model);\n\tfor (const formatter of rangeFormatter) {\n\t\tif (formatter.extensionId) {\n\t\t\tif (seen.has(formatter.extensionId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t\tresult.push({\n\t\t\tdisplayName: formatter.displayName,\n\t\t\textensionId: formatter.extensionId,\n\t\t\tprovideDocumentFormattingEdits(model, options, token) {\n\t\t\t\treturn formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token);\n\t\t\t}\n\t\t});\n\t}\n\treturn result;\n}\n\nexport const enum FormattingKind {\n\tFile = 1,\n\tSelection = 2\n}\n\nexport const enum FormattingMode {\n\tExplicit = 1,\n\tSilent = 2\n}\n\nexport interface IFormattingEditProviderSelector {\n\t<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined>;\n}\n\nexport abstract class FormattingConflicts {\n\n\tprivate static readonly _selectors = new LinkedList<IFormattingEditProviderSelector>();\n\n\tstatic setFormatterSelector(selector: IFormattingEditProviderSelector): IDisposable {\n\t\tconst remove = FormattingConflicts._selectors.unshift(selector);\n\t\treturn { dispose: remove };\n\t}\n\n\tstatic async select<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined> {\n\t\tif (formatter.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst selector = Iterable.first(FormattingConflicts._selectors);\n\t\tif (selector) {\n\t\t\treturn await selector(formatter, document, mode, kind);\n\t\t}\n\t\treturn undefined;\n\t}\n}\n\nexport async function formatDocumentRangesWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentRangeFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst { documentRangeFormattingEditProvider: documentRangeFormattingEditProviderRegistry } = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = documentRangeFormattingEditProviderRegistry.ordered(model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.Selection);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentRangesWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentRangeFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst logService = accessor.get(ILogService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\t// make sure that ranges don't overlap nor touch each other\n\tconst ranges: Range[] = [];\n\tlet len = 0;\n\tfor (const range of asArray(rangeOrRanges).sort(Range.compareRangesUsingStarts)) {\n\t\tif (len > 0 && Range.areIntersectingOrTouching(ranges[len - 1], range)) {\n\t\t\tranges[len - 1] = Range.fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition());\n\t\t} else {\n\t\t\tlen = ranges.push(range);\n\t\t}\n\t}\n\n\tconst computeEdits = async (range: Range) => {\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, range);\n\n\t\tconst result = (await provider.provideDocumentRangeFormattingEdits(\n\t\t\tmodel,\n\t\t\trange,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t)) || [];\n\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\n\t\treturn result;\n\t};\n\n\tconst hasIntersectingEdit = (a: TextEdit[], b: TextEdit[]) => {\n\t\tif (!a.length || !b.length) {\n\t\t\treturn false;\n\t\t}\n\t\t// quick exit if the list of ranges are completely unrelated [O(n)]\n\t\tconst mergedA = a.reduce((acc, val) => { return Range.plusRange(acc, val.range); }, a[0].range);\n\t\tif (!b.some(x => { return Range.intersectRanges(mergedA, x.range); })) {\n\t\t\treturn false;\n\t\t}\n\t\t// fallback to a complete check [O(n^2)]\n\t\tfor (const edit of a) {\n\t\t\tfor (const otherEdit of b) {\n\t\t\t\tif (Range.intersectRanges(edit.range, otherEdit.range)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tconst allEdits: TextEdit[] = [];\n\tconst rawEditsList: TextEdit[][] = [];\n\ttry {\n\t\tif (typeof provider.provideDocumentRangesFormattingEdits === 'function') {\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, ranges);\n\t\t\tconst result = (await provider.provideDocumentRangesFormattingEdits(\n\t\t\t\tmodel,\n\t\t\t\tranges,\n\t\t\t\tmodel.getFormattingOptions(),\n\t\t\t\tcts.token\n\t\t\t)) || [];\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\t\t\trawEditsList.push(result);\n\t\t} else {\n\n\t\t\tfor (const range of ranges) {\n\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\trawEditsList.push(await computeEdits(range));\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < ranges.length; ++i) {\n\t\t\t\tfor (let j = i + 1; j < ranges.length; ++j) {\n\t\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasIntersectingEdit(rawEditsList[i], rawEditsList[j])) {\n\t\t\t\t\t\t// Merge ranges i and j into a single range, recompute the associated edits\n\t\t\t\t\t\tconst mergedRange = Range.plusRange(ranges[i], ranges[j]);\n\t\t\t\t\t\tconst edits = await computeEdits(mergedRange);\n\t\t\t\t\t\tranges.splice(j, 1);\n\t\t\t\t\t\tranges.splice(i, 1);\n\t\t\t\t\t\tranges.push(mergedRange);\n\t\t\t\t\t\trawEditsList.splice(j, 1);\n\t\t\t\t\t\trawEditsList.splice(i, 1);\n\t\t\t\t\t\trawEditsList.push(edits);\n\t\t\t\t\t\t// Restart scanning\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const rawEdits of rawEditsList) {\n\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst minimalEdits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t\tif (minimalEdits) {\n\t\t\t\tallEdits.push(...minimalEdits);\n\t\t\t}\n\t\t}\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (allEdits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, allEdits, true);\n\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = allEdits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], allEdits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function formatDocumentWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.File);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\tlet edits: TextEdit[] | undefined;\n\ttry {\n\t\tconst rawEdits = await provider.provideDocumentFormattingEdits(\n\t\t\tmodel,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t);\n\n\t\tedits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (!edits || edits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, edits, mode !== FormattingMode.Silent);\n\n\t\tif (mode !== FormattingMode.Silent) {\n\t\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\t\t}\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = edits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], edits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function getDocumentRangeFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\trange: Range,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = languageFeaturesService.documentRangeFormattingEditProvider.ordered(model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport async function getDocumentFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport function getOnTypeFormattingEdits(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\tposition: Position,\n\tch: string,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | null | undefined> {\n\n\tconst providers = languageFeaturesService.onTypeFormattingEditProvider.ordered(model);\n\n\tif (providers.length === 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\tif (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\treturn Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, token)).catch(onUnexpectedExternalError).then(edits => {\n\t\treturn workerService.computeMoreMinimalEdits(model.uri, edits);\n\t});\n}\n\nfunction isFormattingOptions(obj: unknown): obj is FormattingOptions {\n\tconst candidate = obj as FormattingOptions | undefined;\n\n\treturn !!candidate && typeof candidate === 'object' && typeof candidate.tabSize === 'number' && typeof candidate.insertSpaces === 'boolean';\n}\n\nCommandsRegistry.registerCommand('_executeFormatRangeProvider', async function (accessor, ...args) {\n\tconst [resource, range, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Range.isIRange(range));\n\tassertType(isFormattingOptions(options));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentRangeFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, Range.lift(range), options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\nCommandsRegistry.registerCommand('_executeFormatDocumentProvider', async function (accessor, ...args) {\n\tconst [resource, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(isFormattingOptions(options));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\nCommandsRegistry.registerCommand('_executeFormatOnTypeProvider', async function (accessor, ...args) {\n\tconst [resource, position, ch, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Position.isIPosition(position));\n\tassertType(typeof ch === 'string');\n\tassertType(isFormattingOptions(options));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getOnTypeFormattingEdits(workerService, languageFeaturesService, reference.object.textEditorModel, Position.lift(position), ch, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { asArray, isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedExternalError } from '../../../../base/common/errors.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../../base/common/linkedList.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport { CodeEditorStateFlag, EditorStateCancellationTokenSource, TextModelCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { IActiveCodeEditor, isCodeEditor } from '../../../browser/editorBrowser.js';\nimport { ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, FormattingOptions, TextEdit } from '../../../common/languages.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { FormattingEdit } from './formattingEdit.js';\nimport { CommandsRegistry } from '../../../../platform/commands/common/commands.js';\nimport { ExtensionIdentifierSet } from '../../../../platform/extensions/common/extensions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IProgress } from '../../../../platform/progress/common/progress.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\n\nexport function getRealAndSyntheticDocumentFormattersOrdered(\n\tdocumentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>,\n\tdocumentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>,\n\tmodel: ITextModel\n): DocumentFormattingEditProvider[] {\n\tconst result: DocumentFormattingEditProvider[] = [];\n\tconst seen = new ExtensionIdentifierSet();\n\n\t// (1) add all document formatter\n\tconst docFormatter = documentFormattingEditProvider.ordered(model);\n\tfor (const formatter of docFormatter) {\n\t\tresult.push(formatter);\n\t\tif (formatter.extensionId) {\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t}\n\n\t// (2) add all range formatter as document formatter (unless the same extension already did that)\n\tconst rangeFormatter = documentRangeFormattingEditProvider.ordered(model);\n\tfor (const formatter of rangeFormatter) {\n\t\tif (formatter.extensionId) {\n\t\t\tif (seen.has(formatter.extensionId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t\tresult.push({\n\t\t\tdisplayName: formatter.displayName,\n\t\t\textensionId: formatter.extensionId,\n\t\t\tprovideDocumentFormattingEdits(model, options, token) {\n\t\t\t\treturn formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token);\n\t\t\t}\n\t\t});\n\t}\n\treturn result;\n}\n\nexport const enum FormattingKind {\n\tFile = 1,\n\tSelection = 2\n}\n\nexport const enum FormattingMode {\n\tExplicit = 1,\n\tSilent = 2\n}\n\nexport interface IFormattingEditProviderSelector {\n\t<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined>;\n}\n\nexport abstract class FormattingConflicts {\n\n\tprivate static readonly _selectors = new LinkedList<IFormattingEditProviderSelector>();\n\n\tstatic setFormatterSelector(selector: IFormattingEditProviderSelector): IDisposable {\n\t\tconst remove = FormattingConflicts._selectors.unshift(selector);\n\t\treturn { dispose: remove };\n\t}\n\n\tstatic async select<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined> {\n\t\tif (formatter.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst selector = Iterable.first(FormattingConflicts._selectors);\n\t\tif (selector) {\n\t\t\treturn await selector(formatter, document, mode, kind);\n\t\t}\n\t\treturn undefined;\n\t}\n}\n\nexport async function formatDocumentRangesWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentRangeFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst { documentRangeFormattingEditProvider: documentRangeFormattingEditProviderRegistry } = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = documentRangeFormattingEditProviderRegistry.ordered(model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.Selection);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentRangesWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentRangeFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst logService = accessor.get(ILogService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\t// make sure that ranges don't overlap nor touch each other\n\tconst ranges: Range[] = [];\n\tlet len = 0;\n\tfor (const range of asArray(rangeOrRanges).sort(Range.compareRangesUsingStarts)) {\n\t\tif (len > 0 && Range.areIntersectingOrTouching(ranges[len - 1], range)) {\n\t\t\tranges[len - 1] = Range.fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition());\n\t\t} else {\n\t\t\tlen = ranges.push(range);\n\t\t}\n\t}\n\n\tconst computeEdits = async (range: Range) => {\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, range);\n\n\t\tconst result = (await provider.provideDocumentRangeFormattingEdits(\n\t\t\tmodel,\n\t\t\trange,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t)) || [];\n\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\n\t\treturn result;\n\t};\n\n\tconst hasIntersectingEdit = (a: TextEdit[], b: TextEdit[]) => {\n\t\tif (!a.length || !b.length) {\n\t\t\treturn false;\n\t\t}\n\t\t// quick exit if the list of ranges are completely unrelated [O(n)]\n\t\tconst mergedA = a.reduce((acc, val) => { return Range.plusRange(acc, val.range); }, a[0].range);\n\t\tif (!b.some(x => { return Range.intersectRanges(mergedA, x.range); })) {\n\t\t\treturn false;\n\t\t}\n\t\t// fallback to a complete check [O(n^2)]\n\t\tfor (const edit of a) {\n\t\t\tfor (const otherEdit of b) {\n\t\t\t\tif (Range.intersectRanges(edit.range, otherEdit.range)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tconst allEdits: TextEdit[] = [];\n\tconst rawEditsList: TextEdit[][] = [];\n\ttry {\n\t\tif (typeof provider.provideDocumentRangesFormattingEdits === 'function') {\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, ranges);\n\t\t\tconst result = (await provider.provideDocumentRangesFormattingEdits(\n\t\t\t\tmodel,\n\t\t\t\tranges,\n\t\t\t\tmodel.getFormattingOptions(),\n\t\t\t\tcts.token\n\t\t\t)) || [];\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\t\t\trawEditsList.push(result);\n\t\t} else {\n\n\t\t\tfor (const range of ranges) {\n\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\trawEditsList.push(await computeEdits(range));\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < ranges.length; ++i) {\n\t\t\t\tfor (let j = i + 1; j < ranges.length; ++j) {\n\t\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasIntersectingEdit(rawEditsList[i], rawEditsList[j])) {\n\t\t\t\t\t\t// Merge ranges i and j into a single range, recompute the associated edits\n\t\t\t\t\t\tconst mergedRange = Range.plusRange(ranges[i], ranges[j]);\n\t\t\t\t\t\tconst edits = await computeEdits(mergedRange);\n\t\t\t\t\t\tranges.splice(j, 1);\n\t\t\t\t\t\tranges.splice(i, 1);\n\t\t\t\t\t\tranges.push(mergedRange);\n\t\t\t\t\t\trawEditsList.splice(j, 1);\n\t\t\t\t\t\trawEditsList.splice(i, 1);\n\t\t\t\t\t\trawEditsList.push(edits);\n\t\t\t\t\t\t// Restart scanning\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const rawEdits of rawEditsList) {\n\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst minimalEdits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t\tif (minimalEdits) {\n\t\t\t\tallEdits.push(...minimalEdits);\n\t\t\t}\n\t\t}\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (allEdits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, allEdits, true);\n\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = allEdits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], allEdits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function formatDocumentWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.File);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\tlet edits: TextEdit[] | undefined;\n\ttry {\n\t\tconst rawEdits = await provider.provideDocumentFormattingEdits(\n\t\t\tmodel,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t);\n\n\t\tedits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (!edits || edits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, edits, mode !== FormattingMode.Silent);\n\n\t\tif (mode !== FormattingMode.Silent) {\n\t\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\t\t}\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = edits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], edits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function getDocumentRangeFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\trange: Range,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = languageFeaturesService.documentRangeFormattingEditProvider.ordered(model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport async function getDocumentFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport function getOnTypeFormattingEdits(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\tposition: Position,\n\tch: string,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | null | undefined> {\n\n\tconst providers = languageFeaturesService.onTypeFormattingEditProvider.ordered(model);\n\n\tif (providers.length === 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\tif (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\treturn Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, token)).catch(onUnexpectedExternalError).then(edits => {\n\t\treturn workerService.computeMoreMinimalEdits(model.uri, edits);\n\t});\n}\n\nfunction isFormattingOptions(obj: unknown): obj is FormattingOptions {\n\tconst candidate = obj as FormattingOptions | undefined;\n\n\treturn !!candidate && typeof candidate === 'object' && typeof candidate.tabSize === 'number' && typeof candidate.insertSpaces === 'boolean';\n}\n\nCommandsRegistry.registerCommand('_executeFormatRangeProvider', async function (accessor, ...args) {\n\tconst [resource, range, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Range.isIRange(range));\n\tassertType(isFormattingOptions(options));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentRangeFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, Range.lift(range), options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\nCommandsRegistry.registerCommand('_executeFormatDocumentProvider', async function (accessor, ...args) {\n\tconst [resource, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(isFormattingOptions(options));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\nCommandsRegistry.registerCommand('_executeFormatOnTypeProvider', async function (accessor, ...args) {\n\tconst [resource, position, ch, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Position.isIPosition(position));\n\tassertType(typeof ch === 'string');\n\tassertType(isFormattingOptions(options));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getOnTypeFormattingEdits(workerService, languageFeaturesService, reference.object.textEditorModel, Position.lift(position), ch, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/format/browser/format.ts","vs/editor/contrib/format/browser/format.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAA2B,MAAM,yCAAyC,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAuB,kCAAkC,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACrJ,OAAO,EAAqB,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAI9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,MAAM,eAAe,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACvE,IAAI,CAAC;QACJ,OAAO,wBAAwB,CAAC,aAAa,EAAE,uBAAuB,EAAE,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzK,CAAC;YAAS,CAAC;QACV,SAAS,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACF,CAAC,CAAC,CAAC","file":"format.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { asArray, isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedExternalError } from '../../../../base/common/errors.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../../base/common/linkedList.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport { CodeEditorStateFlag, EditorStateCancellationTokenSource, TextModelCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { IActiveCodeEditor, isCodeEditor } from '../../../browser/editorBrowser.js';\nimport { ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, FormattingOptions, TextEdit } from '../../../common/languages.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { FormattingEdit } from './formattingEdit.js';\nimport { CommandsRegistry } from '../../../../platform/commands/common/commands.js';\nimport { ExtensionIdentifierSet } from '../../../../platform/extensions/common/extensions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IProgress } from '../../../../platform/progress/common/progress.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\n\nexport function getRealAndSyntheticDocumentFormattersOrdered(\n\tdocumentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>,\n\tdocumentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>,\n\tmodel: ITextModel\n): DocumentFormattingEditProvider[] {\n\tconst result: DocumentFormattingEditProvider[] = [];\n\tconst seen = new ExtensionIdentifierSet();\n\n\t// (1) add all document formatter\n\tconst docFormatter = documentFormattingEditProvider.ordered(model);\n\tfor (const formatter of docFormatter) {\n\t\tresult.push(formatter);\n\t\tif (formatter.extensionId) {\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t}\n\n\t// (2) add all range formatter as document formatter (unless the same extension already did that)\n\tconst rangeFormatter = documentRangeFormattingEditProvider.ordered(model);\n\tfor (const formatter of rangeFormatter) {\n\t\tif (formatter.extensionId) {\n\t\t\tif (seen.has(formatter.extensionId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t\tresult.push({\n\t\t\tdisplayName: formatter.displayName,\n\t\t\textensionId: formatter.extensionId,\n\t\t\tprovideDocumentFormattingEdits(model, options, token) {\n\t\t\t\treturn formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token);\n\t\t\t}\n\t\t});\n\t}\n\treturn result;\n}\n\nexport const enum FormattingKind {\n\tFile = 1,\n\tSelection = 2\n}\n\nexport const enum FormattingMode {\n\tExplicit = 1,\n\tSilent = 2\n}\n\nexport interface IFormattingEditProviderSelector {\n\t<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined>;\n}\n\nexport abstract class FormattingConflicts {\n\n\tprivate static readonly _selectors = new LinkedList<IFormattingEditProviderSelector>();\n\n\tstatic setFormatterSelector(selector: IFormattingEditProviderSelector): IDisposable {\n\t\tconst remove = FormattingConflicts._selectors.unshift(selector);\n\t\treturn { dispose: remove };\n\t}\n\n\tstatic async select<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined> {\n\t\tif (formatter.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst selector = Iterable.first(FormattingConflicts._selectors);\n\t\tif (selector) {\n\t\t\treturn await selector(formatter, document, mode, kind);\n\t\t}\n\t\treturn undefined;\n\t}\n}\n\nexport async function formatDocumentRangesWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentRangeFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst { documentRangeFormattingEditProvider: documentRangeFormattingEditProviderRegistry } = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = documentRangeFormattingEditProviderRegistry.ordered(model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.Selection);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentRangesWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentRangeFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst logService = accessor.get(ILogService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\t// make sure that ranges don't overlap nor touch each other\n\tconst ranges: Range[] = [];\n\tlet len = 0;\n\tfor (const range of asArray(rangeOrRanges).sort(Range.compareRangesUsingStarts)) {\n\t\tif (len > 0 && Range.areIntersectingOrTouching(ranges[len - 1], range)) {\n\t\t\tranges[len - 1] = Range.fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition());\n\t\t} else {\n\t\t\tlen = ranges.push(range);\n\t\t}\n\t}\n\n\tconst computeEdits = async (range: Range) => {\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, range);\n\n\t\tconst result = (await provider.provideDocumentRangeFormattingEdits(\n\t\t\tmodel,\n\t\t\trange,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t)) || [];\n\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\n\t\treturn result;\n\t};\n\n\tconst hasIntersectingEdit = (a: TextEdit[], b: TextEdit[]) => {\n\t\tif (!a.length || !b.length) {\n\t\t\treturn false;\n\t\t}\n\t\t// quick exit if the list of ranges are completely unrelated [O(n)]\n\t\tconst mergedA = a.reduce((acc, val) => { return Range.plusRange(acc, val.range); }, a[0].range);\n\t\tif (!b.some(x => { return Range.intersectRanges(mergedA, x.range); })) {\n\t\t\treturn false;\n\t\t}\n\t\t// fallback to a complete check [O(n^2)]\n\t\tfor (const edit of a) {\n\t\t\tfor (const otherEdit of b) {\n\t\t\t\tif (Range.intersectRanges(edit.range, otherEdit.range)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tconst allEdits: TextEdit[] = [];\n\tconst rawEditsList: TextEdit[][] = [];\n\ttry {\n\t\tif (typeof provider.provideDocumentRangesFormattingEdits === 'function') {\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, ranges);\n\t\t\tconst result = (await provider.provideDocumentRangesFormattingEdits(\n\t\t\t\tmodel,\n\t\t\t\tranges,\n\t\t\t\tmodel.getFormattingOptions(),\n\t\t\t\tcts.token\n\t\t\t)) || [];\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\t\t\trawEditsList.push(result);\n\t\t} else {\n\n\t\t\tfor (const range of ranges) {\n\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\trawEditsList.push(await computeEdits(range));\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < ranges.length; ++i) {\n\t\t\t\tfor (let j = i + 1; j < ranges.length; ++j) {\n\t\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasIntersectingEdit(rawEditsList[i], rawEditsList[j])) {\n\t\t\t\t\t\t// Merge ranges i and j into a single range, recompute the associated edits\n\t\t\t\t\t\tconst mergedRange = Range.plusRange(ranges[i], ranges[j]);\n\t\t\t\t\t\tconst edits = await computeEdits(mergedRange);\n\t\t\t\t\t\tranges.splice(j, 1);\n\t\t\t\t\t\tranges.splice(i, 1);\n\t\t\t\t\t\tranges.push(mergedRange);\n\t\t\t\t\t\trawEditsList.splice(j, 1);\n\t\t\t\t\t\trawEditsList.splice(i, 1);\n\t\t\t\t\t\trawEditsList.push(edits);\n\t\t\t\t\t\t// Restart scanning\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const rawEdits of rawEditsList) {\n\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst minimalEdits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t\tif (minimalEdits) {\n\t\t\t\tallEdits.push(...minimalEdits);\n\t\t\t}\n\t\t}\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (allEdits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, allEdits, true);\n\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = allEdits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], allEdits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function formatDocumentWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.File);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\tlet edits: TextEdit[] | undefined;\n\ttry {\n\t\tconst rawEdits = await provider.provideDocumentFormattingEdits(\n\t\t\tmodel,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t);\n\n\t\tedits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (!edits || edits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, edits, mode !== FormattingMode.Silent);\n\n\t\tif (mode !== FormattingMode.Silent) {\n\t\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\t\t}\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = edits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], edits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function getDocumentRangeFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\trange: Range,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = languageFeaturesService.documentRangeFormattingEditProvider.ordered(model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport async function getDocumentFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport function getOnTypeFormattingEdits(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\tposition: Position,\n\tch: string,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | null | undefined> {\n\n\tconst providers = languageFeaturesService.onTypeFormattingEditProvider.ordered(model);\n\n\tif (providers.length === 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\tif (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\treturn Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, token)).catch(onUnexpectedExternalError).then(edits => {\n\t\treturn workerService.computeMoreMinimalEdits(model.uri, edits);\n\t});\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nCommandsRegistry.registerCommand('_executeFormatRangeProvider', async function (accessor, ...args: any[]) {\n\tconst [resource, range, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Range.isIRange(range));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentRangeFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, Range.lift(range), options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nCommandsRegistry.registerCommand('_executeFormatDocumentProvider', async function (accessor, ...args: any[]) {\n\tconst [resource, options] = args;\n\tassertType(URI.isUri(resource));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nCommandsRegistry.registerCommand('_executeFormatOnTypeProvider', async function (accessor, ...args: any[]) {\n\tconst [resource, position, ch, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Position.isIPosition(position));\n\tassertType(typeof ch === 'string');\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getOnTypeFormattingEdits(workerService, languageFeaturesService, reference.object.textEditorModel, Position.lift(position), ch, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { asArray, isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { onUnexpectedExternalError } from '../../../../base/common/errors.js';\nimport { Iterable } from '../../../../base/common/iterator.js';\nimport { IDisposable } from '../../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../../base/common/linkedList.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { URI } from '../../../../base/common/uri.js';\nimport { CodeEditorStateFlag, EditorStateCancellationTokenSource, TextModelCancellationTokenSource } from '../../editorState/browser/editorState.js';\nimport { IActiveCodeEditor, isCodeEditor } from '../../../browser/editorBrowser.js';\nimport { ServicesAccessor } from '../../../browser/editorExtensions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, FormattingOptions, TextEdit } from '../../../common/languages.js';\nimport { IEditorWorkerService } from '../../../common/services/editorWorker.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { FormattingEdit } from './formattingEdit.js';\nimport { CommandsRegistry } from '../../../../platform/commands/common/commands.js';\nimport { ExtensionIdentifierSet } from '../../../../platform/extensions/common/extensions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IProgress } from '../../../../platform/progress/common/progress.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\n\nexport function getRealAndSyntheticDocumentFormattersOrdered(\n\tdocumentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>,\n\tdocumentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>,\n\tmodel: ITextModel\n): DocumentFormattingEditProvider[] {\n\tconst result: DocumentFormattingEditProvider[] = [];\n\tconst seen = new ExtensionIdentifierSet();\n\n\t// (1) add all document formatter\n\tconst docFormatter = documentFormattingEditProvider.ordered(model);\n\tfor (const formatter of docFormatter) {\n\t\tresult.push(formatter);\n\t\tif (formatter.extensionId) {\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t}\n\n\t// (2) add all range formatter as document formatter (unless the same extension already did that)\n\tconst rangeFormatter = documentRangeFormattingEditProvider.ordered(model);\n\tfor (const formatter of rangeFormatter) {\n\t\tif (formatter.extensionId) {\n\t\t\tif (seen.has(formatter.extensionId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseen.add(formatter.extensionId);\n\t\t}\n\t\tresult.push({\n\t\t\tdisplayName: formatter.displayName,\n\t\t\textensionId: formatter.extensionId,\n\t\t\tprovideDocumentFormattingEdits(model, options, token) {\n\t\t\t\treturn formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token);\n\t\t\t}\n\t\t});\n\t}\n\treturn result;\n}\n\nexport const enum FormattingKind {\n\tFile = 1,\n\tSelection = 2\n}\n\nexport const enum FormattingMode {\n\tExplicit = 1,\n\tSilent = 2\n}\n\nexport interface IFormattingEditProviderSelector {\n\t<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined>;\n}\n\nexport abstract class FormattingConflicts {\n\n\tprivate static readonly _selectors = new LinkedList<IFormattingEditProviderSelector>();\n\n\tstatic setFormatterSelector(selector: IFormattingEditProviderSelector): IDisposable {\n\t\tconst remove = FormattingConflicts._selectors.unshift(selector);\n\t\treturn { dispose: remove };\n\t}\n\n\tstatic async select<T extends (DocumentFormattingEditProvider | DocumentRangeFormattingEditProvider)>(formatter: T[], document: ITextModel, mode: FormattingMode, kind: FormattingKind): Promise<T | undefined> {\n\t\tif (formatter.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst selector = Iterable.first(FormattingConflicts._selectors);\n\t\tif (selector) {\n\t\t\treturn await selector(formatter, document, mode, kind);\n\t\t}\n\t\treturn undefined;\n\t}\n}\n\nexport async function formatDocumentRangesWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentRangeFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst { documentRangeFormattingEditProvider: documentRangeFormattingEditProviderRegistry } = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = documentRangeFormattingEditProviderRegistry.ordered(model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.Selection);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentRangesWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentRangeFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\trangeOrRanges: Range | Range[],\n\ttoken: CancellationToken,\n\tuserGesture: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst logService = accessor.get(ILogService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\t// make sure that ranges don't overlap nor touch each other\n\tconst ranges: Range[] = [];\n\tlet len = 0;\n\tfor (const range of asArray(rangeOrRanges).sort(Range.compareRangesUsingStarts)) {\n\t\tif (len > 0 && Range.areIntersectingOrTouching(ranges[len - 1], range)) {\n\t\t\tranges[len - 1] = Range.fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition());\n\t\t} else {\n\t\t\tlen = ranges.push(range);\n\t\t}\n\t}\n\n\tconst computeEdits = async (range: Range) => {\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, range);\n\n\t\tconst result = (await provider.provideDocumentRangeFormattingEdits(\n\t\t\tmodel,\n\t\t\trange,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t)) || [];\n\n\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\n\t\treturn result;\n\t};\n\n\tconst hasIntersectingEdit = (a: TextEdit[], b: TextEdit[]) => {\n\t\tif (!a.length || !b.length) {\n\t\t\treturn false;\n\t\t}\n\t\t// quick exit if the list of ranges are completely unrelated [O(n)]\n\t\tconst mergedA = a.reduce((acc, val) => { return Range.plusRange(acc, val.range); }, a[0].range);\n\t\tif (!b.some(x => { return Range.intersectRanges(mergedA, x.range); })) {\n\t\t\treturn false;\n\t\t}\n\t\t// fallback to a complete check [O(n^2)]\n\t\tfor (const edit of a) {\n\t\t\tfor (const otherEdit of b) {\n\t\t\t\tif (Range.intersectRanges(edit.range, otherEdit.range)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tconst allEdits: TextEdit[] = [];\n\tconst rawEditsList: TextEdit[][] = [];\n\ttry {\n\t\tif (typeof provider.provideDocumentRangesFormattingEdits === 'function') {\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`, provider.extensionId?.value, ranges);\n\t\t\tconst result = (await provider.provideDocumentRangesFormattingEdits(\n\t\t\t\tmodel,\n\t\t\t\tranges,\n\t\t\t\tmodel.getFormattingOptions(),\n\t\t\t\tcts.token\n\t\t\t)) || [];\n\t\t\tlogService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`, provider.extensionId?.value, result);\n\t\t\trawEditsList.push(result);\n\t\t} else {\n\n\t\t\tfor (const range of ranges) {\n\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\trawEditsList.push(await computeEdits(range));\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < ranges.length; ++i) {\n\t\t\t\tfor (let j = i + 1; j < ranges.length; ++j) {\n\t\t\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasIntersectingEdit(rawEditsList[i], rawEditsList[j])) {\n\t\t\t\t\t\t// Merge ranges i and j into a single range, recompute the associated edits\n\t\t\t\t\t\tconst mergedRange = Range.plusRange(ranges[i], ranges[j]);\n\t\t\t\t\t\tconst edits = await computeEdits(mergedRange);\n\t\t\t\t\t\tranges.splice(j, 1);\n\t\t\t\t\t\tranges.splice(i, 1);\n\t\t\t\t\t\tranges.push(mergedRange);\n\t\t\t\t\t\trawEditsList.splice(j, 1);\n\t\t\t\t\t\trawEditsList.splice(i, 1);\n\t\t\t\t\t\trawEditsList.push(edits);\n\t\t\t\t\t\t// Restart scanning\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const rawEdits of rawEditsList) {\n\t\t\tif (cts.token.isCancellationRequested) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst minimalEdits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t\tif (minimalEdits) {\n\t\t\t\tallEdits.push(...minimalEdits);\n\t\t\t}\n\t\t}\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (allEdits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, allEdits, true);\n\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = allEdits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], allEdits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function formatDocumentWithSelectedProvider(\n\taccessor: ServicesAccessor,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\tprogress: IProgress<DocumentFormattingEditProvider>,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<void> {\n\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel;\n\tconst provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tconst selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.File);\n\tif (selected) {\n\t\tprogress.report(selected);\n\t\tawait instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token, userGesture);\n\t}\n}\n\nexport async function formatDocumentWithProvider(\n\taccessor: ServicesAccessor,\n\tprovider: DocumentFormattingEditProvider,\n\teditorOrModel: ITextModel | IActiveCodeEditor,\n\tmode: FormattingMode,\n\ttoken: CancellationToken,\n\tuserGesture?: boolean\n): Promise<boolean> {\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst accessibilitySignalService = accessor.get(IAccessibilitySignalService);\n\n\tlet model: ITextModel;\n\tlet cts: CancellationTokenSource;\n\tif (isCodeEditor(editorOrModel)) {\n\t\tmodel = editorOrModel.getModel();\n\t\tcts = new EditorStateCancellationTokenSource(editorOrModel, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position, undefined, token);\n\t} else {\n\t\tmodel = editorOrModel;\n\t\tcts = new TextModelCancellationTokenSource(editorOrModel, token);\n\t}\n\n\tlet edits: TextEdit[] | undefined;\n\ttry {\n\t\tconst rawEdits = await provider.provideDocumentFormattingEdits(\n\t\t\tmodel,\n\t\t\tmodel.getFormattingOptions(),\n\t\t\tcts.token\n\t\t);\n\n\t\tedits = await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\n\t\tif (cts.token.isCancellationRequested) {\n\t\t\treturn true;\n\t\t}\n\n\t} finally {\n\t\tcts.dispose();\n\t}\n\n\tif (!edits || edits.length === 0) {\n\t\treturn false;\n\t}\n\n\tif (isCodeEditor(editorOrModel)) {\n\t\t// use editor to apply edits\n\t\tFormattingEdit.execute(editorOrModel, edits, mode !== FormattingMode.Silent);\n\n\t\tif (mode !== FormattingMode.Silent) {\n\t\t\teditorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), ScrollType.Immediate);\n\t\t}\n\n\t} else {\n\t\t// use model to apply edits\n\t\tconst [{ range }] = edits;\n\t\tconst initialSelection = new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\n\t\tmodel.pushEditOperations([initialSelection], edits.map(edit => {\n\t\t\treturn {\n\t\t\t\ttext: edit.text,\n\t\t\t\trange: Range.lift(edit.range),\n\t\t\t\tforceMoveMarkers: true\n\t\t\t};\n\t\t}), undoEdits => {\n\t\t\tfor (const { range } of undoEdits) {\n\t\t\t\tif (Range.areIntersectingOrTouching(range, initialSelection)) {\n\t\t\t\t\treturn [new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\taccessibilitySignalService.playSignal(AccessibilitySignal.format, { userGesture });\n\treturn true;\n}\n\nexport async function getDocumentRangeFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\trange: Range,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = languageFeaturesService.documentRangeFormattingEditProvider.ordered(model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport async function getDocumentFormattingEditsUntilResult(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | undefined> {\n\n\tconst providers = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model);\n\tfor (const provider of providers) {\n\t\tconst rawEdits = await Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(onUnexpectedExternalError);\n\t\tif (isNonEmptyArray(rawEdits)) {\n\t\t\treturn await workerService.computeMoreMinimalEdits(model.uri, rawEdits);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport function getOnTypeFormattingEdits(\n\tworkerService: IEditorWorkerService,\n\tlanguageFeaturesService: ILanguageFeaturesService,\n\tmodel: ITextModel,\n\tposition: Position,\n\tch: string,\n\toptions: FormattingOptions,\n\ttoken: CancellationToken\n): Promise<TextEdit[] | null | undefined> {\n\n\tconst providers = languageFeaturesService.onTypeFormattingEditProvider.ordered(model);\n\n\tif (providers.length === 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\tif (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) {\n\t\treturn Promise.resolve(undefined);\n\t}\n\n\treturn Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, token)).catch(onUnexpectedExternalError).then(edits => {\n\t\treturn workerService.computeMoreMinimalEdits(model.uri, edits);\n\t});\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nCommandsRegistry.registerCommand('_executeFormatRangeProvider', async function (accessor, ...args: any[]) {\n\tconst [resource, range, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Range.isIRange(range));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentRangeFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, Range.lift(range), options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nCommandsRegistry.registerCommand('_executeFormatDocumentProvider', async function (accessor, ...args: any[]) {\n\tconst [resource, options] = args;\n\tassertType(URI.isUri(resource));\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getDocumentFormattingEditsUntilResult(workerService, languageFeaturesService, reference.object.textEditorModel, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nCommandsRegistry.registerCommand('_executeFormatOnTypeProvider', async function (accessor, ...args: any[]) {\n\tconst [resource, position, ch, options] = args;\n\tassertType(URI.isUri(resource));\n\tassertType(Position.isIPosition(position));\n\tassertType(typeof ch === 'string');\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst workerService = accessor.get(IEditorWorkerService);\n\tconst languageFeaturesService = accessor.get(ILanguageFeaturesService);\n\tconst reference = await resolverService.createModelReference(resource);\n\ttry {\n\t\treturn getOnTypeFormattingEdits(workerService, languageFeaturesService, reference.object.textEditorModel, Position.lift(position), ch, options, CancellationToken.None);\n\t} finally {\n\t\treference.dispose();\n\t}\n});\n"]}
|
|
@@ -185,7 +185,7 @@ class FormatDocumentAction extends EditorAction {
|
|
|
185
185
|
constructor() {
|
|
186
186
|
super({
|
|
187
187
|
id: 'editor.action.formatDocument',
|
|
188
|
-
label: nls.localize2(
|
|
188
|
+
label: nls.localize2(1014, "Format Document"),
|
|
189
189
|
precondition: ContextKeyExpr.and(EditorContextKeys.notInCompositeEditor, EditorContextKeys.writable, EditorContextKeys.hasDocumentFormattingProvider),
|
|
190
190
|
kbOpts: {
|
|
191
191
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -211,7 +211,7 @@ class FormatSelectionAction extends EditorAction {
|
|
|
211
211
|
constructor() {
|
|
212
212
|
super({
|
|
213
213
|
id: 'editor.action.formatSelection',
|
|
214
|
-
label: nls.localize2(
|
|
214
|
+
label: nls.localize2(1015, "Format Selection"),
|
|
215
215
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasDocumentSelectionFormattingProvider),
|
|
216
216
|
kbOpts: {
|
|
217
217
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -166,7 +166,7 @@ class MarkerNavigationAction extends EditorAction {
|
|
|
166
166
|
}
|
|
167
167
|
export class NextMarkerAction extends MarkerNavigationAction {
|
|
168
168
|
static { this.ID = 'editor.action.marker.next'; }
|
|
169
|
-
static { this.LABEL = nls.localize2(
|
|
169
|
+
static { this.LABEL = nls.localize2(1020, "Go to Next Problem (Error, Warning, Info)"); }
|
|
170
170
|
constructor() {
|
|
171
171
|
super(true, false, {
|
|
172
172
|
id: NextMarkerAction.ID,
|
|
@@ -180,7 +180,7 @@ export class NextMarkerAction extends MarkerNavigationAction {
|
|
|
180
180
|
menuOpts: {
|
|
181
181
|
menuId: MarkerNavigationWidget.TitleMenu,
|
|
182
182
|
title: NextMarkerAction.LABEL.value,
|
|
183
|
-
icon: registerIcon('marker-navigation-next', Codicon.arrowDown, nls.localize(
|
|
183
|
+
icon: registerIcon('marker-navigation-next', Codicon.arrowDown, nls.localize(1016, 'Icon for goto next marker.')),
|
|
184
184
|
group: 'navigation',
|
|
185
185
|
order: 1
|
|
186
186
|
}
|
|
@@ -189,7 +189,7 @@ export class NextMarkerAction extends MarkerNavigationAction {
|
|
|
189
189
|
}
|
|
190
190
|
class PrevMarkerAction extends MarkerNavigationAction {
|
|
191
191
|
static { this.ID = 'editor.action.marker.prev'; }
|
|
192
|
-
static { this.LABEL = nls.localize2(
|
|
192
|
+
static { this.LABEL = nls.localize2(1021, "Go to Previous Problem (Error, Warning, Info)"); }
|
|
193
193
|
constructor() {
|
|
194
194
|
super(false, false, {
|
|
195
195
|
id: PrevMarkerAction.ID,
|
|
@@ -203,7 +203,7 @@ class PrevMarkerAction extends MarkerNavigationAction {
|
|
|
203
203
|
menuOpts: {
|
|
204
204
|
menuId: MarkerNavigationWidget.TitleMenu,
|
|
205
205
|
title: PrevMarkerAction.LABEL.value,
|
|
206
|
-
icon: registerIcon('marker-navigation-previous', Codicon.arrowUp, nls.localize(
|
|
206
|
+
icon: registerIcon('marker-navigation-previous', Codicon.arrowUp, nls.localize(1017, 'Icon for goto previous marker.')),
|
|
207
207
|
group: 'navigation',
|
|
208
208
|
order: 2
|
|
209
209
|
}
|
|
@@ -214,7 +214,7 @@ class NextMarkerInFilesAction extends MarkerNavigationAction {
|
|
|
214
214
|
constructor() {
|
|
215
215
|
super(true, true, {
|
|
216
216
|
id: 'editor.action.marker.nextInFiles',
|
|
217
|
-
label: nls.localize2(
|
|
217
|
+
label: nls.localize2(1022, "Go to Next Problem in Files (Error, Warning, Info)"),
|
|
218
218
|
precondition: undefined,
|
|
219
219
|
kbOpts: {
|
|
220
220
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -223,7 +223,7 @@ class NextMarkerInFilesAction extends MarkerNavigationAction {
|
|
|
223
223
|
},
|
|
224
224
|
menuOpts: {
|
|
225
225
|
menuId: MenuId.MenubarGoMenu,
|
|
226
|
-
title: nls.localize(
|
|
226
|
+
title: nls.localize(1018, "Next &&Problem"),
|
|
227
227
|
group: '6_problem_nav',
|
|
228
228
|
order: 1
|
|
229
229
|
}
|
|
@@ -234,7 +234,7 @@ class PrevMarkerInFilesAction extends MarkerNavigationAction {
|
|
|
234
234
|
constructor() {
|
|
235
235
|
super(false, true, {
|
|
236
236
|
id: 'editor.action.marker.prevInFiles',
|
|
237
|
-
label: nls.localize2(
|
|
237
|
+
label: nls.localize2(1023, "Go to Previous Problem in Files (Error, Warning, Info)"),
|
|
238
238
|
precondition: undefined,
|
|
239
239
|
kbOpts: {
|
|
240
240
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -243,7 +243,7 @@ class PrevMarkerInFilesAction extends MarkerNavigationAction {
|
|
|
243
243
|
},
|
|
244
244
|
menuOpts: {
|
|
245
245
|
menuId: MenuId.MenubarGoMenu,
|
|
246
|
-
title: nls.localize(
|
|
246
|
+
title: nls.localize(1019, "Previous &&Problem"),
|
|
247
247
|
group: '6_problem_nav',
|
|
248
248
|
order: 2
|
|
249
249
|
}
|
|
@@ -174,19 +174,19 @@ class MessageWidget {
|
|
|
174
174
|
let severityLabel = '';
|
|
175
175
|
switch (marker.severity) {
|
|
176
176
|
case MarkerSeverity.Error:
|
|
177
|
-
severityLabel = nls.localize(
|
|
177
|
+
severityLabel = nls.localize(1024, "Error");
|
|
178
178
|
break;
|
|
179
179
|
case MarkerSeverity.Warning:
|
|
180
|
-
severityLabel = nls.localize(
|
|
180
|
+
severityLabel = nls.localize(1025, "Warning");
|
|
181
181
|
break;
|
|
182
182
|
case MarkerSeverity.Info:
|
|
183
|
-
severityLabel = nls.localize(
|
|
183
|
+
severityLabel = nls.localize(1026, "Info");
|
|
184
184
|
break;
|
|
185
185
|
case MarkerSeverity.Hint:
|
|
186
|
-
severityLabel = nls.localize(
|
|
186
|
+
severityLabel = nls.localize(1027, "Hint");
|
|
187
187
|
break;
|
|
188
188
|
}
|
|
189
|
-
let ariaLabel = nls.localize(
|
|
189
|
+
let ariaLabel = nls.localize(1028, "{0} at {1}. ", severityLabel, marker.startLineNumber + ':' + marker.startColumn);
|
|
190
190
|
const model = this._editor.getModel();
|
|
191
191
|
if (model && (marker.startLineNumber <= model.getLineCount()) && (marker.startLineNumber >= 1)) {
|
|
192
192
|
const lineContent = model.getLineContent(marker.startLineNumber);
|
|
@@ -286,8 +286,8 @@ let MarkerNavigationWidget = class MarkerNavigationWidget extends PeekViewWidget
|
|
|
286
286
|
const model = this.editor.getModel();
|
|
287
287
|
if (model) {
|
|
288
288
|
const detail = markerCount > 1
|
|
289
|
-
? nls.localize(
|
|
290
|
-
: nls.localize(
|
|
289
|
+
? nls.localize(1029, "{0} of {1} problems", markerIdx, markerCount)
|
|
290
|
+
: nls.localize(1030, "{0} of {1} problem", markerIdx, markerCount);
|
|
291
291
|
this.setTitle(basename(model.uri), detail);
|
|
292
292
|
}
|
|
293
293
|
this._icon.className = `codicon ${SeverityIcon.className(MarkerSeverity.toSeverity(this._severity))}`;
|
|
@@ -331,11 +331,11 @@ export { MarkerNavigationWidget };
|
|
|
331
331
|
const errorDefault = oneOf(editorErrorForeground, editorErrorBorder);
|
|
332
332
|
const warningDefault = oneOf(editorWarningForeground, editorWarningBorder);
|
|
333
333
|
const infoDefault = oneOf(editorInfoForeground, editorInfoBorder);
|
|
334
|
-
const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(
|
|
335
|
-
const editorMarkerNavigationErrorHeader = registerColor('editorMarkerNavigationError.headerBackground', { dark: transparent(editorMarkerNavigationError, .1), light: transparent(editorMarkerNavigationError, .1), hcDark: null, hcLight: null }, nls.localize(
|
|
336
|
-
const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(
|
|
337
|
-
const editorMarkerNavigationWarningHeader = registerColor('editorMarkerNavigationWarning.headerBackground', { dark: transparent(editorMarkerNavigationWarning, .1), light: transparent(editorMarkerNavigationWarning, .1), hcDark: '#0C141F', hcLight: transparent(editorMarkerNavigationWarning, .2) }, nls.localize(
|
|
338
|
-
const editorMarkerNavigationInfo = registerColor('editorMarkerNavigationInfo.background', { dark: infoDefault, light: infoDefault, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(
|
|
339
|
-
const editorMarkerNavigationInfoHeader = registerColor('editorMarkerNavigationInfo.headerBackground', { dark: transparent(editorMarkerNavigationInfo, .1), light: transparent(editorMarkerNavigationInfo, .1), hcDark: null, hcLight: null }, nls.localize(
|
|
340
|
-
const editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', editorBackground, nls.localize(
|
|
334
|
+
const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(1031, 'Editor marker navigation widget error color.'));
|
|
335
|
+
const editorMarkerNavigationErrorHeader = registerColor('editorMarkerNavigationError.headerBackground', { dark: transparent(editorMarkerNavigationError, .1), light: transparent(editorMarkerNavigationError, .1), hcDark: null, hcLight: null }, nls.localize(1032, 'Editor marker navigation widget error heading background.'));
|
|
336
|
+
const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(1033, 'Editor marker navigation widget warning color.'));
|
|
337
|
+
const editorMarkerNavigationWarningHeader = registerColor('editorMarkerNavigationWarning.headerBackground', { dark: transparent(editorMarkerNavigationWarning, .1), light: transparent(editorMarkerNavigationWarning, .1), hcDark: '#0C141F', hcLight: transparent(editorMarkerNavigationWarning, .2) }, nls.localize(1034, 'Editor marker navigation widget warning heading background.'));
|
|
338
|
+
const editorMarkerNavigationInfo = registerColor('editorMarkerNavigationInfo.background', { dark: infoDefault, light: infoDefault, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(1035, 'Editor marker navigation widget info color.'));
|
|
339
|
+
const editorMarkerNavigationInfoHeader = registerColor('editorMarkerNavigationInfo.headerBackground', { dark: transparent(editorMarkerNavigationInfo, .1), light: transparent(editorMarkerNavigationInfo, .1), hcDark: null, hcLight: null }, nls.localize(1036, 'Editor marker navigation widget info heading background.'));
|
|
340
|
+
const editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', editorBackground, nls.localize(1037, 'Editor marker navigation widget background.'));
|
|
341
341
|
//# sourceMappingURL=gotoErrorWidget.js.map
|