monaco-editor-core 0.55.0-dev-20251029 → 0.55.0-dev-20251030
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 +14 -0
- package/esm/vs/base/browser/markdownRenderer.js +52 -1
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/common/glob.js +41 -31
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +5 -1
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/base/common/network.js +2 -6
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/strings.js +7 -5
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +1 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +4 -0
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js.map +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/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/contentHoverRendered.js +17 -6
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +6 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +36 -0
- 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 +51 -0
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js.map +1 -0
- package/esm/vs/editor/contrib/hover/browser/hoverTypes.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +25 -9
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +8 -5
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js.map +1 -1
- 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 +4 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
- 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 +8 -8
- 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 +27 -24
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- 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/actions.js +2 -0
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- 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 +27 -27
- 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
|
@@ -96,6 +96,9 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
|
|
|
96
96
|
const disposables = this._renderMarkerStatusbar(context, markerHoverForStatusbar);
|
|
97
97
|
return new RenderedHoverParts(renderedHoverParts, disposables);
|
|
98
98
|
}
|
|
99
|
+
getAccessibleContent(hoverPart) {
|
|
100
|
+
return hoverPart.marker.message;
|
|
101
|
+
}
|
|
99
102
|
_renderMarkerHover(markerHover) {
|
|
100
103
|
const disposables = new DisposableStore();
|
|
101
104
|
const hoverElement = $('div.hover-row');
|
|
@@ -169,7 +172,7 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
|
|
|
169
172
|
const markerController = MarkerController.get(this._editor);
|
|
170
173
|
if (markerController) {
|
|
171
174
|
context.statusBar.addAction({
|
|
172
|
-
label: nls.localize(
|
|
175
|
+
label: nls.localize(1138, "View Problem"),
|
|
173
176
|
commandId: NextMarkerAction.ID,
|
|
174
177
|
run: () => {
|
|
175
178
|
context.hide();
|
|
@@ -184,14 +187,14 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
|
|
|
184
187
|
if (this.recentMarkerCodeActionsInfo) {
|
|
185
188
|
if (IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker) === IMarkerData.makeKey(markerHover.marker)) {
|
|
186
189
|
if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {
|
|
187
|
-
quickfixPlaceholderElement.textContent = nls.localize(
|
|
190
|
+
quickfixPlaceholderElement.textContent = nls.localize(1139, "No quick fixes available");
|
|
188
191
|
}
|
|
189
192
|
}
|
|
190
193
|
else {
|
|
191
194
|
this.recentMarkerCodeActionsInfo = undefined;
|
|
192
195
|
}
|
|
193
196
|
}
|
|
194
|
-
const updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize(
|
|
197
|
+
const updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize(1140, "Checking for quick fixes..."), 200, disposables);
|
|
195
198
|
if (!quickfixPlaceholderElement.textContent) {
|
|
196
199
|
// Have some content in here to avoid flickering
|
|
197
200
|
quickfixPlaceholderElement.textContent = String.fromCharCode(0xA0); //
|
|
@@ -203,7 +206,7 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
|
|
|
203
206
|
this.recentMarkerCodeActionsInfo = { marker: markerHover.marker, hasCodeActions: actions.validActions.length > 0 };
|
|
204
207
|
if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {
|
|
205
208
|
actions.dispose();
|
|
206
|
-
quickfixPlaceholderElement.textContent = nls.localize(
|
|
209
|
+
quickfixPlaceholderElement.textContent = nls.localize(1141, "No quick fixes available");
|
|
207
210
|
return;
|
|
208
211
|
}
|
|
209
212
|
quickfixPlaceholderElement.style.display = 'none';
|
|
@@ -214,7 +217,7 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
|
|
|
214
217
|
}
|
|
215
218
|
}));
|
|
216
219
|
context.statusBar.addAction({
|
|
217
|
-
label: nls.localize(
|
|
220
|
+
label: nls.localize(1142, "Quick Fix..."),
|
|
218
221
|
commandId: quickFixCommandId,
|
|
219
222
|
run: (target) => {
|
|
220
223
|
showing = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/hover/browser/markerHoverParticipant.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAqB,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACjH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAA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QAAQ,CAAC,IAAI,EACb,iBAAiB,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AA7OY,sBAAsB;IAQhC,WAAA,yBAAyB,CAAA;IACzB,WAAA,cAAc,CAAA;IACd,WAAA,wBAAwB,CAAA;GAVd,sBAAsB,CA6OlC","file":"markerHoverParticipant.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 * as dom from '../../../../base/browser/dom.js';\nimport { isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancelablePromise, createCancelablePromise, disposableTimeout } from '../../../../base/common/async.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { basename } from '../../../../base/common/resources.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { CodeActionTriggerType } from '../../../common/languages.js';\nimport { IModelDecoration } from '../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { IMarkerDecorationsService } from '../../../common/services/markerDecorations.js';\nimport { ApplyCodeActionReason, getCodeActions, quickFixCommandId } from '../../codeAction/browser/codeAction.js';\nimport { CodeActionController } from '../../codeAction/browser/codeActionController.js';\nimport { CodeActionKind, CodeActionSet, CodeActionTrigger, CodeActionTriggerSource } from '../../codeAction/common/types.js';\nimport { MarkerController, NextMarkerAction } from '../../gotoError/browser/gotoError.js';\nimport { HoverAnchor, HoverAnchorType, IEditorHoverParticipant, IEditorHoverRenderContext, IHoverPart, IRenderedHoverPart, IRenderedHoverParts, RenderedHoverParts } from './hoverTypes.js';\nimport * as nls from '../../../../nls.js';\nimport { ITextEditorOptions } from '../../../../platform/editor/common/editor.js';\nimport { IMarker, IMarkerData, MarkerSeverity } from '../../../../platform/markers/common/markers.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { Progress } from '../../../../platform/progress/common/progress.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\n\nconst $ = dom.$;\n\nexport class MarkerHover implements IHoverPart {\n\n\tconstructor(\n\t\tpublic readonly owner: IEditorHoverParticipant<MarkerHover>,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly marker: IMarker,\n\t) { }\n\n\tpublic isValidForHoverAnchor(anchor: HoverAnchor): boolean {\n\t\treturn (\n\t\t\tanchor.type === HoverAnchorType.Range\n\t\t\t&& this.range.startColumn <= anchor.range.startColumn\n\t\t\t&& this.range.endColumn >= anchor.range.endColumn\n\t\t);\n\t}\n}\n\nconst markerCodeActionTrigger: CodeActionTrigger = {\n\ttype: CodeActionTriggerType.Invoke,\n\tfilter: { include: CodeActionKind.QuickFix },\n\ttriggerAction: CodeActionTriggerSource.QuickFixHover\n};\n\nexport class MarkerHoverParticipant implements IEditorHoverParticipant<MarkerHover> {\n\n\tpublic readonly hoverOrdinal: number = 1;\n\n\tprivate recentMarkerCodeActionsInfo: { marker: IMarker; hasCodeActions: boolean } | undefined = undefined;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IMarkerDecorationsService private readonly _markerDecorationsService: IMarkerDecorationsService,\n\t\t@IOpenerService private readonly _openerService: IOpenerService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t) { }\n\n\tpublic computeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[]): MarkerHover[] {\n\t\tif (!this._editor.hasModel() || anchor.type !== HoverAnchorType.Range && !anchor.supportsMarkerHover) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editor.getModel();\n\t\tconst anchorRange = anchor.range;\n\t\tif (!model.isValidRange(anchor.range)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst lineNumber = anchorRange.startLineNumber;\n\t\tconst maxColumn = model.getLineMaxColumn(lineNumber);\n\t\tconst result: MarkerHover[] = [];\n\t\tfor (const d of lineDecorations) {\n\t\t\tconst startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\n\t\t\tconst endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\n\n\t\t\tconst marker = this._markerDecorationsService.getMarker(model.uri, d);\n\t\t\tif (!marker) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst range = new Range(anchor.range.startLineNumber, startColumn, anchor.range.startLineNumber, endColumn);\n\t\t\tresult.push(new MarkerHover(this, range, marker));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic renderHoverParts(context: IEditorHoverRenderContext, hoverParts: MarkerHover[]): IRenderedHoverParts<MarkerHover> {\n\t\tif (!hoverParts.length) {\n\t\t\treturn new RenderedHoverParts([]);\n\t\t}\n\t\tconst renderedHoverParts: IRenderedHoverPart<MarkerHover>[] = [];\n\t\thoverParts.forEach(hoverPart => {\n\t\t\tconst renderedMarkerHover = this._renderMarkerHover(hoverPart);\n\t\t\tcontext.fragment.appendChild(renderedMarkerHover.hoverElement);\n\t\t\trenderedHoverParts.push(renderedMarkerHover);\n\t\t});\n\t\tconst markerHoverForStatusbar = hoverParts.length === 1 ? hoverParts[0] : hoverParts.sort((a, b) => MarkerSeverity.compare(a.marker.severity, b.marker.severity))[0];\n\t\tconst disposables = this._renderMarkerStatusbar(context, markerHoverForStatusbar);\n\t\treturn new RenderedHoverParts(renderedHoverParts, disposables);\n\t}\n\n\tprivate _renderMarkerHover(markerHover: MarkerHover): IRenderedHoverPart<MarkerHover> {\n\t\tconst disposables: DisposableStore = new DisposableStore();\n\t\tconst hoverElement = $('div.hover-row');\n\t\tconst markerElement = dom.append(hoverElement, $('div.marker.hover-contents'));\n\t\tconst { source, message, code, relatedInformation } = markerHover.marker;\n\n\t\tthis._editor.applyFontInfo(markerElement);\n\t\tconst messageElement = dom.append(markerElement, $('span'));\n\t\tmessageElement.style.whiteSpace = 'pre-wrap';\n\t\tmessageElement.innerText = message;\n\n\t\tif (source || code) {\n\t\t\t// Code has link\n\t\t\tif (code && typeof code !== 'string') {\n\t\t\t\tconst sourceAndCodeElement = $('span');\n\t\t\t\tif (source) {\n\t\t\t\t\tconst sourceElement = dom.append(sourceAndCodeElement, $('span'));\n\t\t\t\t\tsourceElement.innerText = source;\n\t\t\t\t}\n\t\t\t\tconst codeLink = dom.append(sourceAndCodeElement, $('a.code-link'));\n\t\t\t\tcodeLink.setAttribute('href', code.target.toString(true));\n\n\t\t\t\tdisposables.add(dom.addDisposableListener(codeLink, 'click', (e) => {\n\t\t\t\t\tthis._openerService.open(code.target, { allowCommands: true });\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}));\n\n\t\t\t\tconst codeElement = dom.append(codeLink, $('span'));\n\t\t\t\tcodeElement.innerText = code.value;\n\n\t\t\t\tconst detailsElement = dom.append(markerElement, sourceAndCodeElement);\n\t\t\t\tdetailsElement.style.opacity = '0.6';\n\t\t\t\tdetailsElement.style.paddingLeft = '6px';\n\t\t\t} else {\n\t\t\t\tconst detailsElement = dom.append(markerElement, $('span'));\n\t\t\t\tdetailsElement.style.opacity = '0.6';\n\t\t\t\tdetailsElement.style.paddingLeft = '6px';\n\t\t\t\tdetailsElement.innerText = source && code ? `${source}(${code})` : source ? source : `(${code})`;\n\t\t\t}\n\t\t}\n\n\t\tif (isNonEmptyArray(relatedInformation)) {\n\t\t\tfor (const { message, resource, startLineNumber, startColumn } of relatedInformation) {\n\t\t\t\tconst relatedInfoContainer = dom.append(markerElement, $('div'));\n\t\t\t\trelatedInfoContainer.style.marginTop = '8px';\n\t\t\t\tconst a = dom.append(relatedInfoContainer, $('a'));\n\t\t\t\ta.innerText = `${basename(resource)}(${startLineNumber}, ${startColumn}): `;\n\t\t\t\ta.style.cursor = 'pointer';\n\t\t\t\tdisposables.add(dom.addDisposableListener(a, 'click', (e) => {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tif (this._openerService) {\n\t\t\t\t\t\tconst editorOptions: ITextEditorOptions = { selection: { startLineNumber, startColumn } };\n\t\t\t\t\t\tthis._openerService.open(resource, {\n\t\t\t\t\t\t\tfromUserGesture: true,\n\t\t\t\t\t\t\teditorOptions\n\t\t\t\t\t\t}).catch(onUnexpectedError);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\tconst messageElement = dom.append<HTMLAnchorElement>(relatedInfoContainer, $('span'));\n\t\t\t\tmessageElement.innerText = message;\n\t\t\t\tthis._editor.applyFontInfo(messageElement);\n\t\t\t}\n\t\t}\n\n\t\tconst renderedHoverPart: IRenderedHoverPart<MarkerHover> = {\n\t\t\thoverPart: markerHover,\n\t\t\thoverElement,\n\t\t\tdispose: () => disposables.dispose()\n\t\t};\n\t\treturn renderedHoverPart;\n\t}\n\n\tprivate _renderMarkerStatusbar(context: IEditorHoverRenderContext, markerHover: MarkerHover): IDisposable {\n\t\tconst disposables = new DisposableStore();\n\t\tif (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) {\n\t\t\tconst markerController = MarkerController.get(this._editor);\n\t\t\tif (markerController) {\n\t\t\t\tcontext.statusBar.addAction({\n\t\t\t\t\tlabel: nls.localize('view problem', \"View Problem\"),\n\t\t\t\t\tcommandId: NextMarkerAction.ID,\n\t\t\t\t\trun: () => {\n\t\t\t\t\t\tcontext.hide();\n\t\t\t\t\t\tmarkerController.showAtMarker(markerHover.marker);\n\t\t\t\t\t\tthis._editor.focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (!this._editor.getOption(EditorOption.readOnly)) {\n\t\t\tconst quickfixPlaceholderElement = context.statusBar.append($('div'));\n\t\t\tif (this.recentMarkerCodeActionsInfo) {\n\t\t\t\tif (IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker) === IMarkerData.makeKey(markerHover.marker)) {\n\t\t\t\t\tif (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\n\t\t\t\t\t\tquickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', \"No quick fixes available\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.recentMarkerCodeActionsInfo = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize('checkingForQuickFixes', \"Checking for quick fixes...\"), 200, disposables);\n\t\t\tif (!quickfixPlaceholderElement.textContent) {\n\t\t\t\t// Have some content in here to avoid flickering\n\t\t\t\tquickfixPlaceholderElement.textContent = String.fromCharCode(0xA0); // \n\t\t\t}\n\t\t\tconst codeActionsPromise = this.getCodeActions(markerHover.marker);\n\t\t\tdisposables.add(toDisposable(() => codeActionsPromise.cancel()));\n\t\t\tcodeActionsPromise.then(actions => {\n\t\t\t\tupdatePlaceholderDisposable.dispose();\n\t\t\t\tthis.recentMarkerCodeActionsInfo = { marker: markerHover.marker, hasCodeActions: actions.validActions.length > 0 };\n\n\t\t\t\tif (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\n\t\t\t\t\tactions.dispose();\n\t\t\t\t\tquickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', \"No quick fixes available\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tquickfixPlaceholderElement.style.display = 'none';\n\n\t\t\t\tlet showing = false;\n\t\t\t\tdisposables.add(toDisposable(() => {\n\t\t\t\t\tif (!showing) {\n\t\t\t\t\t\tactions.dispose();\n\t\t\t\t\t}\n\t\t\t\t}));\n\n\t\t\t\tcontext.statusBar.addAction({\n\t\t\t\t\tlabel: nls.localize('quick fixes', \"Quick Fix...\"),\n\t\t\t\t\tcommandId: quickFixCommandId,\n\t\t\t\t\trun: (target) => {\n\t\t\t\t\t\tshowing = true;\n\t\t\t\t\t\tconst controller = CodeActionController.get(this._editor);\n\t\t\t\t\t\tconst elementPosition = dom.getDomNodePagePosition(target);\n\t\t\t\t\t\t// Hide the hover pre-emptively, otherwise the editor can close the code actions\n\t\t\t\t\t\t// context menu as well when using keyboard navigation\n\t\t\t\t\t\tcontext.hide();\n\t\t\t\t\t\tcontroller?.showCodeActions(markerCodeActionTrigger, actions, {\n\t\t\t\t\t\t\tx: elementPosition.left,\n\t\t\t\t\t\t\ty: elementPosition.top,\n\t\t\t\t\t\t\twidth: elementPosition.width,\n\t\t\t\t\t\t\theight: elementPosition.height\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst aiCodeAction = actions.validActions.find(action => action.action.isAI);\n\t\t\t\tif (aiCodeAction) {\n\t\t\t\t\tcontext.statusBar.addAction({\n\t\t\t\t\t\tlabel: aiCodeAction.action.title,\n\t\t\t\t\t\tcommandId: aiCodeAction.action.command?.id ?? '',\n\t\t\t\t\t\ticonClass: ThemeIcon.asClassName(Codicon.sparkle),\n\t\t\t\t\t\trun: () => {\n\t\t\t\t\t\t\tconst controller = CodeActionController.get(this._editor);\n\t\t\t\t\t\t\tcontroller?.applyCodeAction(aiCodeAction, false, false, ApplyCodeActionReason.FromProblemsHover);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Notify that the contents have changed given we added\n\t\t\t\t// actions to the hover\n\t\t\t\t// https://github.com/microsoft/vscode/issues/250424\n\t\t\t\tcontext.onContentsChanged();\n\n\t\t\t}, onUnexpectedError);\n\t\t}\n\t\treturn disposables;\n\t}\n\n\tprivate getCodeActions(marker: IMarker): CancelablePromise<CodeActionSet> {\n\t\treturn createCancelablePromise(cancellationToken => {\n\t\t\treturn getCodeActions(\n\t\t\t\tthis._languageFeaturesService.codeActionProvider,\n\t\t\t\tthis._editor.getModel()!,\n\t\t\t\tnew Range(marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn),\n\t\t\t\tmarkerCodeActionTrigger,\n\t\t\t\tProgress.None,\n\t\t\t\tcancellationToken);\n\t\t});\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/hover/browser/markerHoverParticipant.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAqB,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACjH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAClH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,cAAc,EAAoC,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC7H,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAyI,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC5L,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAW,WAAW,EAA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AAC,KAAK;wBAChC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE;wBAChD,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC;wBACjD,GAAG,EAAE,GAAG,EAAE;4BACT,MAAM,UAAU,GAAG,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;4BAC1D,UAAU,EAAE,eAAe,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;wBAClG,CAAC;qBACD,CAAC,CAAC;gBACJ,CAAC;gBAED,uDAAuD;gBACvD,uBAAuB;gBACvB,oDAAoD;gBACpD,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAE7B,CAAC,EAAE,iBAAiB,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,WAAW,CAAC;IACpB,CAAC;IAEO,cAAc,CAAC,MAAe;QACrC,OAAO,uBAAuB,CAAC,iBAAiB,CAAC,EAAE;YAClD,OAAO,cAAc,CACpB,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,EAChD,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAG,EACxB,IAAI,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,EAC7F,uBAAuB,EACvB,QAAQ,CAAC,IAAI,EACb,iBAAiB,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAjPY,sBAAsB;IAQhC,WAAA,yBAAyB,CAAA;IACzB,WAAA,cAAc,CAAA;IACd,WAAA,wBAAwB,CAAA;GAVd,sBAAsB,CAiPlC","file":"markerHoverParticipant.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 * as dom from '../../../../base/browser/dom.js';\nimport { isNonEmptyArray } from '../../../../base/common/arrays.js';\nimport { CancelablePromise, createCancelablePromise, disposableTimeout } from '../../../../base/common/async.js';\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { basename } from '../../../../base/common/resources.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { CodeActionTriggerType } from '../../../common/languages.js';\nimport { IModelDecoration } from '../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { IMarkerDecorationsService } from '../../../common/services/markerDecorations.js';\nimport { ApplyCodeActionReason, getCodeActions, quickFixCommandId } from '../../codeAction/browser/codeAction.js';\nimport { CodeActionController } from '../../codeAction/browser/codeActionController.js';\nimport { CodeActionKind, CodeActionSet, CodeActionTrigger, CodeActionTriggerSource } from '../../codeAction/common/types.js';\nimport { MarkerController, NextMarkerAction } from '../../gotoError/browser/gotoError.js';\nimport { HoverAnchor, HoverAnchorType, IEditorHoverParticipant, IEditorHoverRenderContext, IHoverPart, IRenderedHoverPart, IRenderedHoverParts, RenderedHoverParts } from './hoverTypes.js';\nimport * as nls from '../../../../nls.js';\nimport { ITextEditorOptions } from '../../../../platform/editor/common/editor.js';\nimport { IMarker, IMarkerData, MarkerSeverity } from '../../../../platform/markers/common/markers.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { Progress } from '../../../../platform/progress/common/progress.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\n\nconst $ = dom.$;\n\nexport class MarkerHover implements IHoverPart {\n\n\tconstructor(\n\t\tpublic readonly owner: IEditorHoverParticipant<MarkerHover>,\n\t\tpublic readonly range: Range,\n\t\tpublic readonly marker: IMarker,\n\t) { }\n\n\tpublic isValidForHoverAnchor(anchor: HoverAnchor): boolean {\n\t\treturn (\n\t\t\tanchor.type === HoverAnchorType.Range\n\t\t\t&& this.range.startColumn <= anchor.range.startColumn\n\t\t\t&& this.range.endColumn >= anchor.range.endColumn\n\t\t);\n\t}\n}\n\nconst markerCodeActionTrigger: CodeActionTrigger = {\n\ttype: CodeActionTriggerType.Invoke,\n\tfilter: { include: CodeActionKind.QuickFix },\n\ttriggerAction: CodeActionTriggerSource.QuickFixHover\n};\n\nexport class MarkerHoverParticipant implements IEditorHoverParticipant<MarkerHover> {\n\n\tpublic readonly hoverOrdinal: number = 1;\n\n\tprivate recentMarkerCodeActionsInfo: { marker: IMarker; hasCodeActions: boolean } | undefined = undefined;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@IMarkerDecorationsService private readonly _markerDecorationsService: IMarkerDecorationsService,\n\t\t@IOpenerService private readonly _openerService: IOpenerService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t) { }\n\n\tpublic computeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[]): MarkerHover[] {\n\t\tif (!this._editor.hasModel() || anchor.type !== HoverAnchorType.Range && !anchor.supportsMarkerHover) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editor.getModel();\n\t\tconst anchorRange = anchor.range;\n\t\tif (!model.isValidRange(anchor.range)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst lineNumber = anchorRange.startLineNumber;\n\t\tconst maxColumn = model.getLineMaxColumn(lineNumber);\n\t\tconst result: MarkerHover[] = [];\n\t\tfor (const d of lineDecorations) {\n\t\t\tconst startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\n\t\t\tconst endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\n\n\t\t\tconst marker = this._markerDecorationsService.getMarker(model.uri, d);\n\t\t\tif (!marker) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst range = new Range(anchor.range.startLineNumber, startColumn, anchor.range.startLineNumber, endColumn);\n\t\t\tresult.push(new MarkerHover(this, range, marker));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic renderHoverParts(context: IEditorHoverRenderContext, hoverParts: MarkerHover[]): IRenderedHoverParts<MarkerHover> {\n\t\tif (!hoverParts.length) {\n\t\t\treturn new RenderedHoverParts([]);\n\t\t}\n\t\tconst renderedHoverParts: IRenderedHoverPart<MarkerHover>[] = [];\n\t\thoverParts.forEach(hoverPart => {\n\t\t\tconst renderedMarkerHover = this._renderMarkerHover(hoverPart);\n\t\t\tcontext.fragment.appendChild(renderedMarkerHover.hoverElement);\n\t\t\trenderedHoverParts.push(renderedMarkerHover);\n\t\t});\n\t\tconst markerHoverForStatusbar = hoverParts.length === 1 ? hoverParts[0] : hoverParts.sort((a, b) => MarkerSeverity.compare(a.marker.severity, b.marker.severity))[0];\n\t\tconst disposables = this._renderMarkerStatusbar(context, markerHoverForStatusbar);\n\t\treturn new RenderedHoverParts(renderedHoverParts, disposables);\n\t}\n\n\tpublic getAccessibleContent(hoverPart: MarkerHover): string {\n\t\treturn hoverPart.marker.message;\n\t}\n\n\tprivate _renderMarkerHover(markerHover: MarkerHover): IRenderedHoverPart<MarkerHover> {\n\t\tconst disposables: DisposableStore = new DisposableStore();\n\t\tconst hoverElement = $('div.hover-row');\n\t\tconst markerElement = dom.append(hoverElement, $('div.marker.hover-contents'));\n\t\tconst { source, message, code, relatedInformation } = markerHover.marker;\n\n\t\tthis._editor.applyFontInfo(markerElement);\n\t\tconst messageElement = dom.append(markerElement, $('span'));\n\t\tmessageElement.style.whiteSpace = 'pre-wrap';\n\t\tmessageElement.innerText = message;\n\n\t\tif (source || code) {\n\t\t\t// Code has link\n\t\t\tif (code && typeof code !== 'string') {\n\t\t\t\tconst sourceAndCodeElement = $('span');\n\t\t\t\tif (source) {\n\t\t\t\t\tconst sourceElement = dom.append(sourceAndCodeElement, $('span'));\n\t\t\t\t\tsourceElement.innerText = source;\n\t\t\t\t}\n\t\t\t\tconst codeLink = dom.append(sourceAndCodeElement, $('a.code-link'));\n\t\t\t\tcodeLink.setAttribute('href', code.target.toString(true));\n\n\t\t\t\tdisposables.add(dom.addDisposableListener(codeLink, 'click', (e) => {\n\t\t\t\t\tthis._openerService.open(code.target, { allowCommands: true });\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}));\n\n\t\t\t\tconst codeElement = dom.append(codeLink, $('span'));\n\t\t\t\tcodeElement.innerText = code.value;\n\n\t\t\t\tconst detailsElement = dom.append(markerElement, sourceAndCodeElement);\n\t\t\t\tdetailsElement.style.opacity = '0.6';\n\t\t\t\tdetailsElement.style.paddingLeft = '6px';\n\t\t\t} else {\n\t\t\t\tconst detailsElement = dom.append(markerElement, $('span'));\n\t\t\t\tdetailsElement.style.opacity = '0.6';\n\t\t\t\tdetailsElement.style.paddingLeft = '6px';\n\t\t\t\tdetailsElement.innerText = source && code ? `${source}(${code})` : source ? source : `(${code})`;\n\t\t\t}\n\t\t}\n\n\t\tif (isNonEmptyArray(relatedInformation)) {\n\t\t\tfor (const { message, resource, startLineNumber, startColumn } of relatedInformation) {\n\t\t\t\tconst relatedInfoContainer = dom.append(markerElement, $('div'));\n\t\t\t\trelatedInfoContainer.style.marginTop = '8px';\n\t\t\t\tconst a = dom.append(relatedInfoContainer, $('a'));\n\t\t\t\ta.innerText = `${basename(resource)}(${startLineNumber}, ${startColumn}): `;\n\t\t\t\ta.style.cursor = 'pointer';\n\t\t\t\tdisposables.add(dom.addDisposableListener(a, 'click', (e) => {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tif (this._openerService) {\n\t\t\t\t\t\tconst editorOptions: ITextEditorOptions = { selection: { startLineNumber, startColumn } };\n\t\t\t\t\t\tthis._openerService.open(resource, {\n\t\t\t\t\t\t\tfromUserGesture: true,\n\t\t\t\t\t\t\teditorOptions\n\t\t\t\t\t\t}).catch(onUnexpectedError);\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\tconst messageElement = dom.append<HTMLAnchorElement>(relatedInfoContainer, $('span'));\n\t\t\t\tmessageElement.innerText = message;\n\t\t\t\tthis._editor.applyFontInfo(messageElement);\n\t\t\t}\n\t\t}\n\n\t\tconst renderedHoverPart: IRenderedHoverPart<MarkerHover> = {\n\t\t\thoverPart: markerHover,\n\t\t\thoverElement,\n\t\t\tdispose: () => disposables.dispose()\n\t\t};\n\t\treturn renderedHoverPart;\n\t}\n\n\tprivate _renderMarkerStatusbar(context: IEditorHoverRenderContext, markerHover: MarkerHover): IDisposable {\n\t\tconst disposables = new DisposableStore();\n\t\tif (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) {\n\t\t\tconst markerController = MarkerController.get(this._editor);\n\t\t\tif (markerController) {\n\t\t\t\tcontext.statusBar.addAction({\n\t\t\t\t\tlabel: nls.localize('view problem', \"View Problem\"),\n\t\t\t\t\tcommandId: NextMarkerAction.ID,\n\t\t\t\t\trun: () => {\n\t\t\t\t\t\tcontext.hide();\n\t\t\t\t\t\tmarkerController.showAtMarker(markerHover.marker);\n\t\t\t\t\t\tthis._editor.focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (!this._editor.getOption(EditorOption.readOnly)) {\n\t\t\tconst quickfixPlaceholderElement = context.statusBar.append($('div'));\n\t\t\tif (this.recentMarkerCodeActionsInfo) {\n\t\t\t\tif (IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker) === IMarkerData.makeKey(markerHover.marker)) {\n\t\t\t\t\tif (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\n\t\t\t\t\t\tquickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', \"No quick fixes available\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.recentMarkerCodeActionsInfo = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize('checkingForQuickFixes', \"Checking for quick fixes...\"), 200, disposables);\n\t\t\tif (!quickfixPlaceholderElement.textContent) {\n\t\t\t\t// Have some content in here to avoid flickering\n\t\t\t\tquickfixPlaceholderElement.textContent = String.fromCharCode(0xA0); // \n\t\t\t}\n\t\t\tconst codeActionsPromise = this.getCodeActions(markerHover.marker);\n\t\t\tdisposables.add(toDisposable(() => codeActionsPromise.cancel()));\n\t\t\tcodeActionsPromise.then(actions => {\n\t\t\t\tupdatePlaceholderDisposable.dispose();\n\t\t\t\tthis.recentMarkerCodeActionsInfo = { marker: markerHover.marker, hasCodeActions: actions.validActions.length > 0 };\n\n\t\t\t\tif (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\n\t\t\t\t\tactions.dispose();\n\t\t\t\t\tquickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', \"No quick fixes available\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tquickfixPlaceholderElement.style.display = 'none';\n\n\t\t\t\tlet showing = false;\n\t\t\t\tdisposables.add(toDisposable(() => {\n\t\t\t\t\tif (!showing) {\n\t\t\t\t\t\tactions.dispose();\n\t\t\t\t\t}\n\t\t\t\t}));\n\n\t\t\t\tcontext.statusBar.addAction({\n\t\t\t\t\tlabel: nls.localize('quick fixes', \"Quick Fix...\"),\n\t\t\t\t\tcommandId: quickFixCommandId,\n\t\t\t\t\trun: (target) => {\n\t\t\t\t\t\tshowing = true;\n\t\t\t\t\t\tconst controller = CodeActionController.get(this._editor);\n\t\t\t\t\t\tconst elementPosition = dom.getDomNodePagePosition(target);\n\t\t\t\t\t\t// Hide the hover pre-emptively, otherwise the editor can close the code actions\n\t\t\t\t\t\t// context menu as well when using keyboard navigation\n\t\t\t\t\t\tcontext.hide();\n\t\t\t\t\t\tcontroller?.showCodeActions(markerCodeActionTrigger, actions, {\n\t\t\t\t\t\t\tx: elementPosition.left,\n\t\t\t\t\t\t\ty: elementPosition.top,\n\t\t\t\t\t\t\twidth: elementPosition.width,\n\t\t\t\t\t\t\theight: elementPosition.height\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst aiCodeAction = actions.validActions.find(action => action.action.isAI);\n\t\t\t\tif (aiCodeAction) {\n\t\t\t\t\tcontext.statusBar.addAction({\n\t\t\t\t\t\tlabel: aiCodeAction.action.title,\n\t\t\t\t\t\tcommandId: aiCodeAction.action.command?.id ?? '',\n\t\t\t\t\t\ticonClass: ThemeIcon.asClassName(Codicon.sparkle),\n\t\t\t\t\t\trun: () => {\n\t\t\t\t\t\t\tconst controller = CodeActionController.get(this._editor);\n\t\t\t\t\t\t\tcontroller?.applyCodeAction(aiCodeAction, false, false, ApplyCodeActionReason.FromProblemsHover);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Notify that the contents have changed given we added\n\t\t\t\t// actions to the hover\n\t\t\t\t// https://github.com/microsoft/vscode/issues/250424\n\t\t\t\tcontext.onContentsChanged();\n\n\t\t\t}, onUnexpectedError);\n\t\t}\n\t\treturn disposables;\n\t}\n\n\tprivate getCodeActions(marker: IMarker): CancelablePromise<CodeActionSet> {\n\t\treturn createCancelablePromise(cancellationToken => {\n\t\t\treturn getCodeActions(\n\t\t\t\tthis._languageFeaturesService.codeActionProvider,\n\t\t\t\tthis._editor.getModel()!,\n\t\t\t\tnew Range(marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn),\n\t\t\t\tmarkerCodeActionTrigger,\n\t\t\t\tProgress.None,\n\t\t\t\tcancellationToken);\n\t\t});\n\t}\n}\n"]}
|
|
@@ -107,7 +107,7 @@ class InPlaceReplaceUp extends EditorAction {
|
|
|
107
107
|
constructor() {
|
|
108
108
|
super({
|
|
109
109
|
id: 'editor.action.inPlaceReplace.up',
|
|
110
|
-
label: nls.localize2(
|
|
110
|
+
label: nls.localize2(1239, "Replace with Previous Value"),
|
|
111
111
|
precondition: EditorContextKeys.writable,
|
|
112
112
|
kbOpts: {
|
|
113
113
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -128,7 +128,7 @@ class InPlaceReplaceDown extends EditorAction {
|
|
|
128
128
|
constructor() {
|
|
129
129
|
super({
|
|
130
130
|
id: 'editor.action.inPlaceReplace.down',
|
|
131
|
-
label: nls.localize2(
|
|
131
|
+
label: nls.localize2(1240, "Replace with Next Value"),
|
|
132
132
|
precondition: EditorContextKeys.writable,
|
|
133
133
|
kbOpts: {
|
|
134
134
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -30,10 +30,10 @@ export class IndentationToSpacesAction extends EditorAction {
|
|
|
30
30
|
constructor() {
|
|
31
31
|
super({
|
|
32
32
|
id: IndentationToSpacesAction.ID,
|
|
33
|
-
label: nls.localize2(
|
|
33
|
+
label: nls.localize2(1147, "Convert Indentation to Spaces"),
|
|
34
34
|
precondition: EditorContextKeys.writable,
|
|
35
35
|
metadata: {
|
|
36
|
-
description: nls.localize2(
|
|
36
|
+
description: nls.localize2(1148, "Convert the tab indentation to spaces."),
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -61,10 +61,10 @@ export class IndentationToTabsAction extends EditorAction {
|
|
|
61
61
|
constructor() {
|
|
62
62
|
super({
|
|
63
63
|
id: IndentationToTabsAction.ID,
|
|
64
|
-
label: nls.localize2(
|
|
64
|
+
label: nls.localize2(1149, "Convert Indentation to Tabs"),
|
|
65
65
|
precondition: EditorContextKeys.writable,
|
|
66
66
|
metadata: {
|
|
67
|
-
description: nls.localize2(
|
|
67
|
+
description: nls.localize2(1150, "Convert the spaces indentation to tabs."),
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
}
|
|
@@ -107,17 +107,17 @@ export class ChangeIndentationSizeAction extends EditorAction {
|
|
|
107
107
|
label: n.toString(),
|
|
108
108
|
// add description for tabSize value set in the configuration
|
|
109
109
|
description: (n === creationOpts.tabSize && n === modelOpts.tabSize
|
|
110
|
-
? nls.localize(
|
|
110
|
+
? nls.localize(1143, "Configured Tab Size")
|
|
111
111
|
: n === creationOpts.tabSize
|
|
112
|
-
? nls.localize(
|
|
112
|
+
? nls.localize(1144, "Default Tab Size")
|
|
113
113
|
: n === modelOpts.tabSize
|
|
114
|
-
? nls.localize(
|
|
114
|
+
? nls.localize(1145, "Current Tab Size")
|
|
115
115
|
: undefined)
|
|
116
116
|
}));
|
|
117
117
|
// auto focus the tabSize set for the current editor
|
|
118
118
|
const autoFocusIndex = Math.min(model.getOptions().tabSize - 1, 7);
|
|
119
119
|
setTimeout(() => {
|
|
120
|
-
quickInputService.pick(picks, { placeHolder: nls.localize(
|
|
120
|
+
quickInputService.pick(picks, { placeHolder: nls.localize(1146, "Select Tab Size for Current File"), activeItem: picks[autoFocusIndex] }).then(pick => {
|
|
121
121
|
if (pick) {
|
|
122
122
|
if (model && !model.isDisposed()) {
|
|
123
123
|
const pickedVal = parseInt(pick.label, 10);
|
|
@@ -144,10 +144,10 @@ export class IndentUsingTabs extends ChangeIndentationSizeAction {
|
|
|
144
144
|
constructor() {
|
|
145
145
|
super(false, false, {
|
|
146
146
|
id: IndentUsingTabs.ID,
|
|
147
|
-
label: nls.localize2(
|
|
147
|
+
label: nls.localize2(1151, "Indent Using Tabs"),
|
|
148
148
|
precondition: undefined,
|
|
149
149
|
metadata: {
|
|
150
|
-
description: nls.localize2(
|
|
150
|
+
description: nls.localize2(1152, "Use indentation with tabs."),
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
}
|
|
@@ -157,10 +157,10 @@ export class IndentUsingSpaces extends ChangeIndentationSizeAction {
|
|
|
157
157
|
constructor() {
|
|
158
158
|
super(true, false, {
|
|
159
159
|
id: IndentUsingSpaces.ID,
|
|
160
|
-
label: nls.localize2(
|
|
160
|
+
label: nls.localize2(1153, "Indent Using Spaces"),
|
|
161
161
|
precondition: undefined,
|
|
162
162
|
metadata: {
|
|
163
|
-
description: nls.localize2(
|
|
163
|
+
description: nls.localize2(1154, "Use indentation with spaces."),
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
166
|
}
|
|
@@ -170,10 +170,10 @@ export class ChangeTabDisplaySize extends ChangeIndentationSizeAction {
|
|
|
170
170
|
constructor() {
|
|
171
171
|
super(true, true, {
|
|
172
172
|
id: ChangeTabDisplaySize.ID,
|
|
173
|
-
label: nls.localize2(
|
|
173
|
+
label: nls.localize2(1155, "Change Tab Display Size"),
|
|
174
174
|
precondition: undefined,
|
|
175
175
|
metadata: {
|
|
176
|
-
description: nls.localize2(
|
|
176
|
+
description: nls.localize2(1156, "Change the space size equivalent of the tab."),
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
}
|
|
@@ -183,10 +183,10 @@ export class DetectIndentation extends EditorAction {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: DetectIndentation.ID,
|
|
186
|
-
label: nls.localize2(
|
|
186
|
+
label: nls.localize2(1157, "Detect Indentation from Content"),
|
|
187
187
|
precondition: undefined,
|
|
188
188
|
metadata: {
|
|
189
|
-
description: nls.localize2(
|
|
189
|
+
description: nls.localize2(1158, "Detect the indentation from content."),
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
}
|
|
@@ -204,10 +204,10 @@ export class ReindentLinesAction extends EditorAction {
|
|
|
204
204
|
constructor() {
|
|
205
205
|
super({
|
|
206
206
|
id: 'editor.action.reindentlines',
|
|
207
|
-
label: nls.localize2(
|
|
207
|
+
label: nls.localize2(1159, "Reindent Lines"),
|
|
208
208
|
precondition: EditorContextKeys.writable,
|
|
209
209
|
metadata: {
|
|
210
|
-
description: nls.localize2(
|
|
210
|
+
description: nls.localize2(1160, "Reindent the lines of the editor."),
|
|
211
211
|
},
|
|
212
212
|
canTriggerInlineEdits: true,
|
|
213
213
|
});
|
|
@@ -230,10 +230,10 @@ export class ReindentSelectedLinesAction extends EditorAction {
|
|
|
230
230
|
constructor() {
|
|
231
231
|
super({
|
|
232
232
|
id: 'editor.action.reindentselectedlines',
|
|
233
|
-
label: nls.localize2(
|
|
233
|
+
label: nls.localize2(1161, "Reindent Selected Lines"),
|
|
234
234
|
precondition: EditorContextKeys.writable,
|
|
235
235
|
metadata: {
|
|
236
|
-
description: nls.localize2(
|
|
236
|
+
description: nls.localize2(1162, "Reindent the selected lines of the editor."),
|
|
237
237
|
},
|
|
238
238
|
canTriggerInlineEdits: true,
|
|
239
239
|
});
|
|
@@ -82,7 +82,7 @@ let InlayHintsHover = class InlayHintsHover extends MarkdownHoverParticipant {
|
|
|
82
82
|
}
|
|
83
83
|
// (1.2) Inlay dbl-click gesture
|
|
84
84
|
if (isNonEmptyArray(part.item.hint.textEdits)) {
|
|
85
|
-
executor.emitOne(new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(localize(
|
|
85
|
+
executor.emitOne(new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(localize(1163, "Double-click to insert"))], false, 10001));
|
|
86
86
|
}
|
|
87
87
|
// (2) Inlay Label Part Tooltip
|
|
88
88
|
let partTooltip;
|
|
@@ -101,19 +101,19 @@ let InlayHintsHover = class InlayHintsHover extends MarkdownHoverParticipant {
|
|
|
101
101
|
const useMetaKey = this._editor.getOption(86 /* EditorOption.multiCursorModifier */) === 'altKey';
|
|
102
102
|
const kb = useMetaKey
|
|
103
103
|
? platform.isMacintosh
|
|
104
|
-
? localize(
|
|
105
|
-
: localize(
|
|
104
|
+
? localize(1164, "cmd + click")
|
|
105
|
+
: localize(1165, "ctrl + click")
|
|
106
106
|
: platform.isMacintosh
|
|
107
|
-
? localize(
|
|
108
|
-
: localize(
|
|
107
|
+
? localize(1166, "option + click")
|
|
108
|
+
: localize(1167, "alt + click");
|
|
109
109
|
if (part.part.location && part.part.command) {
|
|
110
|
-
linkHint = new MarkdownString().appendText(localize(
|
|
110
|
+
linkHint = new MarkdownString().appendText(localize(1168, 'Go to Definition ({0}), right click for more', kb));
|
|
111
111
|
}
|
|
112
112
|
else if (part.part.location) {
|
|
113
|
-
linkHint = new MarkdownString().appendText(localize(
|
|
113
|
+
linkHint = new MarkdownString().appendText(localize(1169, 'Go to Definition ({0})', kb));
|
|
114
114
|
}
|
|
115
115
|
else if (part.part.command) {
|
|
116
|
-
linkHint = new MarkdownString(`[${localize(
|
|
116
|
+
linkHint = new MarkdownString(`[${localize(1170, "Execute Command")}](${asCommandLink(part.part.command)} "${part.part.command.title}") (${kb})`, { isTrusted: true });
|
|
117
117
|
}
|
|
118
118
|
if (linkHint) {
|
|
119
119
|
executor.emitOne(new MarkdownHover(this, anchor.range, [linkHint], false, 10000));
|
|
@@ -25,7 +25,7 @@ export class ShowNextInlineSuggestionAction extends EditorAction {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
super({
|
|
27
27
|
id: ShowNextInlineSuggestionAction.ID,
|
|
28
|
-
label: nls.localize2(
|
|
28
|
+
label: nls.localize2(1182, "Show Next Inline Suggestion"),
|
|
29
29
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
30
30
|
kbOpts: {
|
|
31
31
|
weight: 100,
|
|
@@ -43,7 +43,7 @@ export class ShowPreviousInlineSuggestionAction extends EditorAction {
|
|
|
43
43
|
constructor() {
|
|
44
44
|
super({
|
|
45
45
|
id: ShowPreviousInlineSuggestionAction.ID,
|
|
46
|
-
label: nls.localize2(
|
|
46
|
+
label: nls.localize2(1183, "Show Previous Inline Suggestion"),
|
|
47
47
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
48
48
|
kbOpts: {
|
|
49
49
|
weight: 100,
|
|
@@ -74,13 +74,13 @@ export class TriggerInlineSuggestionAction extends EditorAction {
|
|
|
74
74
|
constructor() {
|
|
75
75
|
super({
|
|
76
76
|
id: 'editor.action.inlineSuggest.trigger',
|
|
77
|
-
label: nls.localize2(
|
|
77
|
+
label: nls.localize2(1184, "Trigger Inline Suggestion"),
|
|
78
78
|
precondition: EditorContextKeys.writable,
|
|
79
79
|
metadata: {
|
|
80
|
-
description: nls.localize(
|
|
80
|
+
description: nls.localize(1171, "Triggers an inline suggestion in the editor."),
|
|
81
81
|
args: [{
|
|
82
82
|
name: 'args',
|
|
83
|
-
description: nls.localize(
|
|
83
|
+
description: nls.localize(1172, "Options for triggering inline suggestions."),
|
|
84
84
|
isOptional: true,
|
|
85
85
|
schema: argsValidator.getJSONSchema(),
|
|
86
86
|
}]
|
|
@@ -108,7 +108,7 @@ export class TriggerInlineSuggestionAction extends EditorAction {
|
|
|
108
108
|
if (!controller?.model.get()?.state.get()) {
|
|
109
109
|
notificationService.notify({
|
|
110
110
|
severity: Severity.Info,
|
|
111
|
-
message: nls.localize(
|
|
111
|
+
message: nls.localize(1173, "No inline suggestion is available.")
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -118,7 +118,7 @@ export class AcceptNextWordOfInlineCompletion extends EditorAction {
|
|
|
118
118
|
constructor() {
|
|
119
119
|
super({
|
|
120
120
|
id: 'editor.action.inlineSuggest.acceptNextWord',
|
|
121
|
-
label: nls.localize2(
|
|
121
|
+
label: nls.localize2(1185, "Accept Next Word Of Inline Suggestion"),
|
|
122
122
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
123
123
|
kbOpts: {
|
|
124
124
|
weight: 100 /* KeybindingWeight.EditorContrib */ + 1,
|
|
@@ -127,7 +127,7 @@ export class AcceptNextWordOfInlineCompletion extends EditorAction {
|
|
|
127
127
|
},
|
|
128
128
|
menuOpts: [{
|
|
129
129
|
menuId: MenuId.InlineSuggestionToolbar,
|
|
130
|
-
title: nls.localize(
|
|
130
|
+
title: nls.localize(1174, 'Accept Word'),
|
|
131
131
|
group: 'primary',
|
|
132
132
|
order: 2,
|
|
133
133
|
}],
|
|
@@ -142,14 +142,14 @@ export class AcceptNextLineOfInlineCompletion extends EditorAction {
|
|
|
142
142
|
constructor() {
|
|
143
143
|
super({
|
|
144
144
|
id: 'editor.action.inlineSuggest.acceptNextLine',
|
|
145
|
-
label: nls.localize2(
|
|
145
|
+
label: nls.localize2(1186, "Accept Next Line Of Inline Suggestion"),
|
|
146
146
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
147
147
|
kbOpts: {
|
|
148
148
|
weight: 100 /* KeybindingWeight.EditorContrib */ + 1,
|
|
149
149
|
},
|
|
150
150
|
menuOpts: [{
|
|
151
151
|
menuId: MenuId.InlineSuggestionToolbar,
|
|
152
|
-
title: nls.localize(
|
|
152
|
+
title: nls.localize(1175, 'Accept Line'),
|
|
153
153
|
group: 'secondary',
|
|
154
154
|
order: 2,
|
|
155
155
|
}],
|
|
@@ -164,16 +164,16 @@ export class AcceptInlineCompletion extends EditorAction {
|
|
|
164
164
|
constructor() {
|
|
165
165
|
super({
|
|
166
166
|
id: inlineSuggestCommitId,
|
|
167
|
-
label: nls.localize2(
|
|
167
|
+
label: nls.localize2(1187, "Accept Inline Suggestion"),
|
|
168
168
|
precondition: ContextKeyExpr.or(InlineCompletionContextKeys.inlineSuggestionVisible, InlineCompletionContextKeys.inlineEditVisible),
|
|
169
169
|
menuOpts: [{
|
|
170
170
|
menuId: MenuId.InlineSuggestionToolbar,
|
|
171
|
-
title: nls.localize(
|
|
171
|
+
title: nls.localize(1176, "Accept"),
|
|
172
172
|
group: 'primary',
|
|
173
173
|
order: 2,
|
|
174
174
|
}, {
|
|
175
175
|
menuId: MenuId.InlineEditsActions,
|
|
176
|
-
title: nls.localize(
|
|
176
|
+
title: nls.localize(1177, "Accept"),
|
|
177
177
|
group: 'primary',
|
|
178
178
|
order: 2,
|
|
179
179
|
}],
|
|
@@ -204,11 +204,11 @@ export class JumpToNextInlineEdit extends EditorAction {
|
|
|
204
204
|
constructor() {
|
|
205
205
|
super({
|
|
206
206
|
id: jumpToNextInlineEditId,
|
|
207
|
-
label: nls.localize2(
|
|
207
|
+
label: nls.localize2(1188, "Jump to next inline edit"),
|
|
208
208
|
precondition: InlineCompletionContextKeys.inlineEditVisible,
|
|
209
209
|
menuOpts: [{
|
|
210
210
|
menuId: MenuId.InlineEditsActions,
|
|
211
|
-
title: nls.localize(
|
|
211
|
+
title: nls.localize(1178, "Jump"),
|
|
212
212
|
group: 'primary',
|
|
213
213
|
order: 1,
|
|
214
214
|
when: InlineCompletionContextKeys.cursorAtInlineEdit.toNegated(),
|
|
@@ -232,7 +232,7 @@ export class HideInlineCompletion extends EditorAction {
|
|
|
232
232
|
constructor() {
|
|
233
233
|
super({
|
|
234
234
|
id: HideInlineCompletion.ID,
|
|
235
|
-
label: nls.localize2(
|
|
235
|
+
label: nls.localize2(1189, "Hide Inline Suggestion"),
|
|
236
236
|
precondition: ContextKeyExpr.or(InlineCompletionContextKeys.inlineSuggestionVisible, InlineCompletionContextKeys.inlineEditVisible),
|
|
237
237
|
kbOpts: {
|
|
238
238
|
weight: 100 /* KeybindingWeight.EditorContrib */ + 90, // same as hiding the suggest widget
|
|
@@ -240,7 +240,7 @@ export class HideInlineCompletion extends EditorAction {
|
|
|
240
240
|
},
|
|
241
241
|
menuOpts: [{
|
|
242
242
|
menuId: MenuId.InlineEditsActions,
|
|
243
|
-
title: nls.localize(
|
|
243
|
+
title: nls.localize(1179, "Reject"),
|
|
244
244
|
group: 'primary',
|
|
245
245
|
order: 3,
|
|
246
246
|
}]
|
|
@@ -259,7 +259,7 @@ export class ToggleInlineCompletionShowCollapsed extends EditorAction {
|
|
|
259
259
|
constructor() {
|
|
260
260
|
super({
|
|
261
261
|
id: ToggleInlineCompletionShowCollapsed.ID,
|
|
262
|
-
label: nls.localize2(
|
|
262
|
+
label: nls.localize2(1190, "Toggle Inline Suggestions Show Collapsed"),
|
|
263
263
|
precondition: ContextKeyExpr.true(),
|
|
264
264
|
});
|
|
265
265
|
}
|
|
@@ -281,7 +281,7 @@ export class ToggleAlwaysShowInlineSuggestionToolbar extends Action2 {
|
|
|
281
281
|
constructor() {
|
|
282
282
|
super({
|
|
283
283
|
id: ToggleAlwaysShowInlineSuggestionToolbar.ID,
|
|
284
|
-
title: nls.localize(
|
|
284
|
+
title: nls.localize(1180, "Always Show Toolbar"),
|
|
285
285
|
f1: false,
|
|
286
286
|
precondition: undefined,
|
|
287
287
|
menu: [{
|
|
@@ -303,7 +303,7 @@ export class DevExtractReproSample extends EditorAction {
|
|
|
303
303
|
constructor() {
|
|
304
304
|
super({
|
|
305
305
|
id: 'editor.action.inlineSuggest.dev.extractRepro',
|
|
306
|
-
label: nls.localize(
|
|
306
|
+
label: nls.localize(1181, "Developer: Extract Inline Suggest State"),
|
|
307
307
|
alias: 'Developer: Inline Suggest Extract Repro',
|
|
308
308
|
precondition: ContextKeyExpr.or(InlineCompletionContextKeys.inlineEditVisible, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
309
309
|
});
|
package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js
CHANGED
|
@@ -6,17 +6,17 @@ import { RawContextKey } from '../../../../../platform/contextkey/common/context
|
|
|
6
6
|
import { localize } from '../../../../../nls.js';
|
|
7
7
|
import * as nls from '../../../../../nls.js';
|
|
8
8
|
export class InlineCompletionContextKeys {
|
|
9
|
-
static { this.inlineSuggestionVisible = new RawContextKey('inlineSuggestionVisible', false, localize(
|
|
10
|
-
static { this.inlineSuggestionHasIndentation = new RawContextKey('inlineSuggestionHasIndentation', false, localize(
|
|
11
|
-
static { this.inlineSuggestionHasIndentationLessThanTabSize = new RawContextKey('inlineSuggestionHasIndentationLessThanTabSize', true, localize(
|
|
12
|
-
static { this.suppressSuggestions = new RawContextKey('inlineSuggestionSuppressSuggestions', undefined, localize(
|
|
13
|
-
static { this.cursorBeforeGhostText = new RawContextKey('cursorBeforeGhostText', false, localize(
|
|
14
|
-
static { this.cursorInIndentation = new RawContextKey('cursorInIndentation', false, localize(
|
|
15
|
-
static { this.hasSelection = new RawContextKey('editor.hasSelection', false, localize(
|
|
16
|
-
static { this.cursorAtInlineEdit = new RawContextKey('cursorAtInlineEdit', false, localize(
|
|
17
|
-
static { this.inlineEditVisible = new RawContextKey('inlineEditIsVisible', false, localize(
|
|
18
|
-
static { this.tabShouldJumpToInlineEdit = new RawContextKey('tabShouldJumpToInlineEdit', false, localize(
|
|
19
|
-
static { this.tabShouldAcceptInlineEdit = new RawContextKey('tabShouldAcceptInlineEdit', false, localize(
|
|
20
|
-
static { this.inInlineEditsPreviewEditor = new RawContextKey('inInlineEditsPreviewEditor', true, nls.localize(
|
|
9
|
+
static { this.inlineSuggestionVisible = new RawContextKey('inlineSuggestionVisible', false, localize(1191, "Whether an inline suggestion is visible")); }
|
|
10
|
+
static { this.inlineSuggestionHasIndentation = new RawContextKey('inlineSuggestionHasIndentation', false, localize(1192, "Whether the inline suggestion starts with whitespace")); }
|
|
11
|
+
static { this.inlineSuggestionHasIndentationLessThanTabSize = new RawContextKey('inlineSuggestionHasIndentationLessThanTabSize', true, localize(1193, "Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")); }
|
|
12
|
+
static { this.suppressSuggestions = new RawContextKey('inlineSuggestionSuppressSuggestions', undefined, localize(1194, "Whether suggestions should be suppressed for the current suggestion")); }
|
|
13
|
+
static { this.cursorBeforeGhostText = new RawContextKey('cursorBeforeGhostText', false, localize(1195, "Whether the cursor is at ghost text")); }
|
|
14
|
+
static { this.cursorInIndentation = new RawContextKey('cursorInIndentation', false, localize(1196, "Whether the cursor is in indentation")); }
|
|
15
|
+
static { this.hasSelection = new RawContextKey('editor.hasSelection', false, localize(1197, "Whether the editor has a selection")); }
|
|
16
|
+
static { this.cursorAtInlineEdit = new RawContextKey('cursorAtInlineEdit', false, localize(1198, "Whether the cursor is at an inline edit")); }
|
|
17
|
+
static { this.inlineEditVisible = new RawContextKey('inlineEditIsVisible', false, localize(1199, "Whether an inline edit is visible")); }
|
|
18
|
+
static { this.tabShouldJumpToInlineEdit = new RawContextKey('tabShouldJumpToInlineEdit', false, localize(1200, "Whether tab should jump to an inline edit.")); }
|
|
19
|
+
static { this.tabShouldAcceptInlineEdit = new RawContextKey('tabShouldAcceptInlineEdit', false, localize(1201, "Whether tab should accept the inline edit.")); }
|
|
20
|
+
static { this.inInlineEditsPreviewEditor = new RawContextKey('inInlineEditsPreviewEditor', true, nls.localize(1202, "Whether the current code editor is showing an inline edits preview")); }
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=inlineCompletionContextKeys.js.map
|
package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js
CHANGED
|
@@ -365,7 +365,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
365
365
|
const accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView');
|
|
366
366
|
let hint;
|
|
367
367
|
if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(169 /* EditorOption.inlineCompletionsAccessibilityVerbose */)) {
|
|
368
|
-
hint = localize(
|
|
368
|
+
hint = localize(1203, "Inspect this in the accessible view ({0})", accessibleViewKeybinding.getAriaLabel());
|
|
369
369
|
}
|
|
370
370
|
alert(hint ? content + ', ' + hint : content);
|
|
371
371
|
}
|
|
@@ -114,13 +114,16 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
|
|
|
114
114
|
};
|
|
115
115
|
return new RenderedHoverParts([renderedHoverPart]);
|
|
116
116
|
}
|
|
117
|
+
getAccessibleContent(hoverPart) {
|
|
118
|
+
return nls.localize(1204, 'There are inline completions here');
|
|
119
|
+
}
|
|
117
120
|
renderScreenReaderText(context, part) {
|
|
118
121
|
const disposables = new DisposableStore();
|
|
119
122
|
const $ = dom.$;
|
|
120
123
|
const markdownHoverElement = $('div.hover-row.markdown-hover');
|
|
121
124
|
const hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents', { ['aria-live']: 'assertive' }));
|
|
122
125
|
const render = (code) => {
|
|
123
|
-
const inlineSuggestionAvailable = nls.localize(
|
|
126
|
+
const inlineSuggestionAvailable = nls.localize(1205, "Suggestion:");
|
|
124
127
|
const renderedContents = disposables.add(this._markdownRendererService.render(new MarkdownString().appendText(inlineSuggestionAvailable).appendCodeblock('text', code), {
|
|
125
128
|
context: this._editor,
|
|
126
129
|
asyncRenderCallback: () => {
|