Author: mhutch
Date: 2006-08-05 12:45:52 -0400 (Sat, 05 Aug 2006)
New Revision: 63391

Added:
   trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs
   
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/MonoDevelopProxy.cs
Modified:
   
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignContainer.cs
   
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
   
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
   
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/EventBindingService.cs
   trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
   trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs
   
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
   trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.mdp
   trunk/monodevelop/Extras/AspNetEdit/ChangeLog
   trunk/monodevelop/Extras/AspNetEdit/Makefile.am
Log:
2006-08-05 Michael Hutchinson <[EMAIL PROTECTED]>

        * AspNetEdit.mdp:
        * Makefile.am:
          Track new files.
        
        * AspNetEdit.Editor.UI/RootDesignerView.cs:
          Give JS more time to return a document.
        
        * AspNetEdit.Integration/EditorProcess.cs:
          New object for the remoted process. This simplifies GUI thread 
          handling.
        
        * AspNetEdit.Integration/AspNetEditViewContent.cs:
          Use EditorProcess instead of EditorHost.
          Create designer when doc is shown, and destroy when hidden, because 
          the designer process is a heavyweight object.
          Track IToolboxConsumer interface change. 
        
        * AspNetEdit.Integration/MonoDevelopProxy.cs:
          Provides remoted designer with access to methods in MD process, 
          mainly for event binding.
        
        * AspNetEdit.Editor/EditorHost.cs:
          Split away from EditorProcess, and use GuiSyncObject to simplify 
          threading.
          Expose lots of methods and objects.
          Add an IEventBindingService utilising MonoDevelopProxy.
        
        * AspNetEdit.Editor.ComponentModel/DesignContainer.cs:
          Prevent unnecessary generation of extra component names.
        
        * AspNetEdit.Editor.ComponentModel/Document.cs:
        * AspNetEdit.Editor.ComponentModel/DesignerHost.cs:
          Make it easier to load a document from a string rather than a stream.
        
        * AspNetEdit.Editor.ComponentModel/EventBindingService.cs:
          Use MonoDevelopProxy to make this actually work.



Modified: trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs 
2006-08-05 16:11:36 UTC (rev 63390)
+++ trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs 
2006-08-05 16:45:52 UTC (rev 63391)
@@ -1,5 +1,5 @@
 //
-// EditorHost.cs: Hosts AspNetEdit in a remote process for MonoDevelop.
+// EditorHost.cs: Host for AspNetEdit designer.
 //
 // Authors:
 //   Michael Hutchinson <[EMAIL PROTECTED]>
@@ -30,161 +30,128 @@
 //
 
 using System;
-using Gtk;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Drawing.Design;
-using System.ComponentModel.Design.Serialization;
-using System.IO;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.Drawing.Design;
+using System.ComponentModel.Design.Serialization;
 
-using MonoDevelop.Core.Execution;
-using MonoDevelop.Core;
+using MonoDevelop.Core.Gui;
 using MonoDevelop.DesignerSupport.Toolbox;
 
-using AspNetEdit.Editor.UI;
 using AspNetEdit.Editor.ComponentModel;
+using AspNetEdit.Editor.UI;
+using AspNetEdit.Integration;
 
 namespace AspNetEdit.Editor
 {
        
-       public class EditorHost : 
MonoDevelop.DesignerSupport.RemoteDesignerProcess
+       public class EditorHost : GuiSyncObject, IDisposable
        {
                DesignerHost host;
                ServiceContainer services;
-               Frame geckoFrame;
-               PropertyGrid propertyGrid;
+               RootDesignerView designerView;
+               MonoDevelopProxy proxy;
                
-               public EditorHost ()
+               public EditorHost (MonoDevelopProxy proxy)
+                       : this (proxy, null, null)
                {
+               }
+               
+               public EditorHost (MonoDevelopProxy proxy, string document, 
string fileName)
+               {
+                       
MonoDevelop.Core.Gui.Services.DispatchService.AssertGuiThread ();
                        
-                       #if TRACE
-                               System.Diagnostics.TextWriterTraceListener 
listener = new System.Diagnostics.TextWriterTraceListener (System.Console.Out);
-                               System.Diagnostics.Trace.Listeners.Add 
(listener);
-                       #endif
+                       this.proxy = proxy;
                        
-                       #region Designer services and host
-                       
                        //set up the services
                        services = new ServiceContainer ();
                        services.AddService (typeof (INameCreationService), new 
NameCreationService ());
                        services.AddService (typeof (ISelectionService), new 
SelectionService ());
-                       //services.AddService (typeof (IEventBindingService), 
new EventBindingService (window));
-                       services.AddService (typeof (ITypeResolutionService), 
new TypeResolutionService ());
-                       ExtenderListService extListServ = new 
AspNetEdit.Editor.ComponentModel.ExtenderListService ();
+                       services.AddService (typeof (ITypeResolutionService), 
new TypeResolutionService ());
+                       services.AddService (typeof (IEventBindingService), new 
EventBindingService (proxy));
+                       ExtenderListService extListServ = new 
ExtenderListService ();
                        services.AddService (typeof (IExtenderListService), 
extListServ);
                        services.AddService (typeof (IExtenderProviderService), 
extListServ);
-                       services.AddService (typeof 
(ITypeDescriptorFilterService), new TypeDescriptorFilterService ());
-                       //services.AddService (typeof (IToolboxService), 
toolboxService);
+                       services.AddService (typeof 
(ITypeDescriptorFilterService), new TypeDescriptorFilterService ());
+                       //services.AddService (typeof (IToolboxService), 
toolboxService);
                        
