50
50
public ExceptionsDialog()
54
54
storeExceptions = new ListStore (typeof(String));
55
55
treeExceptions.Selection.Mode = SelectionMode.Multiple;
56
56
treeExceptions.Model = storeExceptions;
57
57
treeExceptions.AppendColumn ("", new CellRendererText (), "text", 0);
58
58
tstateExc = new TreeViewState (treeExceptions, 0);
59
59
storeExceptions.SetSortColumnId (0, SortType.Ascending);
61
61
storeSelection = new ListStore (typeof(String));
62
62
treeSelected.Selection.Mode = SelectionMode.Multiple;
63
63
treeSelected.Model = storeSelection;
82
82
foreach (var t in dom.FindType (typeof (Exception)).GetSubTypeDefinitions ())
83
83
classes.Add (t.ReflectionName);
85
// no nead to unload this assembly context, it's not cached.
86
var unresolvedAssembly = TypeSystemService.LoadAssemblyContext (Runtime.SystemAssemblyService.CurrentRuntime, MonoDevelop.Core.Assemblies.TargetFramework.Default, typeof(Uri).Assembly.FullName);
87
var mscorlib = TypeSystemService.LoadAssemblyContext (Runtime.SystemAssemblyService.CurrentRuntime, MonoDevelop.Core.Assemblies.TargetFramework.Default, typeof(object).Assembly.FullName);
88
var dom = new ICSharpCode.NRefactory.TypeSystem.Implementation.SimpleCompilation (unresolvedAssembly, mscorlib);
89
foreach (var t in dom.FindType (typeof (Exception)).GetSubTypeDefinitions ())
90
classes.Add (t.ReflectionName);
85
// no need to unload this assembly context, it's not cached.
86
var unresolvedAssembly = TypeSystemService.LoadAssemblyContext (Runtime.SystemAssemblyService.CurrentRuntime, MonoDevelop.Core.Assemblies.TargetFramework.Default, typeof(Uri).Assembly.Location);
87
var mscorlib = TypeSystemService.LoadAssemblyContext (Runtime.SystemAssemblyService.CurrentRuntime, MonoDevelop.Core.Assemblies.TargetFramework.Default, typeof(object).Assembly.Location);
88
if (unresolvedAssembly != null && mscorlib != null) {
89
var dom = new ICSharpCode.NRefactory.TypeSystem.Implementation.SimpleCompilation (unresolvedAssembly, mscorlib);
90
foreach (var t in dom.FindType (typeof (Exception)).GetSubTypeDefinitions ())
91
classes.Add (t.ReflectionName);
94
96
void FillExceptions ()
97
99
storeExceptions.Clear ();
98
string filter = entryFilter.Text.ToLower ();
100
string filter = entryFilter.Text;
99
101
foreach (string t in classes) {
100
if ((filter.Length == 0 || t.ToLower().IndexOf (filter) != -1) && !selectedClasses.Contains (t))
102
if ((filter.Length == 0 || t.IndexOf (filter, StringComparison.OrdinalIgnoreCase) != -1) && !selectedClasses.Contains (t))
101
103
storeExceptions.AppendValues (t);
103
105
tstateExc.Load ();
186
protected virtual void OnEntryFilterActivated (object sender, System.EventArgs e)
188
protected virtual void OnEntryFilterActivated (object sender, EventArgs e)
188
190
OnButtonAddClicked (null, null);
191
protected virtual void OnButtonOkClicked (object sender, System.EventArgs e)
193
protected virtual void OnButtonOkClicked (object sender, EventArgs e)
193
195
foreach (Catchpoint cp in new List<Catchpoint> (DebuggingService.Breakpoints.GetCatchpoints ())) {
194
196
if (!selectedClasses.Contains (cp.ExceptionName))
208
210
args.RetVal = true;
212
214
[GLib.ConnectBefore]
213
215
protected virtual void OnTreeSelectedButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
215
217
if (args.Event.Button == 1 && args.Event.Type == Gdk.EventType.TwoButtonPress)
216
218
OnButtonRemoveClicked (o, args);
219
221
[GLib.ConnectBefore]
220
222
protected virtual void OnTreeExceptionsKeyPressEvent (object o, Gtk.KeyPressEventArgs args)