Open Scmp file in Schema Compare extension (#20435)

* Open Scmp file in Schema Compare extension

* Address comments and fix failing test

* Addressed comment
This commit is contained in:
Sakshi Sharma
2022-08-24 09:50:22 -07:00
committed by GitHub
parent 87e406caca
commit dc8d703c25
5 changed files with 32 additions and 2 deletions

View File

@@ -1089,6 +1089,19 @@ export class SchemaCompareMainWindow {
}
let fileUri = fileUris[0];
this.openScmpFile(fileUri, true);
}
/**
* Primary functional entrypoint for opening the schema comparison window with the scmp file Uri provided.
* @param fileUri .scmp file URI to open Schema Compare extension with
* @param callFromWithinSC is the call from openScmp? False by default, since it is one of the direct entry points.
*/
public async openScmpFile(fileUri: vscode.Uri, callFromWithinSC: boolean = false): Promise<void> {
if (!callFromWithinSC) {
//Instantiate and open schema compare window if called from "Open in Schema Compare"
await this.launch(undefined, undefined, false, undefined);
}
const service = await this.getService();
let startTime = Date.now();
const result = await service.schemaCompareOpenScmp(fileUri.fsPath);