[valadoc] Html: Sort members in the navigation
- From: Florian Brosch <flobrosch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [valadoc] Html: Sort members in the navigation
- Date: Wed, 21 Oct 2009 10:47:01 +0000 (UTC)
commit ecd14716bfe348a0e8017e5eb1f06771be00877e
Author: Didier "Ptitjes <ptitjes free fr>
Date: Tue Oct 20 13:55:42 2009 +0200
Html: Sort members in the navigation
src/doclets/htmlhelpers/doclet/doclet.vala | 4 +++-
src/libvaladoc/api/node.vala | 8 ++++++--
src/libvaladoc/api/tree.vala | 16 ++++++++--------
3 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/src/doclets/htmlhelpers/doclet/Makefile.am b/src/doclets/htmlhelpers/doclet/Makefile.am
old mode 100644
new mode 100755
diff --git a/src/doclets/htmlhelpers/doclet/doclet.vala b/src/doclets/htmlhelpers/doclet/doclet.vala
index 83dc35c..7c1519a 100755
--- a/src/doclets/htmlhelpers/doclet/doclet.vala
+++ b/src/doclets/htmlhelpers/doclet/doclet.vala
@@ -216,7 +216,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
}
protected void write_navi_children (Api.Node node, Api.NodeType type, Api.Node? parent) {
- foreach (Api.Node child in node.get_children_by_type (type)) {
+ var children = node.get_children_by_type (type);
+ children.sort ();
+ foreach (Api.Node child in children) {
write_navi_entry (child, parent, get_html_css_class (child), child != parent);
}
}
diff --git a/src/doclets/htmlhelpers/doclet/markupwriter.vala b/src/doclets/htmlhelpers/doclet/markupwriter.vala
old mode 100644
new mode 100755
diff --git a/src/libvaladoc/api/node.vala b/src/libvaladoc/api/node.vala
index 13466b7..962c494 100644
--- a/src/libvaladoc/api/node.vala
+++ b/src/libvaladoc/api/node.vala
@@ -46,7 +46,7 @@ public enum Valadoc.Api.NodeType {
TYPE_PARAMETER
}
-public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
+public abstract class Valadoc.Api.Node : Item, Visitable, Documentation, Comparable<Node> {
private bool do_document = false;
public abstract string? name { owned get; }
@@ -134,7 +134,7 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
}
}
- return children.read_only_view;
+ return children;
}
public void accept_children_by_type (NodeType type, Visitor visitor) {
@@ -233,5 +233,9 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
}
return this._full_name;
}
+
+ public int compare_to (Node node) {
+ return strcmp (name, node.name);
+ }
}
diff --git a/src/libvaladoc/api/tree.vala b/src/libvaladoc/api/tree.vala
index c545a91..868f110 100644
--- a/src/libvaladoc/api/tree.vala
+++ b/src/libvaladoc/api/tree.vala
@@ -114,7 +114,7 @@ public class Valadoc.Api.Tree {
this.context.checking = settings.enable_checking;
this.context.deprecated = settings.deprecated;
this.context.experimental = settings.experimental;
- this.context.non_null_experimental = settings.non_null_experimental;
+// this.context.non_null_experimental = settings.non_null_experimental;
this.context.dbus_transformation = !settings.disable_dbus_transformation;
@@ -292,14 +292,14 @@ public class Valadoc.Api.Tree {
return false;
}
- if (context.non_null_experimental) {
- Vala.NullChecker null_checker = new Vala.NullChecker ();
- null_checker.check (this.context);
+// if (context.non_null_experimental) {
+// Vala.NullChecker null_checker = new Vala.NullChecker ();
+// null_checker.check (this.context);
- if (this.context.report.get_errors () > 0) {
- return false;
- }
- }
+// if (this.context.report.get_errors () > 0) {
+// return false;
+// }
+// }
Api.NodeBuilder builder = new NodeBuilder (this);
this.context.accept(builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]