@@ -1440,6 +1440,40 @@ export interface WebviewsMain {
14401440 $unregisterSerializer ( viewType : string ) : void ;
14411441}
14421442
1443+ export interface CustomEditorsExt {
1444+ $resolveWebviewEditor (
1445+ resource : UriComponents ,
1446+ newWebviewHandle : string ,
1447+ viewType : string ,
1448+ title : string ,
1449+ position : number ,
1450+ options : theia . WebviewPanelOptions ,
1451+ cancellation : CancellationToken ) : Promise < void > ;
1452+ $createCustomDocument ( resource : UriComponents , viewType : string , backupId : string | undefined , cancellation : CancellationToken ) : Promise < { editable : boolean } > ;
1453+ $disposeCustomDocument ( resource : UriComponents , viewType : string ) : Promise < void > ;
1454+ $undo ( resource : UriComponents , viewType : string , editId : number , isDirty : boolean ) : Promise < void > ;
1455+ $redo ( resource : UriComponents , viewType : string , editId : number , isDirty : boolean ) : Promise < void > ;
1456+ $revert ( resource : UriComponents , viewType : string , cancellation : CancellationToken ) : Promise < void > ;
1457+ $disposeEdits ( resourceComponents : UriComponents , viewType : string , editIds : number [ ] ) : void ;
1458+ $onSave ( resource : UriComponents , viewType : string , cancellation : CancellationToken ) : Promise < void > ;
1459+ $onSaveAs ( resource : UriComponents , viewType : string , targetResource : UriComponents , cancellation : CancellationToken ) : Promise < void > ;
1460+ // $backup(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise<string>;
1461+ $onMoveCustomEditor ( handle : string , newResource : UriComponents , viewType : string ) : Promise < void > ;
1462+ }
1463+
1464+ export interface CustomTextEditorCapabilities {
1465+ readonly supportsMove ?: boolean ;
1466+ }
1467+
1468+ export interface CustomEditorsMain {
1469+ $registerTextEditorProvider ( viewType : string , options : theia . WebviewPanelOptions , capabilities : CustomTextEditorCapabilities ) : void ;
1470+ $registerCustomEditorProvider ( viewType : string , options : theia . WebviewPanelOptions , supportsMultipleEditorsPerDocument : boolean ) : void ;
1471+ $unregisterEditorProvider ( viewType : string ) : void ;
1472+ $createCustomEditorPanel ( handle : string , title : string , viewColumn : theia . ViewColumn | undefined , options : theia . WebviewPanelOptions & theia . WebviewOptions ) : Promise < void > ;
1473+ $onDidEdit ( resource : UriComponents , viewType : string , editId : number , label : string | undefined ) : void ;
1474+ $onContentChange ( resource : UriComponents , viewType : string ) : void ;
1475+ }
1476+
14431477export interface StorageMain {
14441478 $set ( key : string , value : KeysToAnyValues , isGlobal : boolean ) : Promise < boolean > ;
14451479 $get ( key : string , isGlobal : boolean ) : Promise < KeysToAnyValues > ;
@@ -1578,6 +1612,7 @@ export const PLUGIN_RPC_CONTEXT = {
15781612 LANGUAGES_MAIN : createProxyIdentifier < LanguagesMain > ( 'LanguagesMain' ) ,
15791613 CONNECTION_MAIN : createProxyIdentifier < ConnectionMain > ( 'ConnectionMain' ) ,
15801614 WEBVIEWS_MAIN : createProxyIdentifier < WebviewsMain > ( 'WebviewsMain' ) ,
1615+ CUSTOM_EDITORS_MAIN : createProxyIdentifier < CustomEditorsMain > ( 'CustomEditorsMain' ) ,
15811616 STORAGE_MAIN : createProxyIdentifier < StorageMain > ( 'StorageMain' ) ,
15821617 TASKS_MAIN : createProxyIdentifier < TasksMain > ( 'TasksMain' ) ,
15831618 DEBUG_MAIN : createProxyIdentifier < DebugMain > ( 'DebugMain' ) ,
@@ -1610,6 +1645,7 @@ export const MAIN_RPC_CONTEXT = {
16101645 LANGUAGES_EXT : createProxyIdentifier < LanguagesExt > ( 'LanguagesExt' ) ,
16111646 CONNECTION_EXT : createProxyIdentifier < ConnectionExt > ( 'ConnectionExt' ) ,
16121647 WEBVIEWS_EXT : createProxyIdentifier < WebviewsExt > ( 'WebviewsExt' ) ,
1648+ CUSTOM_EDITORS_EXT : createProxyIdentifier < CustomEditorsExt > ( 'CustomEditorsExt' ) ,
16131649 STORAGE_EXT : createProxyIdentifier < StorageExt > ( 'StorageExt' ) ,
16141650 TASKS_EXT : createProxyIdentifier < TasksExt > ( 'TasksExt' ) ,
16151651 DEBUG_EXT : createProxyIdentifier < DebugExt > ( 'DebugExt' ) ,
@@ -1620,7 +1656,8 @@ export const MAIN_RPC_CONTEXT = {
16201656 LABEL_SERVICE_EXT : createProxyIdentifier < LabelServiceExt > ( 'LabelServiceExt' ) ,
16211657 TIMELINE_EXT : createProxyIdentifier < TimelineExt > ( 'TimeLineExt' ) ,
16221658 THEMING_EXT : createProxyIdentifier < ThemingExt > ( 'ThemingExt' ) ,
1623- COMMENTS_EXT : createProxyIdentifier < CommentsExt > ( 'CommentsExt' ) } ;
1659+ COMMENTS_EXT : createProxyIdentifier < CommentsExt > ( 'CommentsExt' )
1660+ } ;
16241661
16251662export interface TasksExt {
16261663 $provideTasks ( handle : number , token ?: CancellationToken ) : Promise < TaskDto [ ] | undefined > ;
0 commit comments