pub trait CustomEditorProvider:
Environment
+ Send
+ Sync {
// Required methods
fn RegisterCustomEditorProvider<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
OptionsValue: Value,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn UnregisterCustomEditorProvider<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn OnSaveCustomDocument<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
ResourceURI: Url,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ResolveCustomEditor<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
ResourceURI: Url,
WebViewPanelHandle: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An abstract service contract for an environment component that can manage the registration and resolution of custom, WebView-based editors.
Required Methods§
Sourcefn RegisterCustomEditorProvider<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
OptionsValue: Value,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn RegisterCustomEditorProvider<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
OptionsValue: Value,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Registers a new custom editor provider from an extension.
§Parameters
ViewType: A unique identifier for the custom editor.OptionsValue: A DTO containing options, including file patterns and webview options.
Sourcefn UnregisterCustomEditorProvider<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn UnregisterCustomEditorProvider<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unregisters a previously registered custom editor provider.
§Parameters
ViewType: The identifier of the provider to unregister.
Sourcefn OnSaveCustomDocument<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
ResourceURI: Url,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn OnSaveCustomDocument<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
ResourceURI: Url,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A notification sent from the extension host (Cocoon) to the main host
(Mountain) when a custom document is saved by the user in the UI.
§Parameters
ViewType: The identifier of the custom editor.ResourceURI: The URI of the document being saved.
Sourcefn ResolveCustomEditor<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
ResourceURI: Url,
WebViewPanelHandle: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ResolveCustomEditor<'life0, 'async_trait>(
&'life0 self,
ViewType: String,
ResourceURI: Url,
WebViewPanelHandle: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A request sent from the main host (Mountain) to the extension host
(Cocoon) to resolve the content for a custom editor.
§Parameters
ViewType: The identifier of the custom editor.ResourceURI: The URI of the document to resolve.WebViewPanelHandle: The unique handle for the webview panel hosting the editor.