internal NestedProjectNode GetNestedProjectForHierarchy(IVsHierarchy hierarchy)
{
IVsProject3 project = hierarchy as IVsProject3;
if (project != null)
{
string mkDocument = String.Empty;
ErrorHandler.ThrowOnFailure(project.GetMkDocument(VSConstants.VSITEMID_ROOT, out mkDocument));
if (!String.IsNullOrEmpty(mkDocument))
{
HierarchyNode node = this.FindChild(mkDocument);
return node as NestedProjectNode;
}
}
return null;
}