Package.RegisterEditorFactory(IVsEditorFactory) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers an editor factory with Visual Studio.
protected:
void RegisterEditorFactory(Microsoft::VisualStudio::Shell::Interop::IVsEditorFactory ^ factory);
protected:
void RegisterEditorFactory(Microsoft::VisualStudio::Shell::Interop::IVsEditorFactory ^ factory);
void RegisterEditorFactory(Microsoft::VisualStudio::Shell::Interop::IVsEditorFactory const & factory);
protected void RegisterEditorFactory (Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory factory);
member this.RegisterEditorFactory : Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory -> unit
Protected Sub RegisterEditorFactory (factory As IVsEditorFactory)
Parameters
- factory
- IVsEditorFactory
The editor factory to register.
Exceptions
factory
is null
.
Remarks
To register an editor factory for a VSPackage, perform the following steps:
Add a RegisterEditorExtensionAttribute to your Package class.
Override the Initialize method. In your implementation of the Initialize method, call the
RegisterEditorFactory
method and pass the instance of your editor factory.
Editor factories are automatically unregistered when the package is disposed. If the editor factory object implements IDisposable, its Dispose
method is called after the factory has been unregistered with Visual Studio.