[Monodevelop-patches-list] r2031 - in trunk/MonoDevelop/Core: . src/AddIns/DisplayBindings/SourceEditor/CodeCompletion
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Nov 23 15:32:45 EST 2004
Author: alp
Date: 2004-11-23 15:32:44 -0500 (Tue, 23 Nov 2004)
New Revision: 2031
Modified:
trunk/MonoDevelop/Core/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
Log:
2004-11-23 Alp Toker <alp at atoker.com>
* src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs:
* src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs:
* src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs:
Initial code completion support for overloaded methods.
Modified: trunk/MonoDevelop/Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/ChangeLog 2004-11-19 23:15:58 UTC (rev 2030)
+++ trunk/MonoDevelop/Core/ChangeLog 2004-11-23 20:32:44 UTC (rev 2031)
@@ -1,3 +1,10 @@
+2004-11-23 Alp Toker <alp at atoker.com>
+
+ * src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs:
+ * src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs:
+ * src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs:
+ Initial code completion support for overloaded methods.
+
2004-11-12 Todd Berman <tberman at off.net>
* configure.in: Require 0.6.99 (HEAD SVN) gtksourceview-sharp.
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs 2004-11-19 23:15:58 UTC (rev 2030)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs 2004-11-23 20:32:44 UTC (rev 2031)
@@ -10,6 +10,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
+using System.Collections;
using MonoDevelop.Internal.Parser;
using MonoDevelop.Services;
@@ -137,6 +138,18 @@
description = value;
}
}
+
+ ArrayList overload_data = new ArrayList ();
+
+ public CodeCompletionData[] GetOverloads ()
+ {
+ return (CodeCompletionData[]) overload_data.ToArray (typeof (CodeCompletionData));
+ }
+
+ public void AddOverload (CodeCompletionData overload)
+ {
+ overload_data.Add (overload);
+ }
public CodeCompletionData (string s, string image)
{
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2004-11-19 23:15:58 UTC (rev 2030)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2004-11-23 20:32:44 UTC (rev 2031)
@@ -125,8 +125,9 @@
completionData.Add(ccd);
insertedElements[method.Name] = ccd;
} else {
- CodeCompletionData oldMethod = (CodeCompletionData)insertedElements[method.Name];
- ++oldMethod.Overloads;
+ CodeCompletionData firstMethod = (CodeCompletionData)insertedElements[method.Name];
+ ++firstMethod.Overloads;
+ firstMethod.AddOverload (ccd);
}
}
} else if (o is IField) {
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs 2004-11-19 23:15:58 UTC (rev 2030)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs 2004-11-23 20:32:44 UTC (rev 2031)
@@ -143,17 +143,25 @@
// FIXME: This is a bad calc, its always on the right,
// it needs to test if thats too big, and if so, place on the left;
int horiz = listpos_x + lvWidth + 2;
- ICompletionDataWithMarkup wMarkup = data as ICompletionDataWithMarkup;
+
+ ICompletionDataWithMarkup datawMarkup = data as ICompletionDataWithMarkup;
declarationviewwindow.Destroy ();
-
- if (wMarkup != null) {
- declarationviewwindow = new DeclarationViewWindow ();
- declarationviewwindow.DescriptionMarkup = wMarkup.DescriptionPango;
- } else {
- declarationviewwindow = new DeclarationViewWindow ();
- declarationviewwindow.DescriptionMarkup = data.Description;
+
+ string descMarkup;
+
+ if (datawMarkup != null)
+ descMarkup = datawMarkup.DescriptionPango;
+ else
+ descMarkup = declarationviewwindow.DescriptionMarkup = data.Description;
+
+ foreach (CodeCompletionData odata in ((CodeCompletionData) data).GetOverloads ()) {
+ ICompletionDataWithMarkup odatawMarkup = odata as ICompletionDataWithMarkup;
+ descMarkup += "\n\n" + (odatawMarkup == null ? odata.Description : odatawMarkup.DescriptionPango);
}
-
+
+ declarationviewwindow = new DeclarationViewWindow ();
+ declarationviewwindow.DescriptionMarkup = descMarkup;
+
if (declarationviewwindow.DescriptionMarkup.Length == 0)
return;
More information about the Monodevelop-patches-list
mailing list