Merge VS Code 1.21 source code (#1067)

* Initial VS Code 1.21 file copy with patches

* A few more merges

* Post npm install

* Fix batch of build breaks

* Fix more build breaks

* Fix more build errors

* Fix more build breaks

* Runtime fixes 1

* Get connection dialog working with some todos

* Fix a few packaging issues

* Copy several node_modules to package build to fix loader issues

* Fix breaks from master

* A few more fixes

* Make tests pass

* First pass of license header updates

* Second pass of license header updates

* Fix restore dialog issues

* Remove add additional themes menu items

* fix select box issues where the list doesn't show up

* formatting

* Fix editor dispose issue

* Copy over node modules to correct location on all platforms
This commit is contained in:
Karl Burtram
2018-04-04 15:27:51 -07:00
committed by GitHub
parent 5fba3e31b4
commit dafb780987
9412 changed files with 141255 additions and 98813 deletions

View File

@@ -7,7 +7,7 @@
import Event, { Emitter } from 'vs/base/common/event';
import { IDisposable } from 'vs/base/common/lifecycle';
import { IReadOnlyModel } from 'vs/editor/common/editorCommon';
import { ITextModel } from 'vs/editor/common/model';
import { LanguageSelector, score } from 'vs/editor/common/modes/languageSelector';
interface Entry<T> {
@@ -58,11 +58,11 @@ export default class LanguageFeatureRegistry<T> {
};
}
has(model: IReadOnlyModel): boolean {
has(model: ITextModel): boolean {
return this.all(model).length > 0;
}
all(model: IReadOnlyModel): T[] {
all(model: ITextModel): T[] {
if (!model || model.isTooLargeForHavingARichMode()) {
return [];
}
@@ -80,13 +80,13 @@ export default class LanguageFeatureRegistry<T> {
return result;
}
ordered(model: IReadOnlyModel): T[] {
ordered(model: ITextModel): T[] {
const result: T[] = [];
this._orderedForEach(model, entry => result.push(entry.provider));
return result;
}
orderedGroups(model: IReadOnlyModel): T[][] {
orderedGroups(model: ITextModel): T[][] {
const result: T[][] = [];
let lastBucket: T[];
let lastBucketScore: number;
@@ -104,7 +104,7 @@ export default class LanguageFeatureRegistry<T> {
return result;
}
private _orderedForEach(model: IReadOnlyModel, callback: (provider: Entry<T>) => any): void {
private _orderedForEach(model: ITextModel, callback: (provider: Entry<T>) => any): void {
if (!model || model.isTooLargeForHavingARichMode()) {
return;
@@ -122,7 +122,7 @@ export default class LanguageFeatureRegistry<T> {
private _lastCandidate: { uri: string; language: string; };
private _updateScores(model: IReadOnlyModel): void {
private _updateScores(model: ITextModel): void {
let candidate = {
uri: model.uri.toString(),