monaco-editor-core 0.55.0-dev-20251007 → 0.55.0-dev-20251009
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.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.ru.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 +3 -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/browser/ui/toolbar/toolbar.js +4 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +2 -5
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -8
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -2
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +9 -1
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/normalization.js +39 -0
- package/esm/vs/base/common/normalization.js.map +1 -0
- package/esm/vs/base/common/process.js +0 -1
- package/esm/vs/base/common/process.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +5 -8
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +36 -31
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/editor/common/core/text/abstractText.js +5 -1
- package/esm/vs/editor/common/core/text/abstractText.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js +2 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +54 -61
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +5 -8
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +18 -23
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +10 -12
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +9 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +8 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +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 +10 -12
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- 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 +5 -5
- 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/rename/browser/renameWidget.js.map +1 -1
- 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 +18 -24
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +15 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- 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 +7 -6
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js.map +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -32
- 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/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/dataChannel/browser/forwardingTelemetryService.js +1 -2
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js +1 -3
- package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.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/product/common/product.js +1 -2
- package/esm/vs/platform/product/common/product.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +33 -9
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- 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 +15 -15
- 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
|
@@ -22,31 +22,29 @@ import { escapeRegExpCharacters } from '../../../../base/common/strings.js';
|
|
|
22
22
|
import { assertReturnsDefined } from '../../../../base/common/types.js';
|
|
23
23
|
import './parameterHints.css';
|
|
24
24
|
import { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';
|
|
25
|
-
import {
|
|
26
|
-
import { MarkdownRenderer } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';
|
|
25
|
+
import { IMarkdownRendererService } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';
|
|
27
26
|
import { Context } from './provideSignatureHelp.js';
|
|
28
27
|
import * as nls from '../../../../nls.js';
|
|
29
28
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
|
30
|
-
import { IOpenerService } from '../../../../platform/opener/common/opener.js';
|
|
31
29
|
import { listHighlightForeground, registerColor } from '../../../../platform/theme/common/colorRegistry.js';
|
|
32
30
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
33
31
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
34
32
|
const $ = dom.$;
|
|
35
|
-
const parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize(
|
|
36
|
-
const parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize(
|
|
33
|
+
const parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize(1303, 'Icon for show next parameter hint.'));
|
|
34
|
+
const parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize(1304, 'Icon for show previous parameter hint.'));
|
|
37
35
|
let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
38
36
|
static { ParameterHintsWidget_1 = this; }
|
|
39
37
|
static { this.ID = 'editor.widget.parameterHintsWidget'; }
|
|
40
|
-
constructor(editor, model, contextKeyService,
|
|
38
|
+
constructor(editor, model, contextKeyService, markdownRendererService) {
|
|
41
39
|
super();
|
|
42
40
|
this.editor = editor;
|
|
43
41
|
this.model = model;
|
|
42
|
+
this.markdownRendererService = markdownRendererService;
|
|
44
43
|
this.renderDisposeables = this._register(new DisposableStore());
|
|
45
44
|
this.visible = false;
|
|
46
45
|
this.announcedLabel = null;
|
|
47
46
|
// Editor.IContentWidget.allowEditorOverflow
|
|
48
47
|
this.allowEditorOverflow = true;
|
|
49
|
-
this.markdownRenderer = new MarkdownRenderer({ editor }, languageService, openerService);
|
|
50
48
|
this.keyVisible = Context.Visible.bindTo(contextKeyService);
|
|
51
49
|
this.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);
|
|
52
50
|
}
|
|
@@ -208,7 +206,7 @@ let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
|
208
206
|
// Select method gets called on every user type while parameter hints are visible.
|
|
209
207
|
// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.
|
|
210
208
|
if (this.announcedLabel !== labelToAnnounce) {
|
|
211
|
-
aria.alert(nls.localize(
|
|
209
|
+
aria.alert(nls.localize(1305, "{0}, hint", labelToAnnounce));
|
|
212
210
|
this.announcedLabel = labelToAnnounce;
|
|
213
211
|
}
|
|
214
212
|
}
|
|
@@ -216,7 +214,8 @@ let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
|
216
214
|
this.domNodes.scrollbar.scanDomNode();
|
|
217
215
|
}
|
|
218
216
|
renderMarkdownDocs(markdown) {
|
|
219
|
-
const renderedContents = this.renderDisposeables.add(this.
|
|
217
|
+
const renderedContents = this.renderDisposeables.add(this.markdownRendererService.render(markdown, {
|
|
218
|
+
editor: this.editor,
|
|
220
219
|
asyncRenderCallback: () => {
|
|
221
220
|
this.domNodes?.scrollbar.scanDomNode();
|
|
222
221
|
}
|
|
@@ -302,9 +301,8 @@ let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
|
302
301
|
};
|
|
303
302
|
ParameterHintsWidget = ParameterHintsWidget_1 = __decorate([
|
|
304
303
|
__param(2, IContextKeyService),
|
|
305
|
-
__param(3,
|
|
306
|
-
__param(4, ILanguageService)
|
|
304
|
+
__param(3, IMarkdownRendererService)
|
|
307
305
|
], ParameterHintsWidget);
|
|
308
306
|
export { ParameterHintsWidget };
|
|
309
|
-
registerColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize(
|
|
307
|
+
registerColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize(1306, 'Foreground color of the active item in the parameter hint.'));
|
|
310
308
|
//# sourceMappingURL=parameterHintsWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,KAAK,IAAI,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,M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,CAAC;QACpC,CAAC;QACD,OAAO,IAAI,CAAC,QAAS,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,KAAK;QACJ,OAAO,sBAAoB,CAAC,EAAE,CAAC;IAChC,CAAC;IAEO,eAAe;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAkC,CAAC;QAC3G,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QACxC,CAAC;IACF,CAAC;;AA3UW,oBAAoB;IA0B9B,WAAA,kBAAkB,CAAA;IAClB,WAAA,cAAc,CAAA;IACd,WAAA,gBAAgB,CAAA;GA5BN,oBAAoB,CA4UhC;;AAED,aAAa,CAAC,uCAAuC,EAAE,uBAAuB,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAsC,EAAE,4DAA4D,CAAC,CAAC,CAAC","file":"parameterHintsWidget.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 * as aria from '../../../../base/browser/ui/aria/aria.js';\nimport { DomScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Event } from '../../../../base/common/event.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { escapeRegExpCharacters } from '../../../../base/common/strings.js';\nimport { assertReturnsDefined } from '../../../../base/common/types.js';\nimport './parameterHints.css';\nimport { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';\nimport * as languages from '../../../common/languages.js';\nimport { ILanguageService } from '../../../common/languages/language.js';\nimport { IMarkdownRenderResult, MarkdownRenderer } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';\nimport { ParameterHintsModel } from './parameterHintsModel.js';\nimport { Context } from './provideSignatureHelp.js';\nimport * as nls from '../../../../nls.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { listHighlightForeground, registerColor } from '../../../../platform/theme/common/colorRegistry.js';\nimport { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\n\nconst $ = dom.$;\n\nconst parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize('parameterHintsNextIcon', 'Icon for show next parameter hint.'));\nconst parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.'));\n\nexport class ParameterHintsWidget extends Disposable implements IContentWidget {\n\n\tprivate static readonly ID = 'editor.widget.parameterHintsWidget';\n\n\tprivate readonly markdownRenderer: MarkdownRenderer;\n\tprivate readonly renderDisposeables = this._register(new DisposableStore());\n\tprivate readonly keyVisible: IContextKey<boolean>;\n\tprivate readonly keyMultipleSignatures: IContextKey<boolean>;\n\n\tprivate domNodes?: {\n\t\treadonly element: HTMLElement;\n\t\treadonly signature: HTMLElement;\n\t\treadonly docs: HTMLElement;\n\t\treadonly overloads: HTMLElement;\n\t\treadonly scrollbar: DomScrollableElement;\n\t};\n\n\tprivate visible: boolean = false;\n\tprivate announcedLabel: string | null = null;\n\n\t// Editor.IContentWidget.allowEditorOverflow\n\tallowEditorOverflow = true;\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\tprivate readonly model: ParameterHintsModel,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IOpenerService openerService: IOpenerService,\n\t\t@ILanguageService languageService: ILanguageService\n\t) {\n\t\tsuper();\n\n\t\tthis.markdownRenderer = new MarkdownRenderer({ editor }, languageService, openerService);\n\n\t\tthis.keyVisible = Context.Visible.bindTo(contextKeyService);\n\t\tthis.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);\n\t}\n\n\tprivate createParameterHintDOMNodes() {\n\t\tconst element = $('.editor-widget.parameter-hints-widget');\n\t\tconst wrapper = dom.append(element, $('.phwrapper'));\n\t\twrapper.tabIndex = -1;\n\n\t\tconst controls = dom.append(wrapper, $('.controls'));\n\t\tconst previous = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsPreviousIcon)));\n\t\tconst overloads = dom.append(controls, $('.overloads'));\n\t\tconst next = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsNextIcon)));\n\n\t\tthis._register(dom.addDisposableListener(previous, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.previous();\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(next, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.next();\n\t\t}));\n\n\t\tconst body = $('.body');\n\t\tconst scrollbar = new DomScrollableElement(body, {\n\t\t\talwaysConsumeMouseWheel: true,\n\t\t});\n\t\tthis._register(scrollbar);\n\t\twrapper.appendChild(scrollbar.getDomNode());\n\n\t\tconst signature = dom.append(body, $('.signature'));\n\t\tconst docs = dom.append(body, $('.docs'));\n\n\t\telement.style.userSelect = 'text';\n\n\t\tthis.domNodes = {\n\t\t\telement,\n\t\t\tsignature,\n\t\t\toverloads,\n\t\t\tdocs,\n\t\t\tscrollbar,\n\t\t};\n\n\t\tthis.editor.addContentWidget(this);\n\t\tthis.hide();\n\n\t\tthis._register(this.editor.onDidChangeCursorSelection(e => {\n\t\t\tif (this.visible) {\n\t\t\t\tthis.editor.layoutContentWidget(this);\n\t\t\t}\n\t\t}));\n\n\t\tconst updateFont = () => {\n\t\t\tif (!this.domNodes) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fontInfo = this.editor.getOption(EditorOption.fontInfo);\n\t\t\tconst element = this.domNodes.element;\n\t\t\telement.style.fontSize = `${fontInfo.fontSize}px`;\n\t\t\telement.style.lineHeight = `${fontInfo.lineHeight / fontInfo.fontSize}`;\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamily', fontInfo.fontFamily);\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamilyDefault', EDITOR_FONT_DEFAULTS.fontFamily);\n\t\t};\n\n\t\tupdateFont();\n\n\t\tthis._register(Event.chain(\n\t\t\tthis.editor.onDidChangeConfiguration.bind(this.editor),\n\t\t\t$ => $.filter(e => e.hasChanged(EditorOption.fontInfo))\n\t\t)(updateFont));\n\n\t\tthis._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));\n\t\tthis.updateMaxHeight();\n\t}\n\n\tpublic show(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\n\t\tthis.keyVisible.set(true);\n\t\tthis.visible = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.domNodes?.element.classList.add('visible');\n\t\t}, 100);\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tpublic hide(): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyVisible.reset();\n\t\tthis.visible = false;\n\t\tthis.announcedLabel = null;\n\t\tthis.domNodes?.element.classList.remove('visible');\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tgetPosition(): IContentWidgetPosition | null {\n\t\tif (this.visible) {\n\t\t\treturn {\n\t\t\t\tposition: this.editor.getPosition(),\n\t\t\t\tpreference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW]\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic render(hints: languages.SignatureHelp): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst multiple = hints.signatures.length > 1;\n\t\tthis.domNodes.element.classList.toggle('multiple', multiple);\n\t\tthis.keyMultipleSignatures.set(multiple);\n\n\t\tthis.domNodes.signature.innerText = '';\n\t\tthis.domNodes.docs.innerText = '';\n\n\t\tconst signature = hints.signatures[hints.activeSignature];\n\t\tif (!signature) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst code = dom.append(this.domNodes.signature, $('.code'));\n\t\tconst hasParameters = signature.parameters.length > 0;\n\t\tconst activeParameterIndex = signature.activeParameter ?? hints.activeParameter;\n\n\t\tif (!hasParameters) {\n\t\t\tconst label = dom.append(code, $('span'));\n\t\t\tlabel.textContent = signature.label;\n\t\t} else {\n\t\t\tthis.renderParameters(code, signature, activeParameterIndex);\n\t\t}\n\n\t\tconst activeParameter: languages.ParameterInformation | undefined = signature.parameters[activeParameterIndex];\n\t\tif (activeParameter?.documentation) {\n\t\t\tconst documentation = $('span.documentation');\n\t\t\tif (typeof activeParameter.documentation === 'string') {\n\t\t\t\tdocumentation.textContent = activeParameter.documentation;\n\t\t\t} else {\n\t\t\t\tconst renderedContents = this.renderMarkdownDocs(activeParameter.documentation);\n\t\t\t\tdocumentation.appendChild(renderedContents.element);\n\t\t\t}\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, documentation));\n\t\t}\n\n\t\tif (signature.documentation === undefined) {\n\t\t\t/** no op */\n\t\t} else if (typeof signature.documentation === 'string') {\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, signature.documentation));\n\t\t} else {\n\t\t\tconst renderedContents = this.renderMarkdownDocs(signature.documentation);\n\t\t\tdom.append(this.domNodes.docs, renderedContents.element);\n\t\t}\n\n\t\tconst hasDocs = this.hasDocs(signature, activeParameter);\n\n\t\tthis.domNodes.signature.classList.toggle('has-docs', hasDocs);\n\t\tthis.domNodes.docs.classList.toggle('empty', !hasDocs);\n\n\t\tthis.domNodes.overloads.textContent =\n\t\t\tString(hints.activeSignature + 1).padStart(hints.signatures.length.toString().length, '0') + '/' + hints.signatures.length;\n\n\t\tif (activeParameter) {\n\t\t\tlet labelToAnnounce = '';\n\t\t\tconst param = signature.parameters[activeParameterIndex];\n\t\t\tif (Array.isArray(param.label)) {\n\t\t\t\tlabelToAnnounce = signature.label.substring(param.label[0], param.label[1]);\n\t\t\t} else {\n\t\t\t\tlabelToAnnounce = param.label;\n\t\t\t}\n\t\t\tif (param.documentation) {\n\t\t\t\tlabelToAnnounce += typeof param.documentation === 'string' ? `, ${param.documentation}` : `, ${param.documentation.value}`;\n\t\t\t}\n\t\t\tif (signature.documentation) {\n\t\t\t\tlabelToAnnounce += typeof signature.documentation === 'string' ? `, ${signature.documentation}` : `, ${signature.documentation.value}`;\n\t\t\t}\n\n\t\t\t// Select method gets called on every user type while parameter hints are visible.\n\t\t\t// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\n\n\t\t\tif (this.announcedLabel !== labelToAnnounce) {\n\t\t\t\taria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\n\t\t\t\tthis.announcedLabel = labelToAnnounce;\n\t\t\t}\n\t\t}\n\n\t\tthis.editor.layoutContentWidget(this);\n\t\tthis.domNodes.scrollbar.scanDomNode();\n\t}\n\n\tprivate renderMarkdownDocs(markdown: IMarkdownString): IMarkdownRenderResult {\n\t\tconst renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(markdown, {\n\t\t\tasyncRenderCallback: () => {\n\t\t\t\tthis.domNodes?.scrollbar.scanDomNode();\n\t\t\t}\n\t\t}));\n\t\trenderedContents.element.classList.add('markdown-docs');\n\t\treturn renderedContents;\n\t}\n\n\tprivate hasDocs(signature: languages.SignatureInformation, activeParameter: languages.ParameterInformation | undefined): boolean {\n\t\tif (activeParameter && typeof activeParameter.documentation === 'string' && assertReturnsDefined(activeParameter.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (activeParameter && typeof activeParameter.documentation === 'object' && assertReturnsDefined(activeParameter.documentation).value.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'string' && assertReturnsDefined(signature.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'object' && assertReturnsDefined(signature.documentation.value).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate renderParameters(parent: HTMLElement, signature: languages.SignatureInformation, activeParameterIndex: number): void {\n\t\tconst [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex);\n\n\t\tconst beforeSpan = document.createElement('span');\n\t\tbeforeSpan.textContent = signature.label.substring(0, start);\n\n\t\tconst paramSpan = document.createElement('span');\n\t\tparamSpan.textContent = signature.label.substring(start, end);\n\t\tparamSpan.className = 'parameter active';\n\n\t\tconst afterSpan = document.createElement('span');\n\t\tafterSpan.textContent = signature.label.substring(end);\n\n\t\tdom.append(parent, beforeSpan, paramSpan, afterSpan);\n\t}\n\n\tprivate getParameterLabelOffsets(signature: languages.SignatureInformation, paramIdx: number): [number, number] {\n\t\tconst param = signature.parameters[paramIdx];\n\t\tif (!param) {\n\t\t\treturn [0, 0];\n\t\t} else if (Array.isArray(param.label)) {\n\t\t\treturn param.label;\n\t\t} else if (!param.label.length) {\n\t\t\treturn [0, 0];\n\t\t} else {\n\t\t\tconst regex = new RegExp(`(\\\\W|^)${escapeRegExpCharacters(param.label)}(?=\\\\W|$)`, 'g');\n\t\t\tregex.test(signature.label);\n\t\t\tconst idx = regex.lastIndex - param.label.length;\n\t\t\treturn idx >= 0\n\t\t\t\t? [idx, regex.lastIndex]\n\t\t\t\t: [0, 0];\n\t\t}\n\t}\n\n\tnext(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.next();\n\t}\n\n\tprevious(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.previous();\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\t\treturn this.domNodes!.element;\n\t}\n\n\tgetId(): string {\n\t\treturn ParameterHintsWidget.ID;\n\t}\n\n\tprivate updateMaxHeight(): void {\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\t\tconst height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\n\t\tconst maxHeight = `${height}px`;\n\t\tthis.domNodes.element.style.maxHeight = maxHeight;\n\t\tconst wrapper = this.domNodes.element.getElementsByClassName('phwrapper') as HTMLCollectionOf<HTMLElement>;\n\t\tif (wrapper.length) {\n\t\t\twrapper[0].style.maxHeight = maxHeight;\n\t\t}\n\t}\n}\n\nregisterColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize('editorHoverWidgetHighlightForeground', 'Foreground color of the active item in the parameter hint.'));\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,KAAK,IAAI,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAE,O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;QACJ,OAAO,sBAAoB,CAAC,EAAE,CAAC;IAChC,CAAC;IAEO,eAAe;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAkC,CAAC;QAC3G,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QACxC,CAAC;IACF,CAAC;;AAxUW,oBAAoB;IAyB9B,WAAA,kBAAkB,CAAA;IAClB,WAAA,wBAAwB,CAAA;GA1Bd,oBAAoB,CAyUhC;;AAED,aAAa,CAAC,uCAAuC,EAAE,uBAAuB,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAsC,EAAE,4DAA4D,CAAC,CAAC,CAAC","file":"parameterHintsWidget.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 * as aria from '../../../../base/browser/ui/aria/aria.js';\nimport { DomScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Event } from '../../../../base/common/event.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { escapeRegExpCharacters } from '../../../../base/common/strings.js';\nimport { assertReturnsDefined } from '../../../../base/common/types.js';\nimport './parameterHints.css';\nimport { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';\nimport * as languages from '../../../common/languages.js';\nimport { IMarkdownRendererService } from '../../../browser/widget/markdownRenderer/browser/markdownRenderer.js';\nimport { IRenderedMarkdown } from '../../../../base/browser/markdownRenderer.js';\nimport { ParameterHintsModel } from './parameterHintsModel.js';\nimport { Context } from './provideSignatureHelp.js';\nimport * as nls from '../../../../nls.js';\nimport { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { listHighlightForeground, registerColor } from '../../../../platform/theme/common/colorRegistry.js';\nimport { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\n\nconst $ = dom.$;\n\nconst parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize('parameterHintsNextIcon', 'Icon for show next parameter hint.'));\nconst parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.'));\n\nexport class ParameterHintsWidget extends Disposable implements IContentWidget {\n\n\tprivate static readonly ID = 'editor.widget.parameterHintsWidget';\n\n\tprivate readonly renderDisposeables = this._register(new DisposableStore());\n\tprivate readonly keyVisible: IContextKey<boolean>;\n\tprivate readonly keyMultipleSignatures: IContextKey<boolean>;\n\n\tprivate domNodes?: {\n\t\treadonly element: HTMLElement;\n\t\treadonly signature: HTMLElement;\n\t\treadonly docs: HTMLElement;\n\t\treadonly overloads: HTMLElement;\n\t\treadonly scrollbar: DomScrollableElement;\n\t};\n\n\tprivate visible: boolean = false;\n\tprivate announcedLabel: string | null = null;\n\n\t// Editor.IContentWidget.allowEditorOverflow\n\tallowEditorOverflow = true;\n\n\tconstructor(\n\t\tprivate readonly editor: ICodeEditor,\n\t\tprivate readonly model: ParameterHintsModel,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@IMarkdownRendererService private readonly markdownRendererService: IMarkdownRendererService,\n\t) {\n\t\tsuper();\n\n\t\tthis.keyVisible = Context.Visible.bindTo(contextKeyService);\n\t\tthis.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);\n\t}\n\n\tprivate createParameterHintDOMNodes() {\n\t\tconst element = $('.editor-widget.parameter-hints-widget');\n\t\tconst wrapper = dom.append(element, $('.phwrapper'));\n\t\twrapper.tabIndex = -1;\n\n\t\tconst controls = dom.append(wrapper, $('.controls'));\n\t\tconst previous = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsPreviousIcon)));\n\t\tconst overloads = dom.append(controls, $('.overloads'));\n\t\tconst next = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsNextIcon)));\n\n\t\tthis._register(dom.addDisposableListener(previous, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.previous();\n\t\t}));\n\n\t\tthis._register(dom.addDisposableListener(next, 'click', e => {\n\t\t\tdom.EventHelper.stop(e);\n\t\t\tthis.next();\n\t\t}));\n\n\t\tconst body = $('.body');\n\t\tconst scrollbar = new DomScrollableElement(body, {\n\t\t\talwaysConsumeMouseWheel: true,\n\t\t});\n\t\tthis._register(scrollbar);\n\t\twrapper.appendChild(scrollbar.getDomNode());\n\n\t\tconst signature = dom.append(body, $('.signature'));\n\t\tconst docs = dom.append(body, $('.docs'));\n\n\t\telement.style.userSelect = 'text';\n\n\t\tthis.domNodes = {\n\t\t\telement,\n\t\t\tsignature,\n\t\t\toverloads,\n\t\t\tdocs,\n\t\t\tscrollbar,\n\t\t};\n\n\t\tthis.editor.addContentWidget(this);\n\t\tthis.hide();\n\n\t\tthis._register(this.editor.onDidChangeCursorSelection(e => {\n\t\t\tif (this.visible) {\n\t\t\t\tthis.editor.layoutContentWidget(this);\n\t\t\t}\n\t\t}));\n\n\t\tconst updateFont = () => {\n\t\t\tif (!this.domNodes) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fontInfo = this.editor.getOption(EditorOption.fontInfo);\n\t\t\tconst element = this.domNodes.element;\n\t\t\telement.style.fontSize = `${fontInfo.fontSize}px`;\n\t\t\telement.style.lineHeight = `${fontInfo.lineHeight / fontInfo.fontSize}`;\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamily', fontInfo.fontFamily);\n\t\t\telement.style.setProperty('--vscode-parameterHintsWidget-editorFontFamilyDefault', EDITOR_FONT_DEFAULTS.fontFamily);\n\t\t};\n\n\t\tupdateFont();\n\n\t\tthis._register(Event.chain(\n\t\t\tthis.editor.onDidChangeConfiguration.bind(this.editor),\n\t\t\t$ => $.filter(e => e.hasChanged(EditorOption.fontInfo))\n\t\t)(updateFont));\n\n\t\tthis._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));\n\t\tthis.updateMaxHeight();\n\t}\n\n\tpublic show(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\n\t\tthis.keyVisible.set(true);\n\t\tthis.visible = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.domNodes?.element.classList.add('visible');\n\t\t}, 100);\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tpublic hide(): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyVisible.reset();\n\t\tthis.visible = false;\n\t\tthis.announcedLabel = null;\n\t\tthis.domNodes?.element.classList.remove('visible');\n\t\tthis.editor.layoutContentWidget(this);\n\t}\n\n\tgetPosition(): IContentWidgetPosition | null {\n\t\tif (this.visible) {\n\t\t\treturn {\n\t\t\t\tposition: this.editor.getPosition(),\n\t\t\t\tpreference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW]\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic render(hints: languages.SignatureHelp): void {\n\t\tthis.renderDisposeables.clear();\n\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst multiple = hints.signatures.length > 1;\n\t\tthis.domNodes.element.classList.toggle('multiple', multiple);\n\t\tthis.keyMultipleSignatures.set(multiple);\n\n\t\tthis.domNodes.signature.innerText = '';\n\t\tthis.domNodes.docs.innerText = '';\n\n\t\tconst signature = hints.signatures[hints.activeSignature];\n\t\tif (!signature) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst code = dom.append(this.domNodes.signature, $('.code'));\n\t\tconst hasParameters = signature.parameters.length > 0;\n\t\tconst activeParameterIndex = signature.activeParameter ?? hints.activeParameter;\n\n\t\tif (!hasParameters) {\n\t\t\tconst label = dom.append(code, $('span'));\n\t\t\tlabel.textContent = signature.label;\n\t\t} else {\n\t\t\tthis.renderParameters(code, signature, activeParameterIndex);\n\t\t}\n\n\t\tconst activeParameter: languages.ParameterInformation | undefined = signature.parameters[activeParameterIndex];\n\t\tif (activeParameter?.documentation) {\n\t\t\tconst documentation = $('span.documentation');\n\t\t\tif (typeof activeParameter.documentation === 'string') {\n\t\t\t\tdocumentation.textContent = activeParameter.documentation;\n\t\t\t} else {\n\t\t\t\tconst renderedContents = this.renderMarkdownDocs(activeParameter.documentation);\n\t\t\t\tdocumentation.appendChild(renderedContents.element);\n\t\t\t}\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, documentation));\n\t\t}\n\n\t\tif (signature.documentation === undefined) {\n\t\t\t/** no op */\n\t\t} else if (typeof signature.documentation === 'string') {\n\t\t\tdom.append(this.domNodes.docs, $('p', {}, signature.documentation));\n\t\t} else {\n\t\t\tconst renderedContents = this.renderMarkdownDocs(signature.documentation);\n\t\t\tdom.append(this.domNodes.docs, renderedContents.element);\n\t\t}\n\n\t\tconst hasDocs = this.hasDocs(signature, activeParameter);\n\n\t\tthis.domNodes.signature.classList.toggle('has-docs', hasDocs);\n\t\tthis.domNodes.docs.classList.toggle('empty', !hasDocs);\n\n\t\tthis.domNodes.overloads.textContent =\n\t\t\tString(hints.activeSignature + 1).padStart(hints.signatures.length.toString().length, '0') + '/' + hints.signatures.length;\n\n\t\tif (activeParameter) {\n\t\t\tlet labelToAnnounce = '';\n\t\t\tconst param = signature.parameters[activeParameterIndex];\n\t\t\tif (Array.isArray(param.label)) {\n\t\t\t\tlabelToAnnounce = signature.label.substring(param.label[0], param.label[1]);\n\t\t\t} else {\n\t\t\t\tlabelToAnnounce = param.label;\n\t\t\t}\n\t\t\tif (param.documentation) {\n\t\t\t\tlabelToAnnounce += typeof param.documentation === 'string' ? `, ${param.documentation}` : `, ${param.documentation.value}`;\n\t\t\t}\n\t\t\tif (signature.documentation) {\n\t\t\t\tlabelToAnnounce += typeof signature.documentation === 'string' ? `, ${signature.documentation}` : `, ${signature.documentation.value}`;\n\t\t\t}\n\n\t\t\t// Select method gets called on every user type while parameter hints are visible.\n\t\t\t// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\n\n\t\t\tif (this.announcedLabel !== labelToAnnounce) {\n\t\t\t\taria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\n\t\t\t\tthis.announcedLabel = labelToAnnounce;\n\t\t\t}\n\t\t}\n\n\t\tthis.editor.layoutContentWidget(this);\n\t\tthis.domNodes.scrollbar.scanDomNode();\n\t}\n\n\tprivate renderMarkdownDocs(markdown: IMarkdownString): IRenderedMarkdown {\n\t\tconst renderedContents = this.renderDisposeables.add(this.markdownRendererService.render(markdown, {\n\t\t\teditor: this.editor,\n\t\t\tasyncRenderCallback: () => {\n\t\t\t\tthis.domNodes?.scrollbar.scanDomNode();\n\t\t\t}\n\t\t}));\n\t\trenderedContents.element.classList.add('markdown-docs');\n\t\treturn renderedContents;\n\t}\n\n\tprivate hasDocs(signature: languages.SignatureInformation, activeParameter: languages.ParameterInformation | undefined): boolean {\n\t\tif (activeParameter && typeof activeParameter.documentation === 'string' && assertReturnsDefined(activeParameter.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (activeParameter && typeof activeParameter.documentation === 'object' && assertReturnsDefined(activeParameter.documentation).value.length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'string' && assertReturnsDefined(signature.documentation).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (signature.documentation && typeof signature.documentation === 'object' && assertReturnsDefined(signature.documentation.value).length > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate renderParameters(parent: HTMLElement, signature: languages.SignatureInformation, activeParameterIndex: number): void {\n\t\tconst [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex);\n\n\t\tconst beforeSpan = document.createElement('span');\n\t\tbeforeSpan.textContent = signature.label.substring(0, start);\n\n\t\tconst paramSpan = document.createElement('span');\n\t\tparamSpan.textContent = signature.label.substring(start, end);\n\t\tparamSpan.className = 'parameter active';\n\n\t\tconst afterSpan = document.createElement('span');\n\t\tafterSpan.textContent = signature.label.substring(end);\n\n\t\tdom.append(parent, beforeSpan, paramSpan, afterSpan);\n\t}\n\n\tprivate getParameterLabelOffsets(signature: languages.SignatureInformation, paramIdx: number): [number, number] {\n\t\tconst param = signature.parameters[paramIdx];\n\t\tif (!param) {\n\t\t\treturn [0, 0];\n\t\t} else if (Array.isArray(param.label)) {\n\t\t\treturn param.label;\n\t\t} else if (!param.label.length) {\n\t\t\treturn [0, 0];\n\t\t} else {\n\t\t\tconst regex = new RegExp(`(\\\\W|^)${escapeRegExpCharacters(param.label)}(?=\\\\W|$)`, 'g');\n\t\t\tregex.test(signature.label);\n\t\t\tconst idx = regex.lastIndex - param.label.length;\n\t\t\treturn idx >= 0\n\t\t\t\t? [idx, regex.lastIndex]\n\t\t\t\t: [0, 0];\n\t\t}\n\t}\n\n\tnext(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.next();\n\t}\n\n\tprevious(): void {\n\t\tthis.editor.focus();\n\t\tthis.model.previous();\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\tif (!this.domNodes) {\n\t\t\tthis.createParameterHintDOMNodes();\n\t\t}\n\t\treturn this.domNodes!.element;\n\t}\n\n\tgetId(): string {\n\t\treturn ParameterHintsWidget.ID;\n\t}\n\n\tprivate updateMaxHeight(): void {\n\t\tif (!this.domNodes) {\n\t\t\treturn;\n\t\t}\n\t\tconst height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\n\t\tconst maxHeight = `${height}px`;\n\t\tthis.domNodes.element.style.maxHeight = maxHeight;\n\t\tconst wrapper = this.domNodes.element.getElementsByClassName('phwrapper') as HTMLCollectionOf<HTMLElement>;\n\t\tif (wrapper.length) {\n\t\t\twrapper[0].style.maxHeight = maxHeight;\n\t\t}\n\t}\n}\n\nregisterColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize('editorHoverWidgetHighlightForeground', 'Foreground color of the active item in the parameter hint.'));\n"]}
|
|
@@ -53,7 +53,7 @@ registerSingleton(IPeekViewService, class {
|
|
|
53
53
|
}, 1 /* InstantiationType.Delayed */);
|
|
54
54
|
export var PeekContext;
|
|
55
55
|
(function (PeekContext) {
|
|
56
|
-
PeekContext.inPeekEditor = new RawContextKey('inReferenceSearchEditor', true, nls.localize(
|
|
56
|
+
PeekContext.inPeekEditor = new RawContextKey('inReferenceSearchEditor', true, nls.localize(1307, "Whether the current code editor is embedded inside peek"));
|
|
57
57
|
PeekContext.notInPeekEditor = PeekContext.inPeekEditor.toNegated();
|
|
58
58
|
})(PeekContext || (PeekContext = {}));
|
|
59
59
|
let PeekContextController = class PeekContextController {
|
|
@@ -149,7 +149,7 @@ let PeekViewWidget = class PeekViewWidget extends ZoneWidget {
|
|
|
149
149
|
this._actionbarWidget = new ActionBar(actionsContainer, actionBarOptions);
|
|
150
150
|
this._disposables.add(this._actionbarWidget);
|
|
151
151
|
if (!noCloseAction) {
|
|
152
|
-
this._actionbarWidget.push(this._disposables.add(new Action('peekview.close', nls.localize(
|
|
152
|
+
this._actionbarWidget.push(this._disposables.add(new Action('peekview.close', nls.localize(1308, "Close"), ThemeIcon.asClassName(Codicon.close), true, () => {
|
|
153
153
|
this.dispose();
|
|
154
154
|
return Promise.resolve();
|
|
155
155
|
})), { label: false, icon: true });
|
|
@@ -216,20 +216,20 @@ PeekViewWidget = __decorate([
|
|
|
216
216
|
__param(2, IInstantiationService)
|
|
217
217
|
], PeekViewWidget);
|
|
218
218
|
export { PeekViewWidget };
|
|
219
|
-
export const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(
|
|
220
|
-
export const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: Color.white, light: Color.black, hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
221
|
-
export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161', hcDark: '#FFFFFF99', hcLight: '#292929' }, nls.localize(
|
|
222
|
-
export const peekViewBorder = registerColor('peekView.border', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(
|
|
223
|
-
export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(
|
|
224
|
-
export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
225
|
-
export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
226
|
-
export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hcDark: null, hcLight: null }, nls.localize(
|
|
227
|
-
export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hcDark: Color.white, hcLight: editorForeground }, nls.localize(
|
|
228
|
-
export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hcDark: Color.black, hcLight: Color.white }, nls.localize(
|
|
229
|
-
export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', peekViewEditorBackground, nls.localize(
|
|
230
|
-
export const peekViewEditorStickyScrollBackground = registerColor('peekViewEditorStickyScroll.background', peekViewEditorBackground, nls.localize(
|
|
231
|
-
export const peekViewEditorStickyScrollGutterBackground = registerColor('peekViewEditorStickyScrollGutter.background', peekViewEditorBackground, nls.localize(
|
|
232
|
-
export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hcDark: null, hcLight: null }, nls.localize(
|
|
233
|
-
export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hcDark: null, hcLight: null }, nls.localize(
|
|
234
|
-
export const peekViewEditorMatchHighlightBorder = registerColor('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(
|
|
219
|
+
export const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(1309, 'Background color of the peek view title area.'));
|
|
220
|
+
export const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: Color.white, light: Color.black, hcDark: Color.white, hcLight: editorForeground }, nls.localize(1310, 'Color of the peek view title.'));
|
|
221
|
+
export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161', hcDark: '#FFFFFF99', hcLight: '#292929' }, nls.localize(1311, 'Color of the peek view title info.'));
|
|
222
|
+
export const peekViewBorder = registerColor('peekView.border', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(1312, 'Color of the peek view borders and arrow.'));
|
|
223
|
+
export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hcDark: Color.black, hcLight: Color.white }, nls.localize(1313, 'Background color of the peek view result list.'));
|
|
224
|
+
export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hcDark: Color.white, hcLight: editorForeground }, nls.localize(1314, 'Foreground color for line nodes in the peek view result list.'));
|
|
225
|
+
export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hcDark: Color.white, hcLight: editorForeground }, nls.localize(1315, 'Foreground color for file nodes in the peek view result list.'));
|
|
226
|
+
export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hcDark: null, hcLight: null }, nls.localize(1316, 'Background color of the selected entry in the peek view result list.'));
|
|
227
|
+
export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hcDark: Color.white, hcLight: editorForeground }, nls.localize(1317, 'Foreground color of the selected entry in the peek view result list.'));
|
|
228
|
+
export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hcDark: Color.black, hcLight: Color.white }, nls.localize(1318, 'Background color of the peek view editor.'));
|
|
229
|
+
export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', peekViewEditorBackground, nls.localize(1319, 'Background color of the gutter in the peek view editor.'));
|
|
230
|
+
export const peekViewEditorStickyScrollBackground = registerColor('peekViewEditorStickyScroll.background', peekViewEditorBackground, nls.localize(1320, 'Background color of sticky scroll in the peek view editor.'));
|
|
231
|
+
export const peekViewEditorStickyScrollGutterBackground = registerColor('peekViewEditorStickyScrollGutter.background', peekViewEditorBackground, nls.localize(1321, 'Background color of the gutter part of sticky scroll in the peek view editor.'));
|
|
232
|
+
export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hcDark: null, hcLight: null }, nls.localize(1322, 'Match highlight color in the peek view result list.'));
|
|
233
|
+
export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hcDark: null, hcLight: null }, nls.localize(1323, 'Match highlight color in the peek view editor.'));
|
|
234
|
+
export const peekViewEditorMatchHighlightBorder = registerColor('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, nls.localize(1324, 'Match highlight border in the peek view editor.'));
|
|
235
235
|
//# sourceMappingURL=peekView.js.map
|
|
@@ -10,5 +10,5 @@ import { registerColor } from '../../../../platform/theme/common/colorUtils.js';
|
|
|
10
10
|
import { PlaceholderTextContribution } from './placeholderTextContribution.js';
|
|
11
11
|
import { wrapInReloadableClass1 } from '../../../../platform/observable/common/wrapInReloadableClass.js';
|
|
12
12
|
registerEditorContribution(PlaceholderTextContribution.ID, wrapInReloadableClass1(() => PlaceholderTextContribution), 0 /* EditorContributionInstantiation.Eager */);
|
|
13
|
-
registerColor('editor.placeholder.foreground', ghostTextForeground, localize(
|
|
13
|
+
registerColor('editor.placeholder.foreground', ghostTextForeground, localize(1325, 'Foreground color of the placeholder text in the editor.'));
|
|
14
14
|
//# sourceMappingURL=placeholderText.contribution.js.map
|
|
@@ -12,7 +12,7 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
12
12
|
super({ canAcceptInBackground: true });
|
|
13
13
|
}
|
|
14
14
|
provideWithoutTextEditor(picker) {
|
|
15
|
-
const label = localize(
|
|
15
|
+
const label = localize(1326, "Open a text editor first to go to a line.");
|
|
16
16
|
picker.items = [{ label }];
|
|
17
17
|
picker.ariaLabel = label;
|
|
18
18
|
return Disposable.None;
|
|
@@ -91,17 +91,17 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
91
91
|
// Location valid: indicate this as picker label
|
|
92
92
|
if (this.isValidLineNumber(editor, lineNumber)) {
|
|
93
93
|
if (this.isValidColumn(editor, lineNumber, column)) {
|
|
94
|
-
return localize(
|
|
94
|
+
return localize(1327, "Go to line {0} and character {1}.", lineNumber, column);
|
|
95
95
|
}
|
|
96
|
-
return localize(
|
|
96
|
+
return localize(1328, "Go to line {0}.", lineNumber);
|
|
97
97
|
}
|
|
98
98
|
// Location invalid: show generic label
|
|
99
99
|
const position = editor.getPosition() || { lineNumber: 1, column: 1 };
|
|
100
100
|
const lineCount = this.lineCount(editor);
|
|
101
101
|
if (lineCount > 1) {
|
|
102
|
-
return localize(
|
|
102
|
+
return localize(1329, "Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.", position.lineNumber, position.column, lineCount);
|
|
103
103
|
}
|
|
104
|
-
return localize(
|
|
104
|
+
return localize(1330, "Current Line: {0}, Character: {1}. Type a line number to navigate to.", position.lineNumber, position.column);
|
|
105
105
|
}
|
|
106
106
|
isValidLineNumber(editor, lineNumber) {
|
|
107
107
|
if (!lineNumber || typeof lineNumber !== 'number') {
|
|
@@ -39,7 +39,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
|
|
|
39
39
|
this.options.canAcceptInBackground = true;
|
|
40
40
|
}
|
|
41
41
|
provideWithoutTextEditor(picker) {
|
|
42
|
-
this.provideLabelPick(picker, localize(
|
|
42
|
+
this.provideLabelPick(picker, localize(1331, "To go to a symbol, first open a text editor with symbol information."));
|
|
43
43
|
return Disposable.None;
|
|
44
44
|
}
|
|
45
45
|
provideWithTextEditor(context, picker, token, runOptions) {
|
|
@@ -60,7 +60,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
|
|
|
60
60
|
doProvideWithoutEditorSymbols(context, model, picker, token) {
|
|
61
61
|
const disposables = new DisposableStore();
|
|
62
62
|
// Generic pick for not having any symbol information
|
|
63
|
-
this.provideLabelPick(picker, localize(
|
|
63
|
+
this.provideLabelPick(picker, localize(1332, "The active text editor does not provide symbol information."));
|
|
64
64
|
// Wait for changes to the registry and see if eventually
|
|
65
65
|
// we do get symbols. This can happen if the picker is opened
|
|
66
66
|
// very early after the model has loaded but before the
|
|
@@ -146,10 +146,10 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
|
|
|
146
146
|
}
|
|
147
147
|
else {
|
|
148
148
|
if (query.original.length > 0) {
|
|
149
|
-
this.provideLabelPick(picker, localize(
|
|
149
|
+
this.provideLabelPick(picker, localize(1333, "No matching editor symbols"));
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
|
-
this.provideLabelPick(picker, localize(
|
|
152
|
+
this.provideLabelPick(picker, localize(1334, "No editor symbols"));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
@@ -196,7 +196,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
|
|
|
196
196
|
if (openSideBySideDirection) {
|
|
197
197
|
buttons = [{
|
|
198
198
|
iconClass: openSideBySideDirection === 'right' ? ThemeIcon.asClassName(Codicon.splitHorizontal) : ThemeIcon.asClassName(Codicon.splitVertical),
|
|
199
|
-
tooltip: openSideBySideDirection === 'right' ? localize(
|
|
199
|
+
tooltip: openSideBySideDirection === 'right' ? localize(1335, "Open to the Side") : localize(1336, "Open to the Bottom")
|
|
200
200
|
}];
|
|
201
201
|
}
|
|
202
202
|
const filteredSymbolPicks = [];
|
|
@@ -312,7 +312,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
|
|
|
312
312
|
}
|
|
313
313
|
else if (sortedFilteredSymbolPicks.length > 0) {
|
|
314
314
|
symbolPicks = [
|
|
315
|
-
{ label: localize(
|
|
315
|
+
{ label: localize(1337, "symbols ({0})", filteredSymbolPicks.length), type: 'separator' },
|
|
316
316
|
...sortedFilteredSymbolPicks
|
|
317
317
|
];
|
|
318
318
|
}
|
|
@@ -362,33 +362,33 @@ AbstractGotoSymbolQuickAccessProvider = AbstractGotoSymbolQuickAccessProvider_1
|
|
|
362
362
|
], AbstractGotoSymbolQuickAccessProvider);
|
|
363
363
|
export { AbstractGotoSymbolQuickAccessProvider };
|
|
364
364
|
// #region NLS Helpers
|
|
365
|
-
const FALLBACK_NLS_SYMBOL_KIND = localize(
|
|
365
|
+
const FALLBACK_NLS_SYMBOL_KIND = localize(1338, "properties ({0})");
|
|
366
366
|
const NLS_SYMBOL_KIND_CACHE = {
|
|
367
|
-
[5 /* SymbolKind.Method */]: localize(
|
|
368
|
-
[11 /* SymbolKind.Function */]: localize(
|
|
369
|
-
[8 /* SymbolKind.Constructor */]: localize(
|
|
370
|
-
[12 /* SymbolKind.Variable */]: localize(
|
|
371
|
-
[4 /* SymbolKind.Class */]: localize(
|
|
372
|
-
[22 /* SymbolKind.Struct */]: localize(
|
|
373
|
-
[23 /* SymbolKind.Event */]: localize(
|
|
374
|
-
[24 /* SymbolKind.Operator */]: localize(
|
|
375
|
-
[10 /* SymbolKind.Interface */]: localize(
|
|
376
|
-
[2 /* SymbolKind.Namespace */]: localize(
|
|
377
|
-
[3 /* SymbolKind.Package */]: localize(
|
|
378
|
-
[25 /* SymbolKind.TypeParameter */]: localize(
|
|
379
|
-
[1 /* SymbolKind.Module */]: localize(
|
|
380
|
-
[6 /* SymbolKind.Property */]: localize(
|
|
381
|
-
[9 /* SymbolKind.Enum */]: localize(
|
|
382
|
-
[21 /* SymbolKind.EnumMember */]: localize(
|
|
383
|
-
[14 /* SymbolKind.String */]: localize(
|
|
384
|
-
[0 /* SymbolKind.File */]: localize(
|
|
385
|
-
[17 /* SymbolKind.Array */]: localize(
|
|
386
|
-
[15 /* SymbolKind.Number */]: localize(
|
|
387
|
-
[16 /* SymbolKind.Boolean */]: localize(
|
|
388
|
-
[18 /* SymbolKind.Object */]: localize(
|
|
389
|
-
[19 /* SymbolKind.Key */]: localize(
|
|
390
|
-
[7 /* SymbolKind.Field */]: localize(
|
|
391
|
-
[13 /* SymbolKind.Constant */]: localize(
|
|
367
|
+
[5 /* SymbolKind.Method */]: localize(1339, "methods ({0})"),
|
|
368
|
+
[11 /* SymbolKind.Function */]: localize(1340, "functions ({0})"),
|
|
369
|
+
[8 /* SymbolKind.Constructor */]: localize(1341, "constructors ({0})"),
|
|
370
|
+
[12 /* SymbolKind.Variable */]: localize(1342, "variables ({0})"),
|
|
371
|
+
[4 /* SymbolKind.Class */]: localize(1343, "classes ({0})"),
|
|
372
|
+
[22 /* SymbolKind.Struct */]: localize(1344, "structs ({0})"),
|
|
373
|
+
[23 /* SymbolKind.Event */]: localize(1345, "events ({0})"),
|
|
374
|
+
[24 /* SymbolKind.Operator */]: localize(1346, "operators ({0})"),
|
|
375
|
+
[10 /* SymbolKind.Interface */]: localize(1347, "interfaces ({0})"),
|
|
376
|
+
[2 /* SymbolKind.Namespace */]: localize(1348, "namespaces ({0})"),
|
|
377
|
+
[3 /* SymbolKind.Package */]: localize(1349, "packages ({0})"),
|
|
378
|
+
[25 /* SymbolKind.TypeParameter */]: localize(1350, "type parameters ({0})"),
|
|
379
|
+
[1 /* SymbolKind.Module */]: localize(1351, "modules ({0})"),
|
|
380
|
+
[6 /* SymbolKind.Property */]: localize(1352, "properties ({0})"),
|
|
381
|
+
[9 /* SymbolKind.Enum */]: localize(1353, "enumerations ({0})"),
|
|
382
|
+
[21 /* SymbolKind.EnumMember */]: localize(1354, "enumeration members ({0})"),
|
|
383
|
+
[14 /* SymbolKind.String */]: localize(1355, "strings ({0})"),
|
|
384
|
+
[0 /* SymbolKind.File */]: localize(1356, "files ({0})"),
|
|
385
|
+
[17 /* SymbolKind.Array */]: localize(1357, "arrays ({0})"),
|
|
386
|
+
[15 /* SymbolKind.Number */]: localize(1358, "numbers ({0})"),
|
|
387
|
+
[16 /* SymbolKind.Boolean */]: localize(1359, "booleans ({0})"),
|
|
388
|
+
[18 /* SymbolKind.Object */]: localize(1360, "objects ({0})"),
|
|
389
|
+
[19 /* SymbolKind.Key */]: localize(1361, "keys ({0})"),
|
|
390
|
+
[7 /* SymbolKind.Field */]: localize(1362, "fields ({0})"),
|
|
391
|
+
[13 /* SymbolKind.Constant */]: localize(1363, "constants ({0})")
|
|
392
392
|
};
|
|
393
393
|
//#endregion
|
|
394
394
|
//# sourceMappingURL=gotoSymbolQuickAccess.js.map
|
|
@@ -20,10 +20,10 @@ export class ReadOnlyMessageController extends Disposable {
|
|
|
20
20
|
let message = this.editor.getOptions().get(105 /* EditorOption.readOnlyMessage */);
|
|
21
21
|
if (!message) {
|
|
22
22
|
if (this.editor.isSimpleWidget) {
|
|
23
|
-
message = new MarkdownString(nls.localize(
|
|
23
|
+
message = new MarkdownString(nls.localize(1364, "Cannot edit in read-only input"));
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
|
-
message = new MarkdownString(nls.localize(
|
|
26
|
+
message = new MarkdownString(nls.localize(1365, "Cannot edit in read-only editor"));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
messageController.showMessage(message, this.editor.getPosition());
|
|
@@ -99,7 +99,7 @@ class RenameSkeleton {
|
|
|
99
99
|
}
|
|
100
100
|
const result = await provider.provideRenameEdits(this.model, this.position, newName, token);
|
|
101
101
|
if (!result) {
|
|
102
|
-
return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize(
|
|
102
|
+
return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize(1366, "No result.")), token);
|
|
103
103
|
}
|
|
104
104
|
else if (result.rejectReason) {
|
|
105
105
|
return this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);
|
|
@@ -172,7 +172,7 @@ let RenameController = class RenameController {
|
|
|
172
172
|
else {
|
|
173
173
|
trace('resolve rename location failed', e instanceof Error ? e : JSON.stringify(e, null, '\t'));
|
|
174
174
|
if (typeof e === 'string' || isMarkdownString(e)) {
|
|
175
|
-
MessageController.get(this.editor)?.showMessage(e || nls.localize(
|
|
175
|
+
MessageController.get(this.editor)?.showMessage(e || nls.localize(1367, "An unknown error occurred while resolving rename location"), position);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
return undefined;
|
|
@@ -240,24 +240,24 @@ let RenameController = class RenameController {
|
|
|
240
240
|
this._bulkEditService.apply(renameResult, {
|
|
241
241
|
editor: this.editor,
|
|
242
242
|
showPreview: inputFieldResult.wantsPreview,
|
|
243
|
-
label: nls.localize(
|
|
243
|
+
label: nls.localize(1368, "Renaming '{0}' to '{1}'", loc?.text, inputFieldResult.newName),
|
|
244
244
|
code: 'undoredo.rename',
|
|
245
|
-
quotableLabel: nls.localize(
|
|
245
|
+
quotableLabel: nls.localize(1369, "Renaming {0} to {1}", loc?.text, inputFieldResult.newName),
|
|
246
246
|
respectAutoSaveConfig: true,
|
|
247
247
|
reason: EditSources.rename(),
|
|
248
248
|
}).then(result => {
|
|
249
249
|
trace('edits applied');
|
|
250
250
|
if (result.ariaSummary) {
|
|
251
|
-
alert(nls.localize(
|
|
251
|
+
alert(nls.localize(1370, "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
|
|
252
252
|
}
|
|
253
253
|
}).catch(err => {
|
|
254
254
|
trace(`error when applying edits ${JSON.stringify(err, null, '\t')}`);
|
|
255
|
-
this._notificationService.error(nls.localize(
|
|
255
|
+
this._notificationService.error(nls.localize(1371, "Rename failed to apply edits"));
|
|
256
256
|
this._logService.error(err);
|
|
257
257
|
});
|
|
258
258
|
}, err => {
|
|
259
259
|
trace('error when providing rename edits', JSON.stringify(err, null, '\t'));
|
|
260
|
-
this._notificationService.error(nls.localize(
|
|
260
|
+
this._notificationService.error(nls.localize(1372, "Rename failed to compute edits"));
|
|
261
261
|
this._logService.error(err);
|
|
262
262
|
}).finally(() => {
|
|
263
263
|
cts2.dispose();
|
|
@@ -293,7 +293,7 @@ export class RenameAction extends EditorAction {
|
|
|
293
293
|
constructor() {
|
|
294
294
|
super({
|
|
295
295
|
id: 'editor.action.rename',
|
|
296
|
-
label: nls.localize2(
|
|
296
|
+
label: nls.localize2(1374, "Rename Symbol"),
|
|
297
297
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),
|
|
298
298
|
kbOpts: {
|
|
299
299
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -373,7 +373,7 @@ registerAction2(class FocusNextRenameSuggestion extends Action2 {
|
|
|
373
373
|
super({
|
|
374
374
|
id: 'focusNextRenameSuggestion',
|
|
375
375
|
title: {
|
|
376
|
-
...nls.localize2(
|
|
376
|
+
...nls.localize2(1375, "Focus Next Rename Suggestion"),
|
|
377
377
|
},
|
|
378
378
|
precondition: CONTEXT_RENAME_INPUT_VISIBLE,
|
|
379
379
|
keybinding: [
|
|
@@ -401,7 +401,7 @@ registerAction2(class FocusPreviousRenameSuggestion extends Action2 {
|
|
|
401
401
|
super({
|
|
402
402
|
id: 'focusPreviousRenameSuggestion',
|
|
403
403
|
title: {
|
|
404
|
-
...nls.localize2(
|
|
404
|
+
...nls.localize2(1376, "Focus Previous Rename Suggestion"),
|
|
405
405
|
},
|
|
406
406
|
precondition: CONTEXT_RENAME_INPUT_VISIBLE,
|
|
407
407
|
keybinding: [
|
|
@@ -446,7 +446,7 @@ Registry.as(Extensions.Configuration).registerConfiguration({
|
|
|
446
446
|
properties: {
|
|
447
447
|
'editor.rename.enablePreview': {
|
|
448
448
|
scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
|
|
449
|
-
description: nls.localize(
|
|
449
|
+
description: nls.localize(1373, "Enable/disable the ability to preview changes before renaming"),
|
|
450
450
|
default: true,
|
|
451
451
|
type: 'boolean'
|
|
452
452
|
}
|
|
@@ -39,8 +39,8 @@ import { editorWidgetBackground, inputBackground, inputBorder, inputForeground,
|
|
|
39
39
|
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
|
|
40
40
|
/** for debugging */
|
|
41
41
|
const _sticky = false;
|
|
42
|
-
export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(
|
|
43
|
-
export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(
|
|
42
|
+
export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1377, "Whether the rename input widget is visible"));
|
|
43
|
+
export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1378, "Whether the rename input widget is focused"));
|
|
44
44
|
let RenameWidget = class RenameWidget {
|
|
45
45
|
constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService, _logService) {
|
|
46
46
|
this._editor = _editor;
|
|
@@ -163,7 +163,7 @@ let RenameWidget = class RenameWidget {
|
|
|
163
163
|
}
|
|
164
164
|
beforeRender() {
|
|
165
165
|
const [accept, preview] = this._acceptKeybindings;
|
|
166
|
-
this._label.innerText = nls.localize(
|
|
166
|
+
this._label.innerText = nls.localize(1379, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
|
|
167
167
|
this._domNode.style.minWidth = `200px`; // to prevent from widening when candidates come in
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
@@ -477,7 +477,7 @@ class RenameCandidateListView {
|
|
|
477
477
|
// adjust list container layout
|
|
478
478
|
this._listContainer.style.height = `${height}px`;
|
|
479
479
|
this._listContainer.style.width = `${width}px`;
|
|
480
|
-
aria.status(nls.localize(
|
|
480
|
+
aria.status(nls.localize(1380, "Received {0} rename suggestions", candidates.length));
|
|
481
481
|
}
|
|
482
482
|
clearCandidates() {
|
|
483
483
|
this._listContainer.style.height = '0px';
|
|
@@ -619,13 +619,13 @@ class InputWithButton {
|
|
|
619
619
|
this._inputNode.className = 'rename-input';
|
|
620
620
|
this._inputNode.type = 'text';
|
|
621
621
|
this._inputNode.style.border = 'none';
|
|
622
|
-
this._inputNode.setAttribute('aria-label', nls.localize(
|
|
622
|
+
this._inputNode.setAttribute('aria-label', nls.localize(1381, "Rename input. Type new name and press Enter to commit."));
|
|
623
623
|
this._domNode.appendChild(this._inputNode);
|
|
624
624
|
this._buttonNode = document.createElement('div');
|
|
625
625
|
this._buttonNode.className = 'rename-suggestions-button';
|
|
626
626
|
this._buttonNode.setAttribute('tabindex', '0');
|
|
627
|
-
this._buttonGenHoverText = nls.localize(
|
|
628
|
-
this._buttonCancelHoverText = nls.localize(
|
|
627
|
+
this._buttonGenHoverText = nls.localize(1382, "Generate New Name Suggestions");
|
|
628
|
+
this._buttonCancelHoverText = nls.localize(1383, "Cancel");
|
|
629
629
|
this._buttonHoverContent = this._buttonGenHoverText;
|
|
630
630
|
this._disposables.add(getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode, () => ({
|
|
631
631
|
content: this._buttonHoverContent,
|