[Monodevelop-patches-list] r933 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: CodeCompletion Commands Gui InsightWindow
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Feb 17 00:34:33 EST 2004
Author: tberman
Date: 2004-02-17 00:34:33 -0500 (Tue, 17 Feb 2004)
New Revision: 933
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Commands/SearchCommands.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/InsightWindow/InsightWindow.cs
Log:
update to match gtk#, and fix goto matching brace
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs 2004-02-17 00:11:11 UTC (rev 932)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs 2004-02-17 05:34:33 UTC (rev 933)
@@ -66,7 +66,7 @@
}
}
- protected override bool OnKeyPressEvent (ref Gdk.EventKey e)
+ protected override bool OnKeyPressEvent (Gdk.EventKey e)
{
switch ((char)e.Key) {
case '.':
@@ -78,7 +78,7 @@
LostFocusListView (null, null);
return true;
}
- return base.OnKeyPressEvent (ref e);
+ return base.OnKeyPressEvent (e);
}
void ListKeypressEvent(object sender, KeyPressEventArgs ex)
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Commands/SearchCommands.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Commands/SearchCommands.cs 2004-02-17 00:11:11 UTC (rev 932)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Commands/SearchCommands.cs 2004-02-17 05:34:33 UTC (rev 933)
@@ -19,12 +19,14 @@
using ICSharpCode.Core.Properties;
using ICSharpCode.Core.AddIns.Codons;
+
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Actions;
+using ICSharpCode.TextEditor.Document;
using ICSharpCode.SharpDevelop.Gui.Dialogs;
-using ICSharpCode.TextEditor.Document;
using ICSharpCode.SharpDevelop.Gui;
+using MonoDevelop.SourceEditor.Gui;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
{
@@ -164,14 +166,16 @@
}
}
- public class GotoMatchingBrace : AbstractEditActionMenuCommand
+ public class GotoMatchingBrace : AbstractMenuCommand
{
- public override IEditAction EditAction {
- get {
- Console.WriteLine ("Not implemented in New Editor");
- return null;
- //return new ICSharpCode.TextEditor.Actions.GotoMatchingBrace();
- }
+ public override void Run ()
+ {
+ IWorkbenchWindow wnd = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
+ if (wnd == null) return;
+ SourceEditorDisplayBindingWrapper o = wnd.ViewContent as SourceEditorDisplayBindingWrapper;
+ if (o == null) return;
+
+ o.GotoMatchingBrace ();
}
}
}
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-02-17 00:11:11 UTC (rev 932)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2004-02-17 05:34:33 UTC (rev 933)
@@ -124,6 +124,15 @@
se.View.GrabFocus ();
}
+ public void GotoMatchingBrace ()
+ {
+ TextIter iter = se.Buffer.GetIterAtMark (se.Buffer.InsertMark);
+ if (Source.IterFindMatchingBracket (ref iter)) {
+ Console.WriteLine ("should be moved");
+ se.Buffer.PlaceCursor (iter);
+ }
+ }
+
public override void RedrawContent()
{
}
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-02-17 00:11:11 UTC (rev 932)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-02-17 05:34:33 UTC (rev 933)
@@ -65,10 +65,10 @@
Glue.SimulateKeyPress (Handle, ref evnt);
}
- protected override bool OnKeyPressEvent (ref Gdk.EventKey evnt)
+ protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
Gdk.Key key = evnt.Key;
- uint state = evnt.State;
+ uint state = (uint)evnt.State;
state &= 1101u;
const uint Normal = 0, Shift = 1, Control = 4, ShiftControl = 5, Alt = 8;
@@ -137,7 +137,7 @@
break;
}
- return base.OnKeyPressEvent (ref evnt);
+ return base.OnKeyPressEvent (evnt);
}
public int FindPrevWordStart (string doc, int offset)
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs 2004-02-17 00:11:11 UTC (rev 932)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs 2004-02-17 05:34:33 UTC (rev 933)
@@ -169,14 +169,14 @@
return false;
}
- protected override bool OnKeyPressEvent (ref Gdk.EventKey e)
+ protected override bool OnKeyPressEvent (Gdk.EventKey e)
{
bool rval;
if (ProcessTextAreaKey (e.Key) == false) {
control.SimulateKeyPress (ref e);
rval = true;
} else {
- rval = base.OnKeyPressEvent (ref e);
+ rval = base.OnKeyPressEvent (e);
}
if (DataProvider != null && DataProvider.CharTyped ()) {
CloseCurrentDataProvider ();
More information about the Monodevelop-patches-list
mailing list