mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 01:25:38 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -124,8 +124,8 @@ suite('AbstractKeybindingService', () => {
|
||||
let messageService: IMessageService = {
|
||||
_serviceBrand: undefined,
|
||||
hideAll: undefined,
|
||||
confirmSync: undefined,
|
||||
confirm: undefined,
|
||||
confirmWithCheckbox: undefined,
|
||||
show: (sev: Severity, message: any): () => void => {
|
||||
showMessageCalls.push({
|
||||
sev: sev,
|
||||
|
||||
@@ -28,7 +28,7 @@ suite('KeybindingResolver', () => {
|
||||
resolvedKeybinding,
|
||||
command,
|
||||
commandArgs,
|
||||
when,
|
||||
when ? when.normalize() : null,
|
||||
isDefault
|
||||
);
|
||||
}
|
||||
@@ -194,10 +194,14 @@ suite('KeybindingResolver', () => {
|
||||
|
||||
test('contextIsEntirelyIncluded', function () {
|
||||
let assertIsIncluded = (a: ContextKeyExpr[], b: ContextKeyExpr[]) => {
|
||||
assert.equal(KeybindingResolver.whenIsEntirelyIncluded(false, new ContextKeyAndExpr(a), new ContextKeyAndExpr(b)), true);
|
||||
let tmpA = new ContextKeyAndExpr(a).normalize();
|
||||
let tmpB = new ContextKeyAndExpr(b).normalize();
|
||||
assert.equal(KeybindingResolver.whenIsEntirelyIncluded(tmpA, tmpB), true);
|
||||
};
|
||||
let assertIsNotIncluded = (a: ContextKeyExpr[], b: ContextKeyExpr[]) => {
|
||||
assert.equal(KeybindingResolver.whenIsEntirelyIncluded(false, new ContextKeyAndExpr(a), new ContextKeyAndExpr(b)), false);
|
||||
let tmpA = new ContextKeyAndExpr(a).normalize();
|
||||
let tmpB = new ContextKeyAndExpr(b).normalize();
|
||||
assert.equal(KeybindingResolver.whenIsEntirelyIncluded(tmpA, tmpB), false);
|
||||
};
|
||||
let key1IsTrue = ContextKeyExpr.equals('key1', true);
|
||||
let key1IsNotFalse = ContextKeyExpr.notEquals('key1', false);
|
||||
|
||||
@@ -7,19 +7,17 @@
|
||||
import { ResolvedKeybinding, Keybinding, SimpleKeybinding } from 'vs/base/common/keyCodes';
|
||||
import Event from 'vs/base/common/event';
|
||||
import { IKeybindingService, IKeybindingEvent, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextKey, IContextKeyService, IContextKeyServiceTarget, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextKey, IContextKeyService, IContextKeyServiceTarget, ContextKeyExpr, IContextKeyChangeEvent } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IResolveResult } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
|
||||
import { OS } from 'vs/base/common/platform';
|
||||
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
|
||||
|
||||
class MockKeybindingContextKey<T> implements IContextKey<T> {
|
||||
private _key: string;
|
||||
private _defaultValue: T;
|
||||
private _value: T;
|
||||
|
||||
constructor(key: string, defaultValue: T) {
|
||||
this._key = key;
|
||||
constructor(defaultValue: T) {
|
||||
this._defaultValue = defaultValue;
|
||||
this._value = this._defaultValue;
|
||||
}
|
||||
@@ -46,14 +44,14 @@ export class MockContextKeyService implements IContextKeyService {
|
||||
//
|
||||
}
|
||||
public createKey<T>(key: string, defaultValue: T): IContextKey<T> {
|
||||
let ret = new MockKeybindingContextKey(key, defaultValue);
|
||||
let ret = new MockKeybindingContextKey(defaultValue);
|
||||
this._keys.set(key, ret);
|
||||
return ret;
|
||||
}
|
||||
public contextMatchesRules(rules: ContextKeyExpr): boolean {
|
||||
return false;
|
||||
}
|
||||
public get onDidChangeContext(): Event<string[]> {
|
||||
public get onDidChangeContext(): Event<IContextKeyChangeEvent> {
|
||||
return Event.None;
|
||||
}
|
||||
public getContextKeyValue(key: string) {
|
||||
|
||||
Reference in New Issue
Block a user