monaco-editor-core 0.54.0-dev-20250922 → 0.54.0-dev-20250924
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 +2 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +7 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +8 -0
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +274 -267
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/editorContextKeys.js +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 +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +10 -0
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +28 -5
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js.map +1 -1
- 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/format.js +3 -0
- package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/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/inlayHints.js +2 -7
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHints.js.map +1 -1
- 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 +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/model/inlineCompletionsModel.js +6 -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 +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +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/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +12 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js.map +1 -1
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +26 -26
- 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/editor/editor.api.d.ts +1 -0
- package/esm/vs/editor/standalone/browser/standaloneThemeService.js +10 -0
- package/esm/vs/editor/standalone/browser/standaloneThemeService.js.map +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 +37 -3
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +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/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/monaco.d.ts +1 -0
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -14,13 +14,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
import { h } from '../../../../base/browser/dom.js';
|
|
15
15
|
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
16
16
|
import { autorun, constObservable, observableFromEvent } from '../../../../base/common/observable.js';
|
|
17
|
+
import { MenuEntryActionViewItem } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';
|
|
17
18
|
import { MenuWorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';
|
|
18
|
-
import { IMenuService, MenuId } from '../../../../platform/actions/common/actions.js';
|
|
19
|
+
import { IMenuService, MenuId, MenuItemAction } from '../../../../platform/actions/common/actions.js';
|
|
19
20
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
21
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
20
22
|
import { observableCodeEditor } from '../../../browser/observableCodeEditor.js';
|
|
21
23
|
let FloatingEditorToolbar = class FloatingEditorToolbar extends Disposable {
|
|
22
24
|
static { this.ID = 'editor.contrib.floatingToolbar'; }
|
|
23
|
-
constructor(editor, instantiationService, menuService) {
|
|
25
|
+
constructor(editor, instantiationService, keybindingService, menuService) {
|
|
24
26
|
super();
|
|
25
27
|
const editorObs = this._register(observableCodeEditor(editor));
|
|
26
28
|
const menu = this._register(menuService.createMenu(MenuId.EditorContent, editor.contextKeyService));
|
|
@@ -35,10 +37,25 @@ let FloatingEditorToolbar = class FloatingEditorToolbar extends Disposable {
|
|
|
35
37
|
// is rendered in the lower right corner at the correct position.
|
|
36
38
|
container.root.style.height = '28px';
|
|
37
39
|
// Toolbar
|
|
38
|
-
|
|
40
|
+
const toolbar = instantiationService.createInstance(MenuWorkbenchToolBar, container.root, MenuId.EditorContent, {
|
|
41
|
+
actionViewItemProvider: (action, options) => {
|
|
42
|
+
if (!(action instanceof MenuItemAction)) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const keybinding = keybindingService.lookupKeybinding(action.id);
|
|
46
|
+
if (!keybinding) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
return instantiationService.createInstance(class extends MenuEntryActionViewItem {
|
|
50
|
+
updateLabel() {
|
|
51
|
+
if (this.options.label && this.label) {
|
|
52
|
+
this.label.textContent = `${this._commandAction.label} (${keybinding.getLabel()})`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, action, { ...options, keybindingNotRenderedWithLabel: true });
|
|
56
|
+
},
|
|
39
57
|
hiddenItemStrategy: 0 /* HiddenItemStrategy.Ignore */,
|
|
40
58
|
menuOptions: {
|
|
41
|
-
arg: editor.getModel()?.uri,
|
|
42
59
|
shouldForwardArgs: true
|
|
43
60
|
},
|
|
44
61
|
telemetrySource: 'editor.overlayToolbar',
|
|
@@ -46,6 +63,11 @@ let FloatingEditorToolbar = class FloatingEditorToolbar extends Disposable {
|
|
|
46
63
|
primaryGroup: () => true,
|
|
47
64
|
useSeparatorsInPrimaryActions: true
|
|
48
65
|
},
|
|
66
|
+
});
|
|
67
|
+
reader.store.add(toolbar);
|
|
68
|
+
reader.store.add(autorun(reader => {
|
|
69
|
+
const model = editorObs.model.read(reader);
|
|
70
|
+
toolbar.context = model?.uri;
|
|
49
71
|
}));
|
|
50
72
|
// Overlay widget
|
|
51
73
|
reader.store.add(editorObs.createOverlayWidget({
|
|
@@ -61,7 +83,8 @@ let FloatingEditorToolbar = class FloatingEditorToolbar extends Disposable {
|
|
|
61
83
|
};
|
|
62
84
|
FloatingEditorToolbar = __decorate([
|
|
63
85
|
__param(1, IInstantiationService),
|
|
64
|
-
__param(2,
|
|
86
|
+
__param(2, IKeybindingService),
|
|
87
|
+
__param(3, IMenuService)
|
|
65
88
|
], FloatingEditorToolbar);
|
|
66
89
|
export { FloatingEditorToolbar };
|
|
67
90
|
//# sourceMappingURL=floatingMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/floatingMenu/browser/floatingMenu.ts","vs/editor/contrib/floatingMenu/browser/floatingMenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,MAAM,iCAAiC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACtG,OAAO,EAAsB,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGzE,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU;aACpC,OAAE,GAAG,gCAAH,AAAmC,CAAC;IAEtD,YACC,MAAmB,EACI,oBAA2C,EACpD,WAAyB;QAEvC,KAAK,EAAE,CAAC;QAER,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;QAE/D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpG,MAAM,cAAc,GAAG,mBAAmB,CAAC,IAAI,EAAE,IAAI,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,WAAA,YAAY,CAAA;GANF,qBAAqB,CAoDjC","file":"floatingMenu.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 { h } from '../../../../base/browser/dom.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, observableFromEvent } from '../../../../base/common/observable.js';\nimport { HiddenItemStrategy, MenuWorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';\nimport { IMenuService, MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\nexport class FloatingEditorToolbar extends Disposable implements IEditorContribution {\n\tstatic readonly ID = 'editor.contrib.floatingToolbar';\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IMenuService menuService: IMenuService\n\t) {\n\t\tsuper();\n\n\t\tconst editorObs = this._register(observableCodeEditor(editor));\n\n\t\tconst menu = this._register(menuService.createMenu(MenuId.EditorContent, editor.contextKeyService));\n\t\tconst menuIsEmptyObs = observableFromEvent(this, menu.onDidChange, () => menu.getActions().length === 0);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst menuIsEmpty = menuIsEmptyObs.read(reader);\n\t\t\tif (menuIsEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst container = h('div.floating-menu-overlay-widget');\n\n\t\t\t// Set height explicitly to ensure that the floating menu element\n\t\t\t// is rendered in the lower right corner at the correct position.\n\t\t\tcontainer.root.style.height = '28px';\n\n\t\t\t// Toolbar\n\t\t\treader.store.add(instantiationService.createInstance(MenuWorkbenchToolBar, container.root, MenuId.EditorContent, {\n\t\t\t\thiddenItemStrategy: HiddenItemStrategy.Ignore,\n\t\t\t\tmenuOptions: {\n\t\t\t\t\targ: editor.getModel()?.uri,\n\t\t\t\t\tshouldForwardArgs: true\n\t\t\t\t},\n\t\t\t\ttelemetrySource: 'editor.overlayToolbar',\n\t\t\t\ttoolbarOptions: {\n\t\t\t\t\tprimaryGroup: () => true,\n\t\t\t\t\tuseSeparatorsInPrimaryActions: true\n\t\t\t\t},\n\t\t\t}));\n\n\t\t\t// Overlay widget\n\t\t\treader.store.add(editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tdomNode: container.root,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable({\n\t\t\t\t\tpreference: OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER\n\t\t\t\t})\n\t\t\t}));\n\t\t}));\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { h } from '../../../../base/browser/dom.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, observableFromEvent } from '../../../../base/common/observable.js';\nimport { HiddenItemStrategy, MenuWorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';\nimport { IMenuService, MenuId } from '../../../../platform/actions/common/actions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\nexport class FloatingEditorToolbar extends Disposable implements IEditorContribution {\n\tstatic readonly ID = 'editor.contrib.floatingToolbar';\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IMenuService menuService: IMenuService\n\t) {\n\t\tsuper();\n\n\t\tconst editorObs = this._register(observableCodeEditor(editor));\n\n\t\tconst menu = this._register(menuService.createMenu(MenuId.EditorContent, editor.contextKeyService));\n\t\tconst menuIsEmptyObs = observableFromEvent(this, menu.onDidChange, () => menu.getActions().length === 0);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst menuIsEmpty = menuIsEmptyObs.read(reader);\n\t\t\tif (menuIsEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst container = h('div.floating-menu-overlay-widget');\n\n\t\t\t// Set height explicitly to ensure that the floating menu element\n\t\t\t// is rendered in the lower right corner at the correct position.\n\t\t\tcontainer.root.style.height = '28px';\n\n\t\t\t// Toolbar\n\t\t\treader.store.add(instantiationService.createInstance(MenuWorkbenchToolBar, container.root, MenuId.EditorContent, {\n\t\t\t\thiddenItemStrategy: HiddenItemStrategy.Ignore,\n\t\t\t\tmenuOptions: {\n\t\t\t\t\targ: editor.getModel()?.uri,\n\t\t\t\t\tshouldForwardArgs: true\n\t\t\t\t},\n\t\t\t\ttelemetrySource: 'editor.overlayToolbar',\n\t\t\t\ttoolbarOptions: {\n\t\t\t\t\tprimaryGroup: () => true,\n\t\t\t\t\tuseSeparatorsInPrimaryActions: true\n\t\t\t\t},\n\t\t\t}));\n\n\t\t\t// Overlay widget\n\t\t\treader.store.add(editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tdomNode: container.root,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable({\n\t\t\t\t\tpreference: OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER\n\t\t\t\t})\n\t\t\t}));\n\t\t}));\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/floatingMenu/browser/floatingMenu.ts","vs/editor/contrib/floatingMenu/brow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EAAE,CAAC,IAAI;oBACxB,6BAA6B,EAAE,IAAI;iBACnC;aACD,CAAC,CAAC;YAEH,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC1B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACjC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3C,OAAO,CAAC,OAAO,GAAG,KAAK,EAAE,GAAG,CAAC;YAC9B,CAAC,CAAC,CAAC,CAAC;YAEJ,iBAAiB;YACjB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC;gBAC9C,mBAAmB,EAAE,KAAK;gBAC1B,OAAO,EAAE,SAAS,CAAC,IAAI;gBACvB,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC;gBACvC,QAAQ,EAAE,eAAe,CAAC;oBACzB,UAAU,6DAAqD;iBAC/D,CAAC;aACF,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC,CAAC;IACL,CAAC;;AA3EW,qBAAqB;IAK/B,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;IAClB,WAAA,YAAY,CAAA;GAPF,qBAAqB,CA4EjC","file":"floatingMenu.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 { h } from '../../../../base/browser/dom.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, observableFromEvent } from '../../../../base/common/observable.js';\nimport { MenuEntryActionViewItem } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';\nimport { HiddenItemStrategy, MenuWorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';\nimport { IMenuService, MenuId, MenuItemAction } from '../../../../platform/actions/common/actions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ICodeEditor, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\nexport class FloatingEditorToolbar extends Disposable implements IEditorContribution {\n\tstatic readonly ID = 'editor.contrib.floatingToolbar';\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IMenuService menuService: IMenuService\n\t) {\n\t\tsuper();\n\n\t\tconst editorObs = this._register(observableCodeEditor(editor));\n\n\t\tconst menu = this._register(menuService.createMenu(MenuId.EditorContent, editor.contextKeyService));\n\t\tconst menuIsEmptyObs = observableFromEvent(this, menu.onDidChange, () => menu.getActions().length === 0);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst menuIsEmpty = menuIsEmptyObs.read(reader);\n\t\t\tif (menuIsEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst container = h('div.floating-menu-overlay-widget');\n\n\t\t\t// Set height explicitly to ensure that the floating menu element\n\t\t\t// is rendered in the lower right corner at the correct position.\n\t\t\tcontainer.root.style.height = '28px';\n\n\t\t\t// Toolbar\n\t\t\tconst toolbar = instantiationService.createInstance(MenuWorkbenchToolBar, container.root, MenuId.EditorContent, {\n\t\t\t\tactionViewItemProvider: (action, options) => {\n\t\t\t\t\tif (!(action instanceof MenuItemAction)) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst keybinding = keybindingService.lookupKeybinding(action.id);\n\t\t\t\t\tif (!keybinding) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn instantiationService.createInstance(class extends MenuEntryActionViewItem {\n\t\t\t\t\t\tprotected override updateLabel(): void {\n\t\t\t\t\t\t\tif (this.options.label && this.label) {\n\t\t\t\t\t\t\t\tthis.label.textContent = `${this._commandAction.label} (${keybinding.getLabel()})`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, action, { ...options, keybindingNotRenderedWithLabel: true });\n\t\t\t\t},\n\t\t\t\thiddenItemStrategy: HiddenItemStrategy.Ignore,\n\t\t\t\tmenuOptions: {\n\t\t\t\t\tshouldForwardArgs: true\n\t\t\t\t},\n\t\t\t\ttelemetrySource: 'editor.overlayToolbar',\n\t\t\t\ttoolbarOptions: {\n\t\t\t\t\tprimaryGroup: () => true,\n\t\t\t\t\tuseSeparatorsInPrimaryActions: true\n\t\t\t\t},\n\t\t\t});\n\n\t\t\treader.store.add(toolbar);\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst model = editorObs.model.read(reader);\n\t\t\t\ttoolbar.context = model?.uri;\n\t\t\t}));\n\n\t\t\t// Overlay widget\n\t\t\treader.store.add(editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tdomNode: container.root,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable({\n\t\t\t\t\tpreference: OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER\n\t\t\t\t})\n\t\t\t}));\n\t\t}));\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { h } from '../../../../base/browser/dom.js';\nimport { Disposable } from '../../../../base/common/lifecycle.js';\nimport { autorun, constObservable, observableFromEvent } from '../../../../base/common/observable.js';\nimport { MenuEntryActionViewItem } from '../../../../platform/actions/browser/menuEntryActionViewItem.js';\nimport { HiddenItemStrategy, MenuWorkbenchToolBar } from '../../../../platform/actions/browser/toolbar.js';\nimport { IMenuService, MenuId, MenuItemAction } from '../../../../platform/actions/common/actions.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ICodeEditor, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../browser/observableCodeEditor.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\n\nexport class FloatingEditorToolbar extends Disposable implements IEditorContribution {\n\tstatic readonly ID = 'editor.contrib.floatingToolbar';\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IMenuService menuService: IMenuService\n\t) {\n\t\tsuper();\n\n\t\tconst editorObs = this._register(observableCodeEditor(editor));\n\n\t\tconst menu = this._register(menuService.createMenu(MenuId.EditorContent, editor.contextKeyService));\n\t\tconst menuIsEmptyObs = observableFromEvent(this, menu.onDidChange, () => menu.getActions().length === 0);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst menuIsEmpty = menuIsEmptyObs.read(reader);\n\t\t\tif (menuIsEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst container = h('div.floating-menu-overlay-widget');\n\n\t\t\t// Set height explicitly to ensure that the floating menu element\n\t\t\t// is rendered in the lower right corner at the correct position.\n\t\t\tcontainer.root.style.height = '28px';\n\n\t\t\t// Toolbar\n\t\t\tconst toolbar = instantiationService.createInstance(MenuWorkbenchToolBar, container.root, MenuId.EditorContent, {\n\t\t\t\tactionViewItemProvider: (action, options) => {\n\t\t\t\t\tif (!(action instanceof MenuItemAction)) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst keybinding = keybindingService.lookupKeybinding(action.id);\n\t\t\t\t\tif (!keybinding) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn instantiationService.createInstance(class extends MenuEntryActionViewItem {\n\t\t\t\t\t\tprotected override updateLabel(): void {\n\t\t\t\t\t\t\tif (this.options.label && this.label) {\n\t\t\t\t\t\t\t\tthis.label.textContent = `${this._commandAction.label} (${keybinding.getLabel()})`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, action, { ...options, keybindingNotRenderedWithLabel: true });\n\t\t\t\t},\n\t\t\t\thiddenItemStrategy: HiddenItemStrategy.Ignore,\n\t\t\t\tmenuOptions: {\n\t\t\t\t\tshouldForwardArgs: true\n\t\t\t\t},\n\t\t\t\ttelemetrySource: 'editor.overlayToolbar',\n\t\t\t\ttoolbarOptions: {\n\t\t\t\t\tprimaryGroup: () => true,\n\t\t\t\t\tuseSeparatorsInPrimaryActions: true\n\t\t\t\t},\n\t\t\t});\n\n\t\t\treader.store.add(toolbar);\n\t\t\treader.store.add(autorun(reader => {\n\t\t\t\tconst model = editorObs.model.read(reader);\n\t\t\t\ttoolbar.context = model?.uri;\n\t\t\t}));\n\n\t\t\t// Overlay widget\n\t\t\treader.store.add(editorObs.createOverlayWidget({\n\t\t\t\tallowEditorOverflow: false,\n\t\t\t\tdomNode: container.root,\n\t\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\t\tposition: constObservable({\n\t\t\t\t\tpreference: OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER\n\t\t\t\t})\n\t\t\t}));\n\t\t}));\n\t}\n}\n"]}
|
|
@@ -507,7 +507,7 @@ class UnfoldAction extends FoldingAction {
|
|
|
507
507
|
constructor() {
|
|
508
508
|
super({
|
|
509
509
|
id: 'editor.unfold',
|
|
510
|
-
label: nls.localize2(
|
|
510
|
+
label: nls.localize2(976, "Unfold"),
|
|
511
511
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
512
512
|
kbOpts: {
|
|
513
513
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -568,7 +568,7 @@ class UnFoldRecursivelyAction extends FoldingAction {
|
|
|
568
568
|
constructor() {
|
|
569
569
|
super({
|
|
570
570
|
id: 'editor.unfoldRecursively',
|
|
571
|
-
label: nls.localize2(
|
|
571
|
+
label: nls.localize2(977, "Unfold Recursively"),
|
|
572
572
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
573
573
|
kbOpts: {
|
|
574
574
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -585,7 +585,7 @@ class FoldAction extends FoldingAction {
|
|
|
585
585
|
constructor() {
|
|
586
586
|
super({
|
|
587
587
|
id: 'editor.fold',
|
|
588
|
-
label: nls.localize2(
|
|
588
|
+
label: nls.localize2(978, "Fold"),
|
|
589
589
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
590
590
|
kbOpts: {
|
|
591
591
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -652,7 +652,7 @@ class ToggleFoldAction extends FoldingAction {
|
|
|
652
652
|
constructor() {
|
|
653
653
|
super({
|
|
654
654
|
id: 'editor.toggleFold',
|
|
655
|
-
label: nls.localize2(
|
|
655
|
+
label: nls.localize2(979, "Toggle Fold"),
|
|
656
656
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
657
657
|
kbOpts: {
|
|
658
658
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -670,7 +670,7 @@ class FoldRecursivelyAction extends FoldingAction {
|
|
|
670
670
|
constructor() {
|
|
671
671
|
super({
|
|
672
672
|
id: 'editor.foldRecursively',
|
|
673
|
-
label: nls.localize2(
|
|
673
|
+
label: nls.localize2(980, "Fold Recursively"),
|
|
674
674
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
675
675
|
kbOpts: {
|
|
676
676
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -688,7 +688,7 @@ class ToggleFoldRecursivelyAction extends FoldingAction {
|
|
|
688
688
|
constructor() {
|
|
689
689
|
super({
|
|
690
690
|
id: 'editor.toggleFoldRecursively',
|
|
691
|
-
label: nls.localize2(
|
|
691
|
+
label: nls.localize2(981, "Toggle Fold Recursively"),
|
|
692
692
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
693
693
|
kbOpts: {
|
|
694
694
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -706,7 +706,7 @@ class FoldAllBlockCommentsAction extends FoldingAction {
|
|
|
706
706
|
constructor() {
|
|
707
707
|
super({
|
|
708
708
|
id: 'editor.foldAllBlockComments',
|
|
709
|
-
label: nls.localize2(
|
|
709
|
+
label: nls.localize2(982, "Fold All Block Comments"),
|
|
710
710
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
711
711
|
kbOpts: {
|
|
712
712
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -736,7 +736,7 @@ class FoldAllRegionsAction extends FoldingAction {
|
|
|
736
736
|
constructor() {
|
|
737
737
|
super({
|
|
738
738
|
id: 'editor.foldAllMarkerRegions',
|
|
739
|
-
label: nls.localize2(
|
|
739
|
+
label: nls.localize2(983, "Fold All Regions"),
|
|
740
740
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
741
741
|
kbOpts: {
|
|
742
742
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -766,7 +766,7 @@ class UnfoldAllRegionsAction extends FoldingAction {
|
|
|
766
766
|
constructor() {
|
|
767
767
|
super({
|
|
768
768
|
id: 'editor.unfoldAllMarkerRegions',
|
|
769
|
-
label: nls.localize2(
|
|
769
|
+
label: nls.localize2(984, "Unfold All Regions"),
|
|
770
770
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
771
771
|
kbOpts: {
|
|
772
772
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -796,7 +796,7 @@ class FoldAllExceptAction extends FoldingAction {
|
|
|
796
796
|
constructor() {
|
|
797
797
|
super({
|
|
798
798
|
id: 'editor.foldAllExcept',
|
|
799
|
-
label: nls.localize2(
|
|
799
|
+
label: nls.localize2(985, "Fold All Except Selected"),
|
|
800
800
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
801
801
|
kbOpts: {
|
|
802
802
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -814,7 +814,7 @@ class UnfoldAllExceptAction extends FoldingAction {
|
|
|
814
814
|
constructor() {
|
|
815
815
|
super({
|
|
816
816
|
id: 'editor.unfoldAllExcept',
|
|
817
|
-
label: nls.localize2(
|
|
817
|
+
label: nls.localize2(986, "Unfold All Except Selected"),
|
|
818
818
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
819
819
|
kbOpts: {
|
|
820
820
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -832,7 +832,7 @@ class FoldAllAction extends FoldingAction {
|
|
|
832
832
|
constructor() {
|
|
833
833
|
super({
|
|
834
834
|
id: 'editor.foldAll',
|
|
835
|
-
label: nls.localize2(
|
|
835
|
+
label: nls.localize2(987, "Fold All"),
|
|
836
836
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
837
837
|
kbOpts: {
|
|
838
838
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -849,7 +849,7 @@ class UnfoldAllAction extends FoldingAction {
|
|
|
849
849
|
constructor() {
|
|
850
850
|
super({
|
|
851
851
|
id: 'editor.unfoldAll',
|
|
852
|
-
label: nls.localize2(
|
|
852
|
+
label: nls.localize2(988, "Unfold All"),
|
|
853
853
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
854
854
|
kbOpts: {
|
|
855
855
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -877,7 +877,7 @@ class GotoParentFoldAction extends FoldingAction {
|
|
|
877
877
|
constructor() {
|
|
878
878
|
super({
|
|
879
879
|
id: 'editor.gotoParentFold',
|
|
880
|
-
label: nls.localize2(
|
|
880
|
+
label: nls.localize2(989, "Go to Parent Fold"),
|
|
881
881
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
882
882
|
kbOpts: {
|
|
883
883
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -905,7 +905,7 @@ class GotoPreviousFoldAction extends FoldingAction {
|
|
|
905
905
|
constructor() {
|
|
906
906
|
super({
|
|
907
907
|
id: 'editor.gotoPreviousFold',
|
|
908
|
-
label: nls.localize2(
|
|
908
|
+
label: nls.localize2(990, "Go to Previous Folding Range"),
|
|
909
909
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
910
910
|
kbOpts: {
|
|
911
911
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -933,7 +933,7 @@ class GotoNextFoldAction extends FoldingAction {
|
|
|
933
933
|
constructor() {
|
|
934
934
|
super({
|
|
935
935
|
id: 'editor.gotoNextFold',
|
|
936
|
-
label: nls.localize2(
|
|
936
|
+
label: nls.localize2(991, "Go to Next Folding Range"),
|
|
937
937
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
938
938
|
kbOpts: {
|
|
939
939
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -960,7 +960,7 @@ class FoldRangeFromSelectionAction extends FoldingAction {
|
|
|
960
960
|
constructor() {
|
|
961
961
|
super({
|
|
962
962
|
id: 'editor.createFoldingRangeFromSelection',
|
|
963
|
-
label: nls.localize2(
|
|
963
|
+
label: nls.localize2(992, "Create Folding Range from Selection"),
|
|
964
964
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
965
965
|
kbOpts: {
|
|
966
966
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -1008,7 +1008,7 @@ class RemoveFoldRangeFromSelectionAction extends FoldingAction {
|
|
|
1008
1008
|
constructor() {
|
|
1009
1009
|
super({
|
|
1010
1010
|
id: 'editor.removeManualFoldingRanges',
|
|
1011
|
-
label: nls.localize2(
|
|
1011
|
+
label: nls.localize2(993, "Remove Manual Folding Ranges"),
|
|
1012
1012
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
1013
1013
|
kbOpts: {
|
|
1014
1014
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -1034,7 +1034,7 @@ class ToggleImportFoldAction extends FoldingAction {
|
|
|
1034
1034
|
constructor() {
|
|
1035
1035
|
super({
|
|
1036
1036
|
id: 'editor.toggleImportFold',
|
|
1037
|
-
label: nls.localize2(
|
|
1037
|
+
label: nls.localize2(994, "Toggle Import Fold"),
|
|
1038
1038
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
1039
1039
|
kbOpts: {
|
|
1040
1040
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -1077,7 +1077,7 @@ registerEditorAction(ToggleImportFoldAction);
|
|
|
1077
1077
|
for (let i = 1; i <= 7; i++) {
|
|
1078
1078
|
registerInstantiatedEditorAction(new FoldLevelAction({
|
|
1079
1079
|
id: FoldLevelAction.ID(i),
|
|
1080
|
-
label: nls.localize2(
|
|
1080
|
+
label: nls.localize2(995, "Fold Level {0}", i),
|
|
1081
1081
|
precondition: CONTEXT_FOLDING_ENABLED,
|
|
1082
1082
|
kbOpts: {
|
|
1083
1083
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -9,16 +9,16 @@ import { editorSelectionBackground, iconForeground, registerColor, transparent }
|
|
|
9
9
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
10
10
|
import { themeColorFromId } from '../../../../platform/theme/common/themeService.js';
|
|
11
11
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
|
12
|
-
const foldBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hcDark: null, hcLight: null }, localize(
|
|
13
|
-
registerColor('editor.foldPlaceholderForeground', { light: '#808080', dark: '#808080', hcDark: null, hcLight: null }, localize(
|
|
14
|
-
registerColor('editorGutter.foldingControlForeground', iconForeground, localize(
|
|
15
|
-
export const foldingExpandedIcon = registerIcon('folding-expanded', Codicon.chevronDown, localize(
|
|
16
|
-
export const foldingCollapsedIcon = registerIcon('folding-collapsed', Codicon.chevronRight, localize(
|
|
17
|
-
export const foldingManualCollapsedIcon = registerIcon('folding-manual-collapsed', foldingCollapsedIcon, localize(
|
|
18
|
-
export const foldingManualExpandedIcon = registerIcon('folding-manual-expanded', foldingExpandedIcon, localize(
|
|
12
|
+
const foldBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hcDark: null, hcLight: null }, localize(996, "Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."), true);
|
|
13
|
+
registerColor('editor.foldPlaceholderForeground', { light: '#808080', dark: '#808080', hcDark: null, hcLight: null }, localize(997, "Color of the collapsed text after the first line of a folded range."));
|
|
14
|
+
registerColor('editorGutter.foldingControlForeground', iconForeground, localize(998, 'Color of the folding control in the editor gutter.'));
|
|
15
|
+
export const foldingExpandedIcon = registerIcon('folding-expanded', Codicon.chevronDown, localize(999, 'Icon for expanded ranges in the editor glyph margin.'));
|
|
16
|
+
export const foldingCollapsedIcon = registerIcon('folding-collapsed', Codicon.chevronRight, localize(1000, 'Icon for collapsed ranges in the editor glyph margin.'));
|
|
17
|
+
export const foldingManualCollapsedIcon = registerIcon('folding-manual-collapsed', foldingCollapsedIcon, localize(1001, 'Icon for manually collapsed ranges in the editor glyph margin.'));
|
|
18
|
+
export const foldingManualExpandedIcon = registerIcon('folding-manual-expanded', foldingExpandedIcon, localize(1002, 'Icon for manually expanded ranges in the editor glyph margin.'));
|
|
19
19
|
const foldedBackgroundMinimap = { color: themeColorFromId(foldBackground), position: 1 /* MinimapPosition.Inline */ };
|
|
20
|
-
const collapsed = localize(
|
|
21
|
-
const expanded = localize(
|
|
20
|
+
const collapsed = localize(1003, "Click to expand the range.");
|
|
21
|
+
const expanded = localize(1004, "Click to collapse the range.");
|
|
22
22
|
export class FoldingDecorationProvider {
|
|
23
23
|
static { this.COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({
|
|
24
24
|
description: 'folding-collapsed-visual-decoration',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/folding/browser/foldingDecorations.ts"],"names":[],"mappings":"AAAA;;;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or-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 { Codicon } from '../../../../base/common/codicons.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { IModelDecorationOptions, IModelDecorationsChangeAccessor, MinimapPosition, TrackedRangeStickiness } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IDecorationProvider } from './foldingModel.js';\nimport { localize } from '../../../../nls.js';\nimport { editorSelectionBackground, iconForeground, registerColor, transparent } from '../../../../platform/theme/common/colorRegistry.js';\nimport { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';\nimport { themeColorFromId } from '../../../../platform/theme/common/themeService.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\n\nconst foldBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hcDark: null, hcLight: null }, localize('foldBackgroundBackground', \"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.\"), true);\nregisterColor('editor.foldPlaceholderForeground', { light: '#808080', dark: '#808080', hcDark: null, hcLight: null }, localize('collapsedTextColor', \"Color of the collapsed text after the first line of a folded range.\"));\nregisterColor('editorGutter.foldingControlForeground', iconForeground, localize('editorGutter.foldingControlForeground', 'Color of the folding control in the editor gutter.'));\n\nexport const foldingExpandedIcon = registerIcon('folding-expanded', Codicon.chevronDown, localize('foldingExpandedIcon', 'Icon for expanded ranges in the editor glyph margin.'));\nexport const foldingCollapsedIcon = registerIcon('folding-collapsed', Codicon.chevronRight, localize('foldingCollapsedIcon', 'Icon for collapsed ranges in the editor glyph margin.'));\nexport const foldingManualCollapsedIcon = registerIcon('folding-manual-collapsed', foldingCollapsedIcon, localize('foldingManualCollapedIcon', 'Icon for manually collapsed ranges in the editor glyph margin.'));\nexport const foldingManualExpandedIcon = registerIcon('folding-manual-expanded', foldingExpandedIcon, localize('foldingManualExpandedIcon', 'Icon for manually expanded ranges in the editor glyph margin.'));\n\nconst foldedBackgroundMinimap = { color: themeColorFromId(foldBackground), position: MinimapPosition.Inline };\n\nconst collapsed = localize('linesCollapsed', \"Click to expand the range.\");\nconst expanded = localize('linesExpanded', \"Click to collapse the range.\");\n\nexport class FoldingDecorationProvider implements IDecorationProvider {\n\n\tprivate static readonly COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-collapsed-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingCollapsedIcon),\n\t});\n\n\tprivate static readonly COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-collapsed-highlighted-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tclassName: 'folded-background',\n\t\tminimap: foldedBackgroundMinimap,\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingCollapsedIcon)\n\t});\n\n\tprivate static readonly MANUALLY_COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-collapsed-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingManualCollapsedIcon)\n\t});\n\n\tprivate static readonly MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-collapsed-highlighted-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tclassName: 'folded-background',\n\t\tminimap: foldedBackgroundMinimap,\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingManualCollapsedIcon)\n\t});\n\n\tprivate static readonly NO_CONTROLS_COLLAPSED_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-no-controls-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t});\n\n\tprivate static readonly NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-no-controls-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tclassName: 'folded-background',\n\t\tminimap: foldedBackgroundMinimap,\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t});\n\n\tprivate static readonly EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-expanded-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: 'alwaysShowFoldIcons ' + ThemeIcon.asClassName(foldingExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-expanded-auto-hide-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly MANUALLY_EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-expanded-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: 'alwaysShowFoldIcons ' + ThemeIcon.asClassName(foldingManualExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-expanded-auto-hide-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingManualExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly NO_CONTROLS_EXPANDED_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-no-controls-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true\n\t});\n\n\tprivate static readonly HIDDEN_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-hidden-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges\n\t});\n\n\tpublic showFoldingControls: 'always' | 'never' | 'mouseover' = 'mouseover';\n\n\tpublic showFoldingHighlights: boolean = true;\n\n\tconstructor(private readonly editor: ICodeEditor) {\n\t}\n\n\tgetDecorationOption(isCollapsed: boolean, isHidden: boolean, isManual: boolean): IModelDecorationOptions {\n\t\tif (isHidden) { // is inside another collapsed region\n\t\t\treturn FoldingDecorationProvider.HIDDEN_RANGE_DECORATION;\n\t\t}\n\t\tif (this.showFoldingControls === 'never') {\n\t\t\tif (isCollapsed) {\n\t\t\t\treturn this.showFoldingHighlights ? FoldingDecorationProvider.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION : FoldingDecorationProvider.NO_CONTROLS_COLLAPSED_RANGE_DECORATION;\n\t\t\t}\n\t\t\treturn FoldingDecorationProvider.NO_CONTROLS_EXPANDED_RANGE_DECORATION;\n\t\t}\n\t\tif (isCollapsed) {\n\t\t\treturn isManual ?\n\t\t\t\t(this.showFoldingHighlights ? FoldingDecorationProvider.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.MANUALLY_COLLAPSED_VISUAL_DECORATION)\n\t\t\t\t: (this.showFoldingHighlights ? FoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION);\n\t\t} else if (this.showFoldingControls === 'mouseover') {\n\t\t\treturn isManual ? FoldingDecorationProvider.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION : FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION;\n\t\t} else {\n\t\t\treturn isManual ? FoldingDecorationProvider.MANUALLY_EXPANDED_VISUAL_DECORATION : FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION;\n\t\t}\n\t}\n\n\tchangeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T {\n\t\treturn this.editor.changeDecorations(callback);\n\t}\n\n\tremoveDecorations(decorationIds: string[]): void {\n\t\tthis.editor.removeDecorations(decorationIds);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/folding/browser/foldingDecorations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAG9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBA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CAAC,CAAC,CAAC,yBAAyB,CAAC,kDAAkD,CAAC,CAAC,CAAC,yBAAyB,CAAC,sCAAsC,CAAC;YACrL,CAAC;YACD,OAAO,yBAAyB,CAAC,qCAAqC,CAAC;QACxE,CAAC;QACD,IAAI,WAAW,EAAE,CAAC;YACjB,OAAO,QAAQ,CAAC,CAAC;gBAChB,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,yBAAyB,CAAC,gDAAgD,CAAC,CAAC,CAAC,yBAAyB,CAAC,oCAAoC,CAAC;gBAC1K,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,yBAAyB,CAAC,uCAAuC,CAAC,CAAC,CAAC,yBAAyB,CAAC,2BAA2B,CAAC,CAAC;QAC7J,CAAC;aAAM,IAAI,IAAI,CAAC,mBAAmB,KAAK,WAAW,EAAE,CAAC;YACrD,OAAO,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,6CAA6C,CAAC,CAAC,CAAC,yBAAyB,CAAC,oCAAoC,CAAC;QAC5J,CAAC;aAAM,CAAC;YACP,OAAO,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,mCAAmC,CAAC,CAAC,CAAC,yBAAyB,CAAC,0BAA0B,CAAC;QACxI,CAAC;IACF,CAAC;IAED,iBAAiB,CAAI,QAAgE;QACpF,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAED,iBAAiB,CAAC,aAAuB;QACxC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC9C,CAAC","file":"foldingDecorations.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 { Codicon } from '../../../../base/common/codicons.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { IModelDecorationOptions, IModelDecorationsChangeAccessor, MinimapPosition, TrackedRangeStickiness } from '../../../common/model.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { IDecorationProvider } from './foldingModel.js';\nimport { localize } from '../../../../nls.js';\nimport { editorSelectionBackground, iconForeground, registerColor, transparent } from '../../../../platform/theme/common/colorRegistry.js';\nimport { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';\nimport { themeColorFromId } from '../../../../platform/theme/common/themeService.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\n\nconst foldBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hcDark: null, hcLight: null }, localize('foldBackgroundBackground', \"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.\"), true);\nregisterColor('editor.foldPlaceholderForeground', { light: '#808080', dark: '#808080', hcDark: null, hcLight: null }, localize('collapsedTextColor', \"Color of the collapsed text after the first line of a folded range.\"));\nregisterColor('editorGutter.foldingControlForeground', iconForeground, localize('editorGutter.foldingControlForeground', 'Color of the folding control in the editor gutter.'));\n\nexport const foldingExpandedIcon = registerIcon('folding-expanded', Codicon.chevronDown, localize('foldingExpandedIcon', 'Icon for expanded ranges in the editor glyph margin.'));\nexport const foldingCollapsedIcon = registerIcon('folding-collapsed', Codicon.chevronRight, localize('foldingCollapsedIcon', 'Icon for collapsed ranges in the editor glyph margin.'));\nexport const foldingManualCollapsedIcon = registerIcon('folding-manual-collapsed', foldingCollapsedIcon, localize('foldingManualCollapedIcon', 'Icon for manually collapsed ranges in the editor glyph margin.'));\nexport const foldingManualExpandedIcon = registerIcon('folding-manual-expanded', foldingExpandedIcon, localize('foldingManualExpandedIcon', 'Icon for manually expanded ranges in the editor glyph margin.'));\n\nconst foldedBackgroundMinimap = { color: themeColorFromId(foldBackground), position: MinimapPosition.Inline };\n\nconst collapsed = localize('linesCollapsed', \"Click to expand the range.\");\nconst expanded = localize('linesExpanded', \"Click to collapse the range.\");\n\nexport class FoldingDecorationProvider implements IDecorationProvider {\n\n\tprivate static readonly COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-collapsed-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingCollapsedIcon),\n\t});\n\n\tprivate static readonly COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-collapsed-highlighted-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tclassName: 'folded-background',\n\t\tminimap: foldedBackgroundMinimap,\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingCollapsedIcon)\n\t});\n\n\tprivate static readonly MANUALLY_COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-collapsed-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingManualCollapsedIcon)\n\t});\n\n\tprivate static readonly MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-collapsed-highlighted-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tclassName: 'folded-background',\n\t\tminimap: foldedBackgroundMinimap,\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingManualCollapsedIcon)\n\t});\n\n\tprivate static readonly NO_CONTROLS_COLLAPSED_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-no-controls-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t});\n\n\tprivate static readonly NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-no-controls-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tafterContentClassName: 'inline-folded',\n\t\tclassName: 'folded-background',\n\t\tminimap: foldedBackgroundMinimap,\n\t\tisWholeLine: true,\n\t\tlinesDecorationsTooltip: collapsed,\n\t});\n\n\tprivate static readonly EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-expanded-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: 'alwaysShowFoldIcons ' + ThemeIcon.asClassName(foldingExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-expanded-auto-hide-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly MANUALLY_EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-expanded-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: 'alwaysShowFoldIcons ' + ThemeIcon.asClassName(foldingManualExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-manually-expanded-auto-hide-visual-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true,\n\t\tfirstLineDecorationClassName: ThemeIcon.asClassName(foldingManualExpandedIcon),\n\t\tlinesDecorationsTooltip: expanded,\n\t});\n\n\tprivate static readonly NO_CONTROLS_EXPANDED_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-no-controls-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,\n\t\tisWholeLine: true\n\t});\n\n\tprivate static readonly HIDDEN_RANGE_DECORATION = ModelDecorationOptions.register({\n\t\tdescription: 'folding-hidden-range-decoration',\n\t\tstickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges\n\t});\n\n\tpublic showFoldingControls: 'always' | 'never' | 'mouseover' = 'mouseover';\n\n\tpublic showFoldingHighlights: boolean = true;\n\n\tconstructor(private readonly editor: ICodeEditor) {\n\t}\n\n\tgetDecorationOption(isCollapsed: boolean, isHidden: boolean, isManual: boolean): IModelDecorationOptions {\n\t\tif (isHidden) { // is inside another collapsed region\n\t\t\treturn FoldingDecorationProvider.HIDDEN_RANGE_DECORATION;\n\t\t}\n\t\tif (this.showFoldingControls === 'never') {\n\t\t\tif (isCollapsed) {\n\t\t\t\treturn this.showFoldingHighlights ? FoldingDecorationProvider.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION : FoldingDecorationProvider.NO_CONTROLS_COLLAPSED_RANGE_DECORATION;\n\t\t\t}\n\t\t\treturn FoldingDecorationProvider.NO_CONTROLS_EXPANDED_RANGE_DECORATION;\n\t\t}\n\t\tif (isCollapsed) {\n\t\t\treturn isManual ?\n\t\t\t\t(this.showFoldingHighlights ? FoldingDecorationProvider.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.MANUALLY_COLLAPSED_VISUAL_DECORATION)\n\t\t\t\t: (this.showFoldingHighlights ? FoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION);\n\t\t} else if (this.showFoldingControls === 'mouseover') {\n\t\t\treturn isManual ? FoldingDecorationProvider.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION : FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION;\n\t\t} else {\n\t\t\treturn isManual ? FoldingDecorationProvider.MANUALLY_EXPANDED_VISUAL_DECORATION : FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION;\n\t\t}\n\t}\n\n\tchangeDecorations<T>(callback: (changeAccessor: IModelDecorationsChangeAccessor) => T): T {\n\t\treturn this.editor.changeDecorations(callback);\n\t}\n\n\tremoveDecorations(decorationIds: string[]): void {\n\t\tthis.editor.removeDecorations(decorationIds);\n\t}\n}\n"]}
|
|
@@ -9,7 +9,7 @@ class EditorFontZoomIn extends EditorAction {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super({
|
|
11
11
|
id: 'editor.action.fontZoomIn',
|
|
12
|
-
label: nls.localize2(
|
|
12
|
+
label: nls.localize2(1005, "Increase Editor Font Size"),
|
|
13
13
|
precondition: undefined
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@ class EditorFontZoomOut extends EditorAction {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super({
|
|
23
23
|
id: 'editor.action.fontZoomOut',
|
|
24
|
-
label: nls.localize2(
|
|
24
|
+
label: nls.localize2(1006, "Decrease Editor Font Size"),
|
|
25
25
|
precondition: undefined
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -33,7 +33,7 @@ class EditorFontZoomReset extends EditorAction {
|
|
|
33
33
|
constructor() {
|
|
34
34
|
super({
|
|
35
35
|
id: 'editor.action.fontZoomReset',
|
|
36
|
-
label: nls.localize2(
|
|
36
|
+
label: nls.localize2(1007, "Reset Editor Font Size"),
|
|
37
37
|
precondition: undefined
|
|
38
38
|
});
|
|
39
39
|
}
|