[Mono-docs-list] Patch to make index browsing easier
Ben Maurer
bmaurer@users.sourceforge.net
Sat, 23 Aug 2003 18:05:16 -0400
--=-8b6xx/2PhOlujSY98Ez6
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
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
--=-8b6xx/2PhOlujSY98Ez6
Content-Disposition: attachment; filename=monodoc-disambiguate-idxmatches.patch
Content-Type: text/x-patch; name=monodoc-disambiguate-idxmatches.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit
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)
--=-8b6xx/2PhOlujSY98Ez6--