Compartilhar via


ModelingEditorFactory Class

Definition

Important

This API is not CLS-compliant.

Modeling version of the Editor factory. The editor factory allows the VS shell to get an editor for a particular file type.

public ref class ModelingEditorFactory abstract : Microsoft::VisualStudio::Shell::Interop::IVsEditorFactory, Microsoft::VisualStudio::Shell::Interop::IVsSolutionEvents
[System.CLSCompliant(false)]
public abstract class ModelingEditorFactory : Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory, Microsoft.VisualStudio.Shell.Interop.IVsSolutionEvents
public abstract class ModelingEditorFactory : Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory, Microsoft.VisualStudio.Shell.Interop.IVsSolutionEvents
[<System.CLSCompliant(false)>]
type ModelingEditorFactory = class
    interface IVsEditorFactory
    interface IVsSolutionEvents
type ModelingEditorFactory = class
    interface IVsEditorFactory
    interface IVsSolutionEvents
Public MustInherit Class ModelingEditorFactory
Implements IVsEditorFactory, IVsSolutionEvents
Inheritance
ModelingEditorFactory
Attributes
Implements

Constructors

ModelingEditorFactory(IServiceProvider)

Public constructor for our editor factory.

Properties

CancelEditorCreate

If set to value greater than 0 during DocData or DocView creation, the create editor operation will be cancelled.

Flags

Provides access to the createFalgs passed in calls to CreateEditorInstance.

ServiceProvider

Methods

Close()

Implementation of the IVsEditorFactory interface.

CreateDocData()

Derived classes should override to create a new instance of a concrete DocData.

CreateDocData(String, IVsHierarchy, UInt32)

Derived classes should override to create a new instance of a concrete DocData.

CreateDocView(ModelingDocData, String, String)

Derived classes can override to create a new instance of a DocView of the specified kind.

CreateEditorInstance(UInt32, String, String, IVsHierarchy, UInt32, IntPtr, IntPtr, IntPtr, String, Guid, Int32)

Creates a new editor.

GetDocData(Object)

Derived classes should override to get a existing instance of a concrete DocData.

GetItemErrorListProvider(IVsHierarchy, UInt32)

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.

HandleEditorCreationException(String, Exception)

Called to handle exception thrown during CreateEditorInstance (if any)

IsDocDataSupported(ModelingDocData)

Derived classes should overload this to return false if they only support certain types of DocData

MapLogicalView(Guid, Object)

Called when the shell asks us to map a logical view to a physical one. Logical views correspond to view types, physical views correspond to view instances. Because we potentially want to support multiple physical views of a given logical view open at once, we also pass along an object which derived classes can use to differentiate the physical views. For example, in the case of multiple web services being viewed in the Service Designer, the logical view (GUID of the Service Designer) would be the same, but the viewContext would allow derived classes to distiguish between designer instances and return a different physical view (it might be a some IMS element, for example).

Derived classes must handle the case where the viewContext is null. This will occur when the user double-clicks on a file as opposed to drilling down to a different view from one of our editors. Most likely they will just return the default physical view, the empty string. Note that this means there may be only one physical view for the default logical view for a file (this would correspond to the ApplicationDesigner, for example).

MapLogicalView(Guid, String)

Maps a logical view to a physical view. This method is called before CreateEditorInstance to allow us to map logical views to physical ones.

OnAfterCloseSolution(Object)

IVsSolutionEvents.OnAfterCloseSolution

OnAfterLoadProject(IVsHierarchy, IVsHierarchy)

IVsSolutionEvents.OnAfterLoadProject

OnAfterOpenProject(IVsHierarchy, Int32)

IVsSolutionEvents.OnAfterCloseSolution

OnAfterOpenSolution(Object, Int32)

IVsSolutionEvents.OnAfterOpenSolution

OnBeforeCloseProject(IVsHierarchy, Int32)

IVsSolutionEvents.OnBeforeCloseProject

OnBeforeCloseSolution(Object)

IVsSolutionEvents.OnBeforeCloseSolution

OnBeforeUnloadProject(IVsHierarchy, IVsHierarchy)

IVsSolutionEvents.OnBeforeUnloadProject

OnQueryCloseProject(IVsHierarchy, Int32, Int32)

IVsSolutionEvents.OnQueryCloseProject

OnQueryCloseSolution(Object, Int32)

IVsSolutionEvents.OnQueryCloseSolution

OnQueryUnloadProject(IVsHierarchy, Int32)

IVsSolutionEvents.OnQueryUnloadProject

SetSite(IServiceProvider)

Implementation of the IVsEditorFactory interface.

Applies to