diff --git a/ChangeLog b/ChangeLog index d48e0e1c9..7b3a3cfe9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-15 Mike Kestner + + * parser/gapi-fixup.cs : warn on unmatched rules. reworked from a Dan + Winship patch. [Fixes #76088] + 2005-09-08 Dan Winship * gtk/Gtk.metadata: Hide Gtk.Drag.SetIconDefault. Mark diff --git a/doc/en/Gtk/Drag.xml b/doc/en/Gtk/Drag.xml index 08600561f..536507cce 100644 --- a/doc/en/Gtk/Drag.xml +++ b/doc/en/Gtk/Drag.xml @@ -484,6 +484,11 @@ + + + System.Obsolete(Message="Replaced by SetIconDefault(ctx)", IsError=False) + + diff --git a/doc/en/Gtk/HBox.xml b/doc/en/Gtk/HBox.xml index f19a8b578..2dd3454d0 100644 --- a/doc/en/Gtk/HBox.xml +++ b/doc/en/Gtk/HBox.xml @@ -127,4 +127,4 @@ class HBoxTester { - \ No newline at end of file + diff --git a/doc/en/Gtk/VBox.xml b/doc/en/Gtk/VBox.xml index d6b8a000f..5df0e49d2 100644 --- a/doc/en/Gtk/VBox.xml +++ b/doc/en/Gtk/VBox.xml @@ -125,4 +125,4 @@ class VBoxTester { - \ No newline at end of file + diff --git a/parser/gapi-fixup.cs b/parser/gapi-fixup.cs index 4571e4a4d..315e6cea9 100644 --- a/parser/gapi-fixup.cs +++ b/parser/gapi-fixup.cs @@ -96,21 +96,29 @@ namespace GtkSharp.Parsing { while (rmv_iter.MoveNext ()) { string path = rmv_iter.Current.GetAttribute ("path", ""); XPathNodeIterator api_iter = api_nav.Select (path); + bool matched = false; while (api_iter.MoveNext ()) { XmlElement api_node = ((IHasXmlNode)api_iter.Current).GetNode () as XmlElement; api_node.ParentNode.RemoveChild (api_node); + matched = true; } + if (!matched) + Console.WriteLine ("Warning: matched no nodes", path); } XPathNodeIterator add_iter = meta_nav.Select ("/metadata/add-node"); while (add_iter.MoveNext ()) { string path = add_iter.Current.GetAttribute ("path", ""); XPathNodeIterator api_iter = api_nav.Select (path); + bool matched = false; while (api_iter.MoveNext ()) { XmlElement api_node = ((IHasXmlNode)api_iter.Current).GetNode () as XmlElement; foreach (XmlNode child in ((IHasXmlNode)add_iter.Current).GetNode().ChildNodes) api_node.AppendChild (api_doc.ImportNode (child, true)); + matched = true; } + if (!matched) + Console.WriteLine ("Warning: matched no nodes", path); } XPathNodeIterator attr_iter = meta_nav.Select ("/metadata/attr"); @@ -118,10 +126,14 @@ namespace GtkSharp.Parsing { string path = attr_iter.Current.GetAttribute ("path", ""); string attr_name = attr_iter.Current.GetAttribute ("name", ""); XPathNodeIterator api_iter = api_nav.Select (path); + bool matched = false; while (api_iter.MoveNext ()) { XmlElement node = ((IHasXmlNode)api_iter.Current).GetNode () as XmlElement; node.SetAttribute (attr_name, attr_iter.Current.Value); + matched = true; } + if (!matched) + Console.WriteLine ("Warning: matched no nodes", path); } XPathNodeIterator move_iter = meta_nav.Select ("/metadata/move-node"); @@ -130,6 +142,7 @@ namespace GtkSharp.Parsing { XPathExpression expr = api_nav.Compile (path); string parent = move_iter.Current.Value; XPathNodeIterator parent_iter = api_nav.Select (parent); + bool matched = false; while (parent_iter.MoveNext ()) { XmlNode parent_node = ((IHasXmlNode)parent_iter.Current).GetNode (); XPathNodeIterator path_iter = parent_iter.Current.Clone ().Select (expr); @@ -138,7 +151,10 @@ namespace GtkSharp.Parsing { parent_node.AppendChild (node.Clone ()); node.ParentNode.RemoveChild (node); } + matched = true; } + if (!matched) + Console.WriteLine ("Warning: matched no nodes", path); } if (symbol_doc != null) {