Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -40,12 +40,13 @@ export class KeybindingResolver {
this._keybindings = KeybindingResolver.combine(defaultKeybindings, overrides);
for (let i = 0, len = this._keybindings.length; i < len; i++) {
let k = this._keybindings[i];
if (k.keypressFirstPart === null) {
if (k.keypressParts.length === 0) {
// unbound
continue;
}
this._addKeyPress(k.keypressFirstPart, k);
// TODO@chords
this._addKeyPress(k.keypressParts[0], k);
}
}
@@ -53,10 +54,12 @@ export class KeybindingResolver {
if (defaultKb.command !== command) {
return false;
}
if (keypressFirstPart && defaultKb.keypressFirstPart !== keypressFirstPart) {
// TODO@chords
if (keypressFirstPart && defaultKb.keypressParts[0] !== keypressFirstPart) {
return false;
}
if (keypressChordPart && defaultKb.keypressChordPart !== keypressChordPart) {
// TODO@chords
if (keypressChordPart && defaultKb.keypressParts[1] !== keypressChordPart) {
return false;
}
if (when) {
@@ -84,8 +87,9 @@ export class KeybindingResolver {
}
const command = override.command.substr(1);
const keypressFirstPart = override.keypressFirstPart;
const keypressChordPart = override.keypressChordPart;
// TODO@chords
const keypressFirstPart = override.keypressParts[0];
const keypressChordPart = override.keypressParts[1];
const when = override.when;
for (let j = defaults.length - 1; j >= 0; j--) {
if (this._isTargetedForRemoval(defaults[j], keypressFirstPart, keypressChordPart, command, when)) {
@@ -114,10 +118,11 @@ export class KeybindingResolver {
continue;
}
const conflictIsChord = (conflict.keypressChordPart !== null);
const itemIsChord = (item.keypressChordPart !== null);
const conflictIsChord = (conflict.keypressParts.length > 1);
const itemIsChord = (item.keypressParts.length > 1);
if (conflictIsChord && itemIsChord && conflict.keypressChordPart !== item.keypressChordPart) {
// TODO@chords
if (conflictIsChord && itemIsChord && conflict.keypressParts[1] !== item.keypressParts[1]) {
// The conflict only shares the chord start with this command
continue;
}
@@ -247,7 +252,8 @@ export class KeybindingResolver {
lookupMap = [];
for (let i = 0, len = candidates.length; i < len; i++) {
let candidate = candidates[i];
if (candidate.keypressChordPart === keypress) {
// TODO@chords
if (candidate.keypressParts[1] === keypress) {
lookupMap.push(candidate);
}
}
@@ -266,7 +272,8 @@ export class KeybindingResolver {
return null;
}
if (currentChord === null && result.keypressChordPart !== null) {
// TODO@chords
if (currentChord === null && result.keypressParts.length > 1 && result.keypressParts[1] !== null) {
return {
enterChord: true,
commandId: null,
@@ -307,29 +314,31 @@ export class KeybindingResolver {
public static getAllUnboundCommands(boundCommands: Map<string, boolean>): string[] {
const unboundCommands: string[] = [];
const seenMap: Map<string, boolean> = new Map<string, boolean>();
const addCommand = id => {
const addCommand = (id: string, includeCommandWithArgs: boolean) => {
if (seenMap.has(id)) {
return;
}
seenMap.set(id);
seenMap.set(id, true);
if (id[0] === '_' || id.indexOf('vscode.') === 0) { // private command
return;
}
if (boundCommands.get(id) === true) {
return;
}
const command = CommandsRegistry.getCommand(id);
if (command && typeof command.description === 'object'
&& isNonEmptyArray((<ICommandHandlerDescription>command.description).args)) { // command with args
return;
if (!includeCommandWithArgs) {
const command = CommandsRegistry.getCommand(id);
if (command && typeof command.description === 'object'
&& isNonEmptyArray((<ICommandHandlerDescription>command.description).args)) { // command with args
return;
}
}
unboundCommands.push(id);
};
for (const id in MenuRegistry.getCommands()) {
addCommand(id);
addCommand(id, true);
}
for (const id in CommandsRegistry.getCommands()) {
addCommand(id);
addCommand(id, false);
}
return unboundCommands;