コード例 #1
0
ファイル: SourceWindow.cs プロジェクト: mono/monocov
 public void CenterOnMethod(MethodItem method)
 {
     // TODO: center the given method on the screen
     editor.SetCursorPosition (method.Model.startLine - 1, 0);
     editor.EnsureCursorVisible ();
     editor.MoveCursor (QTextEdit.CursorAction.MoveUp, false);
 }
コード例 #2
0
        private void OnExpanded(QListViewItem item)
        {
            if (item is ClassItem)
            {
                // Create children on-demand
                ClassItem         classItem = (ClassItem)item;
                ClassCoverageItem klass     = classItem.Model;

                if (item.ChildCount() == 0)
                {
                    foreach (MethodCoverageItem method in klass.Methods)
                    {
                        string title = method.name;
                        if (title.Length > 64)
                        {
                            title = title.Substring(0,63) + "...)";
                        }

                        MethodItem methodItem = new MethodItem(classItem,title,method);
                    }
                }
            }
        }
コード例 #3
0
ファイル: CoverageView.cs プロジェクト: bennidhamma/monocov
        private void OnExpanded(QListViewItem item)
        {
            if (item is ClassItem) {
            // Create children on-demand
            ClassItem classItem = (ClassItem)item;
            ClassCoverageItem klass = classItem.Model;

            if (item.ChildCount () == 0) {
                foreach (MethodCoverageItem method in klass.Methods) {
                    string title = method.name;
                    if (title.Length > 64)
                        title = title.Substring (0, 63) + "...)";

                    MethodItem methodItem = new MethodItem (classItem, title, method);
                }
            }
            }
        }