[Monodevelop-patches-list] r2308 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion Gui
Lluis Sanchez <lluis@ximian.com>
lluis at mono-cvs.ximian.com
Mon Mar 7 15:01:26 EST 2005
Author: lluis
Date: 2005-03-07 15:01:26 -0500 (Mon, 07 Mar 2005)
New Revision: 2308
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml
Log:
2005-03-07 Lluis Sanchez Gual <lluis at novell.com>
* Gui/SourceEditorWidget.cs: Properly dispose the widget.
* Gui/SourceEditorView.cs: Added dispose method.
* Gui/SourceEditorDisplayBinding.cs: Unsubscribe events on dispose.
* CodeCompletion/CodeCompletionDataProvider.cs: Track api changes.
* MonoDevelopEditor.addin.xml: Removed unused view.
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-03-07 20:00:42 UTC (rev 2307)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-03-07 20:01:26 UTC (rev 2308)
@@ -1,3 +1,11 @@
+2005-03-07 Lluis Sanchez Gual <lluis at novell.com>
+
+ * Gui/SourceEditorWidget.cs: Properly dispose the widget.
+ * Gui/SourceEditorView.cs: Added dispose method.
+ * Gui/SourceEditorDisplayBinding.cs: Unsubscribe events on dispose.
+ * CodeCompletion/CodeCompletionDataProvider.cs: Track api changes.
+ * MonoDevelopEditor.addin.xml: Removed unused view.
+
2005-02-26 Poul Andersen <pba at mailme.dk>
* Gui/Dialogs/ReplaceDialog.cs: Added property DialogPointer.
* Gui/Dialogs/ReplaceInFilesDialog.cs: Added property DialogPointer.
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2005-03-07 20:00:42 UTC (rev 2307)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2005-03-07 20:01:26 UTC (rev 2308)
@@ -86,7 +86,7 @@
}
if (charTyped == ' ') {
if (expression == "using" || expression.EndsWith(" using") || expression.EndsWith("\tusing")|| expression.EndsWith("\nusing")|| expression.EndsWith("\rusing")) {
- string[] namespaces = parserService.GetNamespaceList(project, "", true);
+ string[] namespaces = parserService.GetNamespaceList(project, "", true, true);
AddResolveResults(new ResolveResult(namespaces));
}
} else {
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2005-03-07 20:00:42 UTC (rev 2307)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2005-03-07 20:01:26 UTC (rev 2308)
@@ -99,6 +99,7 @@
HBox editorBar;
HBox reloadBar;
internal FileSystemWatcher fsw;
+ IProperties properties;
internal SourceEditor se;
@@ -191,8 +192,8 @@
SetInitialValues ();
PropertyService propertyService = (PropertyService) ServiceManager.GetService (typeof (PropertyService));
- IProperties properties2 = ((IProperties) propertyService.GetProperty("MonoDevelop.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new DefaultProperties()));
- properties2.PropertyChanged += new PropertyEventHandler (PropertiesChanged);
+ properties = ((IProperties) propertyService.GetProperty("MonoDevelop.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new DefaultProperties()));
+ properties.PropertyChanged += new PropertyEventHandler (PropertiesChanged);
fsw = new FileSystemWatcher ();
fsw.Changed += new FileSystemEventHandler (OnFileChanged);
UpdateFSW (null, null);
@@ -239,6 +240,13 @@
public override void Dispose()
{
+ properties.PropertyChanged -= new PropertyEventHandler (PropertiesChanged);
+ se.Buffer.ModifiedChanged -= new EventHandler (OnModifiedChanged);
+ se.Buffer.MarkSet -= new MarkSetHandler (OnMarkSet);
+ se.Buffer.Changed -= new EventHandler (OnChanged);
+ se.View.ToggleOverwrite -= new EventHandler (CaretModeChanged);
+ ContentNameChanged -= new EventHandler (UpdateFSW);
+ se.Dispose ();
fsw.Dispose ();
}
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2005-03-07 20:00:42 UTC (rev 2307)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2005-03-07 20:01:26 UTC (rev 2308)
@@ -58,6 +58,13 @@
buf.Changed += new EventHandler (BufferChanged);
}
+ public new void Dispose ()
+ {
+ buf.MarkSet -= new MarkSetHandler (BufferMarkSet);
+ buf.Changed -= new EventHandler (BufferChanged);
+ base.Dispose ();
+ }
+
void BufferMarkSet (object s, MarkSetArgs a)
{
if (a.Mark.Name == "insert") {
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs 2005-03-07 20:00:42 UTC (rev 2307)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorWidget.cs 2005-03-07 20:01:26 UTC (rev 2308)
@@ -7,9 +7,9 @@
{
public class SourceEditor : ScrolledWindow
{
- public readonly SourceEditorBuffer Buffer;
- public readonly SourceEditorView View;
- public readonly SourceEditorDisplayBindingWrapper DisplayBinding;
+ public SourceEditorBuffer Buffer;
+ public SourceEditorView View;
+ public SourceEditorDisplayBindingWrapper DisplayBinding;
public SourceEditor (SourceEditorDisplayBindingWrapper bind)
{
@@ -27,6 +27,15 @@
Add (View);
}
+
+ public new void Dispose ()
+ {
+ Buffer = null;
+ Remove (View);
+ View.Dispose ();
+ View = null;
+ base.Dispose ();
+ }
public void ExecutingAt (int linenumber)
{
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml 2005-03-07 20:00:42 UTC (rev 2307)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelopEditor.addin.xml 2005-03-07 20:01:26 UTC (rev 2308)
@@ -49,11 +49,6 @@
</Conditional> -->
</Extension>
- <Extension path = "/SharpDevelop/Workbench/Views">
- <Class id = "CompilerMessageView"
- class = "MonoDevelop.EditorBindings.Gui.Pads.CompilerMessageView"/>
- </Extension>
-
<Extension path = "/SharpDevelop/ViewContent/DefaultTextEditor/ContextMenu">
<MenuItem id = "Cut"
_label = "Cut"
More information about the Monodevelop-patches-list
mailing list