mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
This reverts commit d15a3fcc98.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as assert from 'assert';
|
||||
import { KeyChord, KeyCode, KeyMod, Keybinding, ResolvedKeybinding, SimpleKeybinding, createKeybinding, createSimpleKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { OS } from 'vs/base/common/platform';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
@@ -13,9 +14,9 @@ import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
|
||||
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
|
||||
import { INotification, INotificationService, IPromptChoice, IPromptOptions, NoOpNotification, IStatusMessageOptions } from 'vs/platform/notification/common/notification';
|
||||
import { INotification, INotificationService, IPromptChoice, IPromptOptions, NoOpNotification } from 'vs/platform/notification/common/notification';
|
||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||
import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
function createContext(ctx: any) {
|
||||
return {
|
||||
@@ -34,9 +35,10 @@ suite('AbstractKeybindingService', () => {
|
||||
resolver: KeybindingResolver,
|
||||
contextKeyService: IContextKeyService,
|
||||
commandService: ICommandService,
|
||||
notificationService: INotificationService
|
||||
notificationService: INotificationService,
|
||||
statusService?: IStatusbarService
|
||||
) {
|
||||
super(contextKeyService, commandService, NullTelemetryService, notificationService);
|
||||
super(contextKeyService, commandService, NullTelemetryService, notificationService, statusService);
|
||||
this._resolver = resolver;
|
||||
}
|
||||
|
||||
@@ -127,7 +129,7 @@ suite('AbstractKeybindingService', () => {
|
||||
};
|
||||
|
||||
let notificationService: INotificationService = {
|
||||
_serviceBrand: {} as ServiceIdentifier<INotificationService>,
|
||||
_serviceBrand: undefined,
|
||||
notify: (notification: INotification) => {
|
||||
showMessageCalls.push({ sev: notification.severity, message: notification.message });
|
||||
return new NoOpNotification();
|
||||
@@ -146,8 +148,13 @@ suite('AbstractKeybindingService', () => {
|
||||
},
|
||||
prompt(severity: Severity, message: string, choices: IPromptChoice[], options?: IPromptOptions) {
|
||||
throw new Error('not implemented');
|
||||
},
|
||||
status(message: string, options?: IStatusMessageOptions) {
|
||||
}
|
||||
};
|
||||
|
||||
let statusbarService: IStatusbarService = {
|
||||
_serviceBrand: undefined,
|
||||
addEntry: undefined!,
|
||||
setStatusMessage: (message: string, autoDisposeAfter?: number, delayBy?: number): IDisposable => {
|
||||
statusMessageCalls!.push(message);
|
||||
return {
|
||||
dispose: () => {
|
||||
@@ -159,7 +166,7 @@ suite('AbstractKeybindingService', () => {
|
||||
|
||||
let resolver = new KeybindingResolver(items, []);
|
||||
|
||||
return new TestKeybindingService(resolver, contextKeyService, commandService, notificationService);
|
||||
return new TestKeybindingService(resolver, contextKeyService, commandService, notificationService, statusbarService);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user