[Monodevelop-patches-list] r2593 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion Services
Lluis Sanchez <lluis@ximian.com>
lluis at mono-cvs.ximian.com
Thu Jun 9 11:59:41 EDT 2005
Author: lluis
Date: 2005-06-09 11:59:41 -0400 (Thu, 09 Jun 2005)
New Revision: 2593
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs
Log:
2005-06-09 Lluis Sanchez Gual <lluis at novell.com>
* Services/SourceViewService.cs: Added null check.
* CodeCompletion/CompletionListWindow.cs: Added some error checking to
avoid crashes.
* MonoDevelopEditor.addin.xml: Create a toolbar specific for the editor.
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-06-09 15:59:06 UTC (rev 2592)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-06-09 15:59:41 UTC (rev 2593)
@@ -1,3 +1,10 @@
+2005-06-09 Lluis Sanchez Gual <lluis at novell.com>
+
+ * Services/SourceViewService.cs: Added null check.
+ * CodeCompletion/CompletionListWindow.cs: Added some error checking to
+ avoid crashes.
+ * MonoDevelopEditor.addin.xml: Create a toolbar specific for the editor.
+
2005-05-22 Todd Berman <tberman at off.net>
* Gui/Dialogs/ReplaceDialog.cs:
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs 2005-06-09 15:59:06 UTC (rev 2592)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs 2005-06-09 15:59:41 UTC (rev 2593)
@@ -42,7 +42,8 @@
public static void ShowWindow (char firstChar, TextIter trigIter, ICompletionDataProvider provider, SourceEditorView ctrl)
{
- wnd.ShowListWindow (firstChar, trigIter, provider, ctrl);
+ if (!wnd.ShowListWindow (firstChar, trigIter, provider, ctrl))
+ return;
// makes control-space in midle of words to work
TextBuffer buf = wnd.control.Buffer;
@@ -62,7 +63,7 @@
wnd.PartialWord = wnd.CompleteWord;
}
- void ShowListWindow (char firstChar, TextIter trigIter, ICompletionDataProvider provider, SourceEditorView ctrl)
+ bool ShowListWindow (char firstChar, TextIter trigIter, ICompletionDataProvider provider, SourceEditorView ctrl)
{
this.control = ctrl;
this.fileName = ctrl.ParentEditor.DisplayBinding.ContentName;
@@ -70,7 +71,7 @@
triggeringMark = control.Buffer.CreateMark (null, trigIter, true);
completionData = provider.GenerateCompletionData (project, fileName, ctrl, firstChar, triggeringMark);
- if (completionData == null || completionData.Length == 0) return;
+ if (completionData == null || completionData.Length == 0) return false;
this.Style = ctrl.Style.Copy();
@@ -100,6 +101,7 @@
Move (x, y);
Show ();
+ return true;
}
public static void HideWindow ()
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml 2005-06-09 15:59:06 UTC (rev 2592)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml 2005-06-09 15:59:41 UTC (rev 2593)
@@ -147,15 +147,17 @@
<CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.ShowBufferOptions" />
</Extension>
- <Extension path = "/SharpDevelop/Workbench/ToolBar/Standard">
- <CommandItem id = "MonoDevelop.Commands.SearchCommands.Find" insertafter = "CutSeparator" insertbefore = "CompileSeparator" />
- <CommandItem id = "MonoDevelop.Commands.SearchCommands.FindNext" />
- <CommandItem id = "MonoDevelop.Commands.SearchCommands.Replace" />
- <SeparatorItem id = "SearchSeparator" />
- <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.ToggleBookmark" />
- <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.PrevBookmark" />
- <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.NextBookmark" />
- <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.ClearBookmarks" />
+ <Extension path = "/SharpDevelop/Workbench/ToolBar">
+ <ItemSet id = "Search" insertafter = "Standard" insertbefore = "Build">
+ <CommandItem id = "MonoDevelop.Commands.SearchCommands.Find" />
+ <CommandItem id = "MonoDevelop.Commands.SearchCommands.FindNext" />
+ <CommandItem id = "MonoDevelop.Commands.SearchCommands.Replace" />
+ <SeparatorItem id = "SearchSeparator" />
+ <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.ToggleBookmark" />
+ <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.PrevBookmark" />
+ <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.NextBookmark" />
+ <CommandItem id = "MonoDevelop.DefaultEditor.EditorCommands.ClearBookmarks" />
+ </ItemSet>
</Extension>
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs 2005-06-09 15:59:06 UTC (rev 2592)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs 2005-06-09 15:59:41 UTC (rev 2593)
@@ -53,6 +53,7 @@
if (reader.IsStartElement ()) {
switch (reader.Name) {
case "SourceTag":
+ if (lang == null) continue;
string name = reader.GetAttribute ("name");
SourceTagStyle sts = lang.GetTagStyle (name);
sts.Bold = bool.Parse (reader.GetAttribute ("bold"));
More information about the Monodevelop-patches-list
mailing list