mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
Distinguish context key factory from type
This commit is contained in:
@@ -15,7 +15,7 @@ import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { ITextModelService } from 'vs/editor/common/services/resolverService';
|
||||
import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
|
||||
import { CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
|
||||
import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ContextKeyExpr, IContextKeyService, ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConstructorSignature1, ServicesAccessor as InstantiationServicesAccessor, BrandedService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IKeybindings, KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
@@ -39,26 +39,26 @@ export interface IDiffEditorContributionDescription {
|
||||
//#region Command
|
||||
|
||||
export interface ICommandKeybindingsOptions extends IKeybindings {
|
||||
kbExpr?: ContextKeyExpr | null;
|
||||
kbExpr?: ContextKeyExpression | null;
|
||||
weight: number;
|
||||
}
|
||||
export interface ICommandMenuOptions {
|
||||
menuId: MenuId;
|
||||
group: string;
|
||||
order: number;
|
||||
when?: ContextKeyExpr;
|
||||
when?: ContextKeyExpression;
|
||||
title: string;
|
||||
}
|
||||
export interface ICommandOptions {
|
||||
id: string;
|
||||
precondition: ContextKeyExpr | undefined;
|
||||
precondition: ContextKeyExpression | undefined;
|
||||
kbOpts?: ICommandKeybindingsOptions;
|
||||
description?: ICommandHandlerDescription;
|
||||
menuOpts?: ICommandMenuOptions | ICommandMenuOptions[];
|
||||
}
|
||||
export abstract class Command {
|
||||
public readonly id: string;
|
||||
public readonly precondition: ContextKeyExpr | undefined;
|
||||
public readonly precondition: ContextKeyExpression | undefined;
|
||||
private readonly _kbOpts: ICommandKeybindingsOptions | undefined;
|
||||
private readonly _menuOpts: ICommandMenuOptions | ICommandMenuOptions[] | undefined;
|
||||
private readonly _description: ICommandHandlerDescription | undefined;
|
||||
@@ -193,7 +193,7 @@ export abstract class EditorCommand extends Command {
|
||||
export interface IEditorActionContextMenuOptions {
|
||||
group: string;
|
||||
order: number;
|
||||
when?: ContextKeyExpr;
|
||||
when?: ContextKeyExpression;
|
||||
menuId?: MenuId;
|
||||
}
|
||||
export interface IActionOptions extends ICommandOptions {
|
||||
|
||||
Reference in New Issue
Block a user