Share via


IVsProjectAsyncOpen.OpenItemWithSpecificAsync Method

Definition

Asynchronously opens an item using a specific editor.

public Microsoft.VisualStudio.Shell.Interop.IVsTask OpenItemWithSpecificAsync (uint itemId, uint editorFlags, Guid editorType, string? physicalView, Guid logicalView, bool shouldGetDocDataFromRdt, object? docData);
abstract member OpenItemWithSpecificAsync : uint32 * uint32 * Guid * string * Guid * bool * obj -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function OpenItemWithSpecificAsync (itemId As UInteger, editorFlags As UInteger, editorType As Guid, physicalView As String, logicalView As Guid, shouldGetDocDataFromRdt As Boolean, docData As Object) As IVsTask

Parameters

itemId
UInt32

Identifier of the item to open. Should be VSITEMID_ROOT or other valid item identifier. See the VSITEMID enumeration.

editorFlags
UInt32

Flags whose values are taken from the __VSSPECIFICEDITORFLAGS enumeration.

editorType
Guid

Unique identifier of the editor type.

physicalView
String

Name of the physical view. If set to null, MapLogicalView will be called.

logicalView
Guid

Unique identifier of the logical view. If not GUID_NULL, indicates a specific type of view to create. For more information, see the LOGVIEWID.

shouldGetDocDataFromRdt
Boolean

If true, then the this method will use the doc data object obtained from the Running Document Table; otherwise, the service will open the document using the doc data passed in to docData.

docData
Object

A reference to the document data object of the item to open or null. This value passed into this parameter is ignored if shouldGetDocDataFromRdt is true.

Returns

A task representing the reopen operation. The result of the task is an IVsAsyncOpenDocumentResult for the reopened item.

Remarks

This method is used to ask the project to open the item (document) using the specified editor information. It is an extension of OpenItemAsync(UInt32, Guid, Boolean, Object).

It is implemented in conjunction with OpenSpecificEditorAsync.

The task returned by this method does not indicate that the document's view and docdata have been loaded. See DocumentLoadTask for more details.

Applies to