From: Florian Brosch Date: Thu, 4 Dec 2008 15:34:14 +0000 (+0000) Subject: vala-0.5.2 emigration X-Git-Tag: 0.37.1~3^2~613 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2871eb500e8ae0f6ef6fef5aeaf4f750108cb9c6;p=thirdparty%2Fvala.git vala-0.5.2 emigration svn path=/trunk/; revision=21 --- diff --git a/src/libvaladoc/doctree.vala b/src/libvaladoc/doctree.vala index 4d0099328..ea25bfb8b 100755 --- a/src/libvaladoc/doctree.vala +++ b/src/libvaladoc/doctree.vala @@ -1040,9 +1040,9 @@ public interface Valadoc.ConstructionMethodHandler : DataType, MethodHandler { protected void add_methods_and_construction_methods ( Gee.Collection vmethods ) { foreach ( Vala.Method vm in vmethods ) { if ( vm is Vala.CreationMethod ) { - if ( ((Vala.CreationMethod)vm).generated == false ) { + //if ( ((Vala.CreationMethod)vm).generated == false ) { this.add_construction_method ( (Vala.CreationMethod)vm ); - } + //} } else { this.add_method ( vm ); @@ -1432,8 +1432,8 @@ public interface Valadoc.FieldHandler : Basic { // internal public void add_field ( Vala.Field vf ) { - if ( vf.generated == true ) - return ; + //if ( vf.generated == true ) + // return ; var tmp = new Field ( this.settings, vf, this, this.head ); this.fields.add ( tmp ); @@ -1938,15 +1938,15 @@ public class Valadoc.TypeReference : Basic { if ( vtype is Vala.ErrorType ) { Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtype).error_domain; if ( verrdom != null ) - this.data_type = this.head.search_vala_symbol ( verrdom ); + this.data_type = (DataType?)this.head.search_vala_symbol ( verrdom ); else this.data_type = glib_error; } else if (vtype is Vala.DelegateType ) { - this.data_type = this.head.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol ); + this.data_type = (DataType?)this.head.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol ); } else { - this.data_type = this.head.search_vala_symbol ( vtype.data_type ); + this.data_type = (DataType?)this.head.search_vala_symbol ( vtype.data_type ); } } public void write ( Langlet langlet, void* ptr ) { @@ -2030,6 +2030,7 @@ public class Valadoc.FormalParameter : Basic, TypeHandler { this.set_ret_type ( vformparam ); var def = this.vformalparam.default_expression; + /* if ( def != null ) { if ( def is Vala.StringLiteral ) this.default_value = def.to_string; @@ -2046,6 +2047,7 @@ public class Valadoc.FormalParameter : Basic, TypeHandler { else this.default_value = def.to_string; } + */ } public TypeReference type_reference { @@ -2253,7 +2255,7 @@ public class Valadoc.Property : Basic, SymbolAccessibility, ReturnTypeHandler, V public void set_type_references ( ) { if ( this.is_override ) { Vala.Property vp = ( this.vproperty.base_property == null )? this.vproperty.base_interface_property : this.vproperty.base_property; - this.base_property = this.head.search_vala_symbol ( vp ); + this.base_property = (Property?)this.head.search_vala_symbol ( vp ); } this.set_return_type_references ( ); } @@ -2548,7 +2550,7 @@ public class Valadoc.Method : Basic, ParameterListHandler, ExceptionHandler, Tem public void set_type_references ( ) { if ( this.is_override ) { Vala.Method vm = ( this.vmethod.base_method == null )? this.vmethod.base_interface_method : this.vmethod.base_method; - this.base_method = this.head.search_vala_symbol ( vm ); + this.base_method = (Method?)this.head.search_vala_symbol ( vm ); } this.set_return_type_references ( ); diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala index d92803e66..c478d7d47 100755 --- a/src/valadoc/valadoc.vala +++ b/src/valadoc/valadoc.vala @@ -165,7 +165,8 @@ public class ValaDoc : Object { } return null; } -*/ + + private void add_files ( Vala.CodeContext context ) { foreach ( string source in this.sources ) { if (FileUtils.test (source, FileTest.EXISTS)) { @@ -190,7 +191,7 @@ public class ValaDoc : Object { } } } - +*/ // remove private Gee.ArrayList sort_sources ( ) { var to_doc = new Gee.ArrayList(); @@ -294,52 +295,44 @@ public class ValaDoc : Object { } private bool load_taglets ( string fulldirpath, out Gee.HashMap? taglets2, out Type strtag ) { - void* function; - GLib.Dir dir; + try { + taglets2 = new Gee.HashMap ( GLib.str_hash, GLib.str_equal ); + Gee.ArrayList modules = new Gee.ArrayList ( ); + string pluginpath = fulldirpath + "taglets/"; + GLib.Dir dir = GLib.Dir.open ( pluginpath ); + void* function; - string pluginpath = fulldirpath + "taglets/"; + for ( weak string entry = dir.read_name(); entry != null ; entry = dir.read_name() ) { + if ( !( entry.has_suffix(".so") || entry.has_suffix(".dll") ) ) + continue ; - Gee.ArrayList modules = new Gee.ArrayList ( ); + string tagletpath = pluginpath + "/" + entry; + Module* module = Module.open ( tagletpath, ModuleFlags.BIND_LAZY); + if (module == null) { + stdout.printf ( "Can't load plugin.\n" ); + taglets2 = null; + return false; + } -// Gee.HashMap taglets = - taglets2 = new Gee.HashMap ( GLib.str_hash, GLib.str_equal ); + module->symbol( "register_plugin", out function ); + Valadoc.TagletRegisterFunction tagletregisterfkt = (Valadoc.TagletRegisterFunction) function; - try { - dir = GLib.Dir.open ( pluginpath ); + + GLib.Type type = tagletregisterfkt ( taglets2 ); + + if ( entry == "libtagletstring.so" || entry == "libtagletstring.dll" ) + strtag = type; + + modules.add ( module ); + } + return true; } catch ( FileError err ) { stdout.printf ( "Can't load plugin. %s\n", pluginpath ); taglets2 = null; return false; } - - for ( weak string entry = dir.read_name(); entry != null ; entry = dir.read_name() ) { - if ( !( entry.has_suffix(".so") || entry.has_suffix(".dll") ) ) - continue ; - - string tagletpath = pluginpath + "/" + entry; - - Module* module = Module.open ( tagletpath, ModuleFlags.BIND_LAZY); - if (module == null) { - stdout.printf ( "Can't load plugin.\n" ); - taglets2 = null; - return false; - } - - module->symbol( "register_plugin", out function ); - Valadoc.TagletRegisterFunction tagletregisterfkt = (Valadoc.TagletRegisterFunction) function; - - - GLib.Type type = tagletregisterfkt ( taglets2 ); - - if ( entry == "libtagletstring.so" || entry == "libtagletstring.dll" ) - strtag = type; - - modules.add ( module ); - } - - return true; } private Doclet? load_doclet ( string path ) {