[Monodevelop-patches-list] r2268 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Wed Feb 23 21:43:37 EST 2005
Author: jluke
Date: 2005-02-23 21:43:37 -0500 (Wed, 23 Feb 2005)
New Revision: 2268
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
Log:
fix duplication in completion list
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-02-23 23:36:46 UTC (rev 2267)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-02-24 02:43:37 UTC (rev 2268)
@@ -1,5 +1,11 @@
2005-02-22 John Luke <john.luke at gmail.com>
+ * CodeCompletion/CodeCompletionDataProvider.cs:
+ track the added Classes so we dont add them twice to the
+ completion list, I think it should fix bug 72941
+
+2005-02-22 John Luke <john.luke at gmail.com>
+
* Gui/SourceEditorView.cs (ScrollDown): don't change the
value above maxvalue, fixes a little stutter I noticed
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2005-02-23 23:36:46 UTC (rev 2267)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2005-02-24 02:43:37 UTC (rev 2268)
@@ -34,6 +34,7 @@
public class CodeCompletionDataProvider : ICompletionDataProvider
{
// static AmbienceService ambienceService = (AmbienceService)ServiceManager.Services.GetService(typeof(AmbienceService));
+ Hashtable insertedClasses = new Hashtable ();
Hashtable insertedElements = new Hashtable();
Hashtable insertedPropertiesElements = new Hashtable();
Hashtable insertedEventElements = new Hashtable();
@@ -108,7 +109,11 @@
if (o is string) {
completionData.Add(new CodeCompletionData(o.ToString(), Stock.NameSpace));
} else if (o is IClass) {
- completionData.Add(new CodeCompletionData((IClass)o));
+ IClass iclass = (IClass) o;
+ if (iclass.Name != null && insertedClasses[iclass.Name] == null) {
+ completionData.Add(new CodeCompletionData((IClass)o));
+ insertedClasses[iclass.Name] = iclass;
+ }
} else if (o is IProperty) {
IProperty property = (IProperty)o;
if (property.Name != null && insertedPropertiesElements[property.Name] == null) {
More information about the Monodevelop-patches-list
mailing list