mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
SQL Operations Studio Public Preview 1 (0.23) release source code
This commit is contained in:
20
src/vs/platform/clipboard/common/clipboardService.ts
Normal file
20
src/vs/platform/clipboard/common/clipboardService.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export const IClipboardService = createDecorator<IClipboardService>('clipboardService');
|
||||
|
||||
export interface IClipboardService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
/**
|
||||
* Writes text to the system clipboard.
|
||||
*/
|
||||
writeText(text: string): void;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { clipboard } from 'electron';
|
||||
|
||||
export class ClipboardService implements IClipboardService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
public writeText(text: string): void {
|
||||
clipboard.writeText(text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user