Author: wade
Date: 2007-03-07 17:14:19 -0500 (Wed, 07 Mar 2007)
New Revision: 73916

Modified:
   branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/ChangeLog
   
branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.addin.xml
   branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/ChangeLog
   
branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.addin.xml
   branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/ChangeLog
   branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
   branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/ChangeLog
   
branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/MonoDevelop.Projects/Project.cs
   branches/monodevelop/0.13/Extras/AspNetAddIn/ChangeLog
   branches/monodevelop/0.13/Extras/AspNetAddIn/Project/AspNetAppProject.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/DesignTimeParser.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/RootParsingObject.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
   branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
   
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs
   branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.mdp
   branches/monodevelop/0.13/Extras/AspNetEdit/ChangeLog
   branches/monodevelop/0.13/Extras/AspNetEdit/Makefile.am
   
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
   
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js
Log:
Merged the following revisions from trunk:

asp.net editor fixes:
73390
73398
73403
73405

Other fixes:
73393
73394
73395



Modified: branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/ChangeLog
===================================================================
--- branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/ChangeLog   
2007-03-07 22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/ChangeLog   
2007-03-07 22:14:19 UTC (rev 73916)
@@ -1,3 +1,7 @@
+2007-02-24  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Core.Gui.addin.xml: Fix compatible version number.
+
 2007-02-16  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Core.Gui.addin.xml: Change add-in versions to 0.13.

Modified: 
branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.addin.xml
===================================================================
--- 
branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.addin.xml
      2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.addin.xml
      2007-03-07 22:14:19 UTC (rev 73916)
@@ -6,7 +6,7 @@
        description = "Provides basic GUI services"
           category    = "MonoDevelop Core"
        version     = "0.13.0"
-       compatVersion = "0.10.0">
+       compatVersion = "0.13.0">
 
        <Runtime>
                <Import assembly="MonoDevelop.Components.dll"/>

Modified: branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/ChangeLog
===================================================================
--- branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/ChangeLog      
2007-03-07 22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/ChangeLog      
2007-03-07 22:14:19 UTC (rev 73916)
@@ -1,3 +1,7 @@
+2007-02-24  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Documentation.addin.xml: Fix compatible version number.
+
 2007-02-16  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Documentation.addin.xml: Change add-in versions to 0.13.

Modified: 
branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.addin.xml
===================================================================
--- 
branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.addin.xml
    2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.addin.xml
    2007-03-07 22:14:19 UTC (rev 73916)
@@ -6,7 +6,7 @@
        description = "Integrates the Mono documentation browser (Monodoc) into 
the MonoDevelop IDE"
           category    = "IDE extensions"
        version     = "0.13.0"
-       compatVersion = "0.10.0">
+       compatVersion = "0.13.0">
 
        <Runtime>
                <Import assembly="MonoDevelop.Documentation.dll"/>

Modified: branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/ChangeLog        
2007-03-07 22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/ChangeLog        
2007-03-07 22:14:19 UTC (rev 73916)
@@ -1,3 +1,7 @@
+2007-02-24  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Ide.addin.xml: Fix compatible version number.
+
 2007-02-21  Ankit Jain  <[EMAIL PROTECTED]>
 
        * MonoDevelop.Ide.Gui/ProjectOperations.cs (AddReferenceToProject): 
Ensure

Modified: 
branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
===================================================================
--- 
branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml    
    2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml    
    2007-03-07 22:14:19 UTC (rev 73916)
@@ -6,7 +6,7 @@
        description = "The MonoDevelop IDE application."
           category    = "Applications"
        version     = "0.13.0"
-       compatVersion = "0.10.0">
+       compatVersion = "0.13.0">
 
 
        <Runtime>

Modified: branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/ChangeLog
===================================================================
--- branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/ChangeLog   
2007-03-07 22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/ChangeLog   
2007-03-07 22:14:19 UTC (rev 73916)
@@ -1,3 +1,11 @@
+2006-02-25  Michael Hutchinson <[EMAIL PROTECTED]>
+
+       * Core/src/MonoDevelop.Projects/MonoDevelop.Projects/Project.cs:
+         Remove OnPreBuild as it's no longer used or called. I was overriding 
+         it and relying on it being called!
+         Make GetReferenceDeployFiles public so I don't have to duplicate it
+         for AspNetAddProject's GetDeployFiles.
+
 2007-02-21  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Projects/DotNetProjectConfiguration.cs: If the output

Modified: 
branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/MonoDevelop.Projects/Project.cs
===================================================================
--- 
branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/MonoDevelop.Projects/Project.cs
     2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Core/src/MonoDevelop.Projects/MonoDevelop.Projects/Project.cs
     2007-03-07 22:14:19 UTC (rev 73916)
@@ -228,7 +228,7 @@
                        }
                }
                
-               DeployFileCollection GetReferenceDeployFiles (bool force)
+               public DeployFileCollection GetReferenceDeployFiles (bool force)
                {
                        DeployFileCollection deployFiles = new 
DeployFileCollection ();
 
@@ -462,22 +462,6 @@
                        }
                }
                
-               protected virtual void DoPreBuild (IProgressMonitor monitor)
-               {
-                       AbstractProjectConfiguration conf = ActiveConfiguration 
as AbstractProjectConfiguration;
-                               
-                       // create output directory, if not exists
-                       string outputDir = conf.OutputDirectory;
-                       try {
-                               DirectoryInfo directoryInfo = new 
DirectoryInfo(outputDir);
-                               if (!directoryInfo.Exists) {
-                                       directoryInfo.Create();
-                               }
-                       } catch (Exception e) {
-                               throw new ApplicationException("Can't create 
project output directory " + outputDir + " original exception:\n" + 
e.ToString());
-                       }
-               }
-               
                protected virtual ICompilerResult DoBuild (IProgressMonitor 
monitor)
                {
                        return new DefaultCompilerResult (new CompilerResults 
(null), "");

Modified: branches/monodevelop/0.13/Extras/AspNetAddIn/ChangeLog
===================================================================
--- branches/monodevelop/0.13/Extras/AspNetAddIn/ChangeLog      2007-03-07 
22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Extras/AspNetAddIn/ChangeLog      2007-03-07 
22:14:19 UTC (rev 73916)
@@ -1,3 +1,11 @@
+2007-02-25 Michael Hutchinson <[EMAIL PROTECTED]>
+
+       * Project/AspNetAppProject.cs:
+         Remove DoPreBuild override as it's a deprecated build extension point.
+         Now set AspNetAppProjectConfiguration.SourceDirectory via a FileName
+         override, which is more robust.
+         Implement GetDeployFiles to handle ASP.NET bin folder.
+
 2007-02-21  Ankit Jain  <[EMAIL PROTECTED]>
 
        * Project/VerifyCodeBehindBuildStep.cs: Warn the user if

Modified: 
branches/monodevelop/0.13/Extras/AspNetAddIn/Project/AspNetAppProject.cs
===================================================================
--- branches/monodevelop/0.13/Extras/AspNetAddIn/Project/AspNetAppProject.cs    
2007-03-07 22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Extras/AspNetAddIn/Project/AspNetAppProject.cs    
2007-03-07 22:14:19 UTC (rev 73916)
@@ -39,6 +39,7 @@
 using MonoDevelop.Projects;
 using MonoDevelop.Projects.Parser;
 using MonoDevelop.Projects.Serialization;
+using MonoDevelop.Projects.Deployment;
 
 using AspNetAddIn.Parser.Tree;
 using AspNetAddIn.Parser;
@@ -88,30 +89,80 @@
                
                public AspNetAppProject ()
                {
+                       commonInit ();
                }
                
                public AspNetAppProject (string languageName)
                        : base (languageName)
                {
+                       commonInit ();
                }
                
                public AspNetAppProject (string languageName, 
ProjectCreateInformation info, XmlElement projectOptions)
                        : base (languageName, info, projectOptions)
                {
+                       commonInit ();
                }
                
+               
+               private void commonInit ()
+               {
+                       //AspNetAppProjectConfiguration needs SourceDirectory 
set so it can append "bin" to determine the output path
+                       Configurations.ConfigurationAdded += delegate (object 
ob, ConfigurationEventArgs args) {
+                               AspNetAppProjectConfiguration conf = 
(AspNetAppProjectConfiguration) args.Configuration;
+                               conf.SourceDirectory = BaseDirectory;
+                       };
+               }
+               
+               //AspNetAppProjectConfiguration needs SourceDirectory set so it 
can append "bin" to determine the output path
+               public override string FileName {
+                       get {
+                               return base.FileName;
+                       }
+                       set {
+                               base.FileName = value;
+                               foreach (AspNetAppProjectConfiguration conf in 
Configurations)
+                                       conf.SourceDirectory = BaseDirectory;
+                       }
+               }               
+               
                public override IConfiguration CreateConfiguration (string name)
                {
                        AspNetAppProjectConfiguration conf = new 
AspNetAppProjectConfiguration ();
                        
                        conf.Name = name;
                        conf.CompilationParameters = 
LanguageBinding.CreateCompilationParameters (null);
+                       conf.SourceDirectory = BaseDirectory;
                        
                        return conf;
                }
                
                #endregion
                
+               //custom version of GetDeployFiles which puts libraries in the 
bin directory
+               public override DeployFileCollection GetDeployFiles ()
+               {
+                       DeployFileCollection files = new DeployFileCollection 
();
+                       
+                       //add files that are marked to 'deploy'
+                       foreach (ProjectFile pf in ProjectFiles)
+                               if (pf.BuildAction == BuildAction.FileCopy)
+                                       files.Add (new DeployFile (pf.FilePath, 
pf.RelativePath));
+                       
+                       //add referenced libraries
+                       DeployFileCollection dfc = GetReferenceDeployFiles 
(false);
+                       foreach (DeployFile df in dfc)
+                               df.RelativeTargetPath = Path.Combine ("bin", 
df.RelativeTargetPath);
+                       files.AddRange (dfc);
+                       
+                       //add the compiled output file
+                       string outputFile = this.GetOutputFileName ();
+                       if ( !string.IsNullOrEmpty (outputFile))
+                               files.Add (new DeployFile (outputFile, 
Path.Combine ("bin", Path.GetFileName (outputFile)), 
TargetDirectory.ProgramFiles));
+                       
+                       return files;
+               }
+               
                #region build/prebuild/execute
                
                protected override void DoExecute (IProgressMonitor monitor, 
ExecutionContext context)
@@ -157,14 +208,6 @@
                        }
                }
                
-               protected override void DoPreBuild (IProgressMonitor monitor)
-               {
-                       AspNetAppProjectConfiguration conf = 
(AspNetAppProjectConfiguration) ActiveConfiguration;
-                       conf.SourceDirectory = BaseDirectory;
-                       
-                       base.DoPreBuild (monitor);
-               }
-               
                #endregion
                
                #region File utility methods

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs
===================================================================
--- branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs 
2007-03-07 22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor/EditorHost.cs 
2007-03-07 22:14:19 UTC (rev 73916)
@@ -115,13 +115,48 @@
                
                public void UseToolboxNode (ItemToolboxNode node)
                {
+                       //invoke in GUI thread as it catches and displays 
exceptions nicely
+                       Gtk.Application.Invoke ( delegate { handleToolboxNode 
(node); }); 
+               }
+               
+               private void handleToolboxNode (ItemToolboxNode node)
+               {
                        ToolboxItemToolboxNode tiNode = node as 
ToolboxItemToolboxNode;
-                       
+                               
                        if (tiNode != null) {
-                               //load the type into this process
+                               //load the type into this process and get the 
ToolboxItem 
                                tiNode.Type.Load ();
+                               System.Drawing.Design.ToolboxItem ti = 
tiNode.GetToolboxItem ();
                                
-                               System.Drawing.Design.ToolboxItem ti = 
tiNode.GetToolboxItem ();
+                               //web controls have sample HTML that need to be 
deserialised, in a ToolboxDataAttribute
+                               //TODO: Fix WebControlToolboxItem and (mono 
classlib's use of it) so we don't have to mess around with type lookups and 
attributes here
+                               if (ti.AssemblyName != null && ti.TypeName != 
null) {
+                                       //look up and register the type
+                                       ITypeResolutionService typeRes = 
(ITypeResolutionService) host.GetService(typeof(ITypeResolutionService));       
                               
+                                       typeRes.ReferenceAssembly 
(ti.AssemblyName);
+                                       Type controlType = typeRes.GetType 
(ti.TypeName, true);
+                                       
+                                       //read the WebControlToolboxItem data 
from the attribute
+                                       AttributeCollection atts = 
TypeDescriptor.GetAttributes (controlType);
+                                       
+                                       System.Web.UI.ToolboxDataAttribute tda 
= (System.Web.UI.ToolboxDataAttribute) 
atts[typeof(System.Web.UI.ToolboxDataAttribute)];
+                                               
+                                       //if it's present
+                                       if (tda != null && tda.Data.Length > 0) 
{
+                                               //look up the tag's prefix and 
insert it into the data                                          
+                                               
System.Web.UI.Design.IWebFormReferenceManager webRef = host.GetService (typeof 
(System.Web.UI.Design.IWebFormReferenceManager)) as 
System.Web.UI.Design.IWebFormReferenceManager;
+                                               if (webRef == null)
+                                                       throw new 
Exception("Host does not provide an IWebFormReferenceManager");
+                                               string aspText = String.Format 
(tda.Data, webRef.GetTagPrefix (controlType));
+                                               
System.Diagnostics.Trace.WriteLine ("Toolbox processing ASP.NET item data: " + 
aspText);
+                                                       
+                                               //and add it to the document
+                                               
host.RootDocument.InsertFragment (aspText);
+                                               return;
+                                       }
+                               }
+                               
+                               //No ToolboxDataAttribute? Get the ToolboxItem 
to create the components itself
                                ti.CreateComponents (host);
                        }
                }
@@ -129,10 +164,13 @@
                public void LoadDocument (string document, string fileName)
                {
                        System.Diagnostics.Trace.WriteLine ("Copying document 
to editor.");
-                       host.Reset ();
                        
-                       host.Load (document, fileName);
-                       host.Activate ();
+                       //invoke in GUI thread as it catches and displays 
exceptions nicely
+                       Gtk.Application.Invoke ( delegate {
+                               host.Reset ();
+                               host.Load (document, fileName);
+                               host.Activate ();
+                       });
                }
                
                public string GetDocument ()
@@ -140,7 +178,7 @@
                        
MonoDevelop.Core.Gui.Services.DispatchService.AssertGuiThread ();
                        string doc = "";
                        
-                       System.Diagnostics.Trace.WriteLine ("persisting 
document");
+                       System.Diagnostics.Trace.WriteLine ("Persisting 
document.");
                        doc = host.PersistDocument ();
                                
                        return doc;
@@ -151,7 +189,7 @@
                bool disposed = false;
                public virtual void Dispose ()
                {
-                       System.Diagnostics.Trace.WriteLine ("disposing editor 
host");
+                       System.Diagnostics.Trace.WriteLine ("Disposing editor 
host.");
                        
                        if (disposed)
                                return;

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
        2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/DesignerHost.cs
        2007-03-07 22:14:19 UTC (rev 73916)
@@ -74,9 +74,16 @@
                {
                        get { return container; }
                }
-
-               public IComponent CreateComponent (Type componentClass, string 
name)
+               
+               public IComponent CreateComponent (Type componentClass, string 
name)
                {
+                       //add to document, unless loading
+                       bool addToDoc = (this.RootDocument != null);
+                       return CreateComponent (componentClass, name, addToDoc);
+               }
+               
+               internal IComponent CreateComponent (Type componentClass, 
string name, bool addToDoc)
+               {
                        System.Diagnostics.Trace.WriteLine("Attempting to 
create component "+name);
                        //check arguments
                        if (componentClass == null)
@@ -91,19 +98,18 @@
                        IComponent component = (IComponent) 
Activator.CreateInstance (componentClass);
 
                        //and add to container
-                       container.Add (component, name);
-
-                       //add to document, unless loading
-                       if (RootDocument != null) {
+                       container.Add (component, name);
+                       
+                       if (addToDoc) {
                                ((Control)RootComponent).Controls.Add 
((Control) component);
                                RootDocument.AddControl ((Control)component);
+                       
+                               //select it
+                               ISelectionService sel = this.GetService (typeof 
(ISelectionService)) as ISelectionService;
+                               if (sel != null)
+                                       sel.SetSelectedComponents (new 
IComponent[] {component});
                        }
-                       
-                       //select it
-                       ISelectionService sel = this.GetService (typeof 
(ISelectionService)) as ISelectionService;
-                       if (sel != null)
-                               sel.SetSelectedComponents (new IComponent[] 
{component});
-
+                       
                        System.Diagnostics.Trace.WriteLine("Created component 
"+name);
                        return component;
                }

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
    2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/Document.cs
    2007-03-07 22:14:19 UTC (rev 73916)
@@ -71,8 +71,9 @@
                public Document (Control parent, DesignerHost host, string 
document, string fileName)
                {
                        initDocument (parent, host);
-                       this.document = DeserializeAndAdd (document);
-
+                       
+                       Control[] controls;
+                       aspParser.ProcessFragment (document, out controls, out 
this.document);
                        GetView ();
                }
                
@@ -241,22 +242,17 @@
                        return serializedDoc;
                }
                
-               ///<summary>Converts  a ASP.NET fragment to a a designer 
document fragment,
-               /// and adds the controls and directives etc to the 
host.</summary>
-               public string DeserializeAndAdd (string aspFragment)
+               public void InitialiseControls (IEnumerable controls)
                {
-                       string document;
-                       Control[] controls;
-                       
-                       aspParser.ParseDocument (aspFragment, out controls, out 
document);
-                       
-                       foreach (Control c in controls) {
-                               OnInitMethodInfo.Invoke (c, new object[] 
{EventArgs.Empty});
-                       }
-                       
-                       return document;
+                       foreach (Control c in controls)
+                               InitialiseControl(c);
                }
                
+               public static void InitialiseControl (Control control)
+               {
+                       OnInitMethodInfo.Invoke (control, new object[] 
{EventArgs.Empty});
+               }
+               
                //modes for the Serializing parser
                private enum SMode {
                        Free,
@@ -333,9 +329,14 @@
                }
                
                #region add/remove/update controls
+               
+               bool suppressAddControl = false;
                
                public void AddControl (Control control)
                {
+                       if (suppressAddControl) return;
+                       
+                       System.Console.WriteLine("AddControl method called");
                        OnInitMethodInfo.Invoke (control, new object[] 
{EventArgs.Empty});
                        view.AddControl (control);
                }
@@ -352,7 +353,15 @@
                                
                public void InsertFragment (string fragment)
                {
-                       view.InsertFragment (fragment);
+                       Control[] controls;
+                       string doc;
+                       aspParser.ProcessFragment (fragment, out controls, out 
doc);
+                       view.InsertFragment (doc);
+                       
+                       //FIXME: when controls are inserted en masse using 
InsertFragment, the designer surface
+                       //doesn't seem to display then properly till they've 
been updated
+                       foreach (Control c in controls)
+                               view.UpdateRender (c);
                }
 
                #endregion

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
 2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
 2007-03-07 22:14:19 UTC (rev 73916)
@@ -48,16 +48,12 @@
                        //check existing components with name of same form
                        // and make suffixNumber bigger than the greatest of 
them
                        foreach (IComponent comp in container.Components) {
-                               if (comp.Site.Name.StartsWith (dataType.Name)) {
-                                       string str = comp.Site.Name.Remove (0, 
dataType.Name.Length);
-                                       //TODO: Use int.TryParse in .NET 2.0
-                                       try {
-                                               int val = int.Parse (str);
-                                               if (val >= suffixNumber)
-                                                       suffixNumber = val + 1;
-                                       }
-                                       catch (Exception ex) {}
-                               }
+                               if 
(comp.Site.Name.ToLowerInvariant().StartsWith 
(dataType.Name.ToLowerInvariant())) {
+                                       string str = 
comp.Site.Name.Substring(dataType.Name.Length);
+                                       int val;
+                                       if (int.TryParse(str, out val) && val 
>= suffixNumber)
+                                               suffixNumber = val + 1;
+                                       }
                        }
 
                        return dataType.Name + suffixNumber.ToString ();

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/DesignTimeParser.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/DesignTimeParser.cs
       2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/DesignTimeParser.cs
       2007-03-07 22:14:19 UTC (rev 73916)
@@ -66,7 +66,7 @@
                /// </summary>
                /// <param name="fragment">The document fragment to 
parse</param>
                /// <returns>The document with all controls, directives and 
script blocks replaced by placeholders</returns>
-               public void ParseDocument (string fragment, out Control[] 
controls, out string designDocument)
+               public void ProcessFragment (string fragment, out Control[] 
controls, out string substText)
                {
                        
                        AspParser parser = InitialiseParser (fragment);
@@ -74,16 +74,13 @@
                        rootParsingObject = new RootParsingObject(host);
                        openObject = rootParsingObject;
                        
-                       parser.Parse ();
+                       parser.Parse ();
                        
                        if (openObject != rootParsingObject) {
                                throw new Exception ("The tag " +  
openObject.TagID + " was left unclosed");
-                       }
-
-                       object[] objects;
-                       rootParsingObject.BuildObject(out objects, out 
designDocument);
-                       controls = new Control[objects.Length];
-                       objects.CopyTo (controls, 0);
+                       }
+                       
+                       rootParsingObject.GetParsedContent (out controls, out 
substText);
                }
 
                private AspParser InitialiseParser (string parseText)

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/RootParsingObject.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/RootParsingObject.cs
      2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/RootParsingObject.cs
      2007-03-07 22:14:19 UTC (rev 73916)
@@ -30,7 +30,8 @@
 
 using System;
 using System.Text;
-using System.Web.UI.Design;
+using System.Web.UI.Design;
+using System.Web.UI;
 using System.Collections;
 using System.ComponentModel.Design;
 
@@ -53,7 +54,7 @@
                }
 
                public override void AddText (string text)
-               {
+               {
                        stringBuilder.Append (text);
                }
 
@@ -62,9 +63,9 @@
                        controls.Add (control);
                }
 
-               public void BuildObject (out object[] controls, out string 
documentText)
+               public void GetParsedContent (out Control[] controls, out 
string documentText)
                {
-                       controls = this.controls.ToArray ();
+                       controls = (Control[]) this.controls.ToArray 
(typeof(System.Web.UI.Control));
                        documentText = stringBuilder.ToString ();
                }
                

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs
     2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs
     2007-03-07 22:14:19 UTC (rev 73916)
@@ -59,10 +59,10 @@
                                //note: this automatically adds to parent's 
container, as some controls
                                //need to be sited e.g. if they use site 
dictionaries
                                //TODO: should this action be passed up the 
tree so controls can intercept?
-                               obj = base.DesignerHost.CreateComponent (type, 
attributes["ID"] as string);
+                               obj = 
((AspNetEdit.Editor.ComponentModel.DesignerHost) 
base.DesignerHost).CreateComponent (type, attributes["ID"] as string, false);
                        else
                                obj = Activator.CreateInstance (type);
-
+                               
                        //and populate it from the attributes
                        pdc = TypeDescriptor.GetProperties (obj);
                        foreach (DictionaryEntry de in attributes) {
@@ -87,19 +87,19 @@
                                        else
                                                throw new Exception ("Could not 
find event " + str[0].Remove(0,2));
                                }
-
+                               
                                object loopObj = obj;
                                
                                for (int i = 0; i < str.Length; i++ )
                                {
                                        if (pd == null)
                                                throw new Exception ("Could not 
find property " + (string)de.Key);
-                                       Console.WriteLine 
(pd.Converter.ToString() + " " + pd.Name);
+                                       
                                        if (i == str.Length - 1) {
                                                pd.SetValue (obj, 
pd.Converter.ConvertFromString ((string) de.Value));
                                                break;
                                        }
-
+                                       
                                        loopObj = pd.GetValue (loopObj);
                                        pd = TypeDescriptor.GetProperties 
(loopObj).Find (str[0], true);
                                        
@@ -155,7 +155,8 @@
                                                        break;
                                        }
                                }
-                       }                       
+                       }
+               
                }
 
                public override void AddText (string text)
@@ -193,13 +194,16 @@
                public override ParsingObject CloseObject (string 
closingTagText)
                {
                        //we do this here in case we have tags inside
-                       if (mode == ParseChildrenMode.DefaultProperty) {
+                       if (mode == ParseChildrenMode.DefaultProperty && 
!string.IsNullOrEmpty(innerText)) {
                                PropertyDescriptor pd = 
pdc[parseAtt.DefaultProperty];
                                pd.SetValue(obj, 
pd.Converter.ConvertFromString(innerText));
                        }
                        //FIME: what if it isn't?
-                       if (obj is Control)
-                               base.AddText ( Document.RenderDesignerControl 
((Control)obj));
+                       if (obj is Control) {
+                               Control c = (Control) obj;
+                               Document.InitialiseControl (c);
+                               base.AddText (Document.RenderDesignerControl 
(c)); // add initial rendered text representation 
+                       }
                        base.AddControl (obj);
                        return base.CloseObject (closingTagText);
                }

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
        2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
        2007-03-07 22:14:19 UTC (rev 73916)
@@ -147,13 +147,16 @@
                void changeService_ComponentChanged (object sender, 
ComponentChangedEventArgs e)
                {
                        if (!active) return;
-                       
-                       Control control = e.Component as Control;
+                       UpdateRender (e.Component as Control);                  
+               }
+               
+               public void UpdateRender (Control control)
+               {
                        if (control == null)
-                               throw new InvalidOperationException ("The 
changed component is not a System.UI.WebControl");
+                               throw new InvalidOperationException ("The 
updated component is not a System.UI.WebControl");
                        
                        string ctext = Document.RenderDesignerControl (control);
-                       comm.JSCall (GeckoFunctions.UpdateControl, null, 
control.UniqueID, ctext);
+                       comm.JSCall (GeckoFunctions.UpdateControl, null, 
control.UniqueID, ctext);
                }
                
                #endregion
@@ -406,18 +409,18 @@
                
                ///<summary>
                /// Name:       DeserializeAndAdd
-               ///                     Deserialises a fragment of ASP.NET code 
into a Gecko designer document fragment
-               ///                     and adds the controls, directives etc 
to the host.
+               ///                     Handles any ASP.NET code that gets 
pasted into the designer.
                /// Arguments:
                ///             string designerDocumentFragment:        the 
ASP.NET document fragment
-               /// Returns:    the deserialised document
+               /// Returns: none
                ///</summary>
                private string JSDeserializeAndAdd (string[] args)
                {
                        if (args.Length != 1)
                                throw new InvalidJSArgumentException 
("DeserializeAndAdd", -1);
                                                
-                       return host.RootDocument.DeserializeAndAdd (args [0]);
+                       host.RootDocument.InsertFragment (args [0]);
+                       return string.Empty;
                }
 
                #endregion

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
 2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/AspNetEditViewContent.cs
 2007-03-07 22:14:19 UTC (rev 73916)
@@ -40,7 +40,6 @@
 using MonoDevelop.Core.Execution;
 using MonoDevelop.DesignerSupport.Toolbox;
 using MonoDevelop.DesignerSupport;
-using MonoDevelop.Ide.Gui.Content;
 using AspNetEdit.Editor;
 
 namespace AspNetEdit.Integration

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs
 2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.Integration/EditorProcess.cs
 2007-03-07 22:14:19 UTC (rev 73916)
@@ -166,6 +166,7 @@
                        
                        host.Dispose ();                
                        base.Dispose ();
+                       System.Diagnostics.Trace.WriteLine ("AspNetEdit editor 
process disposed");
                }
        }
 }

Modified: branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.mdp
===================================================================
--- branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.mdp  2007-03-07 
22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Extras/AspNetEdit/AspNetEdit.mdp  2007-03-07 
22:14:19 UTC (rev 73916)
@@ -19,21 +19,12 @@
     <File name="./AspNetEdit.Integration" subtype="Directory" 
buildaction="Compile" />
     <File name="./AspNetEdit.Integration/AspNetEditDisplayBinding.cs" 
subtype="Code" buildaction="Compile" />
     <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/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" />
     <File name="./AspNetEdit.Editor.Persistence/HtmlParsingObject.cs" 
subtype="Code" buildaction="Compile" />
-    <File name="./AspNetEdit.Editor.Persistence/ILocation.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./AspNetEdit.Editor.Persistence/Location.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./AspNetEdit.Editor.Persistence/ParseException.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/ParsingObject.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/RootParsingObject.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs" 
subtype="Code" buildaction="Compile" />
-    <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/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" />
@@ -52,8 +43,6 @@
     <File name="./AspNetEdit.Editor.ComponentModel/WebFormReferenceManager.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AspNetEdit.Editor.UI/PropertyGrid.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./AspNetEdit.Editor.UI/RootDesignerView.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./chrome/ChangeLog" subtype="Code" buildaction="Nothing" />
-    <File name="./chrome/chrome.manifest" subtype="Code" buildaction="Nothing" 
/>
     <File name="./chrome/install.rdf" subtype="Code" buildaction="Nothing" />
     <File name="./chrome/Makefile.am" subtype="Code" buildaction="Nothing" />
     <File name="./chrome/README" subtype="Code" buildaction="Nothing" />
@@ -75,31 +64,41 @@
     <File name="./AspNetEdit.Integration/ToolboxProvider.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./data" subtype="Directory" buildaction="Compile" />
     <File name="./data/WebControlsToolbox.xml" subtype="Code" 
buildaction="Compile" />
+    <File name="./chrome/aspdesigner.manifest.in" subtype="Code" 
buildaction="Nothing" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gecko-sharp, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021" />
     <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="Project" localcopy="True" 
refto="MonoDevelop.DesignerSupport" />
     <ProjectReference type="Project" localcopy="True" refto="MonoDevelop.Core" 
/>
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Core.Gui" />
     <ProjectReference type="Project" localcopy="True" refto="MonoDevelop.Ide" 
/>
     <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Projects" />
-    <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.Projects.Gui" />
     <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" />
+    <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, 
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Gac" localcopy="True" refto="gnome-sharp, 
Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Project" localcopy="True" 
refto="MonoDevelop.SourceEditor" />
   </References>
+  <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" 
RelativeMakefileName="./Makefile.am" SyncReferences="True" 
IsAutotoolsProject="True" RelativeConfigureInPath="../../">
+    <BuildFilesVar Name="FILES" />
+    <DeployFilesVar />
+    <ResourcesVar Sync="True" Name="RES" />
+    <OthersVar />
+    <GacRefVar Sync="True" Name="REFS" Prefix="-r:" />
+    <AsmRefVar Sync="True" Name="REFS" Prefix="-r:" />
+    <ProjectRefVar Sync="True" Name="REFS" Prefix="-r:" />
+  </MonoDevelop.Autotools.MakefileInfo>
   <DeploymentInformation strategy="File">
     <excludeFiles />
   </DeploymentInformation>

Modified: branches/monodevelop/0.13/Extras/AspNetEdit/ChangeLog
===================================================================
--- branches/monodevelop/0.13/Extras/AspNetEdit/ChangeLog       2007-03-07 
22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Extras/AspNetEdit/ChangeLog       2007-03-07 
22:14:19 UTC (rev 73916)
@@ -1,3 +1,57 @@
+2007-02-24  Michael Hutchinson <[EMAIL PROTECTED]> 
+       
+       * AspNetEdit.Editor.UI/RootDesignerView.cs: New UpdateRender method.
+       Change behaviour of JSDeserializeAndAdd. It's a one-way function now;
+       JS can give just offload pasted ASP.NET code to host and forget about 
+       it. The C# host will take it from there.
+       
+       * AspNetEdit.Editor/EditorHost.cs:
+       Bump some code into GUI thread so it can handle exceptions. It's less 
+       fragile than remoting.
+       Use ToolboxDataAttribute attributes when handling toolbox items. Relies
+       on improvements to Document.InsertFragment.
+       
+       * AspNetEdit.Editor.ComponentModel/Document.cs,
+       * AspNetEdit.Editor.ComponentModel/DesignerHost.cs,
+       * AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs:
+       Change the places in which controls are created, initialised 
+       and added to document.
+       Document.InsertFragment now handles ASP.NET code.
+       
+       * AspNetEdit.Editor.Persistence/ServerControlParsingObject.cs:
+       Don't allow a tag's innerText to overwrite value from property if it's 
+       empty.
+       
+       * AspNetEdit.Editor.Persistence/DesignTimeParser.cs:
+       Rename ParseDocument to ProcessFragment.
+       
+       * AspNetEdit.Editor.Persistence/RootParsingObject.cs:
+       Rename BuildObject to GetParsedContent and change signature.
+       
+       * AspNetEdit.Editor.ComponentModel/NameCreationService.cs:
+       Make name generation case insensitive, becuase ASP.NET is.
+       
+       * AspNetEdit.Integration/EditorProcess.cs: Add a trace statement.
+       
+       * AspNetEdit.Integration/AspNetEditViewContent.cs: Remove extra "using"
+
+       * chrome/content/aspdesigner/editor.js: Remove debugging alert.
+       
+       * Makefile.am.
+       * AspNetEdit.mdp: Updated. Enable some autotools integration.
+
+2007-02-24  Michael Hutchinson <[EMAIL PROTECTED]>
+
+       * Makefile.am: Eliminate unnecessary copy during build.
+       
+       * chrome/content/aspdesigner/xpcom.js,
+       * chrome/content/aspdesigner/editor.js: Fixed some JS warnings.
+       Fixed aspdesigner initialisation bug with Mozilla/Gecko >= 1.8, such 
+       as Firefox >= 1.5.
+       
+       * AspNetEdit.Editor.ComponentModel/NameCreationService.cs: Use 
+       Int.TryParse now instead of catching exceptions.
+
 2007-02-16  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * AspNetEdit.addin.xml: Change add-in versions to 0.13.

Modified: branches/monodevelop/0.13/Extras/AspNetEdit/Makefile.am
===================================================================
--- branches/monodevelop/0.13/Extras/AspNetEdit/Makefile.am     2007-03-07 
22:07:31 UTC (rev 73915)
+++ branches/monodevelop/0.13/Extras/AspNetEdit/Makefile.am     2007-03-07 
22:14:19 UTC (rev 73916)
@@ -5,25 +5,26 @@
 ADDIN_BUILD = $(top_builddir)/build/AddIns/AspNetEdit
 ASSEMBLY = $(ADDIN_BUILD)/AspNetEdit.dll
 
-REFS = -r:System \
-       -r:System.Xml \
-       -r:System.Web \
-       -r:System.Design \
-       -r:System.Drawing \
-       -r:System.Drawing.Design \
-       -r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+REFS =  \
+       $(GECKO_SHARP_LIBS) \
+       $(GLADE_SHARP_LIBS) \
+       $(GNOME_SHARP_LIBS) \
+       $(GTK_SHARP_LIBS) \
+       -pkg:jscall-sharp \
+       -r:$(top_builddir)/build/AddIns/AspNetAddIn/AspNetAddIn.dll \
+       -r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll \
        -r:$(top_builddir)/build/AddIns/MonoDevelop.Core.Gui.dll \
+       
-r:$(top_builddir)/build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll
 \
+       -r:$(top_builddir)/build/AddIns/MonoDevelop.Ide.dll \
+       -r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.dll \
        -r:$(top_builddir)/build/AddIns/MonoDevelop.SourceEditor.dll \
-       -r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.dll \
-       -r:$(top_builddir)/build/AddIns/MonoDevelop.Ide.dll \
-       -r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll  \
-       
-r:$(top_builddir)/build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll
 \
-       -r:$(top_builddir)/build/AddIns/AspNetAddIn/AspNetAddIn.dll \
-       $(GTK_SHARP_LIBS) \
-       $(GNOME_SHARP_LIBS) \
-       $(GLADE_SHARP_LIBS) \
-       $(GECKO_SHARP_LIBS) \
-       $(JSCALL_LIBS)
+       -r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+       -r:System \
+       -r:System.Design \
+       -r:System.Drawing \
+       -r:System.Drawing.Design \
+       -r:System.Web \
+       -r:System.Xml
 
 FILES =        \
        AssemblyInfo.cs \
@@ -64,13 +65,12 @@
        AspNetEdit.Integration/EditorProcess.cs
 
 
-RES = \
-       #
+RES = #
 
 DATA_FILES = \
        data/WebControlsToolbox.xml
 
-DATA_FILE_BUILD = $(addprefix $(ADDIN_BUILD), $(DATA_FILES))
+DATA_FILE_BUILD = $(addprefix $(ADDIN_BUILD)/, $(notdir $(DATA_FILES)))
 
 ADDIN = AspNetEdit.addin.xml
 

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
    2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
    2007-03-07 22:14:19 UTC (rev 73916)
@@ -30,7 +30,8 @@
 
 var editor                 = null;
 var host                   = null;
-var gDirectivePlaceholder  = '';
+var gDirectivePlaceholder  = '';
+var clip                   = null;
 
 
 
@@ -164,7 +165,7 @@
        throwException: function (location, msg)
        {
                JSCallPlaceClrCall ('ThrowException', '', new Array(location, 
msg));
-       },
+       }
 }
 
 
@@ -305,7 +306,11 @@
 // The editor class and initialization
 //_____________________________________________________________________________
 function aspNetEditor_initialize()
-{
+{
+       //host XUL doc's onload event fires twice for some reason
+       if (editor != null)
+               return;
+       
        dump ("Initialising...");
        editor = new aspNetEditor ();
        dump ("\tCreated editor, initialising...");
@@ -410,7 +415,9 @@
 
                        editor instanceof 
Components.interfaces.nsIPlaintextEditor;
                        editor instanceof Components.interfaces.nsIHTMLEditor;
-               } catch (e) {}
+               } catch (e) {
+                       dump("Could not obtain nsIHTMLEditor: " + e);
+               }
 
                return editor;
        },
@@ -886,7 +893,8 @@
 
        insertFragment: function (aHtml)
        {
-               if(aHtml) {
+               if(aHtml) {
+                       this.hideResizers ();
                        var insertionPoint =
                                {insertIn: null, destinationOffset: 0};
                        this.findInsertionPoint (insertionPoint);
@@ -1073,7 +1081,7 @@
                while((table = aTables.nextNode ()) != null) {
                        table.setAttribute ('cancelUI', 'true');
                }
-       },
+       }
 };
 
 //* ___________________________________________________________________________
@@ -1175,7 +1183,7 @@
 
 
        host.click (DOUBLE_CLICK, controlId);
-       alert (editor.getPage ());
+       //alert (editor.getPage ());
 }
 
 function handleContextMenu(aEvent)
@@ -1345,4 +1353,4 @@
        if(DEBUG) {
                JSCallPlaceClrCall ('DebugStatement', '', new 
Array(aTxtAppend));
        }
-}
\ No newline at end of file
+}

Modified: 
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js
===================================================================
--- 
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js 
    2007-03-07 22:07:31 UTC (rev 73915)
+++ 
branches/monodevelop/0.13/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js 
    2007-03-07 22:14:19 UTC (rev 73916)
@@ -63,7 +63,7 @@
                // Make sure we can't focus a control
                //TODO: make it account for md-can-drop="true" controls, which
                // should be able to recieve focus
-               if(sel.isCollapsed) {
+               if(sel.isCollapsed && editor && editor.base) {
                        var focusNode = sel.focusNode;
                        var parentControl =
                                editor.base.getElementOrParentByTagName 
(CONTROL_TAG_NAME,
@@ -312,7 +312,7 @@
        WillSplitNode: function(existingRightNode, offset)
        {
                //alert ('Will split node');
-       },
+       }
 }
 
 // nsIHTMLObjectResizeListener implementation

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

Reply via email to