private void BuildMemberDropDown()
        {
            memberComboBox.BeginUpdate();

            memberComboBox.Items.Clear();

            MemberList    members       = null;
            ClassTreeNode classTreeNode = classComboBox.SelectedItem as ClassTreeNode;
            ClassModel    classModel    = null;

            if (ASContext.Context.CurrentModel != null)
            {
                List <MemberTreeNode> memberNodes = new List <MemberTreeNode>();

                if (classTreeNode == null)
                {
                    // The caret is not within a class, so add the global members
                    members = ASContext.Context.CurrentModel.Members;
                }
                else
                {
                    // The caret is within a class, so add the classes members
                    classModel = (ClassModel)classTreeNode.Model;
                    members    = classModel.Members;
                }

                // Add the local members
                foreach (MemberModel member in members)
                {
                    MemberTreeNode node = GetMemberTreeNode(member, null);

                    if (node != null)
                    {
                        memberNodes.Add(node);
                    }
                }

                // Add inherited members if applicable
                if (_settings.ShowInheritedMembers && classModel != null)
                {
                    memberNodes.AddRange(GetInheritedMembers(classModel.Extends));
                }

                // Apply member sort
                if (_memberSort != null)
                {
                    memberNodes.Sort(_memberSort);
                }

                memberComboBox.Items.AddRange(memberNodes.ToArray());
            }

            // Select the member that contains the caret
            UpdateMemberDropDown();

            memberComboBox.EndUpdate();
        }
        private void BuildClassDropDown()
        {
            classComboBox.BeginUpdate();

            classComboBox.Items.Clear();

            if (ASContext.Context.CurrentModel != null)
            {
                List <MemberTreeNode> classNodes = new List <MemberTreeNode>();
                List <string>         classNames = new List <string>();

                // Add all the classes from this file
                foreach (ClassModel classModel in ASContext.Context.CurrentModel.Classes)
                {
                    MemberTreeNode node = GetClassTreeNode(classModel, false, false);
                    classNodes.Add(node);

                    if (_settings.ShowSuperClasses)
                    {
                        // While extended class is not null, Object, Void, or haXe Dynamic
                        var extendClassModel = classModel.Extends;
                        while (extendClassModel != null &&
                               extendClassModel.Name != "Object" &&
                               extendClassModel != ClassModel.VoidClass &&
                               (!extendClassModel.InFile.haXe || extendClassModel.Type != "Dynamic"))
                        {
                            // Have we already added this class? Multiple classes could extend the same base.
                            if (classNames.Contains(extendClassModel.QualifiedName))
                            {
                                break;
                            }
                            classNames.Add(extendClassModel.QualifiedName);

                            node = GetClassTreeNode(extendClassModel, true, false);
                            classNodes.Add(node);

                            extendClassModel = extendClassModel.Extends;
                        }
                    }
                }

                // Apply member sort
                if (_memberSort != null)
                {
                    classNodes.Sort(_memberSort);
                }

                classComboBox.Items.AddRange(classNodes.ToArray());
            }

            // Select the class that contains the caret
            UpdateClassDropDown();

            classComboBox.EndUpdate();
        }