[Monodevelop-patches-list] r1248 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . Gui Gui/OptionPanels Properties

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Mar 25 19:03:38 EST 2004


Author: tberman
Date: 2004-03-25 19:03:38 -0500 (Thu, 25 Mar 2004)
New Revision: 1248

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Properties/TextEditorProperties.cs
Log:
hookup Enable Code Completion option, so now you can turn it off.

next comes ctrl+space action.


Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-03-25 22:19:12 UTC (rev 1247)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-03-26 00:03:38 UTC (rev 1248)
@@ -1,5 +1,12 @@
 2004-03-25  Todd Berman  <tberman at sevenl.net>
 
+	* Properties/TextEditorProperties.cs: add a EnableCodeCompletion prop
+	* Gui/SourceEditorDisplayBinding.cs:
+	* Gui/SourceEditorView.cs: hookup EnabledCodeCompletion prop
+	* Gui/OptionPanels/GeneralTextEditorProperties: sensify checkbox
+
+2004-03-25  Todd Berman  <tberman at sevenl.net>
+
 	* CodeCompletion/CompletionWindow.cs: fix bug that didnt allow you to
 	enter shift+p or shift+n.
 

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs	2004-03-25 22:19:12 UTC (rev 1247)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs	2004-03-26 00:03:38 UTC (rev 1248)
@@ -130,7 +130,6 @@
 
 				// FIXME: enable the sensitivity on these widgets when the implementation has been added
 				enableDoublebufferingCheckBox.Sensitive = false;
-				enableCodeCompletionCheckBox.Sensitive = false;
 			}
 
 			public void Store (IProperties CustomizationObject)

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2004-03-25 22:19:12 UTC (rev 1247)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2004-03-26 00:03:38 UTC (rev 1248)
@@ -313,6 +313,7 @@
 			se.View.ShowLineNumbers = TextEditorProperties.ShowLineNumbers;
 			se.Buffer.CheckBrackets = TextEditorProperties.ShowMatchingBracket;
 			se.View.ShowMargin = TextEditorProperties.ShowVerticalRuler;
+			se.View.EnableCodeCompletion = TextEditorProperties.EnableCodeCompletion;
 			
 			if (TextEditorProperties.VerticalRulerRow > -1) {
 				se.View.Margin = (uint) TextEditorProperties.VerticalRulerRow;

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-03-25 22:19:12 UTC (rev 1247)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-03-26 00:03:38 UTC (rev 1248)
@@ -26,6 +26,7 @@
 		SourceEditorBuffer buf;
 		int lineToMark = -1;
 		CompletionWindow completionWindow;
+		bool codeCompleteEnabled;
 		
 		public static new GLib.GType GType
 		{
@@ -36,6 +37,11 @@
 				return gtype;
 			}
 		}
+
+		public bool EnableCodeCompletion {
+			get { return codeCompleteEnabled; }
+			set { codeCompleteEnabled = value; }
+		}
 		
 		public SourceEditorView (SourceEditorBuffer buf, SourceEditor parent) : base (GType)
 		{
@@ -167,8 +173,10 @@
 
 				case '.':
 					bool retval = base.OnKeyPressEvent (evnt);
-					completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider ());
-					completionWindow.ShowCompletionWindow ((char)key);
+					if (EnableCodeCompletion) {
+						completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider ());
+						completionWindow.ShowCompletionWindow ((char)key);
+					}
 					return retval;
 				/*case '(':
 					try {

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Properties/TextEditorProperties.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Properties/TextEditorProperties.cs	2004-03-25 22:19:12 UTC (rev 1247)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Properties/TextEditorProperties.cs	2004-03-26 00:03:38 UTC (rev 1248)
@@ -56,6 +56,15 @@
 				properties.SetProperty ("TabIndent", value);
 			}
 		}
+
+		public static bool EnableCodeCompletion {
+			get {
+				return properties.GetProperty ("EnableCodeCompletion", true);
+			}
+			set {
+				properties.SetProperty ("EnableCodeCompletion", value);
+			}
+		}
 		
 		public static IndentStyle IndentStyle {
 			get {




More information about the Monodevelop-patches-list mailing list