mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 17:23:35 -05:00
Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
This commit is contained in:
@@ -11,7 +11,7 @@ import { KeyCode, Keybinding, ResolvedKeybinding } from 'vs/base/common/keyCodes
|
||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IContextKeyService, IContextKeyServiceTarget } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IKeybindingEvent, IKeybindingService, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IKeybindingEvent, IKeybindingService, IKeyboardEvent, KeybindingsSchemaContribution } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IResolveResult, KeybindingResolver } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
@@ -57,6 +57,7 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
|
||||
public abstract resolveKeybinding(keybinding: Keybinding): ResolvedKeybinding[];
|
||||
public abstract resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding;
|
||||
public abstract resolveUserBinding(userBinding: string): ResolvedKeybinding[];
|
||||
public abstract registerSchemaContribution(contribution: KeybindingsSchemaContribution): void;
|
||||
public abstract _dumpDebugInfo(): string;
|
||||
public abstract _dumpDebugInfoJSON(): string;
|
||||
|
||||
@@ -64,11 +65,11 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
|
||||
return '';
|
||||
}
|
||||
|
||||
public getDefaultKeybindings(): ResolvedKeybindingItem[] {
|
||||
public getDefaultKeybindings(): readonly ResolvedKeybindingItem[] {
|
||||
return this._getResolver().getDefaultKeybindings();
|
||||
}
|
||||
|
||||
public getKeybindings(): ResolvedKeybindingItem[] {
|
||||
public getKeybindings(): readonly ResolvedKeybindingItem[] {
|
||||
return this._getResolver().getKeybindings();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { KeyCode, Keybinding, ResolvedKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import { Keybinding, KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { IContextKeyServiceTarget } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IResolveResult } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
@@ -38,6 +39,12 @@ export interface IKeyboardEvent {
|
||||
readonly code: string;
|
||||
}
|
||||
|
||||
export interface KeybindingsSchemaContribution {
|
||||
readonly onDidChange?: Event<void>;
|
||||
|
||||
getSchemaAdditions(): IJSONSchema[];
|
||||
}
|
||||
|
||||
export const IKeybindingService = createDecorator<IKeybindingService>('keybindingService');
|
||||
|
||||
export interface IKeybindingService {
|
||||
@@ -80,9 +87,9 @@ export interface IKeybindingService {
|
||||
|
||||
getDefaultKeybindingsContent(): string;
|
||||
|
||||
getDefaultKeybindings(): ResolvedKeybindingItem[];
|
||||
getDefaultKeybindings(): readonly ResolvedKeybindingItem[];
|
||||
|
||||
getKeybindings(): ResolvedKeybindingItem[];
|
||||
getKeybindings(): readonly ResolvedKeybindingItem[];
|
||||
|
||||
customKeybindingsCount(): number;
|
||||
|
||||
@@ -92,6 +99,8 @@ export interface IKeybindingService {
|
||||
*/
|
||||
mightProducePrintableCharacter(event: IKeyboardEvent): boolean;
|
||||
|
||||
registerSchemaContribution(contribution: KeybindingsSchemaContribution): void;
|
||||
|
||||
_dumpDebugInfo(): string;
|
||||
_dumpDebugInfoJSON(): string;
|
||||
}
|
||||
|
||||
@@ -215,11 +215,11 @@ export class KeybindingResolver {
|
||||
return this._defaultBoundCommands;
|
||||
}
|
||||
|
||||
public getDefaultKeybindings(): ResolvedKeybindingItem[] {
|
||||
public getDefaultKeybindings(): readonly ResolvedKeybindingItem[] {
|
||||
return this._defaultKeybindings;
|
||||
}
|
||||
|
||||
public getKeybindings(): ResolvedKeybindingItem[] {
|
||||
public getKeybindings(): readonly ResolvedKeybindingItem[] {
|
||||
return this._keybindings;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,10 @@ suite('AbstractKeybindingService', () => {
|
||||
public _dumpDebugInfoJSON(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
public registerSchemaContribution() {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null!;
|
||||
|
||||
@@ -141,4 +141,8 @@ export class MockKeybindingService implements IKeybindingService {
|
||||
public _dumpDebugInfoJSON(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
public registerSchemaContribution() {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user