ModelingEditorFactory.CreateEditorInstance Method

Creates a modeling editor.

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

Syntax

'宣言
Public Function CreateEditorInstance ( _
    createFlags As UInteger, _
    fileName As String, _
    physicalView As String, _
    hierarchy As IVsHierarchy, _
    itemId As UInteger, _
    existingDocData As IntPtr, _
    <OutAttribute> ByRef docView As IntPtr, _
    <OutAttribute> ByRef docData As IntPtr, _
    <OutAttribute> ByRef editorCaption As String, _
    <OutAttribute> ByRef cmdUI As Guid, _
    <OutAttribute> ByRef createDocWinFlags As Integer _
) As Integer
'使用
Dim instance As ModelingEditorFactory
Dim createFlags As UInteger
Dim fileName As String
Dim physicalView As String
Dim hierarchy As IVsHierarchy
Dim itemId As UInteger
Dim existingDocData As IntPtr
Dim docView As IntPtr
Dim docData As IntPtr
Dim editorCaption As String
Dim cmdUI As Guid
Dim createDocWinFlags As Integer
Dim returnValue As Integer

returnValue = instance.CreateEditorInstance(createFlags, _
    fileName, physicalView, hierarchy, _
    itemId, existingDocData, docView, _
    docData, editorCaption, cmdUI, createDocWinFlags)
public int CreateEditorInstance(
    uint createFlags,
    string fileName,
    string physicalView,
    IVsHierarchy hierarchy,
    uint itemId,
    IntPtr existingDocData,
    out IntPtr docView,
    out IntPtr docData,
    out string editorCaption,
    out Guid cmdUI,
    out int createDocWinFlags
)
public:
virtual int CreateEditorInstance(
    unsigned int createFlags, 
    String^ fileName, 
    String^ physicalView, 
    IVsHierarchy^ hierarchy, 
    unsigned int itemId, 
    IntPtr existingDocData, 
    [OutAttribute] IntPtr% docView, 
    [OutAttribute] IntPtr% docData, 
    [OutAttribute] String^% editorCaption, 
    [OutAttribute] Guid% cmdUI, 
    [OutAttribute] int% createDocWinFlags
) sealed
public final function CreateEditorInstance(
    createFlags : uint, 
    fileName : String, 
    physicalView : String, 
    hierarchy : IVsHierarchy, 
    itemId : uint, 
    existingDocData : IntPtr, 
    docView : IntPtr, 
    docData : IntPtr, 
    editorCaption : String, 
    cmdUI : Guid, 
    createDocWinFlags : int
) : int

Parameters

  • createFlags
    Type: System.UInt32

    The flags that define how the modeling editor is created.

  • fileName
    Type: System.String

    The name of the document to open for editing.

  • physicalView
    Type: System.String

    The name of the modeling editor view.

  • existingDocData
    Type: System.IntPtr

    If the document is already open in Visual Studio, the document.

  • editorCaption
    Type: System.String%

    The caption for the modeling editor.

  • cmdUI
    Type: System.Guid%

    The GUID that is assigned to the modeling editor.

Return Value

Type: System.Int32

The modeling editor.

Implements

IVsEditorFactory.CreateEditorInstance(UInt32, String, String, IVsHierarchy, UInt32, IntPtr, IntPtr%, IntPtr%, String%, Guid%, Int32%)

Remarks

This method is part of IVsEditorFactory and is called by Visual Studio to create the modeling editor. ModelingEditorFactory calls CreateDocData and CreateDocView as necessary.

Permissions

See Also

Reference

ModelingEditorFactory Class

ModelingEditorFactory Members

Microsoft.VisualStudio.Modeling.Shell Namespace