mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Copy clipboard command in ADS (html/plain text supported) (#13527)
* draft commit * few changes * Changes to copy query with results in plain and html formatting * undo changes * undo unintended change * remove comments * Addressed comments * Some clean up Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { ClipboardData, IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; // {{SQL CARBON EDIT}}
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
@@ -20,6 +20,11 @@ export class NativeClipboardService implements IClipboardService {
|
||||
@IElectronService private readonly electronService: IElectronService
|
||||
) { }
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
async write(data: ClipboardData, type?: 'selection' | 'clipboard'): Promise<void> {
|
||||
return this.electronService.writeClipboardData(data, type);
|
||||
}
|
||||
|
||||
async writeText(text: string, type?: 'selection' | 'clipboard'): Promise<void> {
|
||||
return this.electronService.writeClipboardText(text, type);
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ export class TestElectronService implements IElectronService {
|
||||
async toggleDevTools(): Promise<void> { }
|
||||
async resolveProxy(url: string): Promise<string | undefined> { return undefined; }
|
||||
async readClipboardText(type?: 'selection' | 'clipboard' | undefined): Promise<string> { return ''; }
|
||||
async writeClipboardData(data: any, type?: 'selection' | 'clipboard' | undefined): Promise<void> { } // {{SQL CARBON EDIT}}
|
||||
async writeClipboardText(text: string, type?: 'selection' | 'clipboard' | undefined): Promise<void> { }
|
||||
async readClipboardFindText(): Promise<string> { return ''; }
|
||||
async writeClipboardFindText(text: string): Promise<void> { }
|
||||
|
||||
Reference in New Issue
Block a user