void OnEnable()
        {
            ProjectAuditorAnalytics.EnableAnalytics();

            m_ProjectAuditor = new ProjectAuditor();

            UpdateAssemblySelection();

            if (m_AreaSelection == null)
            {
                m_AreaSelection = new TreeViewSelection();
                if (!string.IsNullOrEmpty(m_AreaSelectionSummary))
                {
                    if (m_AreaSelectionSummary == "All")
                    {
                        m_AreaSelection.SetAll(AreaNames);
                    }
                    else if (m_AreaSelectionSummary != "None")
                    {
                        var areas = m_AreaSelectionSummary.Split(new[] { ", " }, StringSplitOptions.None);
                        foreach (var area in areas)
                        {
                            m_AreaSelection.selection.Add(area);
                        }
                    }
                }
                else
                {
                    m_AreaSelection.SetAll(AreaNames);
                }
            }

            m_ModeNames = m_AnalysisViewDescriptors.Select(m => m.name).ToArray();

            if (m_TextFilter == null)
            {
                m_TextFilter = new TextFilter();
            }

            m_AnalysisViews.Clear();
            foreach (var desc in m_AnalysisViewDescriptors)
            {
                var view = new AnalysisView();
                view.CreateTable(desc, m_ProjectAuditor.config, m_Preferences, this);

                if (m_AnalysisState == AnalysisState.Valid)
                {
                    view.AddIssues(m_ProjectReport.GetIssues(view.desc.category));
                }

                m_AnalysisViews.Add(view);
            }

            RefreshDisplay();
        }
Пример #2
0
 public void CreateTable(AnalysisViewDescriptor desc, ProjectAuditorConfig config, Preferences prefs, IProjectIssueFilter filter)
 {
     m_AnalysisView.CreateTable(desc, config, prefs, filter);
 }