Hey guys,
Miguel pointed out to me that if you search for the ToString method in
the index browser, you get this:
ToString method
ToString method
..
I fixed it so that it gives the name of the class. Is this ok to commit?
I think the ECMA provider is the only really common case that we have to
handle, even the Microsoft help docs have duplicate entries in the index
for some things.
-- Ben
Index: browser.cs
===================================================================
RCS file: /cvs/public/monodoc/browser/browser.cs,v
retrieving revision 1.47
diff -u -r1.47 browser.cs
--- browser.cs 10 Aug 2003 02:09:32 -0000 1.47
+++ browser.cs 23 Aug 2003 22:10:34 -0000
@@ -695,7 +695,25 @@
public string GetValue (int row)
{
- return index_browser.current_entry [row].Caption;
+ Topic t = index_browser.current_entry [row];
+
+ // Names from the ECMA provider are somewhat
+ // ambigious (you have like a million ToString
+ // methods), so lets give the user the full name
+
+ // Filter out non-ecma
+ if (t.Url [1] != ':')
+ return t.Caption;
+
+ switch (t.Url [0]) {
+ case 'C': return t.Url.Substring (2) + " constructor";
+ case 'M': return t.Url.Substring (2) + " method";
+ case 'P': return t.Url.Substring (2) + " property";
+ case 'F': return t.Url.Substring (2) + " field";
+ case 'E': return t.Url.Substring (2) + " event";
+ default:
+ return t.Caption;
+ }
}
public string GetDescription (int row)