public virtual int OpenItem(uint itemId, ref Guid logicalView, IntPtr punkDocDataExisting,
out IVsWindowFrame frame)
{
// Init output params
frame = null;
var n = NodeFromItemId(itemId);
if (n == null)
{
throw new ArgumentException(SR.GetString(SR.ParameterMustBeAValidItemId, CultureInfo.CurrentUICulture),
"itemId");
}
// Delegate to the document manager object that knows how to open the item
var documentManager = n.GetDocumentManager();
if (documentManager != null)
{
return documentManager.Open(ref logicalView, punkDocDataExisting, out frame,
WindowFrameShowAction.DoNotShow);
}
// This node does not have an associated document manager and we must fail
return VSConstants.E_FAIL;
}