Path: blob/main/src/vs/workbench/contrib/emmet/browser/actions/expandAbbreviation.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/4import * as nls from '../../../../../nls.js';5import { EmmetEditorAction } from '../emmetActions.js';6import { registerEditorAction } from '../../../../../editor/browser/editorExtensions.js';7import { EditorContextKeys } from '../../../../../editor/common/editorContextKeys.js';8import { KeyCode } from '../../../../../base/common/keyCodes.js';9import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js';10import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js';11import { MenuId } from '../../../../../platform/actions/common/actions.js';1213class ExpandAbbreviationAction extends EmmetEditorAction {1415constructor() {16super({17id: 'editor.emmet.action.expandAbbreviation',18label: nls.localize2('expandAbbreviationAction', "Emmet: Expand Abbreviation"),19precondition: EditorContextKeys.writable,20actionName: 'expand_abbreviation',21kbOpts: {22primary: KeyCode.Tab,23kbExpr: ContextKeyExpr.and(24EditorContextKeys.editorTextFocus,25EditorContextKeys.tabDoesNotMoveFocus,26ContextKeyExpr.has('config.emmet.triggerExpansionOnTab')27),28weight: KeybindingWeight.EditorContrib29},30menuOpts: {31menuId: MenuId.MenubarEditMenu,32group: '5_insert',33title: nls.localize({ key: 'miEmmetExpandAbbreviation', comment: ['&& denotes a mnemonic'] }, "Emmet: E&&xpand Abbreviation"),34order: 335}36});3738}39}4041registerEditorAction(ExpandAbbreviationAction);424344