[Monodevelop-patches-list] r1487 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion Gui

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Apr 20 16:16:45 EDT 2004


Author: tberman
Date: 2004-04-20 16:16:45 -0400 (Tue, 20 Apr 2004)
New Revision: 1487

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
Log:
fix a bug with complete ahead and focus being lost.


Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-04-20 19:28:29 UTC (rev 1486)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-04-20 20:16:45 UTC (rev 1487)
@@ -1,3 +1,10 @@
+2004-04-20  Todd Berman  <tberman at sevenl.net>
+
+	* CodeCompletion/CompletionWindow.cs: Properly attach to the lost focus
+	event.
+	* CodeCompletion/CodeCompletionDataProvider.cs: add //'d dbg info
+	* Gui/SourceEditorView.cs: more of the same.
+
 2004-04-19  Todd Berman  <tberman at sevenl.net>
 
 	* CodeCompletion/CodeCompletionDataProvider.cs: Wrap docs.

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs	2004-04-20 19:28:29 UTC (rev 1486)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs	2004-04-20 20:16:45 UTC (rev 1487)
@@ -73,7 +73,7 @@
 			IExpressionFinder expressionFinder = parserService.GetExpressionFinder(fileName);
 			string expression    = expressionFinder == null ? TextUtilities.GetExpressionBeforeOffset(textArea, insertIter.Offset) : expressionFinder.FindExpression(textArea.Buffer.GetText(textArea.Buffer.StartIter, insertIter, true), insertIter.Offset - 2);
 			if (expression == null) return null;
-
+			//Console.WriteLine ("Expr: |{0}|", expression);
 			//FIXME: This chartyped check is a fucking *HACK*
 			if (ctrlspace && charTyped != '.') {
 				AddResolveResults (parserService.CtrlSpace (parserService, caretLineNumber, caretColumn, fileName));

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs	2004-04-20 19:28:29 UTC (rev 1486)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs	2004-04-20 20:16:45 UTC (rev 1487)
@@ -220,7 +220,7 @@
 			//listView.KeyReleaseEvent += new KeyReleaseEventHandler(ListKeyreleaseEvent);
 			listView.FocusOutEvent += new FocusOutEventHandler (LostFocusListView);
 			listView.RowActivated += new RowActivatedHandler (ActivateItem);
-			listView.AddEvents ((int) (Gdk.EventMask.KeyPressMask));
+			listView.AddEvents ((int) (Gdk.EventMask.KeyPressMask | Gdk.EventMask.LeaveNotifyMask));
 		}
 	
 		/// <remarks>
@@ -312,11 +312,11 @@
 		
 		void LostFocusListView (object sender, FocusOutEventArgs e)
 		{
+			control.buf.DropCompleteAhead ();
+			control.buf.EndAtomicUndo ();
 			control.HasFocus = true;
 			declarationviewwindow.HideAll ();
 			this.Hide ();
-			control.buf.DropCompleteAhead ();
-			control.buf.EndAtomicUndo ();
 		}
 		
 		void FillList (bool firstTime, char ch)

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-04-20 19:28:29 UTC (rev 1486)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-04-20 20:16:45 UTC (rev 1487)
@@ -221,12 +221,12 @@
 			case ' ':
 				string word = GetWordBeforeCaret ();
 				if (word != null) {
-					//if (word.ToLower () == "new") {
-					//	if (EnableCodeCompletion) {
-					//		completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider (true));
-					//		completionWindow.ShowCompletionWindow ((char)key, buf.GetIterAtMark (buf.InsertMark), false);
-					//	}
-					//}
+					/*if (word.ToLower () == "new") {
+						if (EnableCodeCompletion) {
+							completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider (true));
+							completionWindow.ShowCompletionWindow ((char)key, buf.GetIterAtMark (buf.InsertMark), true);
+						}
+					}*/
 					CodeTemplateGroup templateGroup = CodeTemplateLoader.GetTemplateGroupPerFilename(ParentEditor.DisplayBinding.ContentName);
 					
 					if (templateGroup != null) {




More information about the Monodevelop-patches-list mailing list