diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-11-02 10:03:16 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-11-02 10:03:16 +0400 |
commit | f8e9e1d90d2fb0a859c5682636ee4a8a4e20271b (patch) | |
tree | 5beda2a492ea7e26083947f2309eb5302a85491b /main/src/addins/MonoDevelop.SourceEditor2 | |
parent | fc54ca49eda7af3e9c119256a3b583d03816e103 (diff) | |
parent | b639f9d5574d8b4e6fadfd9012e111165af39643 (diff) |
Merge branch 'master' into newresolver
Conflicts:
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpTextEditorCompletion.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Resolver/TextEditorResolverProvider.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpAmbience.cs
main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
3 files changed, 18 insertions, 13 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml index 028b4a964d..a2c8b00f06 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml @@ -7,16 +7,16 @@ description = "Provides a text editor for the MonoDevelop based on Mono.TextEditor" category = "MonoDevelop Core" flags = "Hidden" - version = "2.8.1"> + version = "2.8.2"> <Runtime> <Import assembly="MonoDevelop.SourceEditor2.dll"/> </Runtime> <Dependencies> - <Addin id="Core" version="2.8.1"/> - <Addin id="Ide" version="2.8.1"/> - <Addin id="Debugger" version="2.8.1"/> + <Addin id="Core" version="2.8.2"/> + <Addin id="Ide" version="2.8.2"/> + <Addin id="Debugger" version="2.8.2"/> </Dependencies> <!-- Extension points --> diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs index 8f3534417a..48bb35ccd6 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs @@ -103,6 +103,8 @@ namespace MonoDevelop.SourceEditor cr.Stroke (); int errorCounterWidth = 0; + marker.EnsureLayoutCreated (base.Editor); + if (marker.Errors.Count > 1) { double rY = y + Editor.LineHeight / 6; int ew, eh; @@ -127,7 +129,6 @@ namespace MonoDevelop.SourceEditor } cr.Color = new Cairo.Color (0, 0, 0); - marker.EnsureLayoutCreated (base.Editor); int layoutWidth, layoutHeight; marker.Layouts [0].Layout.GetPixelSize (out layoutWidth, out layoutHeight); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs index 42298601c2..dd612eb34f 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs @@ -257,20 +257,20 @@ namespace MonoDevelop.SourceEditor void HandleTaskServiceJumpedToTask (object sender, TaskEventArgs e) { - Task task = e.Tasks.FirstOrDefault (); + var task = e.Tasks != null ? e.Tasks.FirstOrDefault () : null; var doc = Document; if (task == null || doc == null || task.FileName != doc.FileName || this.TextEditor == null) return; - LineSegment lineSegment = doc.GetLine (task.Line); + var lineSegment = doc.GetLine (task.Line); if (lineSegment == null) return; - MessageBubbleTextMarker marker = (MessageBubbleTextMarker)lineSegment.Markers.FirstOrDefault (m => m is MessageBubbleTextMarker); + var marker = (MessageBubbleTextMarker)lineSegment.Markers.FirstOrDefault (m => m is MessageBubbleTextMarker); if (marker == null) return; marker.SetPrimaryError (task.Description); - if (TextEditor.IsComposited) { + if (TextEditor != null && TextEditor.IsComposited) { if (messageBubbleHighlightPopupWindow != null) messageBubbleHighlightPopupWindow.Destroy (); messageBubbleHighlightPopupWindow = new MessageBubbleHighlightPopupWindow (this, marker); @@ -1918,15 +1918,19 @@ namespace MonoDevelop.SourceEditor [CommandHandler (TextEditorCommands.MoveBlockUp)] protected void OnMoveBlockUp () { - TextEditor.RunAction (MiscActions.MoveBlockUp); - CorrectIndenting (); + using (var undo = TextEditor.OpenUndoGroup ()) { + TextEditor.RunAction (MiscActions.MoveBlockUp); + CorrectIndenting (); + } } [CommandHandler (TextEditorCommands.MoveBlockDown)] protected void OnMoveBlockDown () { - TextEditor.RunAction (MiscActions.MoveBlockDown); - CorrectIndenting (); + using (var undo = TextEditor.OpenUndoGroup ()) { + TextEditor.RunAction (MiscActions.MoveBlockDown); + CorrectIndenting (); + } } [CommandUpdateHandler (TextEditorCommands.ToggleBlockSelectionMode)] |