[Monodevelop-patches-list] r978 - trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Feb 21 20:17:37 EST 2004
Author: tberman
Date: 2004-02-21 20:17:37 -0500 (Sat, 21 Feb 2004)
New Revision: 978
Modified:
trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs
Log:
fix phantom namespacing issue for good i hope
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs 2004-02-21 22:08:05 UTC (rev 977)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs 2004-02-22 01:17:37 UTC (rev 978)
@@ -66,8 +66,7 @@
foreach (TreeNode nd in node.Nodes) {
if (nd.Text == c.Name) {
nd.Remove ();
- if (node.Nodes.Count == 0 && c.Namespace.EndsWith (node.Text))
- node.Remove ();
+ DropPhantomNamespaces (c.Namespace, parentNode.Nodes);
return;
}
}
@@ -211,6 +210,17 @@
return classNode;
}
+
+ public void DropPhantomNamespaces (string dir, TreeNodeCollection root)
+ {
+ string[] full_path = dir.Split (new char[] { '.' });
+ for (int i = full_path.Length - 1; i != -1; i--)
+ {
+ TreeNode node = GetNodeByPath (String.Join (".", full_path, 0, i + 1), root, false);
+ if (node != null && node.Nodes.Count == 0)
+ node.Remove ();
+ }
+ }
static public TreeNode GetNodeByPath(string directory, TreeNodeCollection root, bool create)
{
More information about the Monodevelop-patches-list
mailing list