Example #1
0
        static void RegenerateRows(
            UpdateReportListView listView,
            IList reportLines,
            TreeViewItem rootItem,
            List <TreeViewItem> rows)
        {
            ClearRows(rootItem, rows);

            if (reportLines.Count == 0)
            {
                return;
            }

            for (int i = 0; i < reportLines.Count; i++)
            {
                UpdateReportLineListViewItem errorListViewItem =
                    new UpdateReportLineListViewItem(i + 1, (ReportLine)reportLines[i]);

                rootItem.AddChild(errorListViewItem);
                rows.Add(errorListViewItem);
            }

            listView.SetSelection(new List <int> {
                1
            });
        }
Example #2
0
        static void DoErrorsListViewArea(
            UpdateReportListView errorsListView)
        {
            Rect treeRect = GUILayoutUtility.GetRect(0, 100000, 0, 100000);

            errorsListView.OnGUI(treeRect);
        }
Example #3
0
        void DoListArea(
            UpdateReportListView errorsListView,
            object splitterState)
        {
            EditorGUILayout.BeginVertical();
            PlasticSplitterGUILayout.BeginHorizontalSplit(splitterState);

            DoErrorsListViewArea(errorsListView);
            DoErrorDetailsTextArea(errorsListView.GetSelectedError());

            PlasticSplitterGUILayout.EndHorizontalSplit();
            EditorGUILayout.EndVertical();
        }
Example #4
0
        static List <ReportLine> GetSelectedErrors(
            UpdateReportListView listView)
        {
            List <ReportLine> result = new List <ReportLine>();

            IList <int> selectedIds = listView.GetSelection();

            if (selectedIds.Count == 0)
            {
                return(result);
            }

            foreach (UpdateReportLineListViewItem treeViewItem in
                     listView.FindRows(selectedIds))
            {
                result.Add(treeViewItem.ReportLine);
            }

            return(result);
        }
Example #5
0
        void BuildComponenets(WorkspaceInfo wkInfo)
        {
            mErrorDetailsSplitterState = PlasticSplitterGUILayout.InitSplitterState(
                new float[] { 0.50f, 0.50f },
                new int[] { 100, 100 },
                new int[] { 100000, 100000 }
                );

            UpdateReportListHeaderState errorsListHeaderState = UpdateReportListHeaderState.Default;

            TreeHeaderSettings.Load(errorsListHeaderState,
                                    UnityConstants.DEVELOPER_UPDATE_REPORT_TABLE_SETTINGS_NAME,
                                    UnityConstants.UNSORT_COLUMN_ID);

            mPathsListView = new UpdateReportListView(
                wkInfo,
                errorsListHeaderState,
                OnCheckedReportLineChanged);

            mPathsListView.Reload();
        }