Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)

* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79

* Fix breaks

* Extension management fixes

* Fix breaks in windows bundling

* Fix/skip failing tests

* Update distro

* Add clear to nuget.config

* Add hygiene task

* Bump distro

* Fix hygiene issue

* Add build to hygiene exclusion

* Update distro

* Update hygiene

* Hygiene exclusions

* Update tsconfig

* Bump distro for server breaks

* Update build config

* Update darwin path

* Add done calls to notebook tests

* Skip failing tests

* Disable smoke tests
This commit is contained in:
Karl Burtram
2021-02-09 16:15:05 -08:00
committed by GitHub
parent 6f192f9af5
commit ce612a3d96
1929 changed files with 68012 additions and 34564 deletions

View File

@@ -383,14 +383,9 @@ function printWhenExplanation(when: ContextKeyExpression | undefined): string {
}
function printSourceExplanation(kb: ResolvedKeybindingItem): string {
if (kb.isDefault) {
if (kb.extensionId) {
return `built-in extension ${kb.extensionId}`;
}
return `built-in`;
}
if (kb.extensionId) {
return `user extension ${kb.extensionId}`;
}
return `user`;
return (
kb.extensionId
? (kb.isBuiltinExtension ? `built-in extension ${kb.extensionId}` : `user extension ${kb.extensionId}`)
: (kb.isDefault ? `built-in` : `user`)
);
}

View File

@@ -17,6 +17,7 @@ export interface IKeybindingItem {
weight1: number;
weight2: number;
extensionId: string | null;
isBuiltinExtension: boolean;
}
export interface IKeybindings {
@@ -53,6 +54,7 @@ export interface IKeybindingRule2 {
weight: number;
when: ContextKeyExpression | undefined;
extensionId?: string;
isBuiltinExtension?: boolean;
}
export const enum KeybindingWeight {
@@ -164,7 +166,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
when: rule.when,
weight1: rule.weight,
weight2: 0,
extensionId: rule.extensionId || null
extensionId: rule.extensionId || null,
isBuiltinExtension: rule.isBuiltinExtension || false
};
}
}
@@ -223,7 +226,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
when: when,
weight1: weight1,
weight2: weight2,
extensionId: null
extensionId: null,
isBuiltinExtension: false
});
this._cachedMergedKeybindings = null;
}

View File

@@ -18,8 +18,9 @@ export class ResolvedKeybindingItem {
public readonly when: ContextKeyExpression | undefined;
public readonly isDefault: boolean;
public readonly extensionId: string | null;
public readonly isBuiltinExtension: boolean;
constructor(resolvedKeybinding: ResolvedKeybinding | undefined, command: string | null, commandArgs: any, when: ContextKeyExpression | undefined, isDefault: boolean, extensionId: string | null) {
constructor(resolvedKeybinding: ResolvedKeybinding | undefined, command: string | null, commandArgs: any, when: ContextKeyExpression | undefined, isDefault: boolean, extensionId: string | null, isBuiltinExtension: boolean) {
this.resolvedKeybinding = resolvedKeybinding;
this.keypressParts = resolvedKeybinding ? removeElementsAfterNulls(resolvedKeybinding.getDispatchParts()) : [];
this.bubble = (command ? command.charCodeAt(0) === CharCode.Caret : false);
@@ -28,6 +29,7 @@ export class ResolvedKeybindingItem {
this.when = when;
this.isDefault = isDefault;
this.extensionId = extensionId;
this.isBuiltinExtension = isBuiltinExtension;
}
}

View File

@@ -120,7 +120,8 @@ suite('AbstractKeybindingService', () => {
createScoped: undefined!,
getContext: (target: IContextKeyServiceTarget): any => {
return currentContextValue;
}
},
updateParent: () => { }
};
let commandService: ICommandService = {
@@ -191,7 +192,8 @@ suite('AbstractKeybindingService', () => {
null,
when,
true,
null
null,
false
);
}

View File

@@ -28,7 +28,8 @@ suite('KeybindingResolver', () => {
commandArgs,
when,
isDefault,
null
null,
false
);
}

View File

@@ -66,6 +66,18 @@ export class MockContextKeyService implements IContextKeyService {
public createScoped(domNode: HTMLElement): IContextKeyService {
return this;
}
updateParent(_parentContextKeyService: IContextKeyService): void {
// no-op
}
}
export class MockScopableContextKeyService extends MockContextKeyService {
/**
* Don't implement this for all tests since we rarely depend on this behavior and it isn't implemented fully
*/
public createScoped(domNote: HTMLElement): IContextKeyService {
return new MockContextKeyService();
}
}
export class MockKeybindingService implements IKeybindingService {