private void LoadSubelements(ItemCollection item_parent)
        {
            TreeViewItem item_sc = new TreeViewItem();

            item_sc.Tag = Solution;

            item_sc.Header     = CreateHeader(Solution);
            item_sc.IsExpanded = true;
            item_parent.Add(item_sc);

            foreach (Schematix.ProjectExplorer.Project pr in Solution.ProjectList)
            {
                TreeViewItem item_pr = new TreeViewItem();
                item_pr.Tag = pr;

                item_pr.Header     = CreateHeader(pr);
                item_pr.IsExpanded = false;
                item_sc.Items.Add(item_pr);
                if (pr.Compiler.CurrentCompiler is Schematix.Core.Compiler.VHDLCompiler)
                {
                    Schematix.Core.Compiler.VHDLCompiler compiler = pr.Compiler.CurrentCompiler as Schematix.Core.Compiler.VHDLCompiler;
                    foreach (VHDL.VhdlElement el in DesignChildProvider.GetSubElements(compiler.RootScope))
                    {
                        if (el != null)
                        {
                            LoadSubelements(item_pr.Items, el);
                        }
                    }
                }
            }
        }
        private void LoadSubelements(ItemCollection item_parent, VHDL.VhdlElement designElement)
        {
            TreeViewItem item_el = new TreeViewItem();

            item_el.Tag = designElement;

            item_el.Header = CreateHeader(designElement);
            item_parent.Add(item_el);
            IList <VHDL.VhdlElement> childrens = DesignChildProvider.GetSubElements(designElement);

            if (childrens.Count != 0)
            {
                item_el.IsExpanded = ((designElement is VHDL.libraryunit.PackageDeclaration) == false);
                foreach (VHDL.VhdlElement el in childrens)
                {
                    if (el != null)
                    {
                        LoadSubelements(item_el.Items, el);
                    }
                }
            }
        }