mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Adding caching to execution plan and refactoring code and some other fixes (#18913)
* Making ep code modular for easy swithcing in and out * Changing to innerText * Fixing renames * Fixing var name in one file
This commit is contained in:
@@ -15,6 +15,7 @@ export class ExecutionPlanInput extends EditorInput {
|
||||
public static SCHEMA: string = 'executionplan';
|
||||
|
||||
private _content?: string;
|
||||
public _executionPlanFileViewUUID: string;
|
||||
|
||||
constructor(
|
||||
private _uri: URI,
|
||||
@@ -23,6 +24,14 @@ export class ExecutionPlanInput extends EditorInput {
|
||||
super();
|
||||
}
|
||||
|
||||
public get executionPlanFileViewUUID(): string {
|
||||
return this._executionPlanFileViewUUID;
|
||||
}
|
||||
|
||||
public set executionPlanFileViewUUID(v: string) {
|
||||
this._executionPlanFileViewUUID = v;
|
||||
}
|
||||
|
||||
override get typeId(): string {
|
||||
return ExecutionPlanInput.ID;
|
||||
}
|
||||
@@ -31,7 +40,10 @@ export class ExecutionPlanInput extends EditorInput {
|
||||
return path.basename(this._uri.fsPath);
|
||||
}
|
||||
|
||||
public get content(): string | undefined {
|
||||
public async content(): Promise<string> {
|
||||
if (!this._content) {
|
||||
this._content = (await this._fileService.read(this._uri, { acceptTextOnly: true })).value;
|
||||
}
|
||||
return this._content;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user