Ejemplo n.º 1
0
 internal FoxProLibraryNode(FoxProLibraryNode node) :
     base(node)
 {
     this.fileId         = node.fileId;
     this.ownerHierarchy = node.ownerHierarchy;
     this.fileMoniker    = node.fileMoniker;
 }
Ejemplo n.º 2
0
        private void CreateModuleTree(LibraryNode root, LibraryNode current, ScopeNode scope, string namePrefix, ModuleId moduleId)
        {
            if ((null == root) || (null == scope) || (null == scope.NestedScopes))
            {
                return;
            }
            foreach (ScopeNode subItem in scope.NestedScopes)
            {
                FoxProLibraryNode newNode       = new FoxProLibraryNode(subItem, namePrefix, moduleId.Hierarchy, moduleId.ItemID);
                string            newNamePrefix = namePrefix;

                // The classes are always added to the root node, the functions to the
                // current node.
                if ((newNode.NodeType & LibraryNode.LibraryNodeType.Members) != LibraryNode.LibraryNodeType.None)
                {
                    current.AddNode(newNode);
                }
                else if ((newNode.NodeType & LibraryNode.LibraryNodeType.Classes) != LibraryNode.LibraryNodeType.None)
                {
                    // Classes are always added to the root.
                    root.AddNode(newNode);
                    newNamePrefix = newNode.Name + ".";
                }

                // Now use recursion to get the other types.
                CreateModuleTree(root, newNode, subItem, newNamePrefix, moduleId);
            }
        }