]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc/api: adds GLib.Error to exception lists
authorFlorian Brosch <flo.brosch@gmail.com>
Tue, 3 Aug 2010 01:27:26 +0000 (03:27 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Tue, 3 Aug 2010 17:12:42 +0000 (19:12 +0200)
src/libvaladoc/api/delegate.vala
src/libvaladoc/api/method.vala
src/libvaladoc/api/node.vala
src/libvaladoc/html/basicdoclet.vala

index 4f79806da48557cb7726e24edf27c317ba33cd5f..8f074fe833d6445807cc0f7c424696efcbaebade 100644 (file)
@@ -91,7 +91,7 @@ public class Valadoc.Api.Delegate : TypeSymbol {
 
                signature.append (")", false);
 
-               var exceptions = get_children_by_type (NodeType.ERROR_DOMAIN);
+               var exceptions = get_children_by_types ({NodeType.ERROR_DOMAIN, NodeType.CLASS});
                if (exceptions.size > 0) {
                        signature.append_keyword ("throws");
                        first = true;
index a362f4aec6b8345866f9c4df4bfab50054ec8267..9b114a4b201662408b91ed99f312254fc342bf62 100644 (file)
@@ -190,7 +190,7 @@ public class Valadoc.Api.Method : Member {
 
                signature.append (")", false);
 
-               var exceptions = get_children_by_type (NodeType.ERROR_DOMAIN);
+               var exceptions = get_children_by_types ({NodeType.ERROR_DOMAIN, NodeType.CLASS});
                if (exceptions.size > 0) {
                        signature.append_keyword ("throws");
                        first = true;
index f936eea5e2b76c401db3f2191853df5276bc46b3..90aedfba43f3775da0f8e052f5a9506961a31f7e 100644 (file)
@@ -166,6 +166,16 @@ public abstract class Valadoc.Api.Node : Item, Browsable, Documentation, Compara
                return children;
        }
 
+       public Gee.List<Node> get_children_by_types (NodeType[] types, bool filtered = true) {
+               var children = new ArrayList<Node> ();
+
+               foreach (NodeType type in types) {
+                       children.add_all (get_children_by_type (type, filtered));
+               }
+
+               return children;
+       }
+
        public void accept_children_by_type (NodeType type, Visitor visitor) {
                Gee.List<Node> all_children = per_type_children.get (type);
                if (all_children != null) {
index 27dcf927c1ddfe4c1348859142121c44859bba08..f9fc82a4d080607c2375a78f6a85f88be6ed2ebf 100755 (executable)
@@ -539,7 +539,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
                        write_package_note (node);
                }
 
-               if (!(node is Method || node is Delegate || node is Api.Signal)) { // avoids exception listings
+               if (!(node is Method || node is Delegate)) { // avoids exception listings
                        if (node.has_children ({
                                        Api.NodeType.ERROR_CODE,
                                        Api.NodeType.ENUM_VALUE,