internal void OnGUI(Rect rect)
        {
            if (m_Tree == null)
            {
                if (m_TreeState == null)
                {
                    m_TreeState = new TreeViewState();
                }

                m_Tree = new AssetSettingsAnalyzeTreeView(m_TreeState);
                m_Tree.Reload();
            }

            var treeRect = new Rect(rect.xMin, rect.yMin + k_ButtonHeight, rect.width, rect.height - k_ButtonHeight);

            m_Tree.OnGUI(treeRect);

            var buttonRect = new Rect(rect.xMin, rect.yMin, rect.width, rect.height);

            GUILayout.BeginArea(buttonRect);
            GUILayout.BeginHorizontal();
            EditorGUI.BeginDisabledGroup(!m_Tree.SelectionContainsRuleContainer);
            if (GUILayout.Button("Analyze Selected Rules"))
            {
                EditorApplication.delayCall += () => m_Tree.RunAllSelectedRules();
            }

            if (GUILayout.Button("Clear Selected Rules"))
            {
                EditorApplication.delayCall += () => m_Tree.ClearAllSelectedRules();
            }

            EditorGUI.BeginDisabledGroup(!m_Tree.SelectionContainsFixableRule || !m_Tree.SelectionContainsErrors);
            if (GUILayout.Button("Fix Selected Rules"))
            {
                EditorApplication.delayCall += () => m_Tree.FixAllSelectedRules();
            }
            EditorGUI.EndDisabledGroup();
            GUILayout.EndHorizontal();
            GUILayout.EndArea();

            //TODO
            //if (GUILayout.Button("Revert Selected"))
            //{
            //    m_Tree.RevertAllActiveRules();
            //}
        }
        internal void OnGUI(Rect pos, AddressableAssetSettings settings)
        {
            if (m_Tree == null)
            {
                if (m_TreeState == null)
                {
                    m_TreeState = new TreeViewState();
                }

                m_Tree = new AssetSettingsAnalyzeTreeView(m_TreeState, this);
                m_Tree.Reload();
            }


            var  buttonHeight = 24f;
            Rect topRect      = new Rect(pos.x, pos.y, pos.width, buttonHeight);
            Rect treeRect     = new Rect(pos.x, pos.y + buttonHeight, pos.width, pos.height - buttonHeight);

            GUILayout.Space(200);
            GUILayout.BeginArea(topRect);
            GUILayout.BeginHorizontal();
            bool doRun = GUILayout.Button("Run Tests");


            bool doFix = GUILayout.Button("Fix All");

            if (GUILayout.Button("Clear Results"))
            {
                m_RuleResults = new List <AnalyzeRule.AnalyzeResult>();
                foreach (var r in rules)
                {
                    r.ClearAnalysis();
                }
                m_Tree.Reload();
            }
            GUILayout.EndHorizontal();
            GUILayout.EndArea();

            if (doRun)
            {
                m_RuleResults = new List <AnalyzeRule.AnalyzeResult>();
                foreach (var r in rules)
                {
                    m_RuleResults.AddRange(r.RefreshAnalysis(settings));
                }
                m_Tree.Reload();
            }

            if (doFix)
            {
                m_RuleResults = new List <AnalyzeRule.AnalyzeResult>();
                foreach (var r in rules)
                {
                    r.FixIssues(settings);
                    m_RuleResults.AddRange(r.RefreshAnalysis(settings));
                }

                m_Tree.Reload();
            }

            m_Tree.OnGUI(treeRect);
        }