internal XSharpLibraryProject(XProject prj, IVsHierarchy hierarchy) : base(prj.Name, LibraryNodeType.Package, prj.FileName) { this.ownerHierarchy = hierarchy; // //this.displayData.hImageList = XSharpProjectNode.ImageList.Handle; //this.displayData.Image = (ushort)XSharpProjectNode.XSharpProjectImageName.Project; //this.displayData.SelectedImage = (ushort)XSharpProjectNode.XSharpProjectImageName.Project; // this.NodeType = LibraryNodeType.Package; // //prj.ProjectNode this._defaultNameSpace = prj.ProjectNode.RootNameSpace; if (String.IsNullOrEmpty(this._defaultNameSpace)) { this._defaultNameSpace = "Default Namespace"; } // XSharpLibraryNode defaultNS = new XSharpLibraryNode(_defaultNameSpace, LibraryNodeType.Namespaces, ""); defaultNS.displayData.Image = (ushort)IconImageIndex._Namespace; defaultNS.displayData.SelectedImage = (ushort)IconImageIndex._Namespace; this.AddNode(defaultNS); XSettings.LogMessage("Added LibraryProject " + prj.Name); // }
internal XSharpLibraryNode(XSharpLibraryNode node) : base(node) { this.filesId = new List <uint>(); this.Depends(node.filesId); this.ownerHierarchy = node.ownerHierarchy; this.fileMoniker = node.fileMoniker; //this.member = node.member; this.NodeType = node.NodeType; this.editorInfo = node.editorInfo; this.description = node.description; this.kind = node.kind; this.attributes = node.attributes; }
internal LibraryNode SearchHierarchy(IVsHierarchy hierarchy) { LibraryNode found = null; lock (this) { foreach (LibraryNode nd in root.children) { if (nd is XSharpLibraryNode) { XSharpLibraryNode vln = (XSharpLibraryNode)nd; if (hierarchy.Equals(vln.ownerHierarchy)) { found = nd; break; } } } } return(found); }