当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript KbExpr.and方法代码示例

本文整理汇总了TypeScript中vs/platform/keybinding/common/keybinding.KbExpr.and方法的典型用法代码示例。如果您正苦于以下问题:TypeScript KbExpr.and方法的具体用法?TypeScript KbExpr.and怎么用?TypeScript KbExpr.and使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vs/platform/keybinding/common/keybinding.KbExpr的用法示例。


在下文中一共展示了KbExpr.and方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

	constructor() {
		super(
			'editor.action.removeCommentLine',
			nls.localize('comment.line.remove', "Remove Line Comment"),
			'Remove Line Comment',
			Type.ForceRemove
		);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);

		this.kbOpts = {
			kbExpr: KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable),
			primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_U)
		};
	}
开发者ID:BlackstarSoon,项目名称:vscode,代码行数:15,代码来源:comment.ts

示例2: constructor

	constructor(id:string, label:string, alias:string, left:boolean) {
		super(id, label, alias, true);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);

		this.left = left;
	}
开发者ID:BlackstarSoon,项目名称:vscode,代码行数:7,代码来源:carretOperations.ts

示例3: constructor

	constructor() {
		super(
			'editor.action.showSnippets',
			nls.localize('snippet.suggestions.label', "Insert Snippet"),
			'Insert Snippet',
			true
		);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);
	}
开发者ID:BlackstarSoon,项目名称:vscode,代码行数:10,代码来源:snippetCompletion.ts

示例4: constructor

	constructor() {
		super(
			'editor.action.addCommentLine',
			nls.localize('comment.line.add', "Add Line Comment"),
			'Add Line Comment',
			Type.ForceAdd
		);

		this.kbOpts = {
			kbExpr: KbExpr.and(EditorKbExpr.TextFocus, EditorKbExpr.Writable),
			primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_C)
		};
	}
开发者ID:Suhoy95,项目名称:vscode,代码行数:13,代码来源:comment.ts

示例5: constructor

	constructor() {
		super(
			'editor.action.clipboardCutAction',
			nls.localize('actions.clipboard.cutLabel', "Cut"),
			'Cut',
			true,
			'cut'
		);

		this._precondition = KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable);

		this.kbOpts = {
			kbExpr: KbExpr.and(EditorContextKeys.TextFocus, EditorContextKeys.Writable),
			primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
			win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] }
		};

		this.menuOpts = {
			kbExpr: EditorContextKeys.Writable,
			menu: MenuId.EditorContext,
			group: CLIPBOARD_CONTEXT_MENU_GROUP,
			order: 1
		};
	}
开发者ID:BlackstarSoon,项目名称:vscode,代码行数:24,代码来源:clipboard.ts

示例6: constructor

	constructor() {
		super(
			'editor.emmet.action.expandAbbreviation',
			nls.localize('expandAbbreviationAction', "Emmet: Expand Abbreviation"),
			'Emmet: Expand Abbreviation',
			'expand_abbreviation',
			{
				primary: KeyCode.Tab,
				kbExpr: KbExpr.and(
					EditorContextKeys.TextFocus,
					EditorContextKeys.HasOnlyEmptySelection,
					EditorContextKeys.HasSingleSelection,
					EditorContextKeys.TabDoesNotMoveFocus,
					KbExpr.has('config.emmet.triggerExpansionOnTab')
				)
			}
		);
	}
开发者ID:bobmagicii,项目名称:vscode,代码行数:18,代码来源:expandAbbreviation.ts

示例7: constructor

	constructor() {
		super(
			'editor.action.quickOutline',
			nls.localize('QuickOutlineAction.label', "Go to Symbol..."),
			'Go to Symbol...',
			nls.localize('quickOutlineActionInput', "Type the name of an identifier you wish to navigate to")
		);

		this._precondition = KbExpr.and(EditorContextKeys.Focus, ModeContextKeys.hasDocumentSymbolProvider);

		this.kbOpts = {
			kbExpr: EditorContextKeys.Focus,
			primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O
		};

		this.menuOpts = {
			group: 'navigation',
			order: 3,
			kbExpr: ModeContextKeys.hasDocumentSymbolProvider
		};
	}
开发者ID:BlackstarSoon,项目名称:vscode,代码行数:21,代码来源:quickOutline.ts


注:本文中的vs/platform/keybinding/common/keybinding.KbExpr.and方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。