diff options
author | Chris Toshok <toshok@novell.com> | 2008-12-26 00:32:24 +0300 |
---|---|---|
committer | Chris Toshok <toshok@novell.com> | 2008-12-26 00:32:24 +0300 |
commit | 1c7525482229838f0aa38db7ff7f42ab06c557e2 (patch) | |
tree | f00885c9778e538462df01cbf9c0e333e5d0c8ef /gui-compare | |
parent | 1acb57238d766a30492244c03c39b09e6726a6df (diff) |
2008-12-25 Chris Toshok <toshok@ximian.com>
* CompareContext.cs: split out the comparison of base types into a
separate method. Also, if we're adding a missing type, add a tree
node for the base type.
svn path=/trunk/mono-tools/; revision=122128
Diffstat (limited to 'gui-compare')
-rw-r--r-- | gui-compare/ChangeLog | 6 | ||||
-rw-r--r-- | gui-compare/CompareContext.cs | 27 |
2 files changed, 26 insertions, 7 deletions
diff --git a/gui-compare/ChangeLog b/gui-compare/ChangeLog index d61afc75..4a5dd46f 100644 --- a/gui-compare/ChangeLog +++ b/gui-compare/ChangeLog @@ -1,3 +1,9 @@ +2008-12-25 Chris Toshok <toshok@ximian.com> + + * CompareContext.cs: split out the comparison of base types into a + separate method. Also, if we're adding a missing type, add a tree + node for the base type. + 2008-12-19 Jb Evain <jbevain@novell.com> * InfoManager.cs: add SL2SDK assemblies: System.Xml.Linq, diff --git a/gui-compare/CompareContext.cs b/gui-compare/CompareContext.cs index b30e4dfc..0bb3c8d0 100644 --- a/gui-compare/CompareContext.cs +++ b/gui-compare/CompareContext.cs @@ -146,6 +146,15 @@ namespace GuiCompare { reference_container.GetNestedDelegates(), target_container.GetNestedDelegates()); } + void CompareBaseTypes (ComparisonNode parent, ICompHasBaseType reference_type, ICompHasBaseType target_type) + { + if (reference_type.GetBaseType() != target_type.GetBaseType()) { + parent.AddError (String.Format ("reference has base class of {0}, target has base class of {1}", + reference_type.GetBaseType(), + target_type.GetBaseType())); + } + } + void CompareTypeLists (ComparisonNode parent, List<CompNamed> reference_list, List<CompNamed> target_list) @@ -179,13 +188,9 @@ namespace GuiCompare { // compare base types if (reference_list[m] is ICompHasBaseType && target_list[a] is ICompHasBaseType) { - if (((ICompHasBaseType)reference_list[m]).GetBaseType() != - ((ICompHasBaseType)target_list[a]).GetBaseType()) { - comparison.AddError (String.Format ("reference type {0} has base class of {1}, target has base class of {2}", - reference_list[m].Name, - ((ICompHasBaseType)reference_list[m]).GetBaseType(), - ((ICompHasBaseType)target_list[a]).GetBaseType())); - } + CompareBaseTypes (comparison, + (ICompHasBaseType)reference_list[m], + (ICompHasBaseType)target_list[a]); } // compare nested types @@ -412,6 +417,14 @@ namespace GuiCompare { comparisons_performed ++; + if (item is ICompHasBaseType) { + ComparisonNode baseTypeNode = new ComparisonNode (CompType.Class, + string.Format ("BaseType: {0}", + ((ICompHasBaseType)item).GetBaseType())); + baseTypeNode.Status = ComparisonStatus.Missing; + node.AddChild (baseTypeNode); + } + if (item is ICompTypeContainer) { ICompTypeContainer c = (ICompTypeContainer)item; |