mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user