valadoc r21 - in trunk/src: libvaladoc valadoc



Author: flobrosch
Date: Thu Dec  4 15:34:14 2008
New Revision: 21
URL: http://svn.gnome.org/viewvc/valadoc?rev=21&view=rev

Log:
vala-0.5.2 emigration




Modified:
   trunk/src/libvaladoc/doctree.vala
   trunk/src/valadoc/valadoc.vala

Modified: trunk/src/libvaladoc/doctree.vala
==============================================================================
--- trunk/src/libvaladoc/doctree.vala	(original)
+++ trunk/src/libvaladoc/doctree.vala	Thu Dec  4 15:34:14 2008
@@ -1040,9 +1040,9 @@
 	protected void add_methods_and_construction_methods ( Gee.Collection<Vala.Method> 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 @@
 
 	// 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 @@
 		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 @@
 		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 @@
 			else
 				this.default_value = def.to_string;
 		}
+		*/
 	}
 
 	public TypeReference type_reference {
@@ -2253,7 +2255,7 @@
 	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 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 ( );

Modified: trunk/src/valadoc/valadoc.vala
==============================================================================
--- trunk/src/valadoc/valadoc.vala	(original)
+++ trunk/src/valadoc/valadoc.vala	Thu Dec  4 15:34:14 2008
@@ -165,7 +165,8 @@
 		}
 		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 @@
 			}
 		}
 	}
-
+*/
 	// remove
 	private Gee.ArrayList<string> sort_sources ( ) {
 		var to_doc = new Gee.ArrayList<string>();
@@ -294,52 +295,44 @@
 	}
 
 	private bool load_taglets ( string fulldirpath, out Gee.HashMap<string, Type>? taglets2, out Type strtag ) {
-		void* function;
-		GLib.Dir dir;
+		try {
+			taglets2 = new Gee.HashMap<string, Type> ( GLib.str_hash, GLib.str_equal );
+			Gee.ArrayList<Module*> modules = new Gee.ArrayList<weak Module*> ( );
+			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<Module*> modules = new Gee.ArrayList<weak Module*> ( );
+				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<string, Type> taglets =
-			taglets2 = new Gee.HashMap<string, Type> ( 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 ) {



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