]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
-
authorFlorian Brosch <flobrosch@src.gnome.org>
Sun, 7 Dec 2008 15:43:55 +0000 (15:43 +0000)
committerFlorian Brosch <flobrosch@src.gnome.org>
Sun, 7 Dec 2008 15:43:55 +0000 (15:43 +0000)
 -

svn path=/trunk/; revision=23

src/libvaladoc/doctree.vala
src/libvaladoc/parser.vala
src/valadoc/valadoc.vala

index 8c093c7e91f4d685d7f2bff1133d34fa2eac3e19..72955b04efcc5b6834342784e22e86c2c86a1253 100755 (executable)
@@ -178,6 +178,21 @@ public class Valadoc.Basic : Object {
                }
        }
 
+       public string?# filename {
+               get {
+                       SourceReference? sref = this.vsymbol.source_reference;
+                       if ( sref == null )
+                               return null;
+
+                       Vala.SourceFile? file = sref.file;
+                       if ( file == null )
+                               return null;
+
+                       string path = sref.file.filename;
+                       return GLib.Path.get_basename ( path );
+               }
+       }
+
        protected string? comment_string  {
                get {
                        SourceReference sref = this.vsymbol.source_reference;
index adc15a1902dcd123d67d15dd2279c09d5d907d04..2fabca9ae7bac8314a74df9fa81aedfbcdc58e3f 100644 (file)
@@ -29,11 +29,6 @@ namespace Valadoc {
 
 public static delegate GLib.Type TagletRegisterFunction ( Gee.HashMap<string, Type> taglets );
 
-
-
-
-
-
 public abstract class DocElement : Object {
        public abstract bool write ( void* res, int max, int index );
 }
@@ -228,53 +223,6 @@ public class DocumentationTree : Object {
 
 
 
-/** Start Testtaglets **
-
-public class ReturnHtmlTaglet : MainTaglet {
-       public override int order { get { return 90000; } }
-       private Gee.Collection<DocElement> content;
-
-       public override bool parse ( Tree tree, Basic me, Gee.Collection<DocElement> content, out string[] errmsg ) {
-               this.content = content;
-               return true;
-       }
-
-       public override bool write_block_start ( void* ptr ) {
-               weak GLib.FileStream file = (GLib.FileStream)ptr;
-               file.printf ( "<h2 class=\"%s\">Returns:</h2>\n", css_title );
-               return true;
-       }
-
-       public override bool write_block_end ( void* res ) {
-               return true;
-       }
-
-       public override bool write ( void* res, int max, int index ) {
-               int _max = this.content.size;
-               int _index = 0;
-
-               foreach ( DocElement tag in this.content ) {
-                       tag.write ( res, _max, _index );
-                       _index++;
-               }
-               return true;
-       }
-}
-
-public class LinkHtmlInlineTaglet : InlineTaglet {
-       string content;
-
-       public override bool parse ( Tree tree, Basic me, string content, out string[] errmsg ) {
-               this.content = content;
-               return true;
-       }
-
-       public override bool write ( void* res, int max, int index ) {
-               stdout.printf ( "(%s)", content );
-               return true;
-       }
-}
-/** Ende Testtaglets **/
 
 
 
@@ -586,6 +534,8 @@ public class Parser {
                int starttag_pos = 0;
                int paragraph = 0;
 
+               this.filename = me.filename;
+
                this.linestartpos = 0;
                this.startpos = 0;
                this.line = 0;
@@ -595,7 +545,6 @@ public class Parser {
                this.str = str;
                this.line = 0;
 
-               this.filename = "fooo";
 
                bool tmp = this.skip_documentation_header ();
                if ( tmp == false ) {
index a536b94ba6954053b98e17f0700e456fc40c7c5f..fce976553fccb2a7dd7ebe74452ddbdca74be587 100755 (executable)
@@ -445,7 +445,6 @@ public class ValaDoc : Object {
 
                if ( this.tsources != null ) {
                        foreach ( string src in this.tsources ) {
-                               stdout.printf ( ">__>%s\n", src );
                                if ( !doctree.add_file ( src ) ) {
                                        Report.error (null, "%s not found".printf (src));
                                        return quit ();