monaco-editor-core 0.55.0-dev-20251014 → 0.55.0-dev-20251016
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 +9 -0
- 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 +9 -0
- package/esm/nls.messages.pt-br.js +9 -0
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +9 -0
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +10 -0
- package/esm/vs/base/browser/canIUse.js +0 -1
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/domSanitize.js +31 -23
- package/esm/vs/base/browser/domSanitize.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +188 -385
- package/esm/vs/base/browser/markdownRenderer.js +6 -1
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/toggle/toggle.js +6 -0
- package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +1 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/objects.js +0 -1
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +2 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js +4 -2
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js +5 -0
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js +104 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js.map +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +25 -24
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +7 -3
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/diffEditor/style.css +11 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +54 -54
- package/esm/vs/editor/common/config/editorOptions.js +406 -406
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +10 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorContextKeys.js +46 -46
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/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 +13 -14
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- 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/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- 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/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +15 -10
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +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 +47 -37
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- 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 +56 -10
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- 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/stickyScroll/browser/stickyScrollWidget.js +2 -2
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +0 -1
- 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/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/quickinput/common/quickInput.js.map +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 +3 -3
- package/version.txt +1 -1
|
@@ -32,7 +32,7 @@ function announceCursorChange(previousCursorState, cursorState) {
|
|
|
32
32
|
const cursorDiff = cursorState.filter(cs => !previousCursorState.find(pcs => pcs.equals(cs)));
|
|
33
33
|
if (cursorDiff.length >= 1) {
|
|
34
34
|
const cursorPositions = cursorDiff.map(cs => `line ${cs.viewState.position.lineNumber} column ${cs.viewState.position.column}`).join(', ');
|
|
35
|
-
const msg = cursorDiff.length === 1 ? nls.localize(
|
|
35
|
+
const msg = cursorDiff.length === 1 ? nls.localize(1280, "Cursor added: {0}", cursorPositions) : nls.localize(1281, "Cursors added: {0}", cursorPositions);
|
|
36
36
|
status(msg);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -40,7 +40,7 @@ export class InsertCursorAbove extends EditorAction {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: 'editor.action.insertCursorAbove',
|
|
43
|
-
label: nls.localize2(
|
|
43
|
+
label: nls.localize2(1290, "Add Cursor Above"),
|
|
44
44
|
precondition: undefined,
|
|
45
45
|
kbOpts: {
|
|
46
46
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -54,7 +54,7 @@ export class InsertCursorAbove extends EditorAction {
|
|
|
54
54
|
menuOpts: {
|
|
55
55
|
menuId: MenuId.MenubarSelectionMenu,
|
|
56
56
|
group: '3_multi',
|
|
57
|
-
title: nls.localize(
|
|
57
|
+
title: nls.localize(1282, "&&Add Cursor Above"),
|
|
58
58
|
order: 2
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -82,7 +82,7 @@ export class InsertCursorBelow extends EditorAction {
|
|
|
82
82
|
constructor() {
|
|
83
83
|
super({
|
|
84
84
|
id: 'editor.action.insertCursorBelow',
|
|
85
|
-
label: nls.localize2(
|
|
85
|
+
label: nls.localize2(1291, "Add Cursor Below"),
|
|
86
86
|
precondition: undefined,
|
|
87
87
|
kbOpts: {
|
|
88
88
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -96,7 +96,7 @@ export class InsertCursorBelow extends EditorAction {
|
|
|
96
96
|
menuOpts: {
|
|
97
97
|
menuId: MenuId.MenubarSelectionMenu,
|
|
98
98
|
group: '3_multi',
|
|
99
|
-
title: nls.localize(
|
|
99
|
+
title: nls.localize(1283, "A&&dd Cursor Below"),
|
|
100
100
|
order: 3
|
|
101
101
|
}
|
|
102
102
|
});
|
|
@@ -124,7 +124,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
|
|
|
124
124
|
constructor() {
|
|
125
125
|
super({
|
|
126
126
|
id: 'editor.action.insertCursorAtEndOfEachLineSelected',
|
|
127
|
-
label: nls.localize2(
|
|
127
|
+
label: nls.localize2(1292, "Add Cursors to Line Ends"),
|
|
128
128
|
precondition: undefined,
|
|
129
129
|
kbOpts: {
|
|
130
130
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -134,7 +134,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
|
|
|
134
134
|
menuOpts: {
|
|
135
135
|
menuId: MenuId.MenubarSelectionMenu,
|
|
136
136
|
group: '3_multi',
|
|
137
|
-
title: nls.localize(
|
|
137
|
+
title: nls.localize(1284, "Add C&&ursors to Line Ends"),
|
|
138
138
|
order: 4
|
|
139
139
|
}
|
|
140
140
|
});
|
|
@@ -171,7 +171,7 @@ class InsertCursorAtEndOfLineSelected extends EditorAction {
|
|
|
171
171
|
constructor() {
|
|
172
172
|
super({
|
|
173
173
|
id: 'editor.action.addCursorsToBottom',
|
|
174
|
-
label: nls.localize2(
|
|
174
|
+
label: nls.localize2(1293, "Add Cursors to Bottom"),
|
|
175
175
|
precondition: undefined
|
|
176
176
|
});
|
|
177
177
|
}
|
|
@@ -197,7 +197,7 @@ class InsertCursorAtTopOfLineSelected extends EditorAction {
|
|
|
197
197
|
constructor() {
|
|
198
198
|
super({
|
|
199
199
|
id: 'editor.action.addCursorsToTop',
|
|
200
|
-
label: nls.localize2(
|
|
200
|
+
label: nls.localize2(1294, "Add Cursors to Top"),
|
|
201
201
|
precondition: undefined
|
|
202
202
|
});
|
|
203
203
|
}
|
|
@@ -574,7 +574,7 @@ export class AddSelectionToNextFindMatchAction extends MultiCursorSelectionContr
|
|
|
574
574
|
constructor() {
|
|
575
575
|
super({
|
|
576
576
|
id: 'editor.action.addSelectionToNextFindMatch',
|
|
577
|
-
label: nls.localize2(
|
|
577
|
+
label: nls.localize2(1295, "Add Selection to Next Find Match"),
|
|
578
578
|
precondition: undefined,
|
|
579
579
|
kbOpts: {
|
|
580
580
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -584,7 +584,7 @@ export class AddSelectionToNextFindMatchAction extends MultiCursorSelectionContr
|
|
|
584
584
|
menuOpts: {
|
|
585
585
|
menuId: MenuId.MenubarSelectionMenu,
|
|
586
586
|
group: '3_multi',
|
|
587
|
-
title: nls.localize(
|
|
587
|
+
title: nls.localize(1285, "Add &&Next Occurrence"),
|
|
588
588
|
order: 5
|
|
589
589
|
}
|
|
590
590
|
});
|
|
@@ -597,12 +597,12 @@ export class AddSelectionToPreviousFindMatchAction extends MultiCursorSelectionC
|
|
|
597
597
|
constructor() {
|
|
598
598
|
super({
|
|
599
599
|
id: 'editor.action.addSelectionToPreviousFindMatch',
|
|
600
|
-
label: nls.localize2(
|
|
600
|
+
label: nls.localize2(1296, "Add Selection to Previous Find Match"),
|
|
601
601
|
precondition: undefined,
|
|
602
602
|
menuOpts: {
|
|
603
603
|
menuId: MenuId.MenubarSelectionMenu,
|
|
604
604
|
group: '3_multi',
|
|
605
|
-
title: nls.localize(
|
|
605
|
+
title: nls.localize(1286, "Add P&&revious Occurrence"),
|
|
606
606
|
order: 6
|
|
607
607
|
}
|
|
608
608
|
});
|
|
@@ -615,7 +615,7 @@ export class MoveSelectionToNextFindMatchAction extends MultiCursorSelectionCont
|
|
|
615
615
|
constructor() {
|
|
616
616
|
super({
|
|
617
617
|
id: 'editor.action.moveSelectionToNextFindMatch',
|
|
618
|
-
label: nls.localize2(
|
|
618
|
+
label: nls.localize2(1297, "Move Last Selection to Next Find Match"),
|
|
619
619
|
precondition: undefined,
|
|
620
620
|
kbOpts: {
|
|
621
621
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -632,7 +632,7 @@ export class MoveSelectionToPreviousFindMatchAction extends MultiCursorSelection
|
|
|
632
632
|
constructor() {
|
|
633
633
|
super({
|
|
634
634
|
id: 'editor.action.moveSelectionToPreviousFindMatch',
|
|
635
|
-
label: nls.localize2(
|
|
635
|
+
label: nls.localize2(1298, "Move Last Selection to Previous Find Match"),
|
|
636
636
|
precondition: undefined
|
|
637
637
|
});
|
|
638
638
|
}
|
|
@@ -644,7 +644,7 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction
|
|
|
644
644
|
constructor() {
|
|
645
645
|
super({
|
|
646
646
|
id: 'editor.action.selectHighlights',
|
|
647
|
-
label: nls.localize2(
|
|
647
|
+
label: nls.localize2(1299, "Select All Occurrences of Find Match"),
|
|
648
648
|
precondition: undefined,
|
|
649
649
|
kbOpts: {
|
|
650
650
|
kbExpr: EditorContextKeys.focus,
|
|
@@ -654,7 +654,7 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction
|
|
|
654
654
|
menuOpts: {
|
|
655
655
|
menuId: MenuId.MenubarSelectionMenu,
|
|
656
656
|
group: '3_multi',
|
|
657
|
-
title: nls.localize(
|
|
657
|
+
title: nls.localize(1287, "Select All &&Occurrences"),
|
|
658
658
|
order: 7
|
|
659
659
|
}
|
|
660
660
|
});
|
|
@@ -667,7 +667,7 @@ export class CompatChangeAll extends MultiCursorSelectionControllerAction {
|
|
|
667
667
|
constructor() {
|
|
668
668
|
super({
|
|
669
669
|
id: 'editor.action.changeAll',
|
|
670
|
-
label: nls.localize2(
|
|
670
|
+
label: nls.localize2(1300, "Change All Occurrences"),
|
|
671
671
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.editorTextFocus),
|
|
672
672
|
kbOpts: {
|
|
673
673
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -925,9 +925,9 @@ export class FocusNextCursor extends EditorAction {
|
|
|
925
925
|
constructor() {
|
|
926
926
|
super({
|
|
927
927
|
id: 'editor.action.focusNextCursor',
|
|
928
|
-
label: nls.localize2(
|
|
928
|
+
label: nls.localize2(1301, "Focus Next Cursor"),
|
|
929
929
|
metadata: {
|
|
930
|
-
description: nls.localize(
|
|
930
|
+
description: nls.localize(1288, "Focuses the next cursor"),
|
|
931
931
|
args: [],
|
|
932
932
|
},
|
|
933
933
|
precondition: undefined
|
|
@@ -957,9 +957,9 @@ export class FocusPreviousCursor extends EditorAction {
|
|
|
957
957
|
constructor() {
|
|
958
958
|
super({
|
|
959
959
|
id: 'editor.action.focusPreviousCursor',
|
|
960
|
-
label: nls.localize2(
|
|
960
|
+
label: nls.localize2(1302, "Focus Previous Cursor"),
|
|
961
961
|
metadata: {
|
|
962
|
-
description: nls.localize(
|
|
962
|
+
description: nls.localize(1289, "Focuses the previous cursor"),
|
|
963
963
|
args: [],
|
|
964
964
|
},
|
|
965
965
|
precondition: undefined
|
|
@@ -67,7 +67,7 @@ export class TriggerParameterHintsAction extends EditorAction {
|
|
|
67
67
|
constructor() {
|
|
68
68
|
super({
|
|
69
69
|
id: 'editor.action.triggerParameterHints',
|
|
70
|
-
label: nls.localize2(
|
|
70
|
+
label: nls.localize2(1303, "Trigger Parameter Hints"),
|
|
71
71
|
precondition: EditorContextKeys.hasSignatureHelpProvider,
|
|
72
72
|
kbOpts: {
|
|
73
73
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -30,8 +30,8 @@ import { listHighlightForeground, registerColor } from '../../../../platform/the
|
|
|
30
30
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
31
31
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
32
32
|
const $ = dom.$;
|
|
33
|
-
const parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize(
|
|
34
|
-
const parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize(
|
|
33
|
+
const parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize(1304, 'Icon for show next parameter hint.'));
|
|
34
|
+
const parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize(1305, 'Icon for show previous parameter hint.'));
|
|
35
35
|
let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
36
36
|
static { ParameterHintsWidget_1 = this; }
|
|
37
37
|
static { this.ID = 'editor.widget.parameterHintsWidget'; }
|
|
@@ -206,7 +206,7 @@ let ParameterHintsWidget = class ParameterHintsWidget extends Disposable {
|
|
|
206
206
|
// Select method gets called on every user type while parameter hints are visible.
|
|
207
207
|
// We do not want to spam the user with same announcements, so we only announce if the current parameter changed.
|
|
208
208
|
if (this.announcedLabel !== labelToAnnounce) {
|
|
209
|
-
aria.alert(nls.localize(
|
|
209
|
+
aria.alert(nls.localize(1306, "{0}, hint", labelToAnnounce));
|
|
210
210
|
this.announcedLabel = labelToAnnounce;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -304,5 +304,5 @@ ParameterHintsWidget = ParameterHintsWidget_1 = __decorate([
|
|
|
304
304
|
__param(3, IMarkdownRendererService)
|
|
305
305
|
], ParameterHintsWidget);
|
|
306
306
|
export { ParameterHintsWidget };
|
|
307
|
-
registerColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize(
|
|
307
|
+
registerColor('editorHoverWidget.highlightForeground', listHighlightForeground, nls.localize(1307, 'Foreground color of the active item in the parameter hint.'));
|
|
308
308
|
//# sourceMappingURL=parameterHintsWidget.js.map
|
|
@@ -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(1308, "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(1309, "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(1310, '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(1311, 'Color of the peek view title.'));
|
|
221
|
+
export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161', hcDark: '#FFFFFF99', hcLight: '#292929' }, nls.localize(1312, 'Color of the peek view title info.'));
|
|
222
|
+
export const peekViewBorder = registerColor('peekView.border', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize(1313, '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(1314, '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(1315, '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(1316, '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(1317, '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(1318, '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(1319, 'Background color of the peek view editor.'));
|
|
229
|
+
export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', peekViewEditorBackground, nls.localize(1320, 'Background color of the gutter in the peek view editor.'));
|
|
230
|
+
export const peekViewEditorStickyScrollBackground = registerColor('peekViewEditorStickyScroll.background', peekViewEditorBackground, nls.localize(1321, 'Background color of sticky scroll in the peek view editor.'));
|
|
231
|
+
export const peekViewEditorStickyScrollGutterBackground = registerColor('peekViewEditorStickyScrollGutter.background', peekViewEditorBackground, nls.localize(1322, '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(1323, '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(1324, '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(1325, '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(1326, 'Foreground color of the placeholder text in the editor.'));
|
|
14
14
|
//# sourceMappingURL=placeholderText.contribution.js.map
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Toggle } from '../../../../base/browser/ui/toggle/toggle.js';
|
|
6
|
+
import { Codicon } from '../../../../base/common/codicons.js';
|
|
5
7
|
import { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
|
|
8
|
+
import { localize } from '../../../../nls.js';
|
|
9
|
+
import { inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colors/inputColors.js';
|
|
10
|
+
import { asCssVariable } from '../../../../platform/theme/common/colorUtils.js';
|
|
6
11
|
import { getCodeEditor } from '../../../browser/editorBrowser.js';
|
|
7
12
|
import { AbstractEditorNavigationQuickAccessProvider } from './editorNavigationQuickAccess.js';
|
|
8
|
-
import { localize } from '../../../../nls.js';
|
|
9
13
|
export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {
|
|
10
14
|
static { this.PREFIX = ':'; }
|
|
11
|
-
constructor() {
|
|
15
|
+
constructor(useZeroBasedOffset = { value: false }) {
|
|
12
16
|
super({ canAcceptInBackground: true });
|
|
17
|
+
this.useZeroBasedOffset = useZeroBasedOffset;
|
|
13
18
|
}
|
|
14
19
|
provideWithoutTextEditor(picker) {
|
|
15
|
-
const label = localize(
|
|
20
|
+
const label = localize(1327, "Open a text editor first to go to a line.");
|
|
16
21
|
picker.items = [{ label }];
|
|
17
22
|
picker.ariaLabel = label;
|
|
18
23
|
return Disposable.None;
|
|
@@ -35,8 +40,12 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
35
40
|
}));
|
|
36
41
|
// React to picker changes
|
|
37
42
|
const updatePickerAndEditor = () => {
|
|
38
|
-
const
|
|
39
|
-
const
|
|
43
|
+
const inputText = picker.value.trim().substring(AbstractGotoLineQuickAccessProvider.PREFIX.length);
|
|
44
|
+
const inOffsetMode = inputText.startsWith(':');
|
|
45
|
+
const position = this.parsePosition(editor, inputText);
|
|
46
|
+
const label = this.getPickLabel(editor, position.lineNumber, position.column, inOffsetMode);
|
|
47
|
+
// Show toggle only when input text starts with '::'.
|
|
48
|
+
toggle.visible = inOffsetMode;
|
|
40
49
|
// Picker
|
|
41
50
|
picker.items = [{
|
|
42
51
|
lineNumber: position.lineNumber,
|
|
@@ -56,6 +65,20 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
56
65
|
// Decorate
|
|
57
66
|
this.addDecorations(editor, range);
|
|
58
67
|
};
|
|
68
|
+
// Add a toggle to switch between 1- and 0-based offsets.
|
|
69
|
+
const toggle = new Toggle({
|
|
70
|
+
title: localize(1328, "Use zero-based offset"),
|
|
71
|
+
icon: Codicon.symbolArray,
|
|
72
|
+
isChecked: this.useZeroBasedOffset.value,
|
|
73
|
+
inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),
|
|
74
|
+
inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),
|
|
75
|
+
inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground)
|
|
76
|
+
});
|
|
77
|
+
disposables.add(toggle.onChange(() => {
|
|
78
|
+
this.useZeroBasedOffset.value = !this.useZeroBasedOffset.value;
|
|
79
|
+
updatePickerAndEditor();
|
|
80
|
+
}));
|
|
81
|
+
picker.toggles = [toggle];
|
|
59
82
|
updatePickerAndEditor();
|
|
60
83
|
disposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));
|
|
61
84
|
// Adjust line number visibility as needed
|
|
@@ -79,6 +102,25 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
79
102
|
};
|
|
80
103
|
}
|
|
81
104
|
parsePosition(editor, value) {
|
|
105
|
+
// Support ::<offset> notation to navigate to a specific offset in the model.
|
|
106
|
+
if (value.startsWith(':')) {
|
|
107
|
+
let offset = parseInt(value.substring(1), 10);
|
|
108
|
+
if (!isNaN(offset)) {
|
|
109
|
+
const model = this.getModel(editor);
|
|
110
|
+
if (model) {
|
|
111
|
+
const reverse = offset < 0;
|
|
112
|
+
if (!this.useZeroBasedOffset.value) {
|
|
113
|
+
// Convert 1-based offset to model's 0-based.
|
|
114
|
+
offset -= Math.sign(offset);
|
|
115
|
+
}
|
|
116
|
+
if (reverse) {
|
|
117
|
+
// Offset from the end of the buffer
|
|
118
|
+
offset += model.getValueLength();
|
|
119
|
+
}
|
|
120
|
+
return model.getPositionAt(offset);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
82
124
|
// Support line-col formats of `line,col`, `line:col`, `line#col`
|
|
83
125
|
const numbers = value.split(/,|:|#/).map(part => parseInt(part, 10)).filter(part => !isNaN(part));
|
|
84
126
|
const endLine = this.lineCount(editor) + 1;
|
|
@@ -87,21 +129,25 @@ export class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigatio
|
|
|
87
129
|
column: numbers[1]
|
|
88
130
|
};
|
|
89
131
|
}
|
|
90
|
-
getPickLabel(editor, lineNumber, column) {
|
|
132
|
+
getPickLabel(editor, lineNumber, column, inOffsetMode) {
|
|
91
133
|
// Location valid: indicate this as picker label
|
|
92
134
|
if (this.isValidLineNumber(editor, lineNumber)) {
|
|
93
135
|
if (this.isValidColumn(editor, lineNumber, column)) {
|
|
94
|
-
return localize(
|
|
136
|
+
return localize(1329, "Go to line {0} and character {1}.", lineNumber, column);
|
|
95
137
|
}
|
|
96
|
-
return localize(
|
|
138
|
+
return localize(1330, "Go to line {0}.", lineNumber);
|
|
97
139
|
}
|
|
98
140
|
// Location invalid: show generic label
|
|
99
141
|
const position = editor.getPosition() || { lineNumber: 1, column: 1 };
|
|
142
|
+
// When in offset mode, prompt for an offset.
|
|
143
|
+
if (inOffsetMode) {
|
|
144
|
+
return localize(1331, "Current Line: {0}, Character: {1}. Type a character offset to navigate to.", position.lineNumber, position.column);
|
|
145
|
+
}
|
|
100
146
|
const lineCount = this.lineCount(editor);
|
|
101
147
|
if (lineCount > 1) {
|
|
102
|
-
return localize(
|
|
148
|
+
return localize(1332, "Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.", position.lineNumber, position.column, lineCount);
|
|
103
149
|
}
|
|
104
|
-
return localize(
|
|
150
|
+
return localize(1333, "Current Line: {0}, Character: {1}. Type a line number to navigate to.", position.lineNumber, position.column);
|
|
105
151
|
}
|
|
106
152
|
isValidLineNumber(editor, lineNumber) {
|
|
107
153
|
if (!lineNumber || typeof lineNumber !== 'number') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,2CAA2C,EAAiC,MAAM,kCAAkC,CAAC;AAC9H,OAAO,EAAE,QAAQ,EAAE,MAA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AE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,iBAAiB,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAEjD,OAAO,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5E,CAAC;IAEO,SAAS,CAAC,MAAe;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC","file":"gotoLineQuickAccess.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 { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { getCodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { IPosition } from '../../../common/core/position.js';\nimport { IRange } from '../../../common/core/range.js';\nimport { IEditor, ScrollType } from '../../../common/editorCommon.js';\nimport { AbstractEditorNavigationQuickAccessProvider, IQuickAccessTextEditorContext } from './editorNavigationQuickAccess.js';\nimport { localize } from '../../../../nls.js';\nimport { IQuickPick, IQuickPickItem } from '../../../../platform/quickinput/common/quickInput.js';\n\ninterface IGotoLineQuickPickItem extends IQuickPickItem, Partial<IPosition> { }\n\nexport abstract class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {\n\n\tstatic PREFIX = ':';\n\n\tconstructor() {\n\t\tsuper({ canAcceptInBackground: true });\n\t}\n\n\tprotected provideWithoutTextEditor(picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>): IDisposable {\n\t\tconst label = localize('cannotRunGotoLine', \"Open a text editor first to go to a line.\");\n\n\t\tpicker.items = [{ label }];\n\t\tpicker.ariaLabel = label;\n\n\t\treturn Disposable.None;\n\t}\n\n\tprotected provideWithTextEditor(context: IQuickAccessTextEditorContext, picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>, token: CancellationToken): IDisposable {\n\t\tconst editor = context.editor;\n\t\tconst disposables = new DisposableStore();\n\n\t\t// Goto line once picked\n\t\tdisposables.add(picker.onDidAccept(event => {\n\t\t\tconst [item] = picker.selectedItems;\n\t\t\tif (item) {\n\t\t\t\tif (!this.isValidLineNumber(editor, item.lineNumber)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.gotoLocation(context, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground });\n\n\t\t\t\tif (!event.inBackground) {\n\t\t\t\t\tpicker.hide();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// React to picker changes\n\t\tconst updatePickerAndEditor = () => {\n\t\t\tconst position = this.parsePosition(editor, picker.value.trim().substr(AbstractGotoLineQuickAccessProvider.PREFIX.length));\n\t\t\tconst label = this.getPickLabel(editor, position.lineNumber, position.column);\n\n\t\t\t// Picker\n\t\t\tpicker.items = [{\n\t\t\t\tlineNumber: position.lineNumber,\n\t\t\t\tcolumn: position.column,\n\t\t\t\tlabel\n\t\t\t}];\n\n\t\t\t// ARIA Label\n\t\t\tpicker.ariaLabel = label;\n\n\t\t\t// Clear decorations for invalid range\n\t\t\tif (!this.isValidLineNumber(editor, position.lineNumber)) {\n\t\t\t\tthis.clearDecorations(editor);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Reveal\n\t\t\tconst range = this.toRange(position.lineNumber, position.column);\n\t\t\teditor.revealRangeInCenter(range, ScrollType.Smooth);\n\n\t\t\t// Decorate\n\t\t\tthis.addDecorations(editor, range);\n\t\t};\n\t\tupdatePickerAndEditor();\n\t\tdisposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));\n\n\t\t// Adjust line number visibility as needed\n\t\tconst codeEditor = getCodeEditor(editor);\n\t\tif (codeEditor) {\n\t\t\tconst options = codeEditor.getOptions();\n\t\t\tconst lineNumbers = options.get(EditorOption.lineNumbers);\n\t\t\tif (lineNumbers.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tcodeEditor.updateOptions({ lineNumbers: 'on' });\n\n\t\t\t\tdisposables.add(toDisposable(() => codeEditor.updateOptions({ lineNumbers: 'relative' })));\n\t\t\t}\n\t\t}\n\n\t\treturn disposables;\n\t}\n\n\tprivate toRange(lineNumber = 1, column = 1): IRange {\n\t\treturn {\n\t\t\tstartLineNumber: lineNumber,\n\t\t\tstartColumn: column,\n\t\t\tendLineNumber: lineNumber,\n\t\t\tendColumn: column\n\t\t};\n\t}\n\n\tprivate parsePosition(editor: IEditor, value: string): IPosition {\n\n\t\t// Support line-col formats of `line,col`, `line:col`, `line#col`\n\t\tconst numbers = value.split(/,|:|#/).map(part => parseInt(part, 10)).filter(part => !isNaN(part));\n\t\tconst endLine = this.lineCount(editor) + 1;\n\n\t\treturn {\n\t\t\tlineNumber: numbers[0] > 0 ? numbers[0] : endLine + numbers[0],\n\t\t\tcolumn: numbers[1]\n\t\t};\n\t}\n\n\tprivate getPickLabel(editor: IEditor, lineNumber: number, column: number | undefined): string {\n\n\t\t// Location valid: indicate this as picker label\n\t\tif (this.isValidLineNumber(editor, lineNumber)) {\n\t\t\tif (this.isValidColumn(editor, lineNumber, column)) {\n\t\t\t\treturn localize('gotoLineColumnLabel', \"Go to line {0} and character {1}.\", lineNumber, column);\n\t\t\t}\n\n\t\t\treturn localize('gotoLineLabel', \"Go to line {0}.\", lineNumber);\n\t\t}\n\n\t\t// Location invalid: show generic label\n\t\tconst position = editor.getPosition() || { lineNumber: 1, column: 1 };\n\t\tconst lineCount = this.lineCount(editor);\n\t\tif (lineCount > 1) {\n\t\t\treturn localize('gotoLineLabelEmptyWithLimit', \"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.\", position.lineNumber, position.column, lineCount);\n\t\t}\n\n\t\treturn localize('gotoLineLabelEmpty', \"Current Line: {0}, Character: {1}. Type a line number to navigate to.\", position.lineNumber, position.column);\n\t}\n\n\tprivate isValidLineNumber(editor: IEditor, lineNumber: number | undefined): boolean {\n\t\tif (!lineNumber || typeof lineNumber !== 'number') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn lineNumber > 0 && lineNumber <= this.lineCount(editor);\n\t}\n\n\tprivate isValidColumn(editor: IEditor, lineNumber: number, column: number | undefined): boolean {\n\t\tif (!column || typeof column !== 'number') {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst model = this.getModel(editor);\n\t\tif (!model) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst positionCandidate = { lineNumber, column };\n\n\t\treturn model.validatePosition(positionCandidate).equals(positionCandidate);\n\t}\n\n\tprivate lineCount(editor: IEditor): number {\n\t\treturn this.getModel(editor)?.getLineCount() ?? 0;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,yDAAyD,CAAC;AAC5J,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAA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QACzC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;YACnB,OAAO,QAAQ,CAAC,IAA6B,EAAE,yFAAyF,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC5L,CAAC;QAED,OAAO,QAAQ,CAAC,IAAoB,EAAE,uEAAuE,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtJ,CAAC;IAEO,iBAAiB,CAAC,MAAe,EAAE,UAA8B;QACxE,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YACnD,OAAO,KAAK,CAAC;QACd,CAAC;QAED,OAAO,UAAU,GAAG,CAAC,IAAI,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAEO,aAAa,CAAC,MAAe,EAAE,UAAkB,EAAE,MAA0B;QACpF,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,iBAAiB,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAEjD,OAAO,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5E,CAAC;IAEO,SAAS,CAAC,MAAe;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC","file":"gotoLineQuickAccess.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 { Toggle } from '../../../../base/browser/ui/toggle/toggle.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { localize } from '../../../../nls.js';\nimport { IQuickPick, IQuickPickItem } from '../../../../platform/quickinput/common/quickInput.js';\nimport { inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colors/inputColors.js';\nimport { asCssVariable } from '../../../../platform/theme/common/colorUtils.js';\nimport { getCodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { IPosition } from '../../../common/core/position.js';\nimport { IRange } from '../../../common/core/range.js';\nimport { IEditor, ScrollType } from '../../../common/editorCommon.js';\nimport { AbstractEditorNavigationQuickAccessProvider, IQuickAccessTextEditorContext } from './editorNavigationQuickAccess.js';\n\ninterface IGotoLineQuickPickItem extends IQuickPickItem, Partial<IPosition> { }\n\nexport abstract class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {\n\n\tstatic PREFIX = ':';\n\n\tconstructor(private useZeroBasedOffset: { value: boolean } = { value: false }) {\n\t\tsuper({ canAcceptInBackground: true });\n\t}\n\n\tprotected provideWithoutTextEditor(picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>): IDisposable {\n\t\tconst label = localize('cannotRunGotoLine', \"Open a text editor first to go to a line.\");\n\n\t\tpicker.items = [{ label }];\n\t\tpicker.ariaLabel = label;\n\n\t\treturn Disposable.None;\n\t}\n\n\tprotected provideWithTextEditor(context: IQuickAccessTextEditorContext, picker: IQuickPick<IGotoLineQuickPickItem, { useSeparators: true }>, token: CancellationToken): IDisposable {\n\t\tconst editor = context.editor;\n\t\tconst disposables = new DisposableStore();\n\n\t\t// Goto line once picked\n\t\tdisposables.add(picker.onDidAccept(event => {\n\t\t\tconst [item] = picker.selectedItems;\n\t\t\tif (item) {\n\t\t\t\tif (!this.isValidLineNumber(editor, item.lineNumber)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.gotoLocation(context, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground });\n\n\t\t\t\tif (!event.inBackground) {\n\t\t\t\t\tpicker.hide();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// React to picker changes\n\t\tconst updatePickerAndEditor = () => {\n\t\t\tconst inputText = picker.value.trim().substring(AbstractGotoLineQuickAccessProvider.PREFIX.length);\n\t\t\tconst inOffsetMode = inputText.startsWith(':');\n\t\t\tconst position = this.parsePosition(editor, inputText);\n\t\t\tconst label = this.getPickLabel(editor, position.lineNumber, position.column, inOffsetMode);\n\n\t\t\t// Show toggle only when input text starts with '::'.\n\t\t\ttoggle.visible = inOffsetMode;\n\n\t\t\t// Picker\n\t\t\tpicker.items = [{\n\t\t\t\tlineNumber: position.lineNumber,\n\t\t\t\tcolumn: position.column,\n\t\t\t\tlabel\n\t\t\t}];\n\n\t\t\t// ARIA Label\n\t\t\tpicker.ariaLabel = label;\n\n\t\t\t// Clear decorations for invalid range\n\t\t\tif (!this.isValidLineNumber(editor, position.lineNumber)) {\n\t\t\t\tthis.clearDecorations(editor);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Reveal\n\t\t\tconst range = this.toRange(position.lineNumber, position.column);\n\t\t\teditor.revealRangeInCenter(range, ScrollType.Smooth);\n\n\t\t\t// Decorate\n\t\t\tthis.addDecorations(editor, range);\n\t\t};\n\n\t\t// Add a toggle to switch between 1- and 0-based offsets.\n\t\tconst toggle = new Toggle({\n\t\t\ttitle: localize('gotoLineToggle', \"Use zero-based offset\"),\n\t\t\ticon: Codicon.symbolArray,\n\t\t\tisChecked: this.useZeroBasedOffset.value,\n\t\t\tinputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),\n\t\t\tinputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),\n\t\t\tinputActiveOptionBackground: asCssVariable(inputActiveOptionBackground)\n\t\t});\n\n\t\tdisposables.add(\n\t\t\ttoggle.onChange(() => {\n\t\t\t\tthis.useZeroBasedOffset.value = !this.useZeroBasedOffset.value;\n\t\t\t\tupdatePickerAndEditor();\n\t\t\t}));\n\n\t\tpicker.toggles = [toggle];\n\n\t\tupdatePickerAndEditor();\n\t\tdisposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));\n\n\t\t// Adjust line number visibility as needed\n\t\tconst codeEditor = getCodeEditor(editor);\n\t\tif (codeEditor) {\n\t\t\tconst options = codeEditor.getOptions();\n\t\t\tconst lineNumbers = options.get(EditorOption.lineNumbers);\n\t\t\tif (lineNumbers.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tcodeEditor.updateOptions({ lineNumbers: 'on' });\n\n\t\t\t\tdisposables.add(toDisposable(() => codeEditor.updateOptions({ lineNumbers: 'relative' })));\n\t\t\t}\n\t\t}\n\n\t\treturn disposables;\n\t}\n\n\tprivate toRange(lineNumber = 1, column = 1): IRange {\n\t\treturn {\n\t\t\tstartLineNumber: lineNumber,\n\t\t\tstartColumn: column,\n\t\t\tendLineNumber: lineNumber,\n\t\t\tendColumn: column\n\t\t};\n\t}\n\n\tprivate parsePosition(editor: IEditor, value: string): IPosition {\n\n\t\t// Support ::<offset> notation to navigate to a specific offset in the model.\n\t\tif (value.startsWith(':')) {\n\t\t\tlet offset = parseInt(value.substring(1), 10);\n\t\t\tif (!isNaN(offset)) {\n\t\t\t\tconst model = this.getModel(editor);\n\t\t\t\tif (model) {\n\t\t\t\t\tconst reverse = offset < 0;\n\t\t\t\t\tif (!this.useZeroBasedOffset.value) {\n\t\t\t\t\t\t// Convert 1-based offset to model's 0-based.\n\t\t\t\t\t\toffset -= Math.sign(offset);\n\t\t\t\t\t}\n\t\t\t\t\tif (reverse) {\n\t\t\t\t\t\t// Offset from the end of the buffer\n\t\t\t\t\t\toffset += model.getValueLength();\n\t\t\t\t\t}\n\t\t\t\t\treturn model.getPositionAt(offset);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Support line-col formats of `line,col`, `line:col`, `line#col`\n\t\tconst numbers = value.split(/,|:|#/).map(part => parseInt(part, 10)).filter(part => !isNaN(part));\n\t\tconst endLine = this.lineCount(editor) + 1;\n\n\t\treturn {\n\t\t\tlineNumber: numbers[0] > 0 ? numbers[0] : endLine + numbers[0],\n\t\t\tcolumn: numbers[1]\n\t\t};\n\t}\n\n\tprivate getPickLabel(editor: IEditor, lineNumber: number, column: number | undefined, inOffsetMode: boolean): string {\n\n\t\t// Location valid: indicate this as picker label\n\t\tif (this.isValidLineNumber(editor, lineNumber)) {\n\t\t\tif (this.isValidColumn(editor, lineNumber, column)) {\n\t\t\t\treturn localize('gotoLineColumnLabel', \"Go to line {0} and character {1}.\", lineNumber, column);\n\t\t\t}\n\n\t\t\treturn localize('gotoLineLabel', \"Go to line {0}.\", lineNumber);\n\t\t}\n\n\t\t// Location invalid: show generic label\n\t\tconst position = editor.getPosition() || { lineNumber: 1, column: 1 };\n\n\t\t// When in offset mode, prompt for an offset.\n\t\tif (inOffsetMode) {\n\t\t\treturn localize('gotoLineOffsetLabel', \"Current Line: {0}, Character: {1}. Type a character offset to navigate to.\", position.lineNumber, position.column);\n\t\t}\n\n\t\tconst lineCount = this.lineCount(editor);\n\t\tif (lineCount > 1) {\n\t\t\treturn localize('gotoLineLabelEmptyWithLimit', \"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.\", position.lineNumber, position.column, lineCount);\n\t\t}\n\n\t\treturn localize('gotoLineLabelEmpty', \"Current Line: {0}, Character: {1}. Type a line number to navigate to.\", position.lineNumber, position.column);\n\t}\n\n\tprivate isValidLineNumber(editor: IEditor, lineNumber: number | undefined): boolean {\n\t\tif (!lineNumber || typeof lineNumber !== 'number') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn lineNumber > 0 && lineNumber <= this.lineCount(editor);\n\t}\n\n\tprivate isValidColumn(editor: IEditor, lineNumber: number, column: number | undefined): boolean {\n\t\tif (!column || typeof column !== 'number') {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst model = this.getModel(editor);\n\t\tif (!model) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst positionCandidate = { lineNumber, column };\n\n\t\treturn model.validatePosition(positionCandidate).equals(positionCandidate);\n\t}\n\n\tprivate lineCount(editor: IEditor): number {\n\t\treturn this.getModel(editor)?.getLineCount() ?? 0;\n\t}\n}\n"]}
|
|
@@ -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(1334, "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(1335, "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(1336, "No matching editor symbols"));
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
|
-
this.provideLabelPick(picker, localize(
|
|
152
|
+
this.provideLabelPick(picker, localize(1337, "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(1338, "Open to the Side") : localize(1339, "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(1340, "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(1341, "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(1342, "methods ({0})"),
|
|
368
|
+
[11 /* SymbolKind.Function */]: localize(1343, "functions ({0})"),
|
|
369
|
+
[8 /* SymbolKind.Constructor */]: localize(1344, "constructors ({0})"),
|
|
370
|
+
[12 /* SymbolKind.Variable */]: localize(1345, "variables ({0})"),
|
|
371
|
+
[4 /* SymbolKind.Class */]: localize(1346, "classes ({0})"),
|
|
372
|
+
[22 /* SymbolKind.Struct */]: localize(1347, "structs ({0})"),
|
|
373
|
+
[23 /* SymbolKind.Event */]: localize(1348, "events ({0})"),
|
|
374
|
+
[24 /* SymbolKind.Operator */]: localize(1349, "operators ({0})"),
|
|
375
|
+
[10 /* SymbolKind.Interface */]: localize(1350, "interfaces ({0})"),
|
|
376
|
+
[2 /* SymbolKind.Namespace */]: localize(1351, "namespaces ({0})"),
|
|
377
|
+
[3 /* SymbolKind.Package */]: localize(1352, "packages ({0})"),
|
|
378
|
+
[25 /* SymbolKind.TypeParameter */]: localize(1353, "type parameters ({0})"),
|
|
379
|
+
[1 /* SymbolKind.Module */]: localize(1354, "modules ({0})"),
|
|
380
|
+
[6 /* SymbolKind.Property */]: localize(1355, "properties ({0})"),
|
|
381
|
+
[9 /* SymbolKind.Enum */]: localize(1356, "enumerations ({0})"),
|
|
382
|
+
[21 /* SymbolKind.EnumMember */]: localize(1357, "enumeration members ({0})"),
|
|
383
|
+
[14 /* SymbolKind.String */]: localize(1358, "strings ({0})"),
|
|
384
|
+
[0 /* SymbolKind.File */]: localize(1359, "files ({0})"),
|
|
385
|
+
[17 /* SymbolKind.Array */]: localize(1360, "arrays ({0})"),
|
|
386
|
+
[15 /* SymbolKind.Number */]: localize(1361, "numbers ({0})"),
|
|
387
|
+
[16 /* SymbolKind.Boolean */]: localize(1362, "booleans ({0})"),
|
|
388
|
+
[18 /* SymbolKind.Object */]: localize(1363, "objects ({0})"),
|
|
389
|
+
[19 /* SymbolKind.Key */]: localize(1364, "keys ({0})"),
|
|
390
|
+
[7 /* SymbolKind.Field */]: localize(1365, "fields ({0})"),
|
|
391
|
+
[13 /* SymbolKind.Constant */]: localize(1366, "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(1367, "Cannot edit in read-only input"));
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
|
-
message = new MarkdownString(nls.localize(
|
|
26
|
+
message = new MarkdownString(nls.localize(1368, "Cannot edit in read-only editor"));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
messageController.showMessage(message, this.editor.getPosition());
|