Add openQueryDocument API (#16117)

* Add openQueryDocument API

* Remove open call

* Change try name
This commit is contained in:
Charles Gagnon
2021-07-13 17:56:35 -07:00
committed by GitHub
parent a7311764be
commit a0f46fec65
7 changed files with 40 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ import * as azdata from 'azdata';
import { IQueryEvent } from 'sql/workbench/services/query/common/queryModel';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import { URI } from 'vs/base/common/uri';
class ExtHostQueryDocument implements azdata.queryeditor.QueryDocument {
constructor(
@@ -77,4 +78,7 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
});
}
public createQueryDocument(options?: { content?: string }, providerId?: string): Promise<URI> {
return this._proxy.$createQueryDocument(options, providerId).then(data => URI.revive(data));
}
}