-                       #endregion
-                       
-                       #region build the GUI
+                       System.Diagnostics.Trace.WriteLine ("Creating 
AspNetEdit editor");
+                       host = new DesignerHost (services);
                        
-                       Gtk.VBox outerBox = new Gtk.VBox ();
+                       if (document != null)
+                               host.Load (document, fileName);
+                       else
+                               host.NewFile ();
                        
-                       geckoFrame = new Frame ();
-                       geckoFrame.Shadow = ShadowType.In;
-                       outerBox.PackEnd (geckoFrame, true, true, 0);
+                       host.Activate ();
+                       System.Diagnostics.Trace.WriteLine ("AspNetEdit host 
activated; getting designer view");
                        
-                       Toolbar tb = BuildToolbar ();
-                       outerBox.PackStart (tb, false, false, 0);
+                       IRootDesigner rootDesigner = (IRootDesigner) 
host.GetDesigner (host.RootComponent);
+                       designerView = (RootDesignerView) rootDesigner.GetView 
(ViewTechnology.Passthrough);
+                       designerView.Realized += delegate { 
System.Diagnostics.Trace.WriteLine ("Designer view realized"); };
+               }
+               
+               public Gtk.Widget DesignerView {
+                       get { return designerView; }
+               }
+               
+               public ServiceContainer Services {
+                       get { return services; }
+               }
+               
+               public DesignerHost DesignerHost {
+                       get { return host; }
+               }
+               
+               public void UseToolboxNode (ItemToolboxNode node)
+               {
+                       ToolboxItemToolboxNode tiNode = node as 
ToolboxItemToolboxNode;
+                       if (tiNode != null) {
+                               System.Drawing.Design.ToolboxItem ti = 
tiNode.GetToolboxItem ();
+                               ti.CreateComponents (host);
+                       }
+               }
+               
+               public void LoadDocument (string document, string fileName)
+               {
+                       System.Diagnostics.Trace.WriteLine ("Copying document 
to editor.");
+                       host.Reset ();
                        
-                       outerBox.ShowAll ();    
-                       base.DesignerWidget = outerBox;
+                       host.Load (document, fileName);
+                       host.Activate ();
+               }
+               
+               public string GetDocument ()
+               {
+                       
MonoDevelop.Core.Gui.Services.DispatchService.AssertGuiThread ();
+                       string doc = "";
                        
-                       #endregion GUI
-                       
-                       StartGuiThread ();
-                       
-                       Gtk.Application.Invoke (delegate {
-                               System.Diagnostics.Trace.WriteLine ("Activating 
host");
-                               host = new DesignerHost (services);
+                       System.Console.WriteLine("persisting document");
+                       doc = host.PersistDocument ();
                                
-                               //grid picks up some services from the designer 
host
-                               propertyGrid = new PropertyGrid (services);
-                               propertyGrid.ShowAll ();
-                               base.PropertyGridWidget = propertyGrid;
-                               
-                               host.NewFile ();
-                               host.Activate ();
-                               
-                               IRootDesigner rootDesigner = (IRootDesigner) 
host.GetDesigner (host.RootComponent);
-                               RootDesignerView designerView = 
(RootDesignerView) rootDesigner.GetView (ViewTechnology.Passthrough);
-                               geckoFrame.Add (designerView);
-                               
-                               geckoFrame.ShowAll ();
-                               
-                               designerView.Realized += delegate { 
System.Diagnostics.Trace.WriteLine ("Designer view realized"); };
-                       });
+                       return doc;
                }
                
-               Toolbar BuildToolbar ()
+               #region IDisposable
+               
+               bool disposed = false;
+               public virtual void Dispose ()
                {
-                       Toolbar buttons = new Toolbar ();
-                       
-                       // * Clipboard
-                       
-                       ToolButton undoButton = new ToolButton (Stock.Undo);
-                       buttons.Add (undoButton);
-                       undoButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Undo); };
-
-                       ToolButton redoButton = new ToolButton (Stock.Redo);
-                       buttons.Add (redoButton);
-                       redoButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Redo); };
-
-                       ToolButton cutButton = new ToolButton (Stock.Cut);
-                       buttons.Add (cutButton);
-                       cutButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Cut); };
-
-                       ToolButton copyButton = new ToolButton (Stock.Copy);
-                       buttons.Add (copyButton);
-                       copyButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Copy); };
-
-                       ToolButton pasteButton = new ToolButton (Stock.Paste);
-                       buttons.Add (pasteButton);
-                       pasteButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Paste); };
+                       System.Console.WriteLine("disposing editor host");
+                       if (disposed)
+                               return;
                        
-                       
-                       // * Text style
-                       
-                       buttons.Add (new SeparatorToolItem());
-                       
-                       ToolButton boldButton = new ToolButton (Stock.Bold);
-                       buttons.Add (boldButton);
-                       boldButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Bold); };
-                       
-                       ToolButton italicButton = new ToolButton (Stock.Italic);
-                       buttons.Add (italicButton);
-                       italicButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Italic); };
-                       
-                       ToolButton underlineButton = new ToolButton 
(Stock.Underline);
-                       buttons.Add (underlineButton);
-                       underlineButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Underline); };
-                       
-                       ToolButton indentButton = new ToolButton (Stock.Indent);
-                       buttons.Add (indentButton);
-                       indentButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Indent); };
-                       
-                       ToolButton unindentButton = new ToolButton 
(Stock.Unindent);
-                       buttons.Add (unindentButton);
-                       unindentButton.Clicked += delegate { 
host.RootDocument.DoCommand (EditorCommand.Outdent); };
+                       disposed = true;
+                       designerView.Dispose ();
                        
