From cba6c7acc78cf5b6d35c7114b2aa9c7ef0d1f07f Mon Sep 17 00:00:00 2001 From: wangpenglong Date: Thu, 28 Sep 2023 10:44:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4webview=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=9A=84=E5=87=A0=E4=B8=AA=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webview/browser/webview.contribution.ts | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/vs/workbench/contrib/webview/browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/browser/webview.contribution.ts index 098534ac..58d35ec1 100644 --- a/src/vs/workbench/contrib/webview/browser/webview.contribution.ts +++ b/src/vs/workbench/contrib/webview/browser/webview.contribution.ts @@ -5,8 +5,8 @@ import { MultiCommand, RedoCommand, SelectAllCommand, UndoCommand } from 'vs/editor/browser/editorExtensions'; import { CopyAction, CutAction, PasteAction } from 'vs/editor/contrib/clipboard/browser/clipboard'; -import * as nls from 'vs/nls'; -import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; +// import * as nls from 'vs/nls'; +// import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { IWebviewService, IWebview } from 'vs/workbench/contrib/webview/browser/webview'; import { WebviewInput } from 'vs/workbench/contrib/webviewPanel/browser/webviewEditorInput'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -44,32 +44,32 @@ overrideCommandForWebview(CopyAction, webview => webview.copy()); overrideCommandForWebview(PasteAction, webview => webview.paste()); overrideCommandForWebview(CutAction, webview => webview.cut()); -if (CutAction) { - MenuRegistry.appendMenuItem(MenuId.WebviewContext, { - command: { - id: CutAction.id, - title: nls.localize('cut', "Cut"), - }, - order: 1, - }); -} +// if (CutAction) { +// MenuRegistry.appendMenuItem(MenuId.WebviewContext, { +// command: { +// id: CutAction.id, +// title: nls.localize('cut', "Cut"), +// }, +// order: 1, +// }); +// } -if (CopyAction) { - MenuRegistry.appendMenuItem(MenuId.WebviewContext, { - command: { - id: CopyAction.id, - title: nls.localize('copy', "Copy"), - }, - order: 2, - }); -} +// if (CopyAction) { +// MenuRegistry.appendMenuItem(MenuId.WebviewContext, { +// command: { +// id: CopyAction.id, +// title: nls.localize('copy', "Copy"), +// }, +// order: 2, +// }); +// } -if (PasteAction) { - MenuRegistry.appendMenuItem(MenuId.WebviewContext, { - command: { - id: PasteAction.id, - title: nls.localize('paste', "Paste"), - }, - order: 3, - }); -} +// if (PasteAction) { +// MenuRegistry.appendMenuItem(MenuId.WebviewContext, { +// command: { +// id: PasteAction.id, +// title: nls.localize('paste', "Paste"), +// }, +// order: 3, +// }); +// }