Example #1
0
        /// <summary>
        /// Display types in each classpath
        /// </summary>
        /// <param name="context">Language context to explore</param>
        public void UpdateTree()
        {
            DetectContext();
            filterTextBox.Text = "";

            outlineTreeView.BeginUpdate();
            try
            {
                outlineTreeView.Nodes.Clear();
                outlineTreeView.ImageList = ASContext.Panel.TreeIcons;

                allTypes = new List <TypeTreeNode>();
                if (current == null || current.Classpath == null || current.Classpath.Count == 0)
                {
                    return;
                }

                foreach (PathModel path in current.Classpath)
                {
                    ClasspathTreeNode node = new ClasspathTreeNode(path.Path);
                    outlineTreeView.Nodes.Add(node);
                    rootNodes = node.Nodes;

                    packages = new Dictionary <string, TreeNodeCollection>();
                    lock (path.Files.Values)
                    {
                        foreach (FileModel model in path.Files.Values)
                        {
                            AddModel(FindPackage(model.Package), model);
                        }
                    }
                }
            }
            finally
            {
                outlineTreeView.EndUpdate();
                filterTextBox.Focus();
            }
        }
Example #2
0
        /// <summary>
        /// Display types in each classpath
        /// </summary>
        /// <param name="context">Language context to explore</param>
        public void UpdateTree()
        {
            DetectContext();
            filterTextBox.Text = "";

            outlineTreeView.BeginUpdate();
            try
            {
                outlineTreeView.TreeViewNodeSorter = null;
                outlineTreeView.Nodes.Clear();
                outlineTreeView.ImageList = ASContext.Panel.TreeIcons;

                allTypes = new List<TreeNode>();
                if (current == null || current.Classpath == null || current.Classpath.Count == 0) return;

                foreach (PathModel path in current.Classpath)
                {
                    ClasspathTreeNode node = new ClasspathTreeNode(path.Path, path.FilesCount);
                    outlineTreeView.Nodes.Add(node);
                    rootNodes = node.Nodes;

                    packages = new Dictionary<string, TreeNodeCollection>();
                    path.ForeachFile((model) => {
                        AddModel(FindPackage(model.Package), model);
                        return true;
                    });
                }
            }
            finally
            {
                outlineTreeView.TreeViewNodeSorter = new NodesComparer();
                outlineTreeView.EndUpdate();
                filterTextBox.Focus();
            }
        }