ModelingEditorFactory ModelingEditorFactory ModelingEditorFactory 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
type ModelingEditorFactory = class
    interface IVsEditorFactory
    interface IVsSolutionEvents
Public MustInherit Class ModelingEditorFactory
Implements IVsEditorFactory, IVsSolutionEvents
Inheritance
ModelingEditorFactoryModelingEditorFactoryModelingEditorFactoryModelingEditorFactory
Attributes
Implements

Constructors

ModelingEditorFactory(IServiceProvider) ModelingEditorFactory(IServiceProvider) ModelingEditorFactory(IServiceProvider) ModelingEditorFactory(IServiceProvider)

Public constructor for our editor factory.

Properties

CancelEditorCreate CancelEditorCreate CancelEditorCreate CancelEditorCreate

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

Flags Flags Flags Flags

Provides access to the createFalgs passed in calls to CreateEditorInstance.

ServiceProvider ServiceProvider ServiceProvider ServiceProvider

Methods

Close() Close() Close() Close()

Implementation of the IVsEditorFactory interface.

CreateDocData() CreateDocData() CreateDocData() CreateDocData()

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

CreateDocData(String, IVsHierarchy, UInt32) CreateDocData(String, IVsHierarchy, UInt32) CreateDocData(String, IVsHierarchy, UInt32) CreateDocData(String, IVsHierarchy, UInt32)

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

CreateDocView(ModelingDocData, String, String) CreateDocView(ModelingDocData, String, String) CreateDocView(ModelingDocData, String, String) 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) CreateEditorInstance(UInt32, String, String, IVsHierarchy, UInt32, IntPtr, IntPtr, IntPtr, String, Guid, Int32) CreateEditorInstance(UInt32, String, String, IVsHierarchy, UInt32, IntPtr, IntPtr, IntPtr, String, Guid, Int32) CreateEditorInstance(UInt32, String, String, IVsHierarchy, UInt32, IntPtr, IntPtr, IntPtr, String, Guid, Int32)

Creates a new editor.

GetDocData(Object) GetDocData(Object) GetDocData(Object) GetDocData(Object)

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

GetItemErrorListProvider(IVsHierarchy, UInt32) GetItemErrorListProvider(IVsHierarchy, UInt32) GetItemErrorListProvider(IVsHierarchy, UInt32) 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) HandleEditorCreationException(String, Exception) HandleEditorCreationException(String, Exception) HandleEditorCreationException(String, Exception)

Called to handle exception thrown during CreateEditorInstance (if any)

IsDocDataSupported(ModelingDocData) IsDocDataSupported(ModelingDocData) IsDocDataSupported(ModelingDocData) IsDocDataSupported(ModelingDocData)

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

MapLogicalView(Guid, String) MapLogicalView(Guid, String) MapLogicalView(Guid, String) 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.

MapLogicalView(Guid, Object) MapLogicalView(Guid, Object) MapLogicalView(Guid, Object) 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).

OnAfterCloseSolution(Object) OnAfterCloseSolution(Object) OnAfterCloseSolution(Object) OnAfterCloseSolution(Object)

IVsSolutionEvents.OnAfterCloseSolution

OnAfterLoadProject(IVsHierarchy, IVsHierarchy) OnAfterLoadProject(IVsHierarchy, IVsHierarchy) OnAfterLoadProject(IVsHierarchy, IVsHierarchy) OnAfterLoadProject(IVsHierarchy, IVsHierarchy)

IVsSolutionEvents.OnAfterLoadProject

OnAfterOpenProject(IVsHierarchy, Int32) OnAfterOpenProject(IVsHierarchy, Int32) OnAfterOpenProject(IVsHierarchy, Int32) OnAfterOpenProject(IVsHierarchy, Int32)

IVsSolutionEvents.OnAfterCloseSolution

OnAfterOpenSolution(Object, Int32) OnAfterOpenSolution(Object, Int32) OnAfterOpenSolution(Object, Int32) OnAfterOpenSolution(Object, Int32)

IVsSolutionEvents.OnAfterOpenSolution

OnBeforeCloseProject(IVsHierarchy, Int32) OnBeforeCloseProject(IVsHierarchy, Int32) OnBeforeCloseProject(IVsHierarchy, Int32) OnBeforeCloseProject(IVsHierarchy, Int32)

IVsSolutionEvents.OnBeforeCloseProject

OnBeforeCloseSolution(Object) OnBeforeCloseSolution(Object) OnBeforeCloseSolution(Object) OnBeforeCloseSolution(Object)

IVsSolutionEvents.OnBeforeCloseSolution

OnBeforeUnloadProject(IVsHierarchy, IVsHierarchy) OnBeforeUnloadProject(IVsHierarchy, IVsHierarchy) OnBeforeUnloadProject(IVsHierarchy, IVsHierarchy) OnBeforeUnloadProject(IVsHierarchy, IVsHierarchy)

IVsSolutionEvents.OnBeforeUnloadProject

OnQueryCloseProject(IVsHierarchy, Int32, Int32) OnQueryCloseProject(IVsHierarchy, Int32, Int32) OnQueryCloseProject(IVsHierarchy, Int32, Int32) OnQueryCloseProject(IVsHierarchy, Int32, Int32)

IVsSolutionEvents.OnQueryCloseProject

OnQueryCloseSolution(Object, Int32) OnQueryCloseSolution(Object, Int32) OnQueryCloseSolution(Object, Int32) OnQueryCloseSolution(Object, Int32)

IVsSolutionEvents.OnQueryCloseSolution

OnQueryUnloadProject(IVsHierarchy, Int32) OnQueryUnloadProject(IVsHierarchy, Int32) OnQueryUnloadProject(IVsHierarchy, Int32) OnQueryUnloadProject(IVsHierarchy, Int32)

IVsSolutionEvents.OnQueryUnloadProject

SetSite(IServiceProvider) SetSite(IServiceProvider) SetSite(IServiceProvider) SetSite(IServiceProvider)

Implementation of the IVsEditorFactory interface.

Applies to