valadoc r14 - in trunk/src: doclets/devhelp/deps doclets/devhelp/taglets/link doclets/devhelp/taglets/see doclets/html/deps doclets/html/linkhelper doclets/html/taglets/link doclets/html/taglets/see doclets/htmlhelpers doclets/valadoc.org/taglets/link doclets/valadoc.org/taglets/see libvaladoc valadoc
- From: flobrosch svn gnome org
- To: svn-commits-list gnome org
- Subject: valadoc r14 - in trunk/src: doclets/devhelp/deps doclets/devhelp/taglets/link doclets/devhelp/taglets/see doclets/html/deps doclets/html/linkhelper doclets/html/taglets/link doclets/html/taglets/see doclets/htmlhelpers doclets/valadoc.org/taglets/link doclets/valadoc.org/taglets/see libvaladoc valadoc
- Date: Fri, 7 Nov 2008 23:58:11 +0000 (UTC)
Author: flobrosch
Date: Fri Nov 7 23:58:10 2008
New Revision: 14
URL: http://svn.gnome.org/viewvc/valadoc?rev=14&view=rev
Log:
- --force
Modified:
trunk/src/doclets/devhelp/deps/style.css
trunk/src/doclets/devhelp/taglets/link/taglet.vala
trunk/src/doclets/devhelp/taglets/see/taglet.vala
trunk/src/doclets/html/deps/main.css
trunk/src/doclets/html/linkhelper/helper.vala
trunk/src/doclets/html/taglets/link/taglet.vala
trunk/src/doclets/html/taglets/see/taglet.vala
trunk/src/doclets/htmlhelpers/htmlhelpers.vala
trunk/src/doclets/valadoc.org/taglets/link/taglet.vala
trunk/src/doclets/valadoc.org/taglets/see/taglet.vala
trunk/src/libvaladoc/doctree.vala
trunk/src/valadoc/valadoc.vala
Modified: trunk/src/doclets/devhelp/deps/style.css
==============================================================================
--- trunk/src/doclets/devhelp/deps/style.css (original)
+++ trunk/src/doclets/devhelp/deps/style.css Fri Nov 7 23:58:10 2008
@@ -182,7 +182,181 @@
+.css_content_link_constant {
+ background-image:url(constant.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_namespace {
+ background-image:url(namespace.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_struct {
+ background-image:url(struct.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_interface {
+ background-image:url(interface.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_enum {
+ background-image:url(enum.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_errordomain {
+ background-image:url(errordomain.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_delegate {
+ background-image:url(delegate.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_signal {
+ background-image:url(signal.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_field {
+ background-image:url(field.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_enumvalue {
+ background-image:url(enumvalue.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_errorcode {
+ background-image:url(errorcode.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_class {
+ background-image:url(class.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_abstract_class {
+ background-image:url(abstractclass.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_property {
+ background-image:url(property.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_virtual_property {
+ background-image:url(property.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_abstract_property {
+ background-image:url(property.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_method {
+ background-image:url(method.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_static_method {
+ background-image:url(staticmethod.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_virtual_method {
+ background-image:url(method.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_abstract_method {
+ background-image:url( abstractmethod.png );
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_construction_method {
+ background-image:url(method.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.main_inline_navigation_errorcode {
+ list-style-image:url(errorcode.png);
+}
+.main_inline_navigation_enumvalue {
+ list-style-image:url(enumvalue.png);
+}
.navi_abstract_class, .main_inline_navigation_abstract_class {
list-style-image: url(abstractclass.png);
}
Modified: trunk/src/doclets/devhelp/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/devhelp/taglets/link/taglet.vala (original)
+++ trunk/src/doclets/devhelp/taglets/link/taglet.vala Fri Nov 7 23:58:10 2008
@@ -27,6 +27,7 @@
public class LinkHtmlTaglet : InlineTaglet, HtmlHelper {
private string content;
private string path;
+ private string css;
public Settings settings {
construct set;
@@ -45,6 +46,7 @@
}
this.settings = settings;
+ this.css = get_html_content_link_css_class ( element );
this.path = this.get_html_link ( this.settings, element, me );
this.content = str;
@@ -54,9 +56,9 @@
public override bool write ( void* res, int max, int index ) {
if ( this.path == null )
- ((GLib.FileStream)res).printf ( "<i>%s</i>", this.content );
+ ((GLib.FileStream)res).printf ( "<span class=\"%s\">%s</span>", this.css, this.content );
else
- ((GLib.FileStream)res).printf ( "<a href=\"%s\">%s</a>", this.path, this.content );
+ ((GLib.FileStream)res).printf ( "<a class=\"%s\" href=\"%s\">%s</a>", this.css, this.path, this.content );
return true;
}
Modified: trunk/src/doclets/devhelp/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/devhelp/taglets/see/taglet.vala (original)
+++ trunk/src/doclets/devhelp/taglets/see/taglet.vala Fri Nov 7 23:58:10 2008
@@ -26,6 +26,7 @@
public class SeeHtmlTaglet : MainTaglet, HtmlHelper {
private string name;
private string path;
+ private string css;
public override int order {
get { return 500; }
@@ -77,7 +78,7 @@
this.settings = settings;
-
+ this.css = get_html_inline_navigation_link_css_class ( element );
this.path = this.get_html_link ( this.settings, element, me );
this.name = element.full_name();
return true;
@@ -86,7 +87,7 @@
public override bool write ( void* ptr, int max, int index ) {
weak GLib.FileStream file = (GLib.FileStream)ptr;
- file.printf ( "\t<li class=\"%s\"><a href=\"%s\">%s</a></li>\n", css_see_list, this.path, this.name );
+ file.printf ( "\t<li class=\"%s\"><a href=\"%s\">%s</a></li>\n", this.css, this.path, this.name );
return true;
}
}
Modified: trunk/src/doclets/html/deps/main.css
==============================================================================
--- trunk/src/doclets/html/deps/main.css (original)
+++ trunk/src/doclets/html/deps/main.css Fri Nov 7 23:58:10 2008
@@ -167,6 +167,183 @@
+
+.main_inline_navigation_errorcode {
+ list-style-image:url(errorcode.png);
+}
+.main_inline_navigation_enumvalue {
+ list-style-image:url(enumvalue.png);
+}
+.css_content_link_constant {
+ background-image:url(constant.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_namespace {
+ background-image:url(namespace.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_struct {
+ background-image:url(struct.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_interface {
+ background-image:url(interface.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_enum {
+ background-image:url(enum.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_errordomain {
+ background-image:url(errordomain.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_delegate {
+ background-image:url(delegate.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_signal {
+ background-image:url(signal.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_field {
+ background-image:url(field.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_enumvalue {
+ background-image:url(enumvalue.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_errorcode {
+ background-image:url(errorcode.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_class {
+ background-image:url(class.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_abstract_class {
+ background-image:url(abstractclass.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_property {
+ background-image:url(property.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_virtual_property {
+ background-image:url(property.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_abstract_property {
+ background-image:url(property.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_method {
+ background-image:url(method.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_static_method {
+ background-image:url(staticmethod.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_virtual_method {
+ background-image:url(method.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_abstract_method {
+ background-image:url( abstractmethod.png );
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+.css_content_link_construction_method {
+ background-image:url(method.png);
+ display:inline-block;
+ padding-right:17px;
+ background-repeat:no-repeat;
+ background-position:center right;
+ border:0px;
+}
+
+
.main_inline_navigation_virtual_property {
list-style-image: url(property.png);
}
@@ -180,7 +357,6 @@
list-style-image: url(property.png);
}
-
.navi_abstract_class, .main_inline_navigation_abstract_class {
list-style-image: url(abstractclass.png);
}
@@ -244,9 +420,10 @@
.navi_package, .main_inline_navigation_package {
list-style-image: url(package.png);
}
-
.main_inline_navigation_constant, .navi_constant {
list-style-image: url(constant.png);
+ text-decoration: none;
+ color: #214b87;
}
Modified: trunk/src/doclets/html/linkhelper/helper.vala
==============================================================================
--- trunk/src/doclets/html/linkhelper/helper.vala (original)
+++ trunk/src/doclets/html/linkhelper/helper.vala Fri Nov 7 23:58:10 2008
@@ -20,6 +20,8 @@
using GLib;
+
+
public interface Valadoc.LinkHelper {
protected string get_html_top_link ( Valadoc.Basic? postag ) {
if ( postag == null )
Modified: trunk/src/doclets/html/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/html/taglets/link/taglet.vala (original)
+++ trunk/src/doclets/html/taglets/link/taglet.vala Fri Nov 7 23:58:10 2008
@@ -28,6 +28,7 @@
public class LinkHtmlTaglet : InlineTaglet, LinkHelper {
private string content;
private string path;
+ private string css;
public Settings settings {
construct set;
@@ -47,15 +48,16 @@
this.settings = settings;
this.path = this.get_html_link ( settings, element, me );
+ this.css = get_html_content_link_css_class ( element );
this.content = element.full_name ();
return true;
}
public override bool write ( void* res, int max, int index ) {
if ( this.path == null )
- ((GLib.FileStream)res).printf ( "<i>%s</i>", this.content );
+ ((GLib.FileStream)res).printf ( "<span class=\"%s\">%s</span>", this.css, this.content );
else
- ((GLib.FileStream)res).printf ( "<a href=\"%s\">%s</a>", this.path, this.content );
+ ((GLib.FileStream)res).printf ( "<a href=\"%s\" class=\"%s\">%s</a>", this.path, this.css, this.content );
return true;
}
Modified: trunk/src/doclets/html/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/html/taglets/see/taglet.vala (original)
+++ trunk/src/doclets/html/taglets/see/taglet.vala Fri Nov 7 23:58:10 2008
@@ -26,6 +26,7 @@
public class SeeHtmlTaglet : MainTaglet, Valadoc.LinkHelper {
private string name;
private string path;
+ private string css;
public override int order {
get { return 500; }
@@ -76,6 +77,7 @@
}
this.settings = settings;
+ this.css = get_html_inline_navigation_link_css_class ( element );
this.path = this.get_html_link ( settings, element, me );
this.name = element.full_name ();
return true;
@@ -85,9 +87,9 @@
weak GLib.FileStream file = (GLib.FileStream)ptr;
if ( this.path == null )
- file.printf ( "\t<li class=\"%s\"><i>%s</i></li>\n", css_see_list, this.name );
+ file.printf ( "\t<li class=\"%s\">%s</li>\n", this.css, this.name );
else
- file.printf ( "\t<li class=\"%s\"><a href=\"%s\">%s</a></li>\n", css_see_list, this.path, this.name );
+ file.printf ( "\t<li class=\"%s\"><a href=\"%s\">%s</a></li>\n", this.css, this.path, this.name );
return true;
}
Modified: trunk/src/doclets/htmlhelpers/htmlhelpers.vala
==============================================================================
--- trunk/src/doclets/htmlhelpers/htmlhelpers.vala (original)
+++ trunk/src/doclets/htmlhelpers/htmlhelpers.vala Fri Nov 7 23:58:10 2008
@@ -4,8 +4,13 @@
using GLib;
+namespace Valadoc {
+
public const string css_inline_navigation = "main_inline_navigation";
+public const string css_inline_navigation_errorcode = "main_inline_navigation_errorcode";
+public const string css_inline_navigation_enumvalue = "main_inline_navigation_enumvalue";
+
public const string css_inline_navigation_property = "main_inline_navigation_property";
public const string css_inline_navigation_virtual_property = "main_inline_navigation_virtual_property";
public const string css_inline_navigation_abstract_property = "main_inline_navigation_abstract_property";
@@ -104,7 +109,161 @@
+public const string css_content_link_constant = "css_content_link_constant";
+public const string css_content_link_namespace = "css_content_link_namespace";
+public const string css_content_link_struct = "css_content_link_struct";
+public const string css_content_link_interface = "css_content_link_interface";
+public const string css_content_link_enum = "css_content_link_enum";
+public const string css_content_link_errordomain = "css_content_link_errordomain";
+public const string css_content_link_delegate = "css_content_link_delegate";
+public const string css_content_link_signal = "css_content_link_signal";
+public const string css_content_link_field = "css_content_link_field";
+public const string css_content_link_enumvalue = "css_content_link_enumvalue";
+public const string css_content_link_errorcode = "css_content_link_errorcode";
+
+public const string css_content_link_class = "css_content_link_class";
+public const string css_content_link_abstract_class = "css_content_link_abstract_class";
+
+public const string css_content_link_property = "css_content_link_property";
+public const string css_content_link_virtual_property = "css_content_link_virtual_property";
+public const string css_content_link_abstract_property = "css_content_link_abstract_property";
+
+public const string css_content_link_method = "css_content_link_method";
+public const string css_content_link_static_method = "css_content_link_static_method";
+public const string css_content_link_virtual_method = "css_content_link_virtual_method";
+public const string css_content_link_abstract_method = "css_content_link_abstract_method";
+public const string css_content_link_construction_method = "css_content_link_construction_method";
+
+
+public string get_html_content_link_css_class ( Valadoc.Basic element ) {
+ if ( element is Namespace ) {
+ return css_content_link_namespace;
+ }
+ else if ( element is Struct ) {
+ return css_content_link_struct;
+ }
+ else if ( element is Interface ) {
+ return css_content_link_interface;
+ }
+ else if ( element is Class ) {
+ if ( ((Class)element).is_abstract )
+ return css_content_link_abstract_class;
+ else
+ return css_content_link_class;
+ }
+ else if ( element is Enum ) {
+ return css_content_link_enum;
+ }
+ else if ( element is ErrorDomain ) {
+ return css_content_link_errordomain;
+ }
+ else if ( element is Delegate ) {
+ return css_content_link_delegate;
+ }
+ else if ( element is Method ) {
+ if ( ((Method)element).is_constructor )
+ return css_content_link_construction_method;
+ else if ( ((Method)element).is_abstract )
+ return css_content_link_abstract_method;
+ else if ( ((Method)element).is_override || ((Method)element).is_override )
+ return css_content_link_virtual_method;
+ else if ( ((Method)element).is_static )
+ return css_content_link_static_method;
+ else
+ return css_content_link_method;
+ }
+ else if ( element is Signal ) {
+ return css_content_link_signal;
+ }
+ else if ( element is Property ) {
+ if ( ((Property)element).is_virtual || ((Property)element).is_override )
+ return css_content_link_virtual_property;
+ else if ( ((Property)element).is_abstract )
+ return css_content_link_abstract_property;
+ else
+ return css_content_link_property;
+ }
+ else if ( element is Field ) {
+ return css_content_link_field;
+ }
+ else if ( element is Constant ) {
+ return css_content_link_constant;
+ }
+ else if ( element is EnumValue ) {
+ return css_content_link_enumvalue;
+ }
+ else if ( element is ErrorCode ) {
+ return css_content_link_errorcode;
+ }
+ return "";
+}
+
+
+
+
+public string get_html_inline_navigation_link_css_class ( Valadoc.Basic element ) {
+ if ( element is Namespace ) {
+ }
+ else if ( element is Struct ) {
+ return css_inline_navigation_struct;
+ }
+ else if ( element is Interface ) {
+ return css_inline_navigation_interface;
+ }
+ else if ( element is Class ) {
+ return (((Class)element).is_abstract)? css_inline_navigation_abstract_class : css_inline_navigation_class;
+ }
+ else if ( element is Enum ) {
+ return css_inline_navigation_enum;
+ }
+ else if ( element is ErrorDomain ) {
+ return css_inline_navigation_errordomain;
+ }
+ else if ( element is Delegate ) {
+ return css_inline_navigation_delegate;
+ }
+ else if ( element is Method ) {
+ if ( ((Method)element).is_static )
+ return css_inline_navigation_static_method;
+ else if ( ((Method)element).is_static )
+ return css_inline_navigation_static_method;
+ else if ( ((Method)element).is_constructor )
+ return css_inline_navigation_construction_method;
+ else if ( ((Method)element).is_abstract )
+ return css_inline_navigation_abstract_method;
+ else if ( ((Method)element).is_virtual || ((Method)element).is_override )
+ return css_inline_navigation_virtual_method;
+ else
+ return css_inline_navigation_method;
+ }
+ else if ( element is Signal ) {
+ return css_inline_navigation_signal;
+ }
+ else if ( element is Property ) {
+ if ( ((Property)element).is_virtual || ((Property)element).is_override )
+ return css_inline_navigation_virtual_property;
+ else if ( ((Property)element).is_abstract )
+ return css_inline_navigation_abstract_property;
+ else
+ return css_inline_navigation_property;
+ }
+ else if ( element is Field ) {
+ return css_inline_navigation_fields;
+ }
+ else if ( element is Constant ) {
+ return css_inline_navigation_constant;
+ }
+ else if ( element is EnumValue ) {
+ return css_inline_navigation_enumvalue;
+ }
+ else if ( element is ErrorCode ) {
+ return css_inline_navigation_errorcode;
+ }
+ return "";
+}
+
+}
public abstract class Valadoc.BasicHtmlLanglet : Valadoc.Langlet {
@@ -1411,17 +1570,7 @@
file.printf ( "<h3 class=\"%s\">Methods:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Method m in imethods ) {
- string css;
- if ( m.is_static )
- css = css_inline_navigation_static_method;
- else if ( m.is_abstract )
- css = css_inline_navigation_abstract_method;
- else if ( m.is_virtual || m.is_override )
- css = css_inline_navigation_virtual_method;
- else
- css = css_inline_navigation_method;
-
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css, css_navi_link, this.get_link(m, (mself == null)? mh : mself), m.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (m), css_navi_link, this.get_link(m, (mself == null)? mh : mself), m.name );
}
file.puts ( "</ul>\n" );
}
@@ -1440,7 +1589,7 @@
file.printf ( "<h3 class=\"%s\">Static Methods:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Method m in static_methods ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_static_method, css_navi_link, this.get_link(m, mh), m.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (m), css_navi_link, this.get_link(m, mh), m.name );
}
file.puts ( "</ul>\n" );
}
@@ -1559,7 +1708,7 @@
file.printf ( "<h3 class=\"%s\">Constants:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Constant c in constants ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_constant, css_navi_link, this.get_link(c, (mself == null)? ch : mself), c.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (c), css_navi_link, this.get_link(c, (mself == null)? ch : mself), c.name );
}
file.puts ( "</ul>\n" );
}
@@ -1571,7 +1720,7 @@
file.printf ( "<h3 class=\"%s\">Enums:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Enum en in enums ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_enum, css_navi_link, this.get_link(en, (mself == null)? eh : mself), en.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (en), css_navi_link, this.get_link(en, (mself == null)? eh : mself), en.name );
}
file.puts ( "</ul>\n" );
}
@@ -1583,7 +1732,7 @@
file.printf ( "<h3 class=\"%s\">Errordomains:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( ErrorDomain err in errdoms ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_errordomain, css_navi_link, this.get_link(err, (mself == null)? eh : mself), err.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (err), css_navi_link, this.get_link(err, (mself == null)? eh : mself), err.name );
}
file.puts ( "</ul>\n" );
}
@@ -1595,7 +1744,7 @@
file.printf ( "<h3 class=\"%s\">Construction Methods:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Method m in methods ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_construction_method, css_navi_link, this.get_link(m, cmh), m.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (m), css_navi_link, this.get_link(m, cmh), m.name );
}
file.puts ( "</ul>\n" );
}
@@ -1625,7 +1774,7 @@
file.printf ( "<h3 class=\"%s\">Fields:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Field f in fields ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_fields, css_navi_link, this.get_link(f, (mself == null)? fh : mself), f.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class(f), css_navi_link, this.get_link(f, (mself == null)? fh : mself), f.name );
}
file.puts ( "</ul>\n" );
}
@@ -1637,15 +1786,7 @@
file.printf ( "<h3 class=\"%s\">Properties:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Property prop in properties ) {
- string css;
- if ( prop.is_virtual )
- css = css_inline_navigation_virtual_property;
- else if ( prop.is_abstract )
- css = css_inline_navigation_abstract_property;
- else
- css = css_inline_navigation_property;
-
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css, css_navi_link, this.get_link(prop, ph), prop.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (prop), css_navi_link, this.get_link(prop, ph), prop.name );
}
file.puts ( "</ul>\n" );
}
@@ -1657,7 +1798,7 @@
file.printf ( "<h3 class=\"%s\">Signals:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Signal sig in signals ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_signal, css_navi_link, this.get_link(sig, sh), sig.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (sig), css_navi_link, this.get_link(sig, sh), sig.name );
}
file.puts ( "</ul>\n" );
}
@@ -1677,7 +1818,7 @@
name = subcl.name;
}
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", (subcl.is_abstract)? css_inline_navigation_abstract_class : css_inline_navigation_class, css_navi_link, this.get_link(subcl, (mself == null)? clh : mself), name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (subcl), css_navi_link, this.get_link(subcl, (mself == null)? clh : mself), name );
}
file.puts ( "</ul>\n" );
}
@@ -1689,7 +1830,7 @@
file.printf ( "<h3 class=\"%s\">Interfaces:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Interface iface in ifaces ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_interface, css_navi_link, this.get_link(iface, (mself == null)? ih : mself), iface.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (iface), css_navi_link, this.get_link(iface, (mself == null)? ih : mself), iface.name );
}
file.puts ( "</ul>\n" );
}
@@ -1701,7 +1842,7 @@
file.printf ( "<h3 class=\"%s\">Delegates:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Delegate d in delegates ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_delegate, css_navi_link, this.get_link(d, (mself == null)? dh : mself), d.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class (d), css_navi_link, this.get_link(d, (mself == null)? dh : mself), d.name );
}
file.puts ( "</ul>\n" );
}
@@ -1713,7 +1854,7 @@
file.printf ( "<h3 class=\"%s\">Structs:</h3>\n", css_title );
file.printf ( "<ul class=\"%s\">\n", css_inline_navigation );
foreach ( Struct stru in structs ) {
- file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", css_inline_navigation_struct, css_navi_link, this.get_link(stru, (mself == null)? struh : mself), stru.name );
+ file.printf ( "\t<li class=\"%s\"><a class=\"%s\" href=\"%s\">%s</a></li>\n", get_html_inline_navigation_link_css_class ( stru ), css_navi_link, this.get_link(stru, (mself == null)? struh : mself), stru.name );
}
file.puts ( "</ul>\n" );
}
Modified: trunk/src/doclets/valadoc.org/taglets/link/taglet.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/link/taglet.vala (original)
+++ trunk/src/doclets/valadoc.org/taglets/link/taglet.vala Fri Nov 7 23:58:10 2008
@@ -27,6 +27,7 @@
public class LinkHtmlTaglet : InlineTaglet, LinkHelper {
private string content;
private string path;
+ private string css;
public Settings settings {
construct set;
@@ -45,6 +46,7 @@
}
this.settings = settings;
+ this.css = get_html_content_link_css_class ( element );
this.path = this.get_html_link ( settings, element );
this.content = element.full_name ();
return true;
@@ -53,9 +55,9 @@
public override bool write ( void* res, int max, int index ) {
if ( this.path == null )
- ((GLib.FileStream)res).printf ( "<i>%s</i>", this.content );
+ ((GLib.FileStream)res).printf ( "<span class=\"%s\">%s</span>", this.css, this.content );
else
- ((GLib.FileStream)res).printf ( "<a href=\"%s\">%s</a>", this.path, this.content );
+ ((GLib.FileStream)res).printf ( "<a class=\"%s\" href=\"%s\">%s</a>", this.css, this.path, this.content );
return true;
}
Modified: trunk/src/doclets/valadoc.org/taglets/see/taglet.vala
==============================================================================
--- trunk/src/doclets/valadoc.org/taglets/see/taglet.vala (original)
+++ trunk/src/doclets/valadoc.org/taglets/see/taglet.vala Fri Nov 7 23:58:10 2008
@@ -26,6 +26,7 @@
public class SeeHtmlTaglet : MainTaglet, LinkHelper {
private string name;
private string path;
+ private string css;
public override int order {
get { return 500; }
@@ -76,6 +77,7 @@
}
this.settings = settings;
+ this.css = get_html_inline_navigation_link_css_class ( element );
this.path = this.get_html_link ( settings, element );
this.name = element.full_name ();
return true;
@@ -84,7 +86,7 @@
public override bool write ( void* ptr, int max, int index ) {
weak GLib.FileStream file = (GLib.FileStream)ptr;
- file.printf ( "\t<li class=\"%s\"><a href=\"%s\">%s</a></li>\n", css_see_list, this.path, this.name );
+ file.printf ( "\t<li class=\"%s\"><a href=\"%s\">%s</a></li>\n", this.css, this.path, this.name );
return true;
}
}
Modified: trunk/src/libvaladoc/doctree.vala
==============================================================================
--- trunk/src/libvaladoc/doctree.vala (original)
+++ trunk/src/libvaladoc/doctree.vala Fri Nov 7 23:58:10 2008
@@ -112,6 +112,7 @@
public enum CommentContext {
+ NAMESPACE,
ERRORDOMAIN,
ENUMVALUE,
ERRORCODE,
@@ -4154,6 +4155,8 @@
// internal
public void parse_comments ( Valadoc.Parser docparser ) {
+ //this.parse_comment_helper ( docparser, CommentContext.NAMESPACE );
+
this.parse_enum_comments ( docparser );
this.parse_field_comments ( docparser );
this.parse_class_comments ( docparser );
Modified: trunk/src/valadoc/valadoc.vala
==============================================================================
--- trunk/src/valadoc/valadoc.vala (original)
+++ trunk/src/valadoc/valadoc.vala Fri Nov 7 23:58:10 2008
@@ -36,7 +36,6 @@
private static string pkg_name = null;
private static string pkg_version = null;
- private static bool add_documentation = false;
private static bool add_inherited = false;
private static bool _protected = false;
private static bool with_deps = false;
@@ -48,6 +47,7 @@
private static bool non_null_experimental = false;
private static bool disable_non_null = false;
private static bool disable_checking;
+ private static bool force = false;
[NoArrayLength ()]
@@ -89,6 +89,7 @@
{ "package-name", 0, 0, OptionArg.STRING, ref pkg_name, "package name", "DIRECTORY" },
{ "package-version", 0, 0, OptionArg.STRING, ref pkg_version, "package version", "DIRECTORY" },
// { "xml", 0, 0, OptionArg.FILENAME, ref xmlsource, "xml", "DIRECTORY" },
+ { "force", 0, 0, OptionArg.NONE, ref force, "force", null },
{ null }
};
@@ -507,17 +508,6 @@
}
}
-
- // add some random checks here
- // Gee.HashMap<string, Valadoc.TagletCreator> taglets = this.get_taglets ( );
-
- //Gee.HashMap<string, Valadoc.TagletCreator> taglets
- // = new Gee.HashMap<string, Valadoc.TagletCreator>(GLib.str_hash, GLib.str_equal);
-
-
- ////////////////// parse + errorreporter >>>>>>>>>>>>>>>>>
-
-
Reporter reporter = new Reporter();
GLib.Type strtag;
@@ -545,17 +535,6 @@
if ( reporter.errors > 0 )
return quit ();
-
-/* //////////////////////////// XML //////////////////////////
- if ( xmlsource != null ) {
- var xml = new MergeExternalDocumentation ( doctree );
- bool tmp = xml.parse ( xmlsource );
- if ( tmp == false ) {
- stderr.printf ( "Can't load XML-File.\n" );
- return 1;
- }
- }
-*/
doctree.parse_comments ( docparser );
if ( reporter.errors > 0 )
return 1;
@@ -573,6 +552,37 @@
return quit ();
}
+ private static bool remove_directory ( string rpath ) {
+ try {
+ GLib.Dir dir = GLib.Dir.open ( rpath ); //throws GLib.FileError
+ if ( dir == null )
+ return false;
+
+ for ( weak string entry = dir.read_name(); entry != null ; entry = dir.read_name() ) {
+ string path = rpath + entry;
+
+ bool is_dir = GLib.FileUtils.test ( path, GLib.FileTest.IS_DIR );
+ if ( is_dir == true ) {
+ bool tmp = remove_directory ( path );
+ if ( tmp == false ) {
+ stderr.printf ( "Error: Can't remove directory %s.\n", path );
+ return false;
+ }
+ }
+ else {
+ int tmp = GLib.FileUtils.unlink ( path );
+ if ( tmp > 0 ) {
+ stderr.printf ( "Error: Can't remove file %s.\n", path );
+ return false;
+ }
+ }
+ }
+ }
+ finally {}
+
+ return true;
+ }
+
static int main ( string[] args ) {
try {
var opt_context = new OptionContext ("- Vala Documentation Tool");
@@ -605,8 +615,11 @@
directory += "/";
}
- if ( !add_documentation ) {
- if ( FileUtils.test ( directory, FileTest.EXISTS ) ) {
+ if ( FileUtils.test ( directory, FileTest.EXISTS ) ) {
+ if ( force == true ) {
+ remove_directory ( directory );
+ }
+ else {
stderr.printf ("File already exists.\n");
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]