@@ -1424,6 +1424,40 @@ export interface WebviewsMain {
14241424 $unregisterSerializer ( viewType : string ) : void ;
14251425}
14261426
1427+ export interface CustomEditorsExt {
1428+ $resolveWebviewEditor (
1429+ resource : UriComponents ,
1430+ newWebviewHandle : string ,
1431+ viewType : string ,
1432+ title : string ,
1433+ position : number ,
1434+ options : theia . WebviewPanelOptions ,
1435+ cancellation : CancellationToken ) : Promise < void > ;
1436+ $createCustomDocument ( resource : UriComponents , viewType : string , backupId : string | undefined , cancellation : CancellationToken ) : Promise < { editable : boolean } > ;
1437+ $disposeCustomDocument ( resource : UriComponents , viewType : string ) : Promise < void > ;
1438+ $undo ( resource : UriComponents , viewType : string , editId : number , isDirty : boolean ) : Promise < void > ;
1439+ $redo ( resource : UriComponents , viewType : string , editId : number , isDirty : boolean ) : Promise < void > ;
1440+ $revert ( resource : UriComponents , viewType : string , cancellation : CancellationToken ) : Promise < void > ;
1441+ $disposeEdits ( resourceComponents : UriComponents , viewType : string , editIds : number [ ] ) : void ;
1442+ $onSave ( resource : UriComponents , viewType : string , cancellation : CancellationToken ) : Promise < void > ;
1443+ $onSaveAs ( resource : UriComponents , viewType : string , targetResource : UriComponents , cancellation : CancellationToken ) : Promise < void > ;
1444+ // $backup(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<string>;
1445+ $onMoveCustomEditor ( handle : string , newResource : UriComponents , viewType : string ) : Promise < void > ;
1446+ }
1447+
1448+ export interface CustomTextEditorCapabilities {
1449+ readonly supportsMove ?: boolean ;
1450+ }
1451+
1452+ export interface CustomEditorsMain {
1453+ $registerTextEditorProvider ( viewType : string , options : theia . WebviewPanelOptions , capabilities : CustomTextEditorCapabilities ) : void ;
1454+ $registerCustomEditorProvider ( viewType : string , options : theia . WebviewPanelOptions , supportsMultipleEditorsPerDocument : boolean ) : void ;
1455+ $unregisterEditorProvider ( viewType : string ) : void ;
1456+ $createCustomEditorPanel ( handle : string , title : string , viewColumn : theia . ViewColumn | undefined , options : theia . WebviewPanelOptions & theia . WebviewOptions ) : Promise < void > ;
1457+ $onDidEdit ( resource : UriComponents , viewType : string , editId : number , label : string | undefined ) : void ;
1458+ $onContentChange ( resource : UriComponents , viewType : string ) : void ;
1459+ }
1460+
14271461export interface StorageMain {
14281462 $set ( key : string , value : KeysToAnyValues , isGlobal : boolean ) : Promise < boolean > ;
14291463 $get ( key : string , isGlobal : boolean ) : Promise < KeysToAnyValues > ;
@@ -1562,6 +1596,7 @@ export const PLUGIN_RPC_CONTEXT = {
15621596 LANGUAGES_MAIN : createProxyIdentifier < LanguagesMain > ( 'LanguagesMain' ) ,
15631597 CONNECTION_MAIN : createProxyIdentifier < ConnectionMain > ( 'ConnectionMain' ) ,
15641598 WEBVIEWS_MAIN : createProxyIdentifier < WebviewsMain > ( 'WebviewsMain' ) ,
1599+ CUSTOM_EDITORS_MAIN : createProxyIdentifier < CustomEditorsMain > ( 'CustomEditorsMain' ) ,
15651600 STORAGE_MAIN : createProxyIdentifier < StorageMain > ( 'StorageMain' ) ,
15661601 TASKS_MAIN : createProxyIdentifier < TasksMain > ( 'TasksMain' ) ,
15671602 DEBUG_MAIN : createProxyIdentifier < DebugMain > ( 'DebugMain' ) ,
@@ -1594,6 +1629,7 @@ export const MAIN_RPC_CONTEXT = {
15941629 LANGUAGES_EXT : createProxyIdentifier < LanguagesExt > ( 'LanguagesExt' ) ,
15951630 CONNECTION_EXT : createProxyIdentifier < ConnectionExt > ( 'ConnectionExt' ) ,
15961631 WEBVIEWS_EXT : createProxyIdentifier < WebviewsExt > ( 'WebviewsExt' ) ,
1632+ CUSTOM_EDITORS_EXT : createProxyIdentifier < CustomEditorsExt > ( 'CustomEditorsExt' ) ,
15971633 STORAGE_EXT : createProxyIdentifier < StorageExt > ( 'StorageExt' ) ,
15981634 TASKS_EXT : createProxyIdentifier < TasksExt > ( 'TasksExt' ) ,
15991635 DEBUG_EXT : createProxyIdentifier < DebugExt > ( 'DebugExt' ) ,
@@ -1604,7 +1640,8 @@ export const MAIN_RPC_CONTEXT = {
16041640 LABEL_SERVICE_EXT : createProxyIdentifier < LabelServiceExt > ( 'LabelServiceExt' ) ,
16051641 TIMELINE_EXT : createProxyIdentifier < TimelineExt > ( 'TimeLineExt' ) ,
16061642 THEMING_EXT : createProxyIdentifier < ThemingExt > ( 'ThemingExt' ) ,
1607- COMMENTS_EXT : createProxyIdentifier < CommentsExt > ( 'CommentsExt' ) } ;
1643+ COMMENTS_EXT : createProxyIdentifier < CommentsExt > ( 'CommentsExt' )
1644+ } ;
16081645
16091646export interface TasksExt {
16101647 $provideTasks ( handle : number , token ?: CancellationToken ) : Promise < TaskDto [ ] | undefined > ;
0 commit comments