Author: miguel
Date: 2007-12-26 18:45:28 -0500 (Wed, 26 Dec 2007)
New Revision: 91909
Modified:
trunk/mono-tools/gui-compare/CecilMetadata.cs
trunk/mono-tools/gui-compare/ChangeLog
trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs
trunk/mono-tools/gui-compare/gtk-gui/gui.stetic
Log:
2007-12-26 Miguel de Icaza <[EMAIL PROTECTED]>
* CecilMetadata.cs: Do not crash on empty type_def.BaseType (happens
for System.Object).
(CecilAssembly): skip over nested types, and ignore NotPublic types
as well.
(PopulateTypeLists): Do not insert NestedPrivate and NestedAssembly as
public APIs either.
Modified: trunk/mono-tools/gui-compare/CecilMetadata.cs
===================================================================
--- trunk/mono-tools/gui-compare/CecilMetadata.cs 2007-12-26 22:43:39 UTC
(rev 91908)
+++ trunk/mono-tools/gui-compare/CecilMetadata.cs 2007-12-26 23:45:28 UTC
(rev 91909)
@@ -49,8 +49,10 @@
}
if (field_list != null) {
foreach (FieldDefinition fd in fromDef.Fields) {
- if (fd.IsPrivate || fd.IsAssembly)
+ if (fd.IsPrivate || fd.IsAssembly){
+ Console.WriteLine ("Skipping
over {0}.{1} {2}", fromDef.Namespace, fromDef.Name, fd.Name);
continue;
+ }
field_list.Add (new CecilField (fd));
}
}
@@ -72,8 +74,11 @@
List<CompNamed>
struct_list)
{
foreach (TypeDefinition type_def in
fromDef.NestedTypes) {
- if (type_def.IsNotPublic)
+ //Console.WriteLine ("Got {0}.{1} => {2}",
type_def.Namespace, type_def.Name, type_def.Attributes &
TypeAttributes.VisibilityMask);
+ if (type_def.IsNestedPrivate ||
type_def.IsNestedAssembly || type_def.IsNotPublic){
continue;
+ }
+
if (type_def.IsValueType) {
if (type_def.IsEnum) {
enum_list.Add (new CecilEnum
(type_def));
@@ -109,10 +114,12 @@
if (t.Name == "<Module>")
continue;
- // XXX do we really want this?
- if (t.Namespace == "")
+ if (t.IsNotPublic)
continue;
-
+
+ if (t.IsNested)
+ continue;
+
if (t.IsSpecialName || t.IsRuntimeSpecialName)
continue;
@@ -175,8 +182,8 @@
else if (type_def.IsInterface) {
interface_list.Add (new CecilInterface
(type_def, false));
}
- else if (type_def.BaseType.FullName ==
"System.MulticastDelegate"
- || type_def.BaseType.FullName ==
"System.Delegate") {
+ else if (type_def.BaseType != null &&
(type_def.BaseType.FullName == "System.MulticastDelegate"
+ ||
type_def.BaseType.FullName == "System.Delegate")) {
delegate_list.Add (new CecilDelegate
(type_def));
}
else {
Modified: trunk/mono-tools/gui-compare/ChangeLog
===================================================================
--- trunk/mono-tools/gui-compare/ChangeLog 2007-12-26 22:43:39 UTC (rev
91908)
+++ trunk/mono-tools/gui-compare/ChangeLog 2007-12-26 23:45:28 UTC (rev
91909)
@@ -1,3 +1,14 @@
+2007-12-26 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * CecilMetadata.cs: Do not crash on empty type_def.BaseType (happens
+ for System.Object).
+
+ (CecilAssembly): skip over nested types, and ignore NotPublic types
+ as well.
+
+ (PopulateTypeLists): Do not insert NestedPrivate and NestedAssembly as
+ public APIs either.
+
2007-12-18 Miguel de Icaza <[EMAIL PROTECTED]>
* InfoManager.cs:
Modified: trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs
===================================================================
--- trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs 2007-12-26 22:43:39 UTC
(rev 91908)
+++ trunk/mono-tools/gui-compare/gtk-gui/MainWindow.cs 2007-12-26 23:45:28 UTC
(rev 91909)
@@ -147,8 +147,8 @@
if ((this.Child != null)) {
this.Child.ShowAll();
}
- this.DefaultWidth = 499;
- this.DefaultHeight = 310;
+ this.DefaultWidth = 648;
+ this.DefaultHeight = 577;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.quit.Activated += new System.EventHandler(this.OnQuitActivated);
Modified: trunk/mono-tools/gui-compare/gtk-gui/gui.stetic
===================================================================
--- trunk/mono-tools/gui-compare/gtk-gui/gui.stetic 2007-12-26 22:43:39 UTC
(rev 91908)
+++ trunk/mono-tools/gui-compare/gtk-gui/gui.stetic 2007-12-26 23:45:28 UTC
(rev 91909)
@@ -4,7 +4,7 @@
<images-root-path>..</images-root-path>
<target-gtk-version>2.10.2</target-gtk-version>
</configuration>
- <widget class="Gtk.Window" id="MainWindow" design-size="499 310">
+ <widget class="Gtk.Window" id="MainWindow" design-size="648 577">
<action-group name="Default">
<action id="File">
<property name="Type">Action</property>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches