다음을 통해 공유


ModelingEditorFactory Class

Provides support for the modeling editor factory, which enables the Visual Studio shell to obtain an editor for a specific file type.

This API is not CLS-compliant. 

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Shell.ModelingEditorFactory

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public MustInherit Class ModelingEditorFactory _
    Implements IVsEditorFactory, IVsSolutionEvents
[CLSCompliantAttribute(false)]
public abstract class ModelingEditorFactory : IVsEditorFactory, 
    IVsSolutionEvents
[CLSCompliantAttribute(false)]
public ref class ModelingEditorFactory abstract : IVsEditorFactory, 
    IVsSolutionEvents
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
type ModelingEditorFactory =  
    class 
        interface IVsEditorFactory 
        interface IVsSolutionEvents 
    end
public abstract class ModelingEditorFactory implements IVsEditorFactory, IVsSolutionEvents

The ModelingEditorFactory type exposes the following members.

Constructors

  Name Description
Protected method ModelingEditorFactory Initializes a new instance of the ModelingEditorFactory class.

Top

Properties

  Name Description
Protected property CancelEditorCreate Gets the value of the cancelEditorCreate flag. If this value is larger than 0, this property prevents the modeling editor from being created and sets this flag to 0.
Protected property Flags Gets a list of flags, which define how the modeling editor is created.
Protected property ServiceProvider Gets the service provider that retrieves Visual Studio services.

Top

Methods

  Name Description
Public method Close Releases all cached interface pointers and unregisters any event synchronizations.
Protected method CreateDocData() Creates a document in memory.
Public method CreateDocData(String, IVsHierarchy, UInt32) Creates a document in memory.
Protected method CreateDocView Creates a document in memory.
Public method CreateEditorInstance Creates a modeling editor.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected method GetDocData Gets a document.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetItemErrorListProvider Get an error list provider for the specified project item (assumed to be a modeling doc data). If there is no existing error list provider for the item, then one is created.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method HandleEditorCreationException Handles an exception if one occurs when an additional modeling editor is created.
Protected method IsDocDataSupported Verifies whether a document of a specific format can be used in the modeling editor.
Protected method MapLogicalView(Guid, Object) Maps a logical view's GUID to a physical view.
Public method MapLogicalView(Guid%, String%) Maps a logical view's GUID to a physical view.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnAfterCloseSolution Notifies listening clients that the modeling editor has closed.
Public method OnAfterLoadProject Notifies listening clients that the project has loaded.
Public method OnAfterOpenProject Notifies listening clients that the project has opened.
Public method OnAfterOpenSolution Notifies listening clients that the modeling editor has opened.
Public method OnBeforeCloseProject Notifies listening clients that the project is about to be closed.
Public method OnBeforeCloseSolution Notifies listening clients that the modeling editor is about to be closed.
Public method OnBeforeUnloadProject Notifies listening clients that the project is about to be unloaded.
Public method OnQueryCloseProject Queries listening clients as to whether the project can be closed.
Public method OnQueryCloseSolution Notifies listening clients that the modeling editor has closed.
Public method OnQueryUnloadProject Queries listening clients as to whether the project can be unloaded.
Public method SetSite Sets the service provider from which to access shell services.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

You can use this class to create, monitor, and close the modeling editor. The modeling editor is represented by the DocData object and the DocView object. The DocData object represents a document in memory, and the DocView object represents a view for the document. Within the modeling editor, a document can have multiple views assigned to it.

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.Modeling.Shell Namespace