Пример #1
0
 internal NemerleLibraryNode(NemerleLibraryNode node)
     : base(node)
 {
     _fileId		 = node._fileId;
     _ownerHierarchy = node._ownerHierarchy;
     _fileMoniker	= node._fileMoniker;
 }
Пример #2
0
        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)
            {
                NemerleLibraryNode newNode = new NemerleLibraryNode(
                    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);
            }
        }
Пример #3
0
        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)
            {
                NemerleLibraryNode newNode = new NemerleLibraryNode(
                    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);
            }
        }
Пример #4
0
 internal NemerleLibraryNode(NemerleLibraryNode node) : base(node)
 {
     _fileId         = node._fileId;
     _ownerHierarchy = node._ownerHierarchy;
     _fileMoniker    = node._fileMoniker;
 }