-                       return buttons;
+                       GC.SuppressFinalize (this);
                }
                
-               #region expose commands to MD
-               
-               public void UseToolboxNode (ItemToolboxNode node)
+               ~EditorHost ()
                {
-                       ToolboxItemToolboxNode tiNode = node as 
ToolboxItemToolboxNode;
-                       if (tiNode != null) {
-                               Gtk.Application.Invoke (delegate {
-                                       System.Drawing.Design.ToolboxItem ti = 
tiNode.GetToolboxItem ();
-                                       ti.CreateComponents (host);
-                               });
-                       }
+                       Dispose ();
                }
                
-               #endregion
+               #endregion IDisposable
        }
 }

Modified: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignContainer.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignContainer.cs
     2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignContainer.cs
     2006-08-05 16:45:52 UTC (rev 63391)
@@ -76,7 +76,7 @@
                        if (nameService == null)
                                throw new Exception ("The container must have 
access to a INameCreationService implementation");
                        
-                       if (name == null || nameService.IsValidName (name)) {
+                       if (name == null || !nameService.IsValidName (name)) {
                                name = nameService.CreateName (this, 
component.GetType ());
                                System.Diagnostics.Trace.WriteLine("Generated 
name for component: "+name);
                        }
@@ -214,7 +214,10 @@
                public event ComponentRenameEventHandler ComponentRename;
 
                public void OnComponentChanged(object component, 
MemberDescriptor member, object oldValue, object newValue)
-               {               
+               {
+                       if (oldValue == newValue)
+                               return;
+                       
                        //the names of components in this container are 
actually the same as their IDs
                        //so if a change to the ID occurs, we hook in and 
change it back if not valid
                        if(component is Control && ((Control) 
component).Site.Container == this && member.Name == "ID") {
@@ -271,7 +274,7 @@
                }
 
                protected void OnComponentRename(object component, string 
oldName, string newName)
-               {
+               {
                        host.RootDocument.RenameControl (oldName, newName);
 
                        if (ComponentRename != null)

Modified: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
        2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
        2006-08-05 16:45:52 UTC (rev 63391)
@@ -381,14 +381,22 @@
                        OnLoadComplete ();
                }
 
-               public void Load(Stream file, string fileName)
+               public void Load (Stream file, string fileName)
+               {
+                       using (TextReader reader = new StreamReader (file))
+                       {
+                               Load (reader.ReadToEnd (), fileName);
+                       }
+               }
+               
+               public void Load (string document, string fileName)
                {
                        if (activated || RootComponent != null)
                                throw new InvalidOperationException ("You must 
reset the host before loading another file.");
                        loading = true;
 
                        this.Container.Add (new WebFormPage());
-                       this.rootDocument = new Document 
((Control)rootComponent, this, file, fileName);
+                       this.rootDocument = new Document 
((Control)rootComponent, this, document, fileName);
 
                        loading = false;
                        OnLoadComplete ();
@@ -406,7 +414,7 @@
                        }
                }
 
-               public void SaveDocument (Stream file)
+               public void SaveDocumentToFile (Stream file)
                {
                        StreamWriter writer = new StreamWriter (file);
 
@@ -414,6 +422,11 @@
                        writer.Flush ();
                }
                
+               public string PersistDocument ()
+               {
+                       return RootDocument.PersistDocument ();
+               }
+               
                /*TODO: Some .NET 2.0 System.Web.UI.Design.WebFormsRootDesigner 
methods
                public abstract void RemoveControlFromDocument(Control control);
                public virtual void SetControlID(Control control, string id);

Modified: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
    2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
    2006-08-05 16:45:52 UTC (rev 63391)
@@ -68,20 +68,10 @@
                }
                
                ///<summary>Creates a document from an existing file</summary>
-               public Document (Control parent, DesignerHost host, Stream 
fileStream, string fileName)
+               public Document (Control parent, DesignerHost host, string 
document, string fileName)
                {
-                       initDocument (parent, host);
-
-                       TextReader reader = new StreamReader (fileStream);
-                       try {
-                               this.document = DeserializeAndAdd 
(reader.ReadToEnd ());
-                       }
-                       catch (ParseException ex) {
-                               this.document = ConstructErrorDocument 
(ex.Title, ex.Message);
-                       }
-                       catch (Exception ex) {
-                               this.document = ConstructErrorDocument ("Error 
loading document", ex.Message + ex.StackTrace);
-                       }
+                       initDocument (parent, host);
+                       this.document = DeserializeAndAdd (document);
 
                        GetView ();
                }

Modified: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/EventBindingService.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/EventBindingService.cs
 2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/EventBindingService.cs
 2006-08-05 16:45:52 UTC (rev 63391)
@@ -28,7 +28,8 @@
  * USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-using System;
+using System;
+using System.CodeDom;
 using System.ComponentModel.Design;
 using System.ComponentModel;
 using System.Collections;
@@ -39,25 +40,15 @@
 {
        public class EventBindingService : IEventBindingService
        {
-               //TODO: Remove once we get code view
-               Gtk.Window parentWindow;
+               AspNetEdit.Integration.MonoDevelopProxy proxy;
                
-               public EventBindingService (Gtk.Window parentWindow)
+               public EventBindingService 
(AspNetEdit.Integration.MonoDevelopProxy proxy)
                {
-                       this.parentWindow = parentWindow;
+                       this.proxy = proxy;
                }
-               
-               //TODO: Remove after getting code view
-               private void ShowMessage (string mess)
-               {
-                       Gtk.MessageDialog md = new Gtk.MessageDialog 
(parentWindow, Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Info, 
Gtk.ButtonsType.Close, mess);
-                       md.Run ();
-                       md.Destroy ();
-               }                               
+                                       
                #region IEventBindingService Members
                
-               private Hashtable eventHandlers = new Hashtable ();
-               
                public string CreateUniqueMethodName (IComponent component, 
EventDescriptor e)
                {
                        if (component.Site == null || component.Site.Name == 
null)
@@ -65,30 +56,16 @@
                        
                        //TODO: check component.Site.Name is valid as start of 
method name
                        string trialPrefix = component.Site.Name + "_" + e.Name;
-                       string trialValue = trialPrefix;
                        
-                       for (int suffix = 1; suffix <= int.MaxValue; suffix++)
-                       {
-                               if (!eventHandlers.ContainsKey (trialValue))
-                                       return trialValue;
-                               
-                               trialValue = trialPrefix + suffix.ToString ();
-                       }
-                       
-                       throw new Exception ("Tried method names up to " + 
trialValue + " and all already existed");
+                       return proxy.GenerateIdentifierUniqueInCodeBehind 
(trialPrefix);
                }
 
                public System.Collections.ICollection GetCompatibleMethods 
(System.ComponentModel.EventDescriptor e)
                {
-                       ParameterInfo[] pi = GetEventParameters (e);
+                       MethodInfo mi = e.EventType.GetMethod ("Invoke");       
                
+                       CodeMemberMethod methodSignature = 
MonoDevelop.DesignerSupport.BindingService.ReflectionToCodeDomMethod (mi);
                        
-                       ArrayList arr = new ArrayList ();
-                       
-                       foreach (DictionaryEntry de in eventHandlers)
-                               if ( (ParameterInfo[]) de.Value == pi)
-                                       arr.Add (de.Key); 
-                       
-                       return arr.ToArray (typeof(string));
+                       return proxy.GetCompatibleMethodsInCodeBehind 
(methodSignature);
                }
 
                public System.ComponentModel.EventDescriptor GetEvent 
(System.ComponentModel.PropertyDescriptor property)
@@ -97,7 +74,7 @@
                        if (epd == null)
                                return null;
                        
-                       return epd.InternalEventDescriptor;
+                       return epd.InternalEventDescriptor;
                }
 
                public System.ComponentModel.PropertyDescriptorCollection 
GetEventProperties (System.ComponentModel.EventDescriptorCollection events)
@@ -115,8 +92,7 @@
                        if (e == null) throw new ArgumentNullException ("e");
                        return new EventPropertyDescriptor (e);
                }
-
-               //TODO: actually show code and return true if exists
+
                public bool ShowCode (System.ComponentModel.IComponent 
component, System.ComponentModel.EventDescriptor e)
                {
                        PropertyDescriptor pd = GetEventProperty (e);
@@ -127,21 +103,17 @@
                                pd.SetValue (component, name);
                        }
                        
-                       if (eventHandlers.ContainsKey (name))
-                               ShowMessage("In an IDE this would show the 
existing CodeBehind method \"" + name + "\".");
-                       else {
-                               eventHandlers.Add (name, GetEventParameters (e) 
);
-                               ShowMessage("In an IDE this would create and 
show the CodeBehind method \"" + name + "\".");
-                       }
+                       MethodInfo mi = e.EventType.GetMethod ("Invoke");
+                       CodeMemberMethod methodSignature = 
MonoDevelop.DesignerSupport.BindingService.ReflectionToCodeDomMethod (mi);
+                       methodSignature.Name = name;
+                       methodSignature.Attributes = MemberAttributes.Family;
                        
-                       return true;
+                       return proxy.ShowMethod (methodSignature);
                }
-
-               //TODO: actually show code and return true if exists
+
                public bool ShowCode (int lineNumber)
-               {
-                       ShowMessage ("In an IDE this would show the code at 
line " + lineNumber.ToString ());
-                       return true;
+               {
+                       return proxy.ShowLine (lineNumber);
                }
 
                public bool ShowCode ()
@@ -149,13 +121,7 @@
                        return ShowCode (0);
                }
 
-               #endregion
-               
-               private ParameterInfo[] GetEventParameters (EventDescriptor e)
-               {
-                       MethodInfo mi = e.EventType.GetMethod ("Invoke");
-                       return mi.GetParameters ();
-               }
+               #endregion
        }
 
        internal class EventPropertyDescriptor : PropertyDescriptor

Modified: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs    
    2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs    
    2006-08-05 16:45:52 UTC (rev 63391)
@@ -187,13 +187,13 @@
                }
                
                internal new string GetDocument ()
-               {
+               {
                        comm.JSCall (GeckoFunctions.GetPage, "DocumentReturn", 
null);
                        
                        int counter = 0;
                        do {
-                               //only allow JS 5 seconds to return value
-                               if (counter > 50) throw new Exception ("Mozilla 
did not return value during 5 seconds");
+                               //only allow JS 20 seconds to return value
+                               if (counter > 200) throw new Exception 
("Mozilla did not return value during 20 seconds");
                                
                                System.Threading.Thread.Sleep (100);
                                counter++;

Modified: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
 2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
 2006-08-05 16:45:52 UTC (rev 63391)
@@ -32,66 +32,148 @@
 
 using System;
 using System.ComponentModel;
+using Gtk;
 
 using MonoDevelop.Ide.Gui;
+using MonoDevelop.Ide.Gui.Content;
 using MonoDevelop.Core;
 using MonoDevelop.Core.Execution;
 using MonoDevelop.DesignerSupport.Toolbox;
+using MonoDevelop.DesignerSupport;
 
 using AspNetEdit.Editor;
 
 namespace AspNetEdit.Integration
 {
        
-       public class AspNetEditViewContent : AbstractSecondaryViewContent, 
IToolboxConsumer
+       public class AspNetEditViewContent : AbstractSecondaryViewContent, 
IToolboxConsumer //, IEditableTextBuffer
        {
                IViewContent viewContent;
-               EditorHost editor;
+               EditorProcess editorProcess;
+               
                Gtk.Socket designerSocket;
                Gtk.Socket propGridSocket;
                
+               Frame designerFrame;
+               
+               MonoDevelopProxy proxy;
+               
                internal AspNetEditViewContent (IViewContent viewContent)
                {
                        this.viewContent = viewContent;
                        
-                       editor = (EditorHost) 
Runtime.ProcessService.CreateExternalProcessObject (typeof (EditorHost), false);
+                       designerFrame = new Gtk.Frame ();
+                       designerFrame.Shadow = ShadowType.None;
+                       designerFrame.BorderWidth = 0;
                        
+                       designerFrame.Show ();
+               }
+               
+               void UsePropGrid ()
+               {
+                       
MonoDevelop.DesignerSupport.DesignerSupport.Service.PropertyPad.UseCustomWidget 
(propGridSocket);
+               }
+               
+               public override Gtk.Widget Control {
+                       get { return designerFrame; }
+               }
+               
+               public override string TabPageLabel {
+                       get { return "Designer"; }
+               }
+               
+               public override void Dispose()
+               {
+                       DestroyEditorAndSockets ();
+                       designerFrame.Destroy ();
+               }
+               
+               public override void Selected ()
+               {
+                       if (editorProcess != null)
+                               throw new Exception ("Editor should be null 
when document is selected");
+                       
                        designerSocket = new Gtk.Socket ();
+                       designerSocket.Show ();
+                       designerFrame.Add (designerSocket);
+                       
                        propGridSocket = new Gtk.Socket ();
+                       propGridSocket.Show ();
                        
-                       designerSocket.Realized += delegate { 
editor.AttachDesigner (designerSocket.Id); };
-                       propGridSocket.Realized += delegate { 
editor.AttachPropertyGrid (propGridSocket.Id); };
+                       editorProcess = (EditorProcess) 
Runtime.ProcessService.CreateExternalProcessObject (typeof (EditorProcess), 
false);
                        
+                       if (designerSocket.IsRealized)
+                               editorProcess.AttachDesigner 
(designerSocket.Id);
+                       if (propGridSocket.IsRealized)
+                               editorProcess.AttachPropertyGrid 
(propGridSocket.Id);
+                       
+                       designerSocket.Realized += delegate { 
editorProcess.AttachDesigner (designerSocket.Id); };
+                       propGridSocket.Realized += delegate { 
editorProcess.AttachPropertyGrid (propGridSocket.Id); };
+                       
                        //designerSocket.FocusOutEvent += delegate {
                        //      
MonoDevelop.DesignerSupport.DesignerSupport.Service.PropertyPad.BlankPad (); };
-                       designerSocket.FocusInEvent += delegate {
-                               
MonoDevelop.DesignerSupport.DesignerSupport.Service.PropertyPad.UseCustomWidget 
(propGridSocket);
-                       };
+                       designerSocket.FocusInEvent += delegate { UsePropGrid 
(); };
                        
+                       //hook up proxy for event binding
+                       MonoDevelop.Projects.Parser.IClass codeBehind = null;
+                       if (viewContent.Project != null) {
+                               MonoDevelop.Projects.ProjectFile pf = 
viewContent.Project.GetProjectFile (viewContent.ContentName);
+                               if (pf != null)
+                                       codeBehind = 
DesignerSupport.Service.CodeBehindService.GetCodeBehind (pf);
+                       }
+                       proxy = new MonoDevelopProxy (codeBehind);
                        
+                       MonoDevelop.Ide.Gui.Content.ITextBuffer textBuf = 
(MonoDevelop.Ide.Gui.Content.ITextBuffer) viewContent;                        
+                       editorProcess.Initialise (proxy, textBuf.Text, 
viewContent.ContentName);
+                       UsePropGrid ();
                }
                
-               public override Gtk.Widget Control {
-                       get { return designerSocket; }
+               public override void Deselected ()
+               {
+                       if (!editorProcess.ExceptionOccurred) {
+                               MonoDevelop.Ide.Gui.Content.IEditableTextBuffer 
textBuf = (MonoDevelop.Ide.Gui.Content.IEditableTextBuffer) viewContent;
+                               
+                               string doc = null;
+                               try {
+                                       doc = editorProcess.Editor.GetDocument 
();
+                               } catch (Exception e) {
+                                       
IdeApp.Services.MessageService.ShowError (e, "The document could not be 
retrieved from the designer");
+                               }
+                               
+                               if (doc != null)
+                                       textBuf.Text = doc;
+                       }
+                       
+                       proxy = null;
+                       
+                       DestroyEditorAndSockets ();
                }
                
-               public override string TabPageLabel {
-                       get { return "Designer"; }
-               }
-               
-               public override void Dispose()
+               void DestroyEditorAndSockets ()
                {
-                       propGridSocket.Dispose ();
-                       designerSocket.Dispose ();
-                       editor.Dispose ();
+                       if (editorProcess != null) {
+                               editorProcess.Dispose ();
+                               editorProcess = null;
+                       }
+                       
+                       if (propGridSocket != null) {
+                               propGridSocket.Dispose ();
+                               propGridSocket = null;
+                       }
+                       
+                       if (designerSocket != null) {
+                               designerFrame.Remove (designerSocket);
+                               designerSocket.Dispose ();
+                               designerSocket = null;
+                       }
                }
                
                #region IToolboxConsumer
                
-               public void Use (ItemToolboxNode node)
+               public void ConsumeItem (ItemToolboxNode node)
                {
                        if (node is ToolboxItemToolboxNode)
-                               editor.UseToolboxNode (node);
+                               editorProcess.Editor.UseToolboxNode (node);
                }
                
                //used to filter toolbox items
@@ -103,6 +185,11 @@
                        get { return atts; }
                }
                
+               public System.Collections.Generic.IList<ItemToolboxNode> 
GetDynamicItems ()
+               {
+                       return null;
+               }
+               
                //Used if ToolboxItemFilterAttribute demands 
ToolboxItemFilterType.Custom
                //If not expecting it, should just return false
                public bool CustomFilterSupports (ItemToolboxNode item)

Added: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs 
2006-08-05 16:11:36 UTC (rev 63390)
+++ trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs 
2006-08-05 16:45:52 UTC (rev 63391)
@@ -0,0 +1,170 @@
+//
+// EditorProcess.cs: Hosts AspNetEdit in a remote process for MonoDevelop.
+//
+// Authors:
+//   Michael Hutchinson <[EMAIL PROTECTED]>
+//
+// Copyright (C) 2006 Michael Hutchinson
+//
+//
+// This source code is licenced under The MIT License:
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using Gtk;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.Drawing.Design;
+using System.ComponentModel.Design.Serialization;
+using System.IO;
+
+using MonoDevelop.Core.Execution;
+using MonoDevelop.Core;
+using MonoDevelop.DesignerSupport.Toolbox;
+
+using AspNetEdit.Editor.UI;
+using AspNetEdit.Editor.ComponentModel;
+using AspNetEdit.Integration;
+
+namespace AspNetEdit.Editor
+{
+       
+       public class EditorProcess : 
MonoDevelop.DesignerSupport.RemoteDesignerProcess
+       {
+               EditorHost host;
+               ServiceContainer services;
+               Frame geckoFrame;
+               PropertyGrid propertyGrid;
+               
+               public EditorProcess ()
+               {
+                       #if TRACE
+                               System.Diagnostics.TextWriterTraceListener 
listener = new System.Diagnostics.TextWriterTraceListener (System.Console.Out);
+                               System.Diagnostics.Trace.Listeners.Add 
(listener);
+                       #endif
+               }
+               
+               public void Initialise (MonoDevelopProxy proxy, string 
document, string fileName)
+               {
+                       StartGuiThread ();
+                       Gtk.Application.Invoke ( delegate { LoadGui (proxy, 
document, fileName); });
+               }
+               
+               public EditorHost Editor {
+                       get { return host; }
+               }
+               
+               void LoadGui (MonoDevelopProxy proxy, string document, string 
fileName)
+               {
+                       System.Diagnostics.Trace.WriteLine ("Creating 
AspNetEdit EditorHost");
+                       host = new EditorHost (proxy, document, fileName);
+                       System.Diagnostics.Trace.WriteLine ("Created AspNetEdit 
EditorHost");
+                       
+                       System.Diagnostics.Trace.WriteLine ("Building 
AspNetEdit GUI");
+                       Gtk.VBox outerBox = new Gtk.VBox ();
+                       
+                       geckoFrame = new Frame ();
+                       geckoFrame.Shadow = ShadowType.In;
+                       geckoFrame.Add (host.DesignerView);
+                       outerBox.PackEnd (geckoFrame, true, true, 0);
+                       
+                       Toolbar tb = BuildToolbar ();
+                       outerBox.PackStart (tb, false, false, 0);
+                       
+                       outerBox.ShowAll ();    
+                       base.DesignerWidget = outerBox;
+                       
+                       //grid picks up some services from the designer host
+                       propertyGrid = new PropertyGrid (host.Services);
+                       propertyGrid.ShowAll ();
+                       base.PropertyGridWidget = propertyGrid;
+                       System.Diagnostics.Trace.WriteLine ("Built AspNetEdit 
GUI");
+               }
+               
+               Toolbar BuildToolbar ()
+               {
+                       Toolbar buttons = new Toolbar ();
+                       
+                       // * Clipboard
+                       
+                       ToolButton undoButton = new ToolButton (Stock.Undo);
+                       buttons.Add (undoButton);
+                       undoButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Undo); };
+
+                       ToolButton redoButton = new ToolButton (Stock.Redo);
+                       buttons.Add (redoButton);
+                       redoButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Redo); };
+
+                       ToolButton cutButton = new ToolButton (Stock.Cut);
+                       buttons.Add (cutButton);
+                       cutButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Cut); };
+
+                       ToolButton copyButton = new ToolButton (Stock.Copy);
+                       buttons.Add (copyButton);
+                       copyButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Copy); };
+
+                       ToolButton pasteButton = new ToolButton (Stock.Paste);
+                       buttons.Add (pasteButton);
+                       pasteButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Paste); };
+                       
+                       
+                       // * Text style
+                       
+                       buttons.Add (new SeparatorToolItem());
+                       
+                       ToolButton boldButton = new ToolButton (Stock.Bold);
+                       buttons.Add (boldButton);
+                       boldButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Bold); };
+                       
+                       ToolButton italicButton = new ToolButton (Stock.Italic);
+                       buttons.Add (italicButton);
+                       italicButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Italic); };
+                       
+                       ToolButton underlineButton = new ToolButton 
(Stock.Underline);
+                       buttons.Add (underlineButton);
+                       underlineButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Underline); };
+                       
+                       ToolButton indentButton = new ToolButton (Stock.Indent);
+                       buttons.Add (indentButton);
+                       indentButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Indent); };
+                       
+                       ToolButton unindentButton = new ToolButton 
(Stock.Unindent);
+                       buttons.Add (unindentButton);
+                       unindentButton.Clicked += delegate { 
host.DesignerHost.RootDocument.DoCommand (EditorCommand.Outdent); };
+                       
+                       return buttons;
+               }
+               
+               bool disposed = false;
+               public override void Dispose ()
+               {
+                       System.Diagnostics.Trace.WriteLine("Disposing 
AspNetEdit editor process");
+                       
+                       if (disposed)
+                               return;
+                       disposed = true;
+                       
+                       host.Dispose ();                
+                       base.Dispose ();
+               }
+       }
+}

Added: 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/MonoDevelopProxy.cs
===================================================================
--- 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/MonoDevelopProxy.cs  
    2006-08-05 16:11:36 UTC (rev 63390)
+++ 
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Integration/MonoDevelopProxy.cs  
    2006-08-05 16:45:52 UTC (rev 63391)
@@ -0,0 +1,102 @@
+//
+// MonoDevelopProxy.cs: Proxies methods that run in the MD process so 
+//    that they are remotely accessible to the AspNetEdit process.
+//
+// Authors:
+//   Michael Hutchinson <[EMAIL PROTECTED]>
+//
+// Copyright (C) 2006 Michael Hutchinson
+//
+//
+// This source code is licenced under The MIT License:
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.CodeDom;
+using System.Collections.Generic;
+
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Projects.Parser;
+using MonoDevelop.DesignerSupport;
+
+namespace AspNetEdit.Integration
+{
+       
+       public class MonoDevelopProxy : MarshalByRefObject
+       {
+               IClass codeBehindClass;
+               
+               public MonoDevelopProxy (IClass codeBehindClass)
+               {
+                       this.codeBehindClass = codeBehindClass;
+               }
+               
+               
+               //TODO: make this work with inline code
+               #region event binding
+               
+               public bool IdentifierExistsInCodeBehind (string 
trialIdentifier)
+               {
+                       if (codeBehindClass == null)
+                               return false;
+                       
+                       return BindingService.IdentifierExistsInClass 
(codeBehindClass, trialIdentifier);
+               }
+               
+               public string GenerateIdentifierUniqueInCodeBehind (string 
trialIdentifier)
+               {
+                       return BindingService.GenerateIdentifierUniqueInClass 
(codeBehindClass, trialIdentifier);
+               }
+               
+               
+               public string[] GetCompatibleMethodsInCodeBehind 
(CodeMemberMethod method)
+               {                       
+                       if (codeBehindClass == null)
+                               return new string[0];
+                       
+                       return BindingService.GetCompatibleMethodsInClass 
(codeBehindClass, method);
+               }
+               
+               public bool ShowMethod (CodeMemberMethod method)
+               {
+                       if (codeBehindClass == null)
+                               return false;
+                       
+                       BindingService.CreateAndShowMember (codeBehindClass, 
method);
+                       return true;
+               }
+               
+               public bool ShowLine (int lineNumber)
+               {
+                       if (codeBehindClass == null)
+                               return false;
+                       
+                       Gtk.Application.Invoke ( delegate {
+                               IdeApp.Workbench.OpenDocument 
(codeBehindClass.Region.FileName, lineNumber, 1, true);
+                       });     
+                       return true;
+               }
+               
+               #endregion event binding
+       }
+       
+}

Modified: trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.mdp
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.mdp  2006-08-05 16:11:36 UTC 
(rev 63390)
+++ trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.mdp  2006-08-05 16:45:52 UTC 
(rev 63391)
@@ -1,15 +1,15 @@
-<Project name="AspNetEdit" fileversion="2.0" language="C#" 
clr-version="Net_1_1" ctype="DotNetProject">
+<Project name="AspNetEdit" fileversion="2.0" language="C#" 
clr-version="Net_2_0" ctype="DotNetProject">
   <Configurations active="Debug">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
       <Output directory="./bin/Debug" assembly="AspNetEdit" />
       <Build debugmode="True" target="Exe" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_1_1" />
+      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
       <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" 
unsafecodeallowed="False" generateoverflowchecks="True" 
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
     <Configuration name="Release" ctype="DotNetProjectConfiguration">
       <Output directory="./bin/Release" assembly="AspNetEdit" />
       <Build debugmode="False" target="Exe" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_1_1" />
+      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
       <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" 
unsafecodeallowed="False" generateoverflowchecks="True" 
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
   </Configurations>
@@ -22,7 +22,6 @@
     <File name="./AspNetEdit.addin.xml" subtype="Code" buildaction="Nothing" />
     <File name="./AspNetEdit.Editor.Persistence/AspParser.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/AspTokenizer.cs" 
subtype="Code" buildaction="Compile" />
-    <File name="./AspNetEdit.Editor.Persistence/ChangeLog" subtype="Code" 
buildaction="Nothing" />
     <File name="./AspNetEdit.Editor.Persistence/ControlPersister.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/DesignTimeParser.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/Directive.cs" subtype="Code" 
buildaction="Compile" />
@@ -36,12 +35,10 @@
     <File name="./AspNetEdit.Editor.Persistence/StrUtils.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/TagAttributes.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/TagType.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./AspNetEdit.Editor.ComponentModel/ChangeLog" subtype="Code" 
buildaction="Nothing" />
     <File name="./AspNetEdit.Editor.ComponentModel/DesignContainer.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.ComponentModel/DesignerHost.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.ComponentModel/Document.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./AspNetEdit.Editor.ComponentModel/DocumentDirective.cs" 
subtype="Code" buildaction="Compile" />
-    <File name="./AspNetEdit.Editor.ComponentModel/EventBindingService.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.ComponentModel/ExtenderListService.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.ComponentModel/MenuCommandService.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.ComponentModel/NameCreationService.cs" 
subtype="Code" buildaction="Compile" />
@@ -71,8 +68,11 @@
     <File name="./chrome/content/aspdesigner/xpcom.js" subtype="Code" 
buildaction="Nothing" />
     <File name="./chrome/locale/en-US/aspdesigner/contents.rdf" subtype="Code" 
buildaction="Nothing" />
     <File name="./AspNetEdit.Integration/AspNetEditViewContent.cs" 
subtype="Code" buildaction="Compile" />
+    <File name="./ChangeLog" subtype="Code" buildaction="Nothing" />
     <File name="./AspNetEdit.Editor/EditorHost.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./ChangeLog" subtype="Code" buildaction="Nothing" />
+    <File name="./AspNetEdit.Integration/EditorProcess.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="./AspNetEdit.Integration/MonoDevelopProxy.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="./AspNetEdit.Editor.ComponentModel/EventBindingService.cs" 
subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
@@ -81,13 +81,6 @@
     <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <ProjectReference type="Gac" localcopy="True" refto="System.Web, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="True" refto="System.Windows.Forms, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="True" refto="System.Drawing, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="True" 
refto="System.Drawing.Design, Version=1.0.5000.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="True" refto="System.Design, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="True" refto="System, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="True" refto="System.Xml, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.DesignerSupport" />
     <ProjectReference type="Project" localcopy="True" refto="MonoDevelop.Core" 
/>
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Core.Gui" />
@@ -97,6 +90,13 @@
     <ProjectReference type="Project" localcopy="True" refto="AspNetAddIn" />
     <ProjectReference type="Gac" localcopy="True" refto="jscall, 
Version=0.0.2.0, Culture=neutral, PublicKeyToken=db10596f4718e9c9" />
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Components" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Web, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Windows.Forms, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Drawing, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+    <ProjectReference type="Gac" localcopy="True" 
refto="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Design, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+    <ProjectReference type="Gac" localcopy="True" refto="System, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Xml, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </References>
   <DeploymentInformation strategy="File">
     <excludeFiles />

Modified: trunk/monodevelop/Extras/AspNetEdit/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/ChangeLog       2006-08-05 16:11:36 UTC 
(rev 63390)
+++ trunk/monodevelop/Extras/AspNetEdit/ChangeLog       2006-08-05 16:45:52 UTC 
(rev 63391)
@@ -1,3 +1,42 @@
+2006-08-05 Michael Hutchinson <[EMAIL PROTECTED]>
+
+       * AspNetEdit.mdp:
+       * Makefile.am:
+         Track new files.
+       
+       * AspNetEdit.Editor.UI/RootDesignerView.cs:
+         Give JS more time to return a document.
+       
+       * AspNetEdit.Integration/EditorProcess.cs:
+         New object for the remoted process. This simplifies GUI thread 
+         handling.
+       
+       * AspNetEdit.Integration/AspNetEditViewContent.cs:
+         Use EditorProcess instead of EditorHost.
+         Create designer when doc is shown, and destroy when hidden, because 
+         the designer process is a heavyweight object.
+         Track IToolboxConsumer interface change. 
+       
+       * AspNetEdit.Integration/MonoDevelopProxy.cs:
+         Provides remoted designer with access to methods in MD process, 
+         mainly for event binding.
+       
+       * AspNetEdit.Editor/EditorHost.cs:
+         Split away from EditorProcess, and use GuiSyncObject to simplify 
+         threading.
+         Expose lots of methods and objects.
+         Add an IEventBindingService utilising MonoDevelopProxy.
+       
+       * AspNetEdit.Editor.ComponentModel/DesignContainer.cs:
+         Prevent unnecessary generation of extra component names.
+       
+       * AspNetEdit.Editor.ComponentModel/Document.cs:
+       * AspNetEdit.Editor.ComponentModel/DesignerHost.cs:
+         Make it easier to load a document from a string rather than a stream.
+       
+       * AspNetEdit.Editor.ComponentModel/EventBindingService.cs:
+         Use MonoDevelopProxy to make this actually work.
+
 2006-07-29 Michael Hutchinson <[EMAIL PROTECTED]>
 
        * AspNetEdit.Integration/*:

Modified: trunk/monodevelop/Extras/AspNetEdit/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/Makefile.am     2006-08-05 16:11:36 UTC 
(rev 63390)
+++ trunk/monodevelop/Extras/AspNetEdit/Makefile.am     2006-08-05 16:45:52 UTC 
(rev 63391)
@@ -63,7 +63,9 @@
        AspNetEdit.Editor.UI/RootDesignerView.cs \
        \
        AspNetEdit.Integration/AspNetEditDisplayBinding.cs \
-       AspNetEdit.Integration/AspNetEditViewContent.cs
+       AspNetEdit.Integration/AspNetEditViewContent.cs \
+       AspNetEdit.Integration/MonoDevelopProxy.cs \
+       AspNetEdit.Integration/EditorProcess.cs
 
 
 RES = \

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to