|
5 | 5 |
|
6 | 6 | import { MultiCommand, RedoCommand, SelectAllCommand, UndoCommand } from 'vs/editor/browser/editorExtensions'; |
7 | 7 | import { CopyAction, CutAction, PasteAction } from 'vs/editor/contrib/clipboard/clipboard'; |
8 | | -import { localize } from 'vs/nls'; |
9 | | -import { registerAction2 } from 'vs/platform/actions/common/actions'; |
10 | | -import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; |
11 | | -import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; |
12 | | -import { Registry } from 'vs/platform/registry/common/platform'; |
13 | | -import { EditorDescriptor, Extensions as EditorExtensions, IEditorRegistry } from 'vs/workbench/browser/editor'; |
14 | | -import { Extensions as EditorInputExtensions, IEditorInputFactoryRegistry } from 'vs/workbench/common/editor'; |
15 | 8 | import { IWebviewService, Webview } from 'vs/workbench/contrib/webview/browser/webview'; |
16 | | -import { WebviewEditorInputFactory } from 'vs/workbench/contrib/webview/browser/webviewEditorInputFactory'; |
17 | | -import { HideWebViewEditorFindCommand, ReloadWebviewAction, ShowWebViewEditorFindWidgetAction, WebViewEditorFindNextCommand, WebViewEditorFindPreviousCommand } from '../browser/webviewCommands'; |
18 | | -import { WebviewEditor } from './webviewEditor'; |
19 | | -import { WebviewInput } from './webviewEditorInput'; |
20 | | -import { IWebviewWorkbenchService, WebviewEditorService } from './webviewWorkbenchService'; |
21 | | - |
22 | | -(Registry.as<IEditorRegistry>(EditorExtensions.Editors)).registerEditor(EditorDescriptor.create( |
23 | | - WebviewEditor, |
24 | | - WebviewEditor.ID, |
25 | | - localize('webview.editor.label', "webview editor")), |
26 | | - [new SyncDescriptor(WebviewInput)]); |
27 | | - |
28 | | -Registry.as<IEditorInputFactoryRegistry>(EditorInputExtensions.EditorInputFactories).registerEditorInputFactory( |
29 | | - WebviewEditorInputFactory.ID, |
30 | | - WebviewEditorInputFactory); |
31 | | - |
32 | | -registerSingleton(IWebviewWorkbenchService, WebviewEditorService, true); |
33 | | - |
34 | | -registerAction2(ShowWebViewEditorFindWidgetAction); |
35 | | -registerAction2(HideWebViewEditorFindCommand); |
36 | | -registerAction2(WebViewEditorFindNextCommand); |
37 | | -registerAction2(WebViewEditorFindPreviousCommand); |
38 | | -registerAction2(ReloadWebviewAction); |
39 | 9 |
|
40 | 10 |
|
41 | 11 | const PRIORITY = 100; |
|
0 commit comments