[valadoc] Embedded: Search images relative to the file



commit 4f4829ba44ea261c80e6d7971be664c157b48e9b
Author: Florian Brosch <flo brosch gmail com>
Date:   Fri Jan 27 03:20:30 2012 +0100

    Embedded: Search images relative to the file

 src/libvaladoc/content/blockcontent.vala           |    7 ++++---
 src/libvaladoc/content/comment.vala                |    9 +++++----
 src/libvaladoc/content/contentelement.vala         |    5 +++--
 src/libvaladoc/content/contentfactory.vala         |    3 ++-
 src/libvaladoc/content/contentvisitor.vala         |    3 ++-
 src/libvaladoc/content/embedded.vala               |   16 ++++++++++++++--
 src/libvaladoc/content/headline.vala               |    7 ++++---
 src/libvaladoc/content/inlinecontent.vala          |    7 ++++---
 src/libvaladoc/content/inlinetaglet.vala           |    7 ++++---
 src/libvaladoc/content/link.vala                   |    5 +++--
 src/libvaladoc/content/list.vala                   |    7 ++++---
 src/libvaladoc/content/listitem.vala               |    9 +++++----
 src/libvaladoc/content/note.vala                   |    7 ++++---
 src/libvaladoc/content/paragraph.vala              |    7 ++++---
 src/libvaladoc/content/run.vala                    |    7 ++++---
 src/libvaladoc/content/sourcecode.vala             |    5 +++--
 src/libvaladoc/content/symbollink.vala             |    5 +++--
 src/libvaladoc/content/table.vala                  |    7 ++++---
 src/libvaladoc/content/tablecell.vala              |    7 ++++---
 src/libvaladoc/content/tablerow.vala               |    7 ++++---
 src/libvaladoc/content/text.vala                   |    5 +++--
 src/libvaladoc/content/warning.vala                |    7 ++++---
 src/libvaladoc/content/wikilink.vala               |    5 +++--
 .../documentation/documentationparser.vala         |    7 ++++---
 .../documentation/gtkdoccommentparser.vala         |    4 ++--
 src/libvaladoc/taglets/tagletdeprecated.vala       |    7 ++++---
 src/libvaladoc/taglets/tagletinheritdoc.vala       |    5 +++--
 src/libvaladoc/taglets/tagletlink.vala             |    7 ++++---
 src/libvaladoc/taglets/tagletparam.vala            |    7 ++++---
 src/libvaladoc/taglets/tagletreturn.vala           |    7 ++++---
 src/libvaladoc/taglets/tagletsee.vala              |    5 +++--
 src/libvaladoc/taglets/tagletsince.vala            |    5 +++--
 src/libvaladoc/taglets/tagletthrows.vala           |    7 ++++---
 33 files changed, 129 insertions(+), 86 deletions(-)
---
diff --git a/src/libvaladoc/content/blockcontent.vala b/src/libvaladoc/content/blockcontent.vala
index e466177..d3d8a98 100755
--- a/src/libvaladoc/content/blockcontent.vala
+++ b/src/libvaladoc/content/blockcontent.vala
@@ -1,6 +1,7 @@
 /* blockcontent.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -34,9 +35,9 @@ public abstract class Valadoc.Content.BlockContent : ContentElement {
 	public override void configure (Settings settings, ResourceLocator locator) {
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		foreach (Block element in _content) {
-			element.check (api_root, container, reporter, settings);
+			element.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/comment.vala b/src/libvaladoc/content/comment.vala
index 6978b8f..0c6f449 100755
--- a/src/libvaladoc/content/comment.vala
+++ b/src/libvaladoc/content/comment.vala
@@ -1,6 +1,7 @@
 /* comment.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -36,11 +37,11 @@ public class Valadoc.Content.Comment : BlockContent {
 	public override void configure (Settings settings, ResourceLocator locator) {
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
-		base.check (api_root, container, reporter, settings);
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
+		base.check (api_root, container, file_path, reporter, settings);
 
 		foreach (Taglet element in _taglets) {
-			element.check (api_root, container, reporter, settings);
+			element.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/contentelement.vala b/src/libvaladoc/content/contentelement.vala
index 427cf66..be15e5b 100755
--- a/src/libvaladoc/content/contentelement.vala
+++ b/src/libvaladoc/content/contentelement.vala
@@ -1,6 +1,7 @@
 /* contentelement.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,7 +29,7 @@ public abstract class Valadoc.Content.ContentElement : Object {
 	public virtual void configure (Settings settings, ResourceLocator locator) {
 	}
 
-	public abstract void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings);
+	public abstract void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings);
 
 	public abstract void accept (ContentVisitor visitor);
 
diff --git a/src/libvaladoc/content/contentfactory.vala b/src/libvaladoc/content/contentfactory.vala
index 19cf41b..dda8a87 100755
--- a/src/libvaladoc/content/contentfactory.vala
+++ b/src/libvaladoc/content/contentfactory.vala
@@ -1,6 +1,7 @@
 /* contentfactory.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/src/libvaladoc/content/contentvisitor.vala b/src/libvaladoc/content/contentvisitor.vala
index 3eb3a4b..d1b14c4 100755
--- a/src/libvaladoc/content/contentvisitor.vala
+++ b/src/libvaladoc/content/contentvisitor.vala
@@ -1,6 +1,7 @@
 /* contentvisitor.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/src/libvaladoc/content/embedded.vala b/src/libvaladoc/content/embedded.vala
index f158800..b8f4222 100755
--- a/src/libvaladoc/content/embedded.vala
+++ b/src/libvaladoc/content/embedded.vala
@@ -1,6 +1,7 @@
 /* embedded.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -42,7 +43,18 @@ public class Valadoc.Content.Embedded : ContentElement, Inline, StyleAttributes
 		_locator = locator;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
+		// search relative to our file
+		if (!Path.is_absolute (url)) {
+			string relative_to_file = Path.build_path (Path.DIR_SEPARATOR_S, Path.get_dirname (file_path), url);
+			if (FileUtils.test (relative_to_file, FileTest.EXISTS | FileTest.IS_REGULAR)) {
+				url = (owned) relative_to_file;
+				package = container.package;
+				return ;
+			}
+		}
+
+		// search relative to the current directory / absoulte path
 		if (!FileUtils.test (url, FileTest.EXISTS | FileTest.IS_REGULAR)) {
 			reporter.simple_error ("%s does not exist", url);
 		} else {
diff --git a/src/libvaladoc/content/headline.vala b/src/libvaladoc/content/headline.vala
index c7fcb29..36b19c2 100755
--- a/src/libvaladoc/content/headline.vala
+++ b/src/libvaladoc/content/headline.vala
@@ -1,6 +1,7 @@
 /* headline.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -31,12 +32,12 @@ public class Valadoc.Content.Headline : Block, InlineContent {
 		_level = 0;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// TODO report error if level == 0 ?
 		// TODO: content.size == 0?
 
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/inlinecontent.vala b/src/libvaladoc/content/inlinecontent.vala
index 389c66b..119f056 100755
--- a/src/libvaladoc/content/inlinecontent.vala
+++ b/src/libvaladoc/content/inlinecontent.vala
@@ -1,6 +1,7 @@
 /* inlinecontent.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -35,9 +36,9 @@ public abstract class Valadoc.Content.InlineContent : ContentElement {
 	internal InlineContent () {
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		foreach (Inline element in _content) {
-			element.check (api_root, container, reporter, settings);
+			element.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/inlinetaglet.vala b/src/libvaladoc/content/inlinetaglet.vala
index 813bcf3..1513950 100755
--- a/src/libvaladoc/content/inlinetaglet.vala
+++ b/src/libvaladoc/content/inlinetaglet.vala
@@ -1,6 +1,7 @@
 /* taglet.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -48,9 +49,9 @@ public abstract class Valadoc.Content.InlineTaglet : ContentElement, Taglet, Inl
 		this.locator = locator;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		ContentElement element = get_content ();
-		element.check (api_root, container, reporter, settings);
+		element.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/link.vala b/src/libvaladoc/content/link.vala
index e114e96..e264898 100755
--- a/src/libvaladoc/content/link.vala
+++ b/src/libvaladoc/content/link.vala
@@ -1,6 +1,7 @@
 /* link.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,7 +34,7 @@ public class Valadoc.Content.Link : InlineContent, Inline {
 	public override void configure (Settings settings, ResourceLocator locator) {
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		//TODO: check url
 	}
 
diff --git a/src/libvaladoc/content/list.vala b/src/libvaladoc/content/list.vala
index c7bae59..e55489f 100755
--- a/src/libvaladoc/content/list.vala
+++ b/src/libvaladoc/content/list.vala
@@ -1,6 +1,7 @@
 /* list.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -108,10 +109,10 @@ public class Valadoc.Content.List : ContentElement, Block {
 		_items = new ArrayList<ListItem> ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check individual list items
 		foreach (ListItem element in _items) {
-			element.check (api_root, container, reporter, settings);
+			element.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/listitem.vala b/src/libvaladoc/content/listitem.vala
index f690796..ef5f589 100755
--- a/src/libvaladoc/content/listitem.vala
+++ b/src/libvaladoc/content/listitem.vala
@@ -1,6 +1,7 @@
 /* listitem.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,12 +31,12 @@ public class Valadoc.Content.ListItem : InlineContent {
 		base ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 
 		if (sub_list != null) {
-			sub_list.check (api_root, container, reporter, settings);
+			sub_list.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/note.vala b/src/libvaladoc/content/note.vala
index d2b16c5..40bb930 100755
--- a/src/libvaladoc/content/note.vala
+++ b/src/libvaladoc/content/note.vala
@@ -1,6 +1,7 @@
 /* note.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,9 +29,9 @@ public class Valadoc.Content.Note : BlockContent, Block {
 		base ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/paragraph.vala b/src/libvaladoc/content/paragraph.vala
index 8f89b48..4998952 100755
--- a/src/libvaladoc/content/paragraph.vala
+++ b/src/libvaladoc/content/paragraph.vala
@@ -1,6 +1,7 @@
 /* paragraph.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -32,9 +33,9 @@ public class Valadoc.Content.Paragraph : InlineContent, Block, StyleAttributes {
 		base ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/run.vala b/src/libvaladoc/content/run.vala
index 519b424..146d9c2 100755
--- a/src/libvaladoc/content/run.vala
+++ b/src/libvaladoc/content/run.vala
@@ -1,6 +1,7 @@
 /* run.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -117,9 +118,9 @@ public class Valadoc.Content.Run : InlineContent, Inline {
 		_style = style;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/sourcecode.vala b/src/libvaladoc/content/sourcecode.vala
index fb2bd62..338d23b 100755
--- a/src/libvaladoc/content/sourcecode.vala
+++ b/src/libvaladoc/content/sourcecode.vala
@@ -1,6 +1,7 @@
 /* sourcecode.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -64,7 +65,7 @@ public class Valadoc.Content.SourceCode : ContentElement, Inline{
 		_language = Language.VALA;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/symbollink.vala b/src/libvaladoc/content/symbollink.vala
index ef52b30..aff9476 100755
--- a/src/libvaladoc/content/symbollink.vala
+++ b/src/libvaladoc/content/symbollink.vala
@@ -1,6 +1,7 @@
 /* symbollink.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -36,7 +37,7 @@ public class Valadoc.Content.SymbolLink : ContentElement, Inline {
 	public override void configure (Settings settings, ResourceLocator locator) {
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/table.vala b/src/libvaladoc/content/table.vala
index dc232ae..17fa589 100755
--- a/src/libvaladoc/content/table.vala
+++ b/src/libvaladoc/content/table.vala
@@ -1,6 +1,7 @@
 /* table.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,12 +34,12 @@ public class Valadoc.Content.Table : ContentElement, Block {
 		_rows = new ArrayList<TableRow> ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check the table consistency in term of row/column number
 
 		// Check individual rows
 		foreach (var row in _rows) {
-			row.check (api_root, container, reporter, settings);
+			row.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/tablecell.vala b/src/libvaladoc/content/tablecell.vala
index 01e732f..733aad1 100755
--- a/src/libvaladoc/content/tablecell.vala
+++ b/src/libvaladoc/content/tablecell.vala
@@ -1,6 +1,7 @@
 /* tablecell.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -36,9 +37,9 @@ public class Valadoc.Content.TableCell : InlineContent, StyleAttributes {
 		_rowspan = 1;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/tablerow.vala b/src/libvaladoc/content/tablerow.vala
index 943c95f..5cd59fd 100755
--- a/src/libvaladoc/content/tablerow.vala
+++ b/src/libvaladoc/content/tablerow.vala
@@ -1,6 +1,7 @@
 /* tablerow.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,10 +34,10 @@ public class Valadoc.Content.TableRow : ContentElement {
 		_cells = new ArrayList<TableCell> ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check individual cells
 		foreach (var cell in _cells) {
-			cell.check (api_root, container, reporter, settings);
+			cell.check (api_root, container, file_path, reporter, settings);
 		}
 	}
 
diff --git a/src/libvaladoc/content/text.vala b/src/libvaladoc/content/text.vala
index 2b14723..6d3877e 100755
--- a/src/libvaladoc/content/text.vala
+++ b/src/libvaladoc/content/text.vala
@@ -1,6 +1,7 @@
 /* text.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -36,7 +37,7 @@ public class Valadoc.Content.Text : ContentElement, Inline {
 		}
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/warning.vala b/src/libvaladoc/content/warning.vala
index e848c43..3ab9b3c 100755
--- a/src/libvaladoc/content/warning.vala
+++ b/src/libvaladoc/content/warning.vala
@@ -1,6 +1,7 @@
 /* warning.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,9 +29,9 @@ public class Valadoc.Content.Warning : BlockContent, Block {
 		base ();
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check inline content
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/content/wikilink.vala b/src/libvaladoc/content/wikilink.vala
index e88bc18..e08719f 100755
--- a/src/libvaladoc/content/wikilink.vala
+++ b/src/libvaladoc/content/wikilink.vala
@@ -1,6 +1,7 @@
 /* link.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -34,7 +35,7 @@ public class Valadoc.Content.WikiLink : InlineContent, Inline {
 	public override void configure (Settings settings, ResourceLocator locator) {
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		page = api_root.wikitree.search (name);
 		if (page == null) {
 			reporter.simple_warning ("%s does not exist".printf (name));
diff --git a/src/libvaladoc/documentation/documentationparser.vala b/src/libvaladoc/documentation/documentationparser.vala
index f4a9667..5fa736a 100755
--- a/src/libvaladoc/documentation/documentationparser.vala
+++ b/src/libvaladoc/documentation/documentationparser.vala
@@ -1,6 +1,7 @@
 /* documentationparser.vala
  *
- * Copyright (C) 2008-2011 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -76,7 +77,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
 	public Comment? parse_comment_str (Api.Node element, string content, string filename, int first_line, int first_column) {
 		try {
 			Comment doc_comment = parse_comment (content, filename, first_line, first_column);
-			doc_comment.check (_tree, element, _reporter, _settings);
+			doc_comment.check (_tree, element, filename, _reporter, _settings);
 			return doc_comment;
 		} catch (ParserError error) {
 			return null;
@@ -94,7 +95,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
 
 		try {
 			Page documentation = parse_wiki (page.documentation_str, page.get_filename ());
-			documentation.check (_tree, pkg, _reporter, _settings);
+			documentation.check (_tree, pkg, page.path, _reporter, _settings);
 			return documentation;
 		} catch (ParserError error) {
 			return null;
diff --git a/src/libvaladoc/documentation/gtkdoccommentparser.vala b/src/libvaladoc/documentation/gtkdoccommentparser.vala
index 574e65f..b148606 100644
--- a/src/libvaladoc/documentation/gtkdoccommentparser.vala
+++ b/src/libvaladoc/documentation/gtkdoccommentparser.vala
@@ -1,6 +1,6 @@
 /* gtkcommentparser.vala
  *
- * Copyright (C) 2011  Florian Brosch
+ * Copyright (C) 2011-2012  Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -260,7 +260,7 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
 			first = false;
 		}
 
-		comment.check (tree, element, reporter, settings);
+		comment.check (tree, element, gir_comment.file.relative_path, reporter, settings);
 		return comment;
 	}
 
diff --git a/src/libvaladoc/taglets/tagletdeprecated.vala b/src/libvaladoc/taglets/tagletdeprecated.vala
index f51adc1..468f6ec 100755
--- a/src/libvaladoc/taglets/tagletdeprecated.vala
+++ b/src/libvaladoc/taglets/tagletdeprecated.vala
@@ -1,6 +1,7 @@
 /* tagletdeprecated.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,8 +29,8 @@ public class Valadoc.Taglets.Deprecated : InlineContent, Taglet, Block {
 		return run_rule;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
-		base.check (api_root, container, reporter, settings);
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/taglets/tagletinheritdoc.vala b/src/libvaladoc/taglets/tagletinheritdoc.vala
index 329db68..653a448 100755
--- a/src/libvaladoc/taglets/tagletinheritdoc.vala
+++ b/src/libvaladoc/taglets/tagletinheritdoc.vala
@@ -1,6 +1,7 @@
 /* tagletinheritdoc.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,7 +31,7 @@ public class Valadoc.Taglets.InheritDoc : InlineTaglet {
 		return null;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// TODO Check that the container is an override of an abstract symbol
 		// Also retrieve that abstract symbol _inherited
 
diff --git a/src/libvaladoc/taglets/tagletlink.vala b/src/libvaladoc/taglets/tagletlink.vala
index 3ebb6de..cbe8dc4 100755
--- a/src/libvaladoc/taglets/tagletlink.vala
+++ b/src/libvaladoc/taglets/tagletlink.vala
@@ -1,6 +1,7 @@
 /* taglet.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -50,7 +51,7 @@ public class Valadoc.Taglets.Link : InlineTaglet {
 		});
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		if (symbol_name.has_prefix ("c::")) {
 			_symbol_name = _symbol_name.substring (3);
 			_symbol = api_root.search_symbol_cstr (container, symbol_name);
@@ -75,7 +76,7 @@ public class Valadoc.Taglets.Link : InlineTaglet {
 			reporter.simple_warning ("%s: %s does not exist", container.get_full_name (), symbol_name);
 		}
 
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override ContentElement produce_content () {
diff --git a/src/libvaladoc/taglets/tagletparam.vala b/src/libvaladoc/taglets/tagletparam.vala
index 6dfb235..bbff403 100755
--- a/src/libvaladoc/taglets/tagletparam.vala
+++ b/src/libvaladoc/taglets/tagletparam.vala
@@ -1,6 +1,7 @@
 /* taglet.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +41,7 @@ public class Valadoc.Taglets.Param : InlineContent, Taglet, Block {
 	}
 
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// Check for the existence of such a parameter
 		this.parameter = null;
 
@@ -72,7 +73,7 @@ public class Valadoc.Taglets.Param : InlineContent, Taglet, Block {
 			reporter.simple_warning ("%s: Unknown parameter `%s'", container.get_full_name (), parameter_name);
 		}
 
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/taglets/tagletreturn.vala b/src/libvaladoc/taglets/tagletreturn.vala
index a4beee0..5a27977 100755
--- a/src/libvaladoc/taglets/tagletreturn.vala
+++ b/src/libvaladoc/taglets/tagletreturn.vala
@@ -1,6 +1,7 @@
 /* taglet.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -29,10 +30,10 @@ public class Valadoc.Taglets.Return : InlineContent, Taglet, Block {
 		return run_rule;
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		// TODO check for the existence of a return type
 
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/taglets/tagletsee.vala b/src/libvaladoc/taglets/tagletsee.vala
index 68ed636..895e3c2 100755
--- a/src/libvaladoc/taglets/tagletsee.vala
+++ b/src/libvaladoc/taglets/tagletsee.vala
@@ -1,6 +1,7 @@
 /* tagletsee.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -38,7 +39,7 @@ public class Valadoc.Taglets.See : ContentElement, Taglet, Block {
 		});
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		if (symbol_name.has_prefix ("c::")) {
 			symbol_name = symbol_name.substring (3);
 			symbol = api_root.search_symbol_cstr (container, symbol_name);
diff --git a/src/libvaladoc/taglets/tagletsince.vala b/src/libvaladoc/taglets/tagletsince.vala
index 5b68ecf..49acafb 100755
--- a/src/libvaladoc/taglets/tagletsince.vala
+++ b/src/libvaladoc/taglets/tagletsince.vala
@@ -1,6 +1,7 @@
 /* tagletsince.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -37,7 +38,7 @@ public class Valadoc.Taglets.Since : ContentElement, Taglet, Block {
 		});
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 	}
 
 	public override void accept (ContentVisitor visitor) {
diff --git a/src/libvaladoc/taglets/tagletthrows.vala b/src/libvaladoc/taglets/tagletthrows.vala
index b592f6c..547fbc7 100755
--- a/src/libvaladoc/taglets/tagletthrows.vala
+++ b/src/libvaladoc/taglets/tagletthrows.vala
@@ -1,6 +1,7 @@
 /* tagletthrows.vala
  *
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -35,14 +36,14 @@ public class Valadoc.Taglets.Throws : InlineContent, Taglet, Block {
 		});
 	}
 
-	public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+	public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
 		error_domain = api_root.search_symbol_str (container, error_domain_name);
 		if (error_domain == null) {
 			// TODO use ContentElement's source reference
 			reporter.simple_error ("%s does not exist", error_domain_name);
 		}
 
-		base.check (api_root, container, reporter, settings);
+		base.check (api_root, container, file_path, reporter, settings);
 	}
 
 	public override void accept (ContentVisitor visitor) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]