[Monodevelop-patches-list] r2763 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Gui/Completion

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Fri Aug 19 05:40:21 EDT 2005


Author: lluis
Date: 2005-08-19 05:40:20 -0400 (Fri, 19 Aug 2005)
New Revision: 2763

Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Completion/CompletionListWindow.cs
Log:
2005-08-19  Lluis Sanchez Gual  <lluis at novell.com> 

	* Gui/Completion/CompletionListWindow.cs: Avoid crash is something
	goes wrong while showing the completion window.



Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-08-18 19:07:07 UTC (rev 2762)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-08-19 09:40:20 UTC (rev 2763)
@@ -1,3 +1,8 @@
+2005-08-19  Lluis Sanchez Gual  <lluis at novell.com> 
+
+	* Gui/Completion/CompletionListWindow.cs: Avoid crash is something
+	goes wrong while showing the completion window.
+
 2005-08-12  Lluis Sanchez Gual  <lluis at novell.com> 
 
 	* Internal/Codons/Commands/LinkItemCodon.cs:

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Completion/CompletionListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Completion/CompletionListWindow.cs	2005-08-18 19:07:07 UTC (rev 2762)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Completion/CompletionListWindow.cs	2005-08-19 09:40:20 UTC (rev 2763)
@@ -38,24 +38,28 @@
 		
 		public static void ShowWindow (char firstChar, ICompletionDataProvider provider, ICompletionWidget completionWidget)
 		{
-			if (!wnd.ShowListWindow (firstChar, provider,  completionWidget))
-				return;
-			
-			// makes control-space in midle of words to work
-			string text = wnd.completionWidget.CompletionText;
-			if (text.Length == 0)
-				return;
-			
-			wnd.PartialWord = text; 
-			//if there is only one matching result we take it by default
-			if (wnd.IsUniqueMatch)
-			{	
-				wnd.Hide ();
+			try {
+				if (!wnd.ShowListWindow (firstChar, provider,  completionWidget))
+					return;
+				
+				// makes control-space in midle of words to work
+				string text = wnd.completionWidget.CompletionText;
+				if (text.Length == 0)
+					return;
+				
+				wnd.PartialWord = text; 
+				//if there is only one matching result we take it by default
+				if (wnd.IsUniqueMatch)
+				{	
+					wnd.Hide ();
+				}
+				
+				wnd.UpdateWord ();
+				
+				wnd.PartialWord = wnd.CompleteWord;
+			} catch (Exception ex) {
+				Console.WriteLine (ex);
 			}
-			
-			wnd.UpdateWord ();
-			
-			wnd.PartialWord = wnd.CompleteWord;		
 		}
 		
 		bool ShowListWindow (char firstChar, ICompletionDataProvider provider, ICompletionWidget completionWidget)




More information about the Monodevelop-patches-list mailing list