Delen via


EditorFactory Class

This class provides a default editor factory implementation that hosts the Visual Studio core editor.

This API is not CLS-compliant. 

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Package.EditorFactory

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
<ComVisibleAttribute(True)> _
Public Class EditorFactory _
    Implements IVsEditorFactory
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public class EditorFactory : IVsEditorFactory
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public ref class EditorFactory : IVsEditorFactory
[<CLSCompliantAttribute(false)>]
[<ComVisibleAttribute(true)>]
type EditorFactory =  
    class 
        interface IVsEditorFactory 
    end
public class EditorFactory implements IVsEditorFactory

The EditorFactory type exposes the following members.

Constructors

  Name Description
Public method EditorFactory() Initializes a new instance of EditorFactory.
Public method EditorFactory(Package) Creates an instance of the EditorFactory class.

Top

Properties

  Name Description
Public property CodePagePrompt Gets and sets flags to prompt user for an encoding on an open with specified codepage.

Top

Methods

  Name Description
Public method Close Releases all service provides and sets the package object to nulla null reference (Nothing in Visual Basic).
Public method CreateEditorInstance Used to create the Visual Studio core editor, an editor that supports data/view separation.
Public method CreateEditorView Creates a code window with the Visual Studio core editor.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Destructor for the class. (Overrides Object.Finalize.)
Public method GetExtensions Returns a list of file extensions registered for this editor factory.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetLanguageService Gets the GUID of the language service registered for this file extension under the registry key HKLM\Software\Microsoft\Visual Studio\10.0\Languages\File Extensions.
Public method GetLanguageServiceGuid Gets the language service GUID.
Protected method GetPackage Gets the Package object.
Public method GetRegisteredEditor Gets the GUID of the highest-priority editor registered for this extension. This will also pick up user-defined associations between file extensions and editors
Public method GetRegisteredEditorInfo Gets the EditorFactory.EditorInfo for the specified extension.
Protected method GetSite Gets the main service provider.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetUserDefinedEditor Gets the GUID of the editor that the user has defined for this file extension.
Public method IsOurFileFormat Checks whether there is an editor that can handle this extension.
Public method IsRegisteredExtension Determines if a file extension is registered with this editor factory.
Public method MapLogicalView Maps a logical view to a physical view.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetSite Sets the service provider.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member GuidVSBufferDetectLangSid Gets a GUID value in IVsUserData that, when set to false, will stop the core editor for searching for a different language service.

Top

Remarks

Inherit from this class and add the [ComVisible] and [Guid] attributes, and then specify the EditorFactoryGuid, EditorFactoryGuid and EditorName variables in your Registration class.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Package Namespace

ProvideEditorFactoryAttribute