mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 09:42:34 -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:
@@ -8,14 +8,14 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { first } from 'vs/base/common/async';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IModel } from 'vs/editor/common/editorCommon';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { IDisposable, toDisposable, IReference, ReferenceCollection, ImmortalReference } from 'vs/base/common/lifecycle';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import network = require('vs/base/common/network');
|
||||
import { ITextModelService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService';
|
||||
import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService';
|
||||
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
|
||||
import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel';
|
||||
|
||||
class ResourceModelCollection extends ReferenceCollection<TPromise<ITextEditorModel>> {
|
||||
@@ -81,7 +81,7 @@ class ResourceModelCollection extends ReferenceCollection<TPromise<ITextEditorMo
|
||||
});
|
||||
}
|
||||
|
||||
private resolveTextModelContent(key: string): TPromise<IModel> {
|
||||
private resolveTextModelContent(key: string): TPromise<ITextModel> {
|
||||
const resource = URI.parse(key);
|
||||
const providers = this.providers[resource.scheme] || [];
|
||||
const factories = providers.map(p => () => p.provideTextContent(resource));
|
||||
@@ -89,7 +89,7 @@ class ResourceModelCollection extends ReferenceCollection<TPromise<ITextEditorMo
|
||||
return first(factories).then(model => {
|
||||
if (!model) {
|
||||
console.error(`Unable to open '${resource}' resource is not available.`); // TODO PII
|
||||
return TPromise.wrapError<IModel>(new Error('resource is not available'));
|
||||
return TPromise.wrapError<ITextModel>(new Error('resource is not available'));
|
||||
}
|
||||
|
||||
return model;
|
||||
@@ -119,7 +119,7 @@ export class TextModelResolverService implements ITextModelService {
|
||||
|
||||
// Untitled Schema: go through cached input
|
||||
// TODO ImmortalReference is a hack
|
||||
if (resource.scheme === UNTITLED_SCHEMA) {
|
||||
if (resource.scheme === network.Schemas.untitled) {
|
||||
return this.untitledEditorService.loadOrCreate({ resource }).then(model => new ImmortalReference(model));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user