Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2008-12-20 10:14:04 +0300
committerMiguel de Icaza <miguel@gnome.org>2008-12-20 10:14:04 +0300
commitb2a0ee064e5694b1dc879d27c3706cab23ec2fc8 (patch)
tree330872c0d778b32d08d501b87fa452e2d921f4dc /webcompare
parent1afe4b7defc5c0aa96c96da6b18f3f2f9aef5867 (diff)
Small improvement: show the children problems (missing attributes)
svn path=/trunk/mono-tools/; revision=121917
Diffstat (limited to 'webcompare')
-rw-r--r--webcompare/status.aspx34
1 files changed, 23 insertions, 11 deletions
diff --git a/webcompare/status.aspx b/webcompare/status.aspx
index 19a60077..dea4cb83 100644
--- a/webcompare/status.aspx
+++ b/webcompare/status.aspx
@@ -5,15 +5,11 @@
<%@ Import Namespace="GuiCompare" %>
<!--
- TODO:
+TODO:
- Add Error messages generated by the compare process.
+ Add Error messages generated by the compare process.
-
- Cleanup:
-
- * Change all the ComparisonNode public fields to use CamelCasing.
- * -->
+-->
<head>
<script>
</script>
@@ -218,6 +214,19 @@ static string MemberStatus (ComparisonNode cn)
}
}
+// {0} = MemberStatus
+// {1} = child.Name
+// {2} = child notes
+// {3} = type
+static string RenderMemberStatus (ComparisonNode cn, string format)
+{
+ return String.Format (format,
+ MemberStatus (cn),
+ cn.Name,
+ (cn.Missing > 0 ? ImageMissing : "") + (cn.Extra > 0 ? ImageExtra : ""),
+ cn.Type.ToString ());
+}
+
ComparisonNode ComparisonNodeFromTreeNode (TreeNode tn)
{
if (tn.Parent == null){
@@ -259,8 +268,11 @@ static string GetMethodFQN (ComparisonNode node)
string name = p == -1 || q == -1 ? node.Name : node.Name.Substring (q+1, p-q-1);
+ if (name == ".ctor")
+ name = "";
+
string n = GetFQN (node.Parent);
- return n == "" ? name : n + "." + name;
+ return n == "" ? name : n + (name == "" ? "" : "." + name);
}
static string MakeURL (string type)
@@ -323,7 +335,7 @@ void TreeNodePopulate (object sender, TreeNodeEventArgs e)
break;
case CompType.Method:
- tn = new TreeNode (MemberStatus (child) + child.Name, child.Name);
+ tn = new TreeNode (RenderMemberStatus (child, "{0}{1}{2}"), child.Name);
AttachComments (tn, child);
tn.NavigateUrl = MakeURL (GetMethodFQN (child));
tn.Target = "_blank";
@@ -333,7 +345,7 @@ void TreeNodePopulate (object sender, TreeNodeEventArgs e)
case CompType.Field:
case CompType.Delegate:
case CompType.Event:
- tn = new TreeNode (MemberStatus (child) + " " + child.Type.ToString() + " " + child.Name, child.Name);
+ tn = new TreeNode (RenderMemberStatus (child, "{0} {3} {1}{2}"), child.Name);
AttachComments (tn, child);
tn.NavigateUrl = MakeURL (GetFQN (child));
tn.Target = "_blank";
@@ -341,7 +353,7 @@ void TreeNodePopulate (object sender, TreeNodeEventArgs e)
case CompType.Assembly:
case CompType.Attribute:
- tn = new TreeNode (MemberStatus (child) + " " + child.Type.ToString() + " " + child.Name, child.Name);
+ tn = new TreeNode (RenderMemberStatus (child, "{0} {3} {1}{2}"), child.Name);
break;
default: