diff options
author | Lluis Sanchez <lluis@novell.com> | 2007-06-26 03:50:40 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2007-06-26 03:50:40 +0400 |
commit | a3bc679d9fd88842e0aa32bad8bd96829127a79d (patch) | |
tree | f0ce3a6e1a40fbe82ea3bf3ab13a970326c11823 /Mono.Addins/Mono.Addins.Database | |
parent | a70f04845d08d1ac155e0d922c18cf6991427cd4 (diff) |
* Mono.Addins/RuntimeAddin.cs: Assembly loading fix by Brad Taylor.
Fixes endless loop in Initialize.
* Mono.Addins.Description/AddinDescription.cs: Set the hasUserId flag
when loading from xml.
* Mono.Addins.Database/AddinUpdateData.cs,
Mono.Addins.Database/AddinDatabase.cs: Moved add-in update counters
to the AddinUpdateData class, since they need to be updated there.
svn path=/trunk/mono-addins/; revision=80747
Diffstat (limited to 'Mono.Addins/Mono.Addins.Database')
-rw-r--r-- | Mono.Addins/Mono.Addins.Database/AddinDatabase.cs | 27 | ||||
-rw-r--r-- | Mono.Addins/Mono.Addins.Database/AddinUpdateData.cs | 6 |
2 files changed, 14 insertions, 19 deletions
diff --git a/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs b/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs index 44485fb..741973b 100644 --- a/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs +++ b/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs @@ -433,11 +433,6 @@ namespace Mono.Addins.Database Hashtable addinHash = new Hashtable (); - relExtensionPoints = 0; - relExtensions = 0; - relNodeSetTypes = 0; - relExtensionNodes = 0; - if (monitor.VerboseLog) monitor.Log ("Generating add-in extension maps"); @@ -530,19 +525,13 @@ namespace Mono.Addins.Database if (monitor.VerboseLog) { monitor.Log ("Addin relation map generated."); monitor.Log (" Addins Updated: " + descriptionsToSave.Count); - monitor.Log (" Extension points: " + relExtensionPoints); - monitor.Log (" Extensions: " + relExtensions); - monitor.Log (" Extension nodes: " + relExtensionNodes); - monitor.Log (" Node sets: " + relNodeSetTypes); + monitor.Log (" Extension points: " + updateData.RelExtensionPoints); + monitor.Log (" Extensions: " + updateData.RelExtensions); + monitor.Log (" Extension nodes: " + updateData.RelExtensionNodes); + monitor.Log (" Node sets: " + updateData.RelNodeSetTypes); } } - int relExtensionPoints; - int relExtensions; - int relNodeSetTypes; - int relExtensionNodes; - - // Collects extension data in a hash table. The key is the path, the value is a list // of add-ins ids that extend that path @@ -551,7 +540,7 @@ namespace Mono.Addins.Database foreach (ExtensionNodeSet nset in conf.ExtensionNodeSets) { try { updateData.RegisterNodeSet (conf, nset); - relNodeSetTypes++; + updateData.RelNodeSetTypes++; } catch (Exception ex) { throw new InvalidOperationException ("Error reading node set: " + nset.Id, ex); } @@ -560,7 +549,7 @@ namespace Mono.Addins.Database foreach (ExtensionPoint ep in conf.ExtensionPoints) { try { updateData.RegisterExtensionPoint (conf, ep); - relExtensionPoints++; + updateData.RelExtensionPoints++; } catch (Exception ex) { throw new InvalidOperationException ("Error reading extension point: " + ep.Path, ex); } @@ -568,7 +557,7 @@ namespace Mono.Addins.Database foreach (ModuleDescription module in conf.AllModules) { foreach (Extension ext in module.Extensions) { - relExtensions++; + updateData.RelExtensions++; updateData.RegisterExtension (conf, module, ext); AddChildExtensions (conf, module, updateData, ext.Path, ext.ExtensionNodes, false); } @@ -584,7 +573,7 @@ namespace Mono.Addins.Database foreach (ExtensionNodeDescription node in nodes) { if (node.NodeName == "ComplexCondition") continue; - relExtensionNodes++; + updateData.RelExtensionNodes++; string id = node.GetAttribute ("id"); if (id.Length != 0) AddChildExtensions (conf, module, updateData, path + "/" + id, node.ChildNodes, node.NodeName == "Condition"); diff --git a/Mono.Addins/Mono.Addins.Database/AddinUpdateData.cs b/Mono.Addins/Mono.Addins.Database/AddinUpdateData.cs index 4b76276..ebcfc99 100644 --- a/Mono.Addins/Mono.Addins.Database/AddinUpdateData.cs +++ b/Mono.Addins/Mono.Addins.Database/AddinUpdateData.cs @@ -46,6 +46,11 @@ namespace Mono.Addins.Database Hashtable objectTypeExtensions = new Hashtable (); + internal int RelExtensionPoints; + internal int RelExtensions; + internal int RelNodeSetTypes; + internal int RelExtensionNodes; + class RootExtensionPoint { public AddinDescription Description; @@ -61,6 +66,7 @@ namespace Mono.Addins.Database public void RegisterAddinRootExtensionPoint (AddinDescription description, ExtensionPoint ep) { + RelExtensionPoints++; ArrayList list = (ArrayList) pathHash [ep.Path]; if (list == null) { list = new ArrayList (); |