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
System.Object
Microsoft.VisualStudio.Package.EditorFactory
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.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)
Syntax
'宣告
<CLSCompliantAttribute(False)> _
<ComVisibleAttribute(True)> _
Public Class EditorFactory _
Implements IVsEditorFactory
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public class EditorFactory : IVsEditorFactory
The EditorFactory type exposes the following members.
Constructors
Name | Description | |
---|---|---|
EditorFactory() | Initializes a new instance of EditorFactory. | |
EditorFactory(Package) | Creates an instance of the EditorFactory class. |
Top
Properties
Name | Description | |
---|---|---|
CodePagePrompt | Gets and sets flags to prompt user for an encoding on an open with specified codepage. |
Top
Methods
Name | Description | |
---|---|---|
Close | Releases all service provides and sets the package object to nulla null reference (Nothing in Visual Basic). | |
CreateEditorInstance | Used to create the Visual Studio core editor, an editor that supports data/view separation. | |
CreateEditorView | Creates a code window with the Visual Studio core editor. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Destructor for the class. (Overrides Object.Finalize().) | |
GetExtensions | Returns a list of file extensions registered for this editor factory. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
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. | |
GetLanguageServiceGuid | gETs the language service GUID. | |
GetPackage | Gets the Package object. | |
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 | |
GetRegisteredEditorInfo | Gets the EditorFactory.EditorInfo for the specified extension. | |
GetSite | Gets the main service provider. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUserDefinedEditor | Gets the GUID of the editor that the user has defined for this file extension. | |
IsOurFileFormat | Checks whether there is an editor that can handle this extension. | |
IsRegisteredExtension | Determines if a file extension is registered with this editor factory. | |
MapLogicalView | Maps a logical view to a physical view. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetSite | Sets the service provider. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
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.