[valadoc] Allow doclets to report errors & warnings
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] Allow doclets to report errors & warnings
- Date: Thu, 24 Feb 2011 01:32:17 +0000 (UTC)
commit ee537880ad4886610e08e52152470977db562490
Author: Florian Brosch <flo brosch gmail com>
Date: Tue Feb 15 01:12:30 2011 +0100
Allow doclets to report errors & warnings
src/doclets/devhelp/doclet.vala | 4 ++--
src/doclets/gtkdoc/doclet.vala | 4 +++-
src/doclets/htm/doclet.vala | 4 ++--
src/libvaladoc/doclet.vala | 2 +-
src/libvaladoc/html/basicdoclet.vala | 2 +-
src/valadoc/valadoc.vala | 2 +-
6 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/doclets/devhelp/doclet.vala b/src/doclets/devhelp/doclet.vala
index e369337..a5da48f 100755
--- a/src/doclets/devhelp/doclet.vala
+++ b/src/doclets/devhelp/doclet.vala
@@ -53,8 +53,8 @@ public class Valadoc.Devhelp.Doclet : Valadoc.Html.BasicDoclet {
}
- public override void process (Settings settings, Api.Tree tree) {
- base.process (settings, tree);
+ public override void process (Settings settings, Api.Tree tree, ErrorReporter reporter) {
+ base.process (settings, tree, reporter);
DirUtils.create (this.settings.path, 0777);
write_wiki_pages (tree, css_path_wiki, js_path_wiki, Path.build_filename (this.settings.path, this.settings.pkg_name, "content"));
tree.accept (this);
diff --git a/src/doclets/gtkdoc/doclet.vala b/src/doclets/gtkdoc/doclet.vala
index a783f59..f56b1be 100644
--- a/src/doclets/gtkdoc/doclet.vala
+++ b/src/doclets/gtkdoc/doclet.vala
@@ -74,6 +74,7 @@ namespace Gtkdoc.Config {
public class Gtkdoc.Director : Valadoc.Doclet, Object {
+ private ErrorReporter reporter;
private Settings settings;
private Api.Tree tree;
private Gtkdoc.Generator generator;
@@ -88,11 +89,12 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
* Done. Now we have -decl.txt of the whole code and -sections.txt containing C sections
* and Vala sections.
*/
- public void process (Settings settings, Api.Tree tree) {
+ public void process (Settings settings, Api.Tree tree, ErrorReporter reporter) {
this.settings = settings;
if (!Config.parse (settings.pluginargs)) {
return;
}
+ this.reporter = reporter;
this.tree = tree;
var ccomments_dir = Path.build_filename (settings.path, "ccomments");
diff --git a/src/doclets/htm/doclet.vala b/src/doclets/htm/doclet.vala
index 0faf737..6f20dd8 100755
--- a/src/doclets/htm/doclet.vala
+++ b/src/doclets/htm/doclet.vala
@@ -41,8 +41,8 @@ public class Valadoc.HtmlDoclet : Valadoc.Html.BasicDoclet {
return GLib.Path.build_filename ( this.settings.path, element.package.name, element.get_full_name () + ".html" );
}
- public override void process (Settings settings, Api.Tree tree) {
- base.process (settings, tree);
+ public override void process (Settings settings, Api.Tree tree, ErrorReporter reporter) {
+ base.process (settings, tree, reporter);
DirUtils.create (this.settings.path, 0777);
copy_directory (icons_dir, settings.path);
diff --git a/src/libvaladoc/doclet.vala b/src/libvaladoc/doclet.vala
index 847e5e7..c98adcf 100755
--- a/src/libvaladoc/doclet.vala
+++ b/src/libvaladoc/doclet.vala
@@ -26,5 +26,5 @@ using Gee;
public delegate Type Valadoc.DocletRegisterFunction (GLib.TypeModule module);
public interface Valadoc.Doclet : GLib.Object {
- public abstract void process (Settings settings, Api.Tree tree);
+ public abstract void process (Settings settings, Api.Tree tree, ErrorReporter reporter);
}
diff --git a/src/libvaladoc/html/basicdoclet.vala b/src/libvaladoc/html/basicdoclet.vala
index acda5d8..7afa5c9 100755
--- a/src/libvaladoc/html/basicdoclet.vala
+++ b/src/libvaladoc/html/basicdoclet.vala
@@ -95,7 +95,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
private const string css_style_content = "site_content";
private const string css_style_body = "site_body";
- public virtual void process (Settings settings, Api.Tree tree) {
+ public virtual void process (Settings settings, Api.Tree tree, ErrorReporter reporter) {
this.settings = settings;
this.tree = tree;
diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala
index 74bff77..4be7630 100755
--- a/src/valadoc/valadoc.vala
+++ b/src/valadoc/valadoc.vala
@@ -220,7 +220,7 @@ public class ValaDoc : Object {
return quit (reporter);
}
- modules.doclet.process (settings, doctree);
+ modules.doclet.process (settings, doctree, reporter);
return quit (reporter);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]