diff --git a/src/sql/workbench/contrib/queryPlan/common/queryPlanInput.ts b/src/sql/workbench/contrib/queryPlan/common/queryPlanInput.ts index e26cea556f..f68584a6a3 100644 --- a/src/sql/workbench/contrib/queryPlan/common/queryPlanInput.ts +++ b/src/sql/workbench/contrib/queryPlan/common/queryPlanInput.ts @@ -3,13 +3,13 @@ * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EditorInput, EditorModel, IEditorInput } from 'vs/workbench/common/editor'; -import { IFileService } from 'vs/platform/files/common/files'; -import { URI } from 'vs/base/common/uri'; -import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ILanguageAssociation } from 'sql/workbench/services/languageAssociation/common/languageAssociation'; +import { URI } from 'vs/base/common/uri'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { EditorInput, EditorModel, IEditorInput } from 'vs/workbench/common/editor'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput'; export class QueryPlanConverter implements ILanguageAssociation { static readonly languages = ['sqlplan']; @@ -40,7 +40,7 @@ export class QueryPlanInput extends EditorInput { constructor( private _uri: URI, - @IFileService private readonly fileService: IFileService + @ITextFileService private readonly fileService: ITextFileService ) { super(); } @@ -67,7 +67,7 @@ export class QueryPlanInput extends EditorInput { public async resolve(refresh?: boolean): Promise { if (!this._xml) { - this._xml = (await this.fileService.readFile(this._uri)).value.toString(); + this._xml = (await this.fileService.read(this._uri, { acceptTextOnly: true })).value; } return null; }