~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-10 16:54:48 UTC
  • mfrom: (19.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100910165448-0rybfk25zd4o9431
Tags: 2.4+dfsg-2
* debian/patches/inject_Mono.Debugger.Soft_source.patch,
  debian/patches/use_system_Mono.Debugger.Soft.patch,
  debian/control:
  + Build against system Soft Debugger, since we now have a new
    enough Mono to match MonoDevelop's required API

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
                {
41
41
                        FilteredMembersSource src = new FilteredMembersSource (ctx, objectSource, type, obj, bindingFlags);
42
42
                        src.Connect ();
43
 
                        return ObjectValue.CreateObject (src, new ObjectPath (label), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
 
43
                        ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath (label), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
 
44
                        val.ChildSelector = "";
 
45
                        return val;
44
46
                }
45
47
 
46
 
                public ObjectValue[] GetChildren (ObjectPath path, int index, int count)
 
48
                public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
47
49
                {
48
 
                        var names = new ObjectValueNameTracker (ctx);
 
50
                        EvaluationContext cctx = ctx.WithOptions (options);
 
51
                        var names = new ObjectValueNameTracker (cctx);
49
52
                        object tdataType = null;
50
53
                        TypeDisplayData tdata = null;
51
54
                        List<ObjectValue> list = new List<ObjectValue> ();
52
 
                        foreach (ValueReference val in ctx.Adapter.GetMembersSorted (ctx, objectSource, type, obj, bindingFlags)) {
 
55
                        foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) {
53
56
                                object decType = val.DeclaringType;
54
57
                                if (decType != null && decType != tdataType) {
55
58
                                        tdataType = decType;
56
 
                                        tdata = ctx.Adapter.GetTypeDisplayData (ctx, decType);
 
59
                                        tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType);
57
60
                                }
58
61
                                DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
59
62
                                if (state == DebuggerBrowsableState.Never)
60
63
                                        continue;
61
 
                                ObjectValue oval = val.CreateObjectValue ();
 
64
                                ObjectValue oval = val.CreateObjectValue (options);
62
65
                                names.FixName (val, oval);
63
66
                                list.Add (oval);
64
67
                        }
65
68
                        if ((bindingFlags & BindingFlags.NonPublic) == 0) {
66
69
                                BindingFlags newFlags = bindingFlags | BindingFlags.NonPublic;
67
70
                                newFlags &= ~BindingFlags.Public;
68
 
                                list.Add (CreateNonPublicsNode (ctx, objectSource, type, obj, newFlags));
 
71
                                list.Add (CreateNonPublicsNode (cctx, objectSource, type, obj, newFlags));
69
72
                        }
70
73
                        return list.ToArray ();
71
74
                }
75
78
                        throw new NotSupportedException ();
76
79
                }
77
80
 
78
 
                public EvaluationResult SetValue (ObjectPath path, string value)
 
81
                public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
79
82
                {
80
83
                        throw new NotSupportedException ();
81
84
                }
 
85
                
 
86
                public object GetRawValue (ObjectPath path, EvaluationOptions options)
 
87
                {
 
88
                        throw new System.NotImplementedException ();
 
89
                }
 
90
                
 
91
                public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
 
92
                {
 
93
                        throw new System.NotImplementedException ();
 
94
                }
82
95
        }
83
96
}