enable provider/extension side copy to clipboard support (#23363)

* improve copy data experience

* add copy result handler

* refactoring

* updates

* add thirdparty notice for TextCopy nuget package

* add await

* comments
This commit is contained in:
Alan Ren
2023-06-09 14:24:45 -07:00
committed by GitHub
parent 80b733ebe0
commit 58082402aa
24 changed files with 217 additions and 104 deletions

View File

@@ -414,6 +414,15 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
return this._resolveProvider<azdata.QueryProvider>(handle).saveResults(requestParams);
}
override $copyResults(handle: number, requestParams: azdata.CopyResultsRequestParams): Thenable<void> {
const provider = this._resolveProvider<azdata.QueryProvider>(handle);
if (provider.copyResults) {
return provider.copyResults(requestParams);
} else {
throw new Error(`copyResults() is not implemented by the provider`);
}
}
// Edit Data handlers
override $commitEdit(handle: number, ownerUri: string): Thenable<void> {
return this._resolveProvider<azdata.QueryProvider>(handle).commitEdit(ownerUri);