Share via


IVsProjectAsyncOpen.ReopenItemAsync Method

Definition

Asynchronously reopens an item in the project.

public Microsoft.VisualStudio.Shell.Interop.IVsTask ReopenItemAsync (uint itemId, Guid editorType, string? physicalView, Guid logicalView, bool shouldGetDocDataFromRdt, object? docData);
abstract member ReopenItemAsync : uint32 * Guid * string * Guid * bool * obj -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function ReopenItemAsync (itemId 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.

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 environment 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

Similar to OpenItemAsync(UInt32, Guid, Boolean, Object) except that you call OpenSpecificEditorAsync (rather than the OpenStandardEditorAsync).

Implement ReopenItemAsync(UInt32, Guid, String, Guid, Boolean, Object) to handle automatic reopening of files that belong to a project. For example, when a user adds files to a project type that you created, closes the project and later reopens it, implement ReopenItemAsync(UInt32, Guid, String, Guid, Boolean, Object) to also open the files that belong to the new project type.

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