[MonoDevelop] A service that needs the workbench to be created

Alexandre Gomes alexmipego@hotmail.com
Mon, 13 Dec 2004 18:39:37 +0000


I was trying to implement a Service that needs to bind to any sourceview 
that is openned.
 From what I see the services are loaded before the AutoStart commands 
are executed. So the default workbench it is not created when the 
services are initialized.
After a few research I found no way (event) to know when that happens.

I whish to know how to do this. Anyway, I have patched my 
Workbenchsingleton to enable this if there is no other way.
here is the patch:

 From here 
Index: src/Main/Base/Gui/WorkbenchSingleton.cs
--- src/Main/Base/Gui/WorkbenchSingleton.cs    (revision 2070)
+++ src/Main/Base/Gui/WorkbenchSingleton.cs    (working copy)
@@ -63,6 +63,10 @@
+            if (WorkspaceCreated != null)
+                WorkspaceCreated (null, null);
+        public static event EventHandler WorkspaceCreated;
To here

This adds and event that fires when a Workspace is created and works for 
me. Any way I think that after this should be added another event fired 
when a new workspace is setup. This other event should be called 

Alexandre Gomes, Portugal