Index: src/anjuta-callbacks.c
===================================================================
--- src/anjuta-callbacks.c	(Revision 3173)
+++ src/anjuta-callbacks.c	(Arbeitskopie)
@@ -20,7 +20,7 @@
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
-
+ 
 #include <sys/stat.h>
 #include <unistd.h>
 #include <signal.h>
Index: plugins/symbol-browser/an_symbol_info.c
===================================================================
--- plugins/symbol-browser/an_symbol_info.c	(Revision 3173)
+++ plugins/symbol-browser/an_symbol_info.c	(Arbeitskopie)
@@ -300,7 +300,7 @@
 /*-----------------------------------------------------------------------------
  * return the pixbufs. It will initialize pixbufs first if they weren't before
  */
-GdkPixbuf*
+const GdkPixbuf*
 anjuta_symbol_info_get_pixbuf  (SVNodeType node_type)
 {
 	if (!sv_symbol_pixbufs)
Index: plugins/symbol-browser/plugin.c
===================================================================
--- plugins/symbol-browser/plugin.c	(Revision 3173)
+++ plugins/symbol-browser/plugin.c	(Arbeitskopie)
@@ -1354,14 +1354,12 @@
 
 	if (needed_text == NULL)
 		DEBUG_PRINT ("needed_text is null");
-	DEBUG_PRINT ("text needed is %s", needed_text );
-	
+	DEBUG_PRINT ("text needed is %s", needed_text );	
 
 	/* we'll pass only the text of the current scope: i.e. only the current function
 	 * in which we request the completion. */
 	TMTag * found_type = anjuta_symbol_view_get_type_of_expression (symbol_view, 
 				needed_text, text_pos - scope_position, func_scope_tag, &access_method);
-
 				
 	if (found_type == NULL) {
 		DEBUG_PRINT ("type not found.");
Index: plugins/symbol-browser/an_symbol_info.h
===================================================================
--- plugins/symbol-browser/an_symbol_info.h	(Revision 3173)
+++ plugins/symbol-browser/an_symbol_info.h	(Arbeitskopie)
@@ -101,7 +101,7 @@
 SVRootType anjuta_symbol_info_get_root_type (SVNodeType type);
 
 /* Returns the icon pixbuf. Caller does not get a reference. */
-GdkPixbuf* anjuta_symbol_info_get_pixbuf  (SVNodeType type);
+const GdkPixbuf* anjuta_symbol_info_get_pixbuf  (SVNodeType type);
 
 G_END_DECLS
 #endif /* __AN_SYMBOL_INFO_H__ */
Index: plugins/symbol-browser/an_symbol.c
===================================================================
--- plugins/symbol-browser/an_symbol.c	(Revision 3173)
+++ plugins/symbol-browser/an_symbol.c	(Arbeitskopie)
@@ -20,6 +20,7 @@
 
 #include <libgnome/gnome-macros.h>
 #include <libanjuta/anjuta-utils.h>
+#include <libanjuta/anjuta-debug.h>
 #include <libanjuta/interfaces/ianjuta-symbol.h>
 #include "an_symbol_info.h"
 #include "an_symbol.h"
@@ -105,61 +106,70 @@
 }
 
 static const gchar*
-isymbol_name (IAnjutaSymbol *isymbol, GError **err)
+isymbol_type_name (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
 
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), NULL);
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, NULL);
-	return s->priv->tm_tag->name;
+	return s->priv->tm_tag->atts.entry.type_ref[1];
 }
 
 static const gchar*
-isymbol_args (IAnjutaSymbol *isymbol, GError **err)
+isymbol_type_str (IAnjutaSymbol *isymbol, GError **err)
 {
+	DEBUG_PRINT ("TODO: isymbol_type_str ()");
+	return NULL;
+}
+
+static const gchar*
+isymbol_name (IAnjutaSymbol *isymbol, GError **err)
+{
 	AnjutaSymbol *s;
 
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), NULL);
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, NULL);
-	return s->priv->tm_tag->atts.entry.arglist;
+	return s->priv->tm_tag->name;
 }
 
 static const gchar*
-isymbol_scope (IAnjutaSymbol *isymbol, GError **err)
+isymbol_args (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
 
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), NULL);
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, NULL);
-	return s->priv->tm_tag->atts.entry.scope;
+	return s->priv->tm_tag->atts.entry.arglist;
 }
 
 static const gchar*
-isymbol_inheritance (IAnjutaSymbol *isymbol, GError **err)
+isymbol_scope (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
 
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), NULL);
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, NULL);
-	return s->priv->tm_tag->atts.entry.inheritance;
+	return s->priv->tm_tag->atts.entry.scope;
 }
 
 static const gchar*
-isymbol_var_type (IAnjutaSymbol *isymbol, GError **err)
+isymbol_inheritance (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
 
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), NULL);
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, NULL);
-	return s->priv->tm_tag->atts.entry.type_ref[1];
+//	return s->priv->tm_tag->atts.entry.inheritance;
+	DEBUG_PRINT ("isymbol_inheritance () FIXME");
+	return NULL;
 }
 
-static gchar
+static const gchar*
 isymbol_access (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
@@ -167,10 +177,12 @@
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), '\0');
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, '\0');
-	return s->priv->tm_tag->atts.entry.access;
+	DEBUG_PRINT ("isymbol_access () FIXME");
+	return "fixme";
+//	return s->priv->tm_tag->atts.entry.access;
 }
 
-static gchar
+static const gchar*
 isymbol_impl (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
@@ -178,7 +190,10 @@
 	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), '\0');
 	s = ANJUTA_SYMBOL (isymbol);
 	g_return_val_if_fail (s->priv->tm_tag != NULL, '\0');
-	return s->priv->tm_tag->atts.entry.impl;
+	DEBUG_PRINT ("isymbol_impl () FIXME");
+	return "fixme";
+	
+//	return s->priv->tm_tag->atts.entry.impl;	
 }
 
 static const gchar*
@@ -216,17 +231,7 @@
 	return s->priv->tm_tag->atts.entry.local;
 }
 
-static guint
-isymbol_pointer_order (IAnjutaSymbol *isymbol, GError **err)
-{
-	AnjutaSymbol *s;
-	g_return_val_if_fail (ANJUTA_IS_SYMBOL (isymbol), FALSE);
-	s = ANJUTA_SYMBOL (isymbol);
-	g_return_val_if_fail (s->priv->tm_tag != NULL, 0);
-	return s->priv->tm_tag->atts.entry.pointerOrder;
-}
-
-static GdkPixbuf*
+static const GdkPixbuf*
 isymbol_icon (IAnjutaSymbol *isymbol, GError **err)
 {
 	AnjutaSymbol *s;
@@ -243,17 +248,17 @@
 isymbol_iface_init (IAnjutaSymbolIface *iface)
 {
 	iface->type = isymbol_type;
+	iface->type_str = isymbol_type_str;	
+	iface->type_name = isymbol_type_name;
 	iface->name = isymbol_name;
 	iface->args = isymbol_args;
 	iface->scope = isymbol_scope;
-	iface->inheritance = isymbol_inheritance;
-	iface->var_type = isymbol_var_type;
+	iface->inheritance = isymbol_inheritance;	
 	iface->access = isymbol_access;
 	iface->impl = isymbol_impl;
 	iface->file = isymbol_file;
 	iface->line = isymbol_line;
 	iface->is_local = isymbol_is_local;
-	iface->pointer_order = isymbol_pointer_order;
 	iface->icon = isymbol_icon;
 }
 
Index: plugins/build-basic-autotools/build-basic-autotools.c
===================================================================
--- plugins/build-basic-autotools/build-basic-autotools.c	(Revision 3173)
+++ plugins/build-basic-autotools/build-basic-autotools.c	(Arbeitskopie)
@@ -1957,6 +1957,8 @@
 	static gboolean initialized = FALSE;
 	BasicAutotoolsPlugin *ba_plugin = ANJUTA_PLUGIN_BASIC_AUTOTOOLS (plugin);
 	
+	DEBUG_PRINT ("BuildBasicAutotools: Activating BuildBasicAutotools plugin ...");
+	
 	ui = anjuta_shell_get_ui (plugin->shell, NULL);
 	
 	g_signal_connect (plugin->shell, "save-session",
Index: plugins/symbol-db/plugin.c
===================================================================
--- plugins/symbol-db/plugin.c	(Revision 3173)
+++ plugins/symbol-db/plugin.c	(Arbeitskopie)
@@ -36,6 +36,8 @@
 #include <libanjuta/interfaces/ianjuta-editor.h>
 #include <libanjuta/interfaces/ianjuta-markable.h>
 #include <libanjuta/interfaces/ianjuta-language.h>
+#include <libanjuta/interfaces/ianjuta-iterable.h>
+
 #include <libegg/menu/egg-combo-action.h>
 
 #include "plugin.h"
@@ -131,7 +133,7 @@
 	
 	seconds_elapsed = g_timer_elapsed (timer, NULL);
 	
-	DEBUG_PRINT ("seconds_elapsed  %f", seconds_elapsed );
+	/* DEBUG_PRINT ("seconds_elapsed  %f", seconds_elapsed ); */
 	if (seconds_elapsed < TIMEOUT_SECONDS_AFTER_LAST_TIP)
 		return TRUE;
 		
@@ -187,8 +189,7 @@
 		g_free (uri);
 	}
 	
-	if (current_buffer)
-		g_free (current_buffer);  
+	g_free (current_buffer);  
 
 	need_symbols_update = FALSE;
 
@@ -732,7 +733,7 @@
 						g_free (local_filename);
 						continue;
 					}
-					
+				
 					lang = ianjuta_language_get_name (lang_manager, lang_id, NULL);
 					DEBUG_PRINT ("Language of %s is %s", local_filename, file_mime);
 					/* test its existence */
@@ -810,7 +811,7 @@
 	/* don't forget to close the project */
 	symbol_db_engine_close_project (sdb_plugin->sdbe, 
 									sdb_plugin->project_root_dir);
-		
+
 	g_free (sdb_plugin->project_root_uri);
 	g_free (sdb_plugin->project_root_dir);
 	sdb_plugin->project_root_uri = NULL;
@@ -1061,25 +1062,46 @@
 						gboolean global_search,
 						GError **err)
 {
-#if 0
-	const GPtrArray *tags_array;
-	AnjutaSymbolIter *iter = NULL;
-	const gchar *name;
+	SymbolDBEngineIterator *iterator = NULL;
+	SymbolDBPlugin *sdb_plugin;
+	SymbolDBEngine *dbe;
+	const gchar* name;
+
+	DEBUG_PRINT ("called isymbol_manager_search()! %s", match_name);
 	
+	sdb_plugin = ANJUTA_PLUGIN_SYMBOL_DB (sm);
+	dbe = SYMBOL_DB_ENGINE (sdb_plugin->sdbe);
+
+	
 	if (match_name && strlen (match_name) > 0)
 		name = match_name;
 	else
 		name = NULL;
+
 	
-	tags_array = tm_workspace_find (name, match_types, NULL,
-									partial_name_match, global_search);
-	if (tags_array)
-	{
-		iter = anjuta_symbol_iter_new (tags_array);
-		return IANJUTA_ITERABLE (iter);
-	}
-#endif	
-	return NULL;
+	iterator = 
+		symbol_db_engine_find_symbol_by_name_pattern (dbe, 
+									name, SYMINFO_SIMPLE |
+								  	SYMINFO_FILE_PATH |
+									SYMINFO_IMPLEMENTATION |
+									SYMINFO_ACCESS |
+									SYMINFO_KIND |
+									SYMINFO_TYPE |
+									SYMINFO_TYPE_NAME |
+									SYMINFO_LANGUAGE |
+									SYMINFO_FILE_IGNORE |
+									SYMINFO_FILE_INCLUDE |
+									SYMINFO_PROJECT_NAME |
+									SYMINFO_WORKSPACE_NAME );
+	do {
+		SymbolDBEngineIteratorNode *node;
+		
+		node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+//		DEBUG_PRINT ("*** got this symbol %s", symbol_db_engine_iterator_node_get_symbol_name (node));
+		
+	}while (symbol_db_engine_iterator_move_next (iterator) == TRUE);
+	
+	return IANJUTA_ITERABLE (iterator);
 }
 
 static IAnjutaIterable*
@@ -1234,5 +1256,4 @@
 ANJUTA_PLUGIN_ADD_INTERFACE (isymbol_manager, IANJUTA_TYPE_SYMBOL_MANAGER);
 ANJUTA_PLUGIN_END;
 
-/*ANJUTA_PLUGIN_BOILERPLATE (SymbolDBPlugin, symbol_db);*/
 ANJUTA_SIMPLE_PLUGIN (SymbolDBPlugin, symbol_db);
Index: plugins/symbol-db/test/main.c
===================================================================
--- plugins/symbol-db/test/main.c	(Revision 3173)
+++ plugins/symbol-db/test/main.c	(Arbeitskopie)
@@ -27,8 +27,12 @@
 #include <glib.h>
 #include <unistd.h>
 
+#if 0
+
+
 #include "../symbol-db-engine.h"
 #include "../symbol-db-engine-iterator.h"
+#include "../symbol-db-engine-iterator-node.h"
 #include "../readtags.h"
 
 static GdaConnection *db_connection = NULL;
@@ -67,20 +71,7 @@
 	GPtrArray *files_array;
 	
 	files_array = g_ptr_array_new();	
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexMMIXAL.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexCsound.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/XPM.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/StyleContext.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexMSSQL.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexSQL.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexAsn1.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexInno.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexSpice.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/ScintillaBase.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/editor/scintilla/LexPOV.cxx"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/symbol-db/readtags.c"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/symbol-browser/test-class.h"));
-	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/anjuta/plugins/symbol-browser/test-class.cpp"));	
+	g_ptr_array_add (files_array, g_strdup("/home/pescio/svnroot/libgda/providers/sqlite/sqlite-src/sqlite3.c"));	
 	symbol_db_engine_add_new_files (dbe, "foo_project", files_array, "C", TRUE);
 }
 
@@ -337,7 +328,7 @@
 	gda_init ("Test db", "0.1", argc, argv);
 	dbe = symbol_db_engine_new ();
 	
-	gchar *prj_dir = "/home/pescio/svnroot/anjuta/";
+	gchar *prj_dir = "/home/pescio/svnroot/anjuta/plugins/symbol-db/test";
 
 	g_message ("opening database");
 	if (symbol_db_engine_open_db (dbe, prj_dir) == FALSE)
@@ -357,9 +348,37 @@
 	
 
 	
-//	g_message ("adding files...");
-//	add_new_files  (dbe);
+	g_message ("adding files...");
+	add_new_files  (dbe);
 
+	/* 
+	** Message: elapsed: 319.713238 for (4008) [0.079769 per symbol]
+	
+	adding index on file (file_path)
+	** Message: elapsed: 206.735366 for (4008) [0.051581 per symbol] (db already present)
+	** Message: elapsed: 276.093110 for (4008) [0.068886 per symbol]
+	
+	adding index on sym_type (type)
+	** Message: elapsed: 228.382055 for (4008) [0.056982 per symbol]
+	
+	adding index on sym_type (type, type_name)
+	** Message: elapsed: 286.737892 for (4008) [0.071541 per symbol]
+	
+	adding index scope_uniq_idx_2
+	** Message: elapsed: 273.554569 for (4008) [0.068252 per symbol]
+
+	check these:
+	v PREP_QUERY_GET_FILE_ID_BY_UNIQUE_NAME
+	v PREP_QUERY_GET_SYMBOL_ID_BY_UNIQUE_INDEX_KEY
+	v PREP_QUERY_UPDATE_SYMBOL_ALL
+	
+	v PREP_QUERY_GET_SYM_TYPE_ID
+	v PREP_QUERY_SYM_TYPE_NEW
+	v PREP_QUERY_GET_SYM_KIND_BY_UNIQUE_NAME
+	v PREP_QUERY_SYM_KIND_NEW
+	
+	
+	*/
 //	g_message ("updating project");
 //	update_project	(dbe);
 	
@@ -380,8 +399,8 @@
 //	g_message ("getting symbol info by id");
 //	get_info_by_id (dbe);
 	
-	g_message ("updating buffers");
-	update_buffers (dbe);
+//	g_message ("updating buffers");
+//	update_buffers (dbe);
 	
 	GMainLoop *main_loop;	
 	main_loop = g_main_loop_new( NULL, FALSE );
@@ -390,3 +409,10 @@
 
 	return 0;
 }
+
+#endif
+
+int main(int argc, char** argv)
+{
+return 0;
+}
Index: plugins/symbol-db/test/Makefile.am
===================================================================
--- plugins/symbol-db/test/Makefile.am	(Revision 3173)
+++ plugins/symbol-db/test/Makefile.am	(Arbeitskopie)
@@ -23,7 +23,10 @@
 	../symbol-db-engine.c       \
 	../symbol-db-engine.h       \
 	../symbol-db-engine-iterator.c       \
-	../symbol-db-engine-iterator.h 
+	../symbol-db-engine-iterator.h \
+	../symbol-db-engine-iterator-node.c \
+	../symbol-db-engine-iterator-node.h
+ 
 
 test_symbol_db_LDFLAGS = \
 	$(LIBANJUTA_LIBS) \
Index: plugins/symbol-db/symbol-db-engine.h
===================================================================
--- plugins/symbol-db/symbol-db-engine.h	(Revision 3173)
+++ plugins/symbol-db/symbol-db-engine.h	(Arbeitskopie)
@@ -32,7 +32,7 @@
 
 G_BEGIN_DECLS
 
-#define SYMBOL_TYPE_DB_ENGINE             (symbol_db_engine_get_type ())
+#define SYMBOL_TYPE_DB_ENGINE             (sdb_engine_get_type ())
 #define SYMBOL_DB_ENGINE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYMBOL_TYPE_DB_ENGINE, SymbolDBEngine))
 #define SYMBOL_DB_ENGINE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), SYMBOL_TYPE_DB_ENGINE, SymbolDBEngineClass))
 #define SYMBOL_IS_DB_ENGINE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYMBOL_TYPE_DB_ENGINE))
@@ -77,7 +77,7 @@
 	
 } SymExtraInfo;
 
-GType symbol_db_engine_get_type (void) G_GNUC_CONST;
+GType sdb_engine_get_type (void) G_GNUC_CONST;
 
 
 SymbolDBEngine* symbol_db_engine_new (void);
Index: plugins/symbol-db/symbol-db-view.c
===================================================================
--- plugins/symbol-db/symbol-db-view.c	(Revision 3173)
+++ plugins/symbol-db/symbol-db-view.c	(Arbeitskopie)
@@ -30,6 +30,7 @@
 #include "symbol-db-view.h"
 #include "symbol-db-engine.h"
 #include "symbol-db-engine-iterator.h"
+#include "symbol-db-engine-iterator-node.h"
 
 
 enum {
@@ -58,7 +59,6 @@
 on_symbol_updated (SymbolDBEngine *dbe, 
 					gint symbol_id, gpointer data)
 {
-	SymbolDBEngineIterator *iterator;
 	GtkTreeStore *store;
 	gint i;	
 	gint parent_symbol_id;
@@ -91,31 +91,34 @@
 			gtk_tree_store_append (store, &child_iter, parent_iter);
 			gchar *file_path;
 			const gchar *sym_name;
+			SymbolDBEngineIteratorNode *iter_node;
 	
+			iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (child_iterator);
+			
 			sym_name = 
-				symbol_db_engine_iterator_get_symbol_name (child_iterator);
+				symbol_db_engine_iterator_node_get_symbol_name (iter_node);
 			
 			/* DEBUG_PRINT ("child iterator for %s",  sym_name); */
 			
 			/* get the full file path instead of a database-oriented one. */
 			file_path = 
 				symbol_db_engine_get_full_local_path (dbe, 
-					symbol_db_engine_iterator_get_symbol_extra_string (child_iterator,
+					symbol_db_engine_iterator_node_get_symbol_extra_string (iter_node,
 											SYMINFO_FILE_PATH));
 			
 			gtk_tree_store_set (store, &child_iter,
 					COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
-						symbol_db_engine_iterator_get_symbol_extra_string (
-								child_iterator, SYMINFO_KIND),
-						symbol_db_engine_iterator_get_symbol_extra_string (
-								child_iterator, SYMINFO_ACCESS)
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+								iter_node, SYMINFO_KIND),
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+								iter_node, SYMINFO_ACCESS)
 					),
 					COLUMN_NAME, sym_name,
 					COLUMN_LINE, 
-						symbol_db_engine_iterator_get_symbol_file_pos (child_iterator),
+						symbol_db_engine_iterator_node_get_symbol_file_pos (iter_node),
 					COLUMN_FILE, file_path,
 					COLUMN_SYMBOL_ID, 
-							symbol_db_engine_iterator_get_symbol_id (child_iterator),
+							symbol_db_engine_iterator_node_get_symbol_id (iter_node),
 					-1);
 			
 			g_free (file_path);
@@ -126,7 +129,7 @@
 
 
 static gboolean
-do_recurse_and_add_new_sym (gint parent_symbol_id, SymbolDBEngineIterator *iterator, 
+do_recurse_and_add_new_sym (gint parent_symbol_id, SymbolDBEngineIteratorNode *iter_node, 
 					GtkTreeStore *store, GtkTreeIter *iter)
 {
 	gint sym_id;
@@ -141,19 +144,19 @@
 		gtk_tree_store_append (store, &child_iter, iter);
 		gtk_tree_store_set (store, &child_iter,
 			COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
-					symbol_db_engine_iterator_get_symbol_extra_string (
-						iterator, SYMINFO_KIND),
-					symbol_db_engine_iterator_get_symbol_extra_string (
-						iterator, SYMINFO_ACCESS)),
-			COLUMN_NAME, symbol_db_engine_iterator_get_symbol_name (iterator),
-			COLUMN_LINE, symbol_db_engine_iterator_get_symbol_file_pos (iterator),
-			COLUMN_SYMBOL_ID, symbol_db_engine_iterator_get_symbol_id (iterator),								
+					symbol_db_engine_iterator_node_get_symbol_extra_string (
+						iter_node, SYMINFO_KIND),
+					symbol_db_engine_iterator_node_get_symbol_extra_string (
+						iter_node, SYMINFO_ACCESS)),
+			COLUMN_NAME, symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+			COLUMN_LINE, symbol_db_engine_iterator_node_get_symbol_file_pos (iter_node),
+			COLUMN_SYMBOL_ID, symbol_db_engine_iterator_node_get_symbol_id (iter_node),
 			-1);
 			
 		DEBUG_PRINT ("[do_recurse_and_add_new_sym] inserted into -global- tab: %s [%s]",
-					 symbol_db_engine_iterator_get_symbol_name (iterator),
-					 symbol_db_engine_iterator_get_symbol_extra_string (
-						iterator, SYMINFO_KIND));	
+					 symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+					 symbol_db_engine_iterator_node_get_symbol_extra_string (
+						iter_node, SYMINFO_KIND));	
 		return TRUE;
 	} 
 	
@@ -163,7 +166,7 @@
 		gtk_tree_model_iter_children (GTK_TREE_MODEL (store), &child, iter);
 		
 		DEBUG_PRINT ("[do_recurse_and_add_new_sym] recurse for child");
-		if (do_recurse_and_add_new_sym (parent_symbol_id, iterator, store, &child) 
+		if (do_recurse_and_add_new_sym (parent_symbol_id, iter_node, store, &child) 
 			== TRUE)
 			return TRUE;
 	}
@@ -171,7 +174,7 @@
 	while ((valid = 
 			gtk_tree_model_iter_next (GTK_TREE_MODEL (store), iter)) == TRUE)
 	{
-		if (do_recurse_and_add_new_sym (parent_symbol_id, iterator, store, iter)
+		if (do_recurse_and_add_new_sym (parent_symbol_id, iter_node, store, iter)
 			== TRUE)
 			return TRUE;
 	}
@@ -229,7 +232,10 @@
 	if (iterator != NULL) 
 	{
 		GtkTreeIter iter, child;
+		SymbolDBEngineIteratorNode *iter_node;
 		
+		iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+		
 		/* add to root if parent_symbol_id is <= 0 */
 		if (parent_symbol_id <= 0)
 		{
@@ -237,31 +243,29 @@
 			
 			gtk_tree_store_set (store, &iter,
 				COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
-						symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_KIND),
-						symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_ACCESS)),
-				COLUMN_NAME, symbol_db_engine_iterator_get_symbol_name (iterator),
-				COLUMN_LINE, symbol_db_engine_iterator_get_symbol_file_pos (iterator),
-				COLUMN_SYMBOL_ID, symbol_db_engine_iterator_get_symbol_id (iterator),								
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_KIND),
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_ACCESS)),
+				COLUMN_NAME, symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+				COLUMN_LINE, symbol_db_engine_iterator_node_get_symbol_file_pos (iter_node),
+				COLUMN_SYMBOL_ID, symbol_db_engine_iterator_node_get_symbol_id (iter_node),								
 				-1);	
 			
 			DEBUG_PRINT ("[on_symbol_inserted] inserted into -global- tab: %s [%s]",
-						 symbol_db_engine_iterator_get_symbol_name (iterator),
+						 symbol_db_engine_iterator_node_get_symbol_name (iter_node),
 						 symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_KIND));	
+							iter_node, SYMINFO_KIND));	
 			
 			do_add_hidden_children (dbe, store, &iter, 
-							symbol_db_engine_iterator_get_symbol_id (iterator));
+							symbol_db_engine_iterator_node_get_symbol_id (iter_node));
 		}
 		else 
 		{
 			gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);			
-			do_recurse_and_add_new_sym (parent_symbol_id, iterator, store, &iter);
+			do_recurse_and_add_new_sym (parent_symbol_id, iter_node, store, &iter);
 		}
-		
-		
-		symbol_db_engine_iterator_move_next (iterator);
+				
 		g_object_unref (iterator);
 	}	
 }
@@ -593,7 +597,7 @@
 	GtkTreeStore *store;
 	SymbolDBViewPriv *priv;
 	gint i, j;
-	
+#if 0	
 	g_return_if_fail (dbv != NULL);
 	
 	priv = dbv->priv;
@@ -626,7 +630,7 @@
 			gtk_tree_store_append (store, &iter, NULL);			
 			
 			sym_name = symbol_db_engine_iterator_get_symbol_name (iterator);			
-			curr_symbol_id = symbol_db_engine_iterator_get_symbol_id (iterator);
+			curr_symbol_id = symbol_db_engine_iterator_node_get_symbol_id (iterator);
 /*			DEBUG_PRINT ("father for %s [%d]", sym_name, count++);*/
 			/* get the full file path instead of a database-oriented one. */
 			file_path = 
@@ -682,4 +686,5 @@
 	/* Re-attach model to view */
 	gtk_tree_view_set_model (GTK_TREE_VIEW (dbv), GTK_TREE_MODEL (store)); 
 	g_object_unref(store);	
+#endif	
 }
Index: plugins/symbol-db/symbol-db-view-search.c
===================================================================
--- plugins/symbol-db/symbol-db-view-search.c	(Revision 3173)
+++ plugins/symbol-db/symbol-db-view-search.c	(Arbeitskopie)
@@ -46,8 +46,8 @@
 #include "symbol-db-view-search.h"
 #include "symbol-db-engine.h"
 #include "symbol-db-engine-iterator.h"
+#include "symbol-db-engine-iterator-node.h"
 
-
 /* private class */
 struct _SymbolDBViewSearchPriv
 {
@@ -119,6 +119,7 @@
 		{
 			GList *completion_list;
 			gint max_hits;
+			SymbolDBEngineIteratorNode *iter_node;
 			
 			/* max number of hits to take care of */
 			hits = symbol_db_engine_iterator_get_n_items (iterator);
@@ -129,33 +130,38 @@
 			for (i = 0; i < max_hits; ++i)
 			{
 				GtkTreeIter iter;
-				const gchar *sym_name = symbol_db_engine_iterator_get_symbol_name (iterator);
 				
+				iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+				
+				const gchar *sym_name = 
+					symbol_db_engine_iterator_node_get_symbol_name (iter_node);
+								
 				if (sym_name)
 				{
 					/* get the full file path instead of a database-oriented one. */
 					gchar *file_path = 
 						symbol_db_engine_get_full_local_path (priv->sdbe, 
-							symbol_db_engine_iterator_get_symbol_extra_string (iterator,
-													SYMINFO_FILE_PATH));
-															  
+							symbol_db_engine_iterator_node_get_symbol_extra_string (
+									iter_node, SYMINFO_FILE_PATH));
+					
 					/* add a new iter */
 					gtk_tree_store_append (GTK_TREE_STORE (store), &iter, NULL);
 					
 					gtk_tree_store_set (GTK_TREE_STORE (store), &iter,
-								COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
-									symbol_db_engine_iterator_get_symbol_extra_string (
-										iterator, SYMINFO_KIND),
-										symbol_db_engine_iterator_get_symbol_extra_string (
-										iterator, SYMINFO_ACCESS)
-									),
-								COLUMN_NAME, sym_name,
-								COLUMN_LINE, 
-									symbol_db_engine_iterator_get_symbol_file_pos (iterator),
-								COLUMN_FILE, file_path,
-								COLUMN_SYMBOL_ID,
-									symbol_db_engine_iterator_get_symbol_id (iterator),
-								-1);
+							COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
+								symbol_db_engine_iterator_node_get_symbol_extra_string (
+									iter_node, SYMINFO_KIND),
+									symbol_db_engine_iterator_node_get_symbol_extra_string (
+									iter_node, SYMINFO_ACCESS)
+								),
+							COLUMN_NAME, sym_name,
+							COLUMN_LINE, 
+								symbol_db_engine_iterator_node_get_symbol_file_pos (
+													iter_node),
+							COLUMN_FILE, file_path,
+							COLUMN_SYMBOL_ID,
+								symbol_db_engine_iterator_node_get_symbol_id (iter_node),
+							-1);
 					
 					completion_list = g_list_prepend (completion_list,
 							g_strdup (sym_name));
Index: plugins/symbol-db/symbol-db-view-locals.c
===================================================================
--- plugins/symbol-db/symbol-db-view-locals.c	(Revision 3173)
+++ plugins/symbol-db/symbol-db-view-locals.c	(Arbeitskopie)
@@ -30,6 +30,7 @@
 #include "symbol-db-view-locals.h"
 #include "symbol-db-engine.h"
 #include "symbol-db-engine-iterator.h"
+#include "symbol-db-engine-iterator-node.h"
 
 enum {
 	COLUMN_PIXBUF,
@@ -166,7 +167,6 @@
 static void 
 on_symbol_removed (SymbolDBEngine *dbe, gint symbol_id, gpointer data)
 {
-	SymbolDBEngineIterator *iterator;
 	GtkTreeStore *store;
 	gint i;	
 	SymbolDBViewLocals *dbvl;
@@ -218,19 +218,7 @@
 static void 
 on_symbol_updated (SymbolDBEngine *dbe, gint symbol_id, gpointer data)
 {
-	SymbolDBEngineIterator *iterator;
-	GtkTreeStore *store;
-	gint i;	
-	SymbolDBViewLocals *dbvl;
-	SymbolDBViewLocalsPriv *priv;
-	
-	dbvl = SYMBOL_DB_VIEW_LOCALS (data);
-
-	g_return_if_fail (dbvl != NULL);	
-	priv = dbvl->priv;
-	
-	
-	DEBUG_PRINT ("on_symbol_updated !!!!!");	
+	DEBUG_PRINT ("TODO: on_symbol_updated ()");	
 }
 
 static void 
@@ -262,8 +250,11 @@
 	
 	if (iterator != NULL) 
 	{
+		SymbolDBEngineIteratorNode *iter_node;
+		iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+		
 		gchar *tmp = symbol_db_engine_get_full_local_path (dbe, 
-						symbol_db_engine_iterator_get_symbol_extra_string (iterator,
+						symbol_db_engine_iterator_node_get_symbol_extra_string (iter_node,
 															SYMINFO_FILE_PATH));
 		/* it's not our case, just bail out. */
 		if (strcmp (tmp, priv->current_file) != 0) 
@@ -279,28 +270,31 @@
 		gtk_tree_view_set_model(GTK_TREE_VIEW(dbvl), NULL); 
 
   		/* ... insert a couple of thousand rows ...*/		
-		for (i=0; i < symbol_db_engine_iterator_get_n_items (iterator); i++) 
-		{
+		do {
 			GtkTreeIter iter;
+			
+			/* get our new reference */
+			iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+			
 			gtk_tree_store_append (store, &iter, NULL);
 			gtk_tree_store_set (store, &iter,
 				COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
-						symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_KIND),
-						symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_ACCESS)),
-				COLUMN_NAME, symbol_db_engine_iterator_get_symbol_name (iterator),
-				COLUMN_LINE, symbol_db_engine_iterator_get_symbol_file_pos (iterator),
-				COLUMN_SYMBOL_ID, symbol_db_engine_iterator_get_symbol_id (iterator),								
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_KIND),
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_ACCESS)),
+				COLUMN_NAME, symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+				COLUMN_LINE, symbol_db_engine_iterator_node_get_symbol_file_pos (iter_node),
+				COLUMN_SYMBOL_ID, symbol_db_engine_iterator_node_get_symbol_id (iter_node),								
 				-1);	
 			
 			DEBUG_PRINT ("inserted into locals tab: %s [%s]",
-						 symbol_db_engine_iterator_get_symbol_name (iterator),
-						 symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_KIND));	
+						 symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+						 symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_KIND));	
 			
-			symbol_db_engine_iterator_move_next (iterator);
-		}
+			
+		} while (symbol_db_engine_iterator_move_next (iterator) == TRUE);
 		g_free (tmp);		
 		g_object_unref (iterator);
 		
@@ -379,35 +373,39 @@
 
 	iterator = symbol_db_engine_get_file_symbols (dbe, filepath, SYMINFO_SIMPLE |
 												  	SYMINFO_ACCESS |
-													SYMINFO_KIND);	
+													SYMINFO_KIND);		
 	if (iterator != NULL) 
 	{
-		for (i=0; i < symbol_db_engine_iterator_get_n_items (iterator); i++) 
+		do 
 		{
 			GtkTreeIter iter, child;
+			SymbolDBEngineIteratorNode *iter_node;
+									
+			iter_node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iterator);
+			
 			gtk_tree_store_append (store, &iter, NULL);
 			
 			DEBUG_PRINT ("gonna add [id: %d] %s %s [%s]",
-				symbol_db_engine_iterator_get_symbol_id (iterator),
-				symbol_db_engine_iterator_get_symbol_name (iterator),
-				symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_KIND),
-				symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_ACCESS));
+				symbol_db_engine_iterator_node_get_symbol_id (iter_node),
+				symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+				symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_KIND),
+				symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_ACCESS));
 			
 			gtk_tree_store_set (store, &iter,
 				COLUMN_PIXBUF, symbol_db_view_get_pixbuf (
-						symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_KIND),
-						symbol_db_engine_iterator_get_symbol_extra_string (
-							iterator, SYMINFO_ACCESS)),
-				COLUMN_NAME, symbol_db_engine_iterator_get_symbol_name (iterator),
-				COLUMN_LINE, symbol_db_engine_iterator_get_symbol_file_pos (iterator),
-				COLUMN_SYMBOL_ID, symbol_db_engine_iterator_get_symbol_id (iterator),
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_KIND),
+						symbol_db_engine_iterator_node_get_symbol_extra_string (
+							iter_node, SYMINFO_ACCESS)),
+				COLUMN_NAME, symbol_db_engine_iterator_node_get_symbol_name (iter_node),
+				COLUMN_LINE, symbol_db_engine_iterator_node_get_symbol_file_pos (iter_node),
+				COLUMN_SYMBOL_ID, symbol_db_engine_iterator_node_get_symbol_id (iter_node),
 				-1);
 			
-			symbol_db_engine_iterator_move_next (iterator);
-		}
+			
+		} while (symbol_db_engine_iterator_move_next (iterator) == TRUE);
 		g_object_unref (iterator);
 	}
 }
Index: plugins/symbol-db/symbol-db-engine-iterator.c
===================================================================
--- plugins/symbol-db/symbol-db-engine-iterator.c	(Revision 3173)
+++ plugins/symbol-db/symbol-db-engine-iterator.c	(Arbeitskopie)
@@ -22,7 +22,10 @@
  * 	Boston, MA  02110-1301, USA.
  */
 
+#include <libanjuta/interfaces/ianjuta-iterable.h>
+#include <libanjuta/anjuta-utils.h>
 #include <libanjuta/anjuta-debug.h>
+#include "symbol-db-engine-iterator-node.h"
 #include "symbol-db-engine-iterator.h"
 #include "symbol-db-engine.h"
 
@@ -31,14 +34,13 @@
 	GdaDataModel *data_model;
 	GdaDataModelIter *data_iter;
 	
-	gint curr_row;
 	gint total_rows;
 };
 
-static GObjectClass* parent_class = NULL;
+static SymbolDBEngineIteratorNodeClass* parent_class = NULL;
 
 static void
-sdb_engine_iterator_init (SymbolDBEngineIterator *object)
+sdb_engine_iterator_instance_init (SymbolDBEngineIterator *object)
 {
 	SymbolDBEngineIterator *sdbi;
 	
@@ -48,22 +50,18 @@
 	/* initialize some priv data */
 	sdbi->priv->data_model = NULL;
 	sdbi->priv->data_iter = NULL;
-	sdbi->priv->curr_row = 0;
-	sdbi->priv->total_rows = 0;	
+	sdbi->priv->total_rows = -1;	
 }
 
 static void
 sdb_engine_iterator_finalize (GObject *object)
 {
-	/* TODO: Add deinitalization code here */
 	SymbolDBEngineIterator *dbi;
 	SymbolDBEngineIteratorPriv *priv;
 	
 	dbi = SYMBOL_DB_ENGINE_ITERATOR (object);	
 	priv = dbi->priv;
 
-	DEBUG_PRINT ("finalizing sdb_iterator");
-	
 	if (priv->data_model)
 		g_object_unref (priv->data_model);
 		
@@ -74,39 +72,11 @@
 sdb_engine_iterator_class_init (SymbolDBEngineIteratorClass *klass)
 {
 	GObjectClass* object_class = G_OBJECT_CLASS (klass);
-	parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
-
+	parent_class = g_type_class_ref (SYMBOL_TYPE_DB_ENGINE_ITERATOR_NODE);
+	
 	object_class->finalize = sdb_engine_iterator_finalize;
 }
 
-GType
-symbol_db_engine_iterator_get_type (void)
-{
-	static GType our_type = 0;
-
-	if(our_type == 0)
-	{
-		static const GTypeInfo our_info =
-		{
-			sizeof (SymbolDBEngineIteratorClass), /* class_size */
-			(GBaseInitFunc) NULL, /* base_init */
-			(GBaseFinalizeFunc) NULL, /* base_finalize */
-			(GClassInitFunc) sdb_engine_iterator_class_init, /* class_init */
-			(GClassFinalizeFunc) NULL, /* class_finalize */
-			NULL /* class_data */,
-			sizeof (SymbolDBEngineIterator), /* instance_size */
-			0, /* n_preallocs */
-			(GInstanceInitFunc) sdb_engine_iterator_init, /* instance_init */
-			NULL /* value_table */
-		};
-
-		our_type = g_type_register_static (G_TYPE_OBJECT, "SymbolDBEngineIterator",
-		                                   &our_info, 0);
-	}
-
-	return our_type;
-}
-
 SymbolDBEngineIterator *
 symbol_db_engine_iterator_new (GdaDataModel *model)
 {
@@ -121,12 +91,40 @@
 	
 	priv->data_model = model;
 	priv->data_iter = gda_data_model_iter_new (model);
-	priv->total_rows = gda_data_model_get_n_rows (model);
 	
+	/* because gda_data_model_get_n_rows () could be cpu-intensive, we'll 
+	 * proxy this value, e.g. it's calculated if it is really needed */
+	priv->total_rows = -1; 
+
+	/* to avoid calling everytime this function when we want to use the IteratorNode,
+	 * just do it now.
+	 */
+	symbol_db_engine_iterator_first (dbi);
+	
+	/* set the data_iter no the base class */
+	symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (dbi),
+											 priv->data_iter);
+	
+	ianjuta_iterable_first (IANJUTA_ITERABLE (dbi), NULL);
 	return dbi;
 }
 
+/**
+ * Set the iterator at the first node.
+ */
 gboolean
+symbol_db_engine_iterator_first (SymbolDBEngineIterator *dbi)
+{
+	SymbolDBEngineIteratorPriv *priv;
+	
+	g_return_val_if_fail (dbi != NULL, FALSE);
+	priv = dbi->priv;
+	
+	return gda_data_model_iter_set_at_row (priv->data_iter, 0);
+}
+
+
+gboolean
 symbol_db_engine_iterator_move_next (SymbolDBEngineIterator *dbi)
 {
 	SymbolDBEngineIteratorPriv *priv;
@@ -134,11 +132,6 @@
 	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
 
-	if (priv->curr_row + 1 < priv->total_rows)
-		priv->curr_row++;
-	else 
-		return FALSE;
-
 	return gda_data_model_iter_move_next (priv->data_iter);
 }
 
@@ -149,16 +142,13 @@
 	
 	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
-
-	if (priv->curr_row > 0)
-		priv->curr_row--;
-	else
-		return FALSE;
 	
 	return gda_data_model_iter_move_prev (priv->data_iter);
 }
 
-/* -1 on error */
+/**
+ * @return -1 on error
+ */
 gint 
 symbol_db_engine_iterator_get_n_items (SymbolDBEngineIterator *dbi)
 {
@@ -167,196 +157,252 @@
 	g_return_val_if_fail (dbi != NULL, -1);
 	priv = dbi->priv;
 	
+	if (priv->total_rows < 0) 
+	{
+		/* try to get the number of rows */
+		priv->total_rows = gda_data_model_get_n_rows (priv->data_model);
+	}		
+	
 	return priv->total_rows;
 }
 
-/* 
- * Symbol name must be always on column 0
+/**
+ * Set the iterator at the last node.
  */
-gint
-symbol_db_engine_iterator_get_symbol_id (SymbolDBEngineIterator *dbi)
+gboolean
+symbol_db_engine_iterator_last (SymbolDBEngineIterator *dbi)
 {
 	SymbolDBEngineIteratorPriv *priv;
-	const GValue* value;
 	
-	g_return_val_if_fail (dbi != NULL, -1);
+	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
 	
-	value = gda_data_model_get_value_at (priv->data_model, 0, priv->curr_row);
-	
-	return value != NULL && G_VALUE_HOLDS_INT (value)
-		? g_value_get_int (value) : -1;
+	return gda_data_model_iter_set_at_row (priv->data_iter, 
+					symbol_db_engine_iterator_get_n_items (dbi));
 }
 
-/* 
- * Symbol name must be always on column 1
- */
-const gchar* 
-symbol_db_engine_iterator_get_symbol_name (SymbolDBEngineIterator *dbi)
+gboolean
+symbol_db_engine_iterator_set_position (SymbolDBEngineIterator *dbi, gint pos)
 {
 	SymbolDBEngineIteratorPriv *priv;
-	const GValue* value;
 	
-	g_return_val_if_fail (dbi != NULL, NULL);
+	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
 	
-	value = gda_data_model_get_value_at (priv->data_model, 1, priv->curr_row);
-	
-	return value != NULL && G_VALUE_HOLDS_STRING (value)
-		? g_value_get_string (value) : NULL;
+	return gda_data_model_iter_set_at_row (priv->data_iter, pos);
 }
 
 gint
-symbol_db_engine_iterator_get_symbol_file_pos (SymbolDBEngineIterator *dbi)
+symbol_db_engine_iterator_get_position (SymbolDBEngineIterator *dbi)
 {
 	SymbolDBEngineIteratorPriv *priv;
-	const GValue* value;
 	
-	g_return_val_if_fail (dbi != NULL, -1);
+	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
 	
-	value = gda_data_model_get_value_at (priv->data_model, 2, priv->curr_row);
-	
-	return value != NULL && G_VALUE_HOLDS_INT (value)
-		? g_value_get_int (value) : -1;
+	return gda_data_model_iter_get_row (priv->data_iter);
 }
 
-gboolean
-symbol_db_engine_iterator_get_symbol_is_file_scope (SymbolDBEngineIterator *dbi)
+
+void
+symbol_db_engine_iterator_foreach (SymbolDBEngineIterator *dbi, GFunc callback, 
+								   gpointer user_data)
 {
 	SymbolDBEngineIteratorPriv *priv;
-	const GValue* value;
 	
-	g_return_val_if_fail (dbi != NULL, -1);
+	g_return_if_fail (dbi != NULL);
 	priv = dbi->priv;
+
+	gint saved_pos = symbol_db_engine_iterator_get_position (dbi);
 	
-	value = gda_data_model_get_value_at (priv->data_model, 3, priv->curr_row);
+	symbol_db_engine_iterator_last (dbi);
 	
-	if (value != NULL)
-		return g_value_get_int (value) == 1 ? TRUE : FALSE;
-	
-	return FALSE;
+	while (!symbol_db_engine_iterator_move_next (dbi))
+		callback (dbi, user_data);
+	symbol_db_engine_iterator_set_position (dbi, saved_pos);
 }
 
-const gchar* 
-symbol_db_engine_iterator_get_symbol_signature (SymbolDBEngineIterator *dbi)
+/* IAnjutaIterable implementation */
+
+static gboolean
+isymbol_iter_first (IAnjutaIterable *iterable, GError **err)
 {
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
 	SymbolDBEngineIteratorPriv *priv;
-	const GValue* value;
 	
-	g_return_val_if_fail (dbi != NULL, NULL);
+	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
-	
-	value = gda_data_model_get_value_at (priv->data_model, 4, priv->curr_row);
-	
-	return value != NULL && G_VALUE_HOLDS_STRING (value)
-		? g_value_get_string (value) : NULL;
+
+
+	if (symbol_db_engine_iterator_first (dbi) == FALSE) 
+	{
+		symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 NULL);
+		
+		return FALSE;
+	}
+	symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 priv->data_iter);
+	return TRUE;
 }
 
-const gchar*
-symbol_db_engine_iterator_get_symbol_extra_string (SymbolDBEngineIterator *dbi,
-												   gint sym_info)
+static gboolean
+isymbol_iter_next (IAnjutaIterable *iterable, GError **err)
 {
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
 	SymbolDBEngineIteratorPriv *priv;
-	const GValue* value;
 	
-	g_return_val_if_fail (dbi != NULL, NULL);
+	g_return_val_if_fail (dbi != NULL, FALSE);
 	priv = dbi->priv;
 
-	if (sym_info & SYMINFO_FILE_PATH)
+	if (symbol_db_engine_iterator_move_next (dbi) == FALSE)
 	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "file_path",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
+		symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 NULL);
+		
+		return FALSE;
 	}
-			
-	if (sym_info & SYMINFO_LANGUAGE)
-	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "language_name",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;		
-	}
+	symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 priv->data_iter);
 	
-	if (sym_info & SYMINFO_IMPLEMENTATION)
-	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "implementation_name",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
-	}
+	return TRUE;
+}
+
+static gboolean
+isymbol_iter_previous (IAnjutaIterable *iterable, GError **err)
+{
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
+	SymbolDBEngineIteratorPriv *priv;
 	
-	if (sym_info & SYMINFO_ACCESS)
+	g_return_val_if_fail (dbi != NULL, FALSE);
+	priv = dbi->priv;
+
+	if (symbol_db_engine_iterator_move_prev (dbi) == FALSE)
 	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "access_name",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
+		symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 NULL);
+		
+		return FALSE;
 	}
+	symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 priv->data_iter);
 	
-	if (sym_info & SYMINFO_KIND)
-	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "kind_name",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
-	}
+	return TRUE;
+}
+
+static gboolean
+isymbol_iter_last (IAnjutaIterable *iterable, GError **err)
+{
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
+	SymbolDBEngineIteratorPriv *priv;
 	
-	if (sym_info & SYMINFO_TYPE)
+	g_return_val_if_fail (dbi != NULL, FALSE);
+	priv = dbi->priv;
+
+	if (symbol_db_engine_iterator_last (dbi) == FALSE)
 	{
-		value =	gda_data_model_get_value_at_col_name (priv->data_model,
-													 "type",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
+		symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 NULL);
+		
+		return FALSE;
 	}
+	symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 priv->data_iter);
 	
-	if (sym_info & SYMINFO_TYPE_NAME)
-	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "type_name",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
-	}
+	return TRUE;
+}
 
-	if (sym_info & SYMINFO_PROJECT_NAME)
-	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "project_name",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
-	}	
+static void
+isymbol_iter_foreach (IAnjutaIterable *iterable, GFunc callback,
+					  gpointer user_data, GError **err)
+{
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
+	SymbolDBEngineIteratorPriv *priv;
+	
+	g_return_if_fail (dbi != NULL);
+	priv = dbi->priv;
 
-	if (sym_info & SYMINFO_FILE_IGNORE)
-	{
-		value =	gda_data_model_get_value_at_col_name (priv->data_model,
-													 "file_ignore_type",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
-	}
+	symbol_db_engine_iterator_foreach (dbi, callback, user_data);
+}
 
-	if (sym_info & SYMINFO_FILE_INCLUDE)
+static gboolean
+isymbol_iter_set_position (IAnjutaIterable *iterable,
+						   gint position, GError **err)
+{
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
+	SymbolDBEngineIteratorPriv *priv;
+	
+	g_return_val_if_fail (dbi != NULL, FALSE);
+	priv = dbi->priv;
+
+	if (symbol_db_engine_iterator_set_position (dbi, position) == FALSE)
 	{
-		value = gda_data_model_get_value_at_col_name (priv->data_model,
-													 "file_include_type",
-													 priv->curr_row);
-		return value != NULL && G_VALUE_HOLDS_STRING (value)
-			? g_value_get_string (value) : NULL;
+		symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 NULL);
+		
+		return FALSE;
 	}
+	symbol_db_engine_iterator_node_set_data (SYMBOL_DB_ENGINE_ITERATOR_NODE (iterable),
+										 priv->data_iter);
+	
+	return TRUE;	
+}
 
-	/* not found */
+static gint
+isymbol_iter_get_position (IAnjutaIterable *iterable, GError **err)
+{
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
+	SymbolDBEngineIteratorPriv *priv;
+	
+	g_return_val_if_fail (dbi != NULL, FALSE);
+	priv = dbi->priv;
+
+	return symbol_db_engine_iterator_get_position (dbi);
+}
+
+static gint
+isymbol_iter_get_length (IAnjutaIterable *iterable, GError **err)
+{
+	SymbolDBEngineIterator *dbi = SYMBOL_DB_ENGINE_ITERATOR (iterable);
+	SymbolDBEngineIteratorPriv *priv;
+	
+	g_return_val_if_fail (dbi != NULL, FALSE);
+	priv = dbi->priv;
+
+	return symbol_db_engine_iterator_get_n_items (dbi);
+}
+
+static IAnjutaIterable *
+isymbol_iter_clone (IAnjutaIterable *iter, GError **e)
+{
+	DEBUG_PRINT ("isymbol_iter_clone  () UNIMPLEMENTED");
 	return NULL;
 }
 
+static void
+isymbol_iter_assign (IAnjutaIterable *iter, IAnjutaIterable *src_iter, GError **e)
+{
+	DEBUG_PRINT ("isymbol_iter_assign () UNIMPLEMENTED");
+}
 
 
+static void
+isymbol_iter_iface_init (IAnjutaIterableIface *iface, GError **err)
+{
+	iface->first = isymbol_iter_first;
+	iface->next = isymbol_iter_next;
+	iface->previous = isymbol_iter_previous;
+	iface->last = isymbol_iter_last;
+	iface->foreach = isymbol_iter_foreach;
+	iface->set_position = isymbol_iter_set_position;
+	iface->get_position = isymbol_iter_get_position;
+	iface->get_length = isymbol_iter_get_length;
+	iface->clone = isymbol_iter_clone;
+	iface->assign = isymbol_iter_assign;	
+}
 
+
+
+ANJUTA_TYPE_BEGIN (SymbolDBEngineIterator, sdb_engine_iterator, SYMBOL_TYPE_DB_ENGINE_ITERATOR_NODE);
+ANJUTA_TYPE_ADD_INTERFACE (isymbol_iter, IANJUTA_TYPE_ITERABLE);
+ANJUTA_TYPE_END;
Index: plugins/symbol-db/symbol-db-engine-iterator.h
===================================================================
--- plugins/symbol-db/symbol-db-engine-iterator.h	(Revision 3173)
+++ plugins/symbol-db/symbol-db-engine-iterator.h	(Arbeitskopie)
@@ -27,10 +27,11 @@
 
 #include <glib-object.h>
 #include <libgda/libgda.h>
+#include "symbol-db-engine-iterator-node.h"
 
 G_BEGIN_DECLS
 
-#define SYMBOL_TYPE_DB_ENGINE_ITERATOR             (symbol_db_engine_iterator_get_type ())
+#define SYMBOL_TYPE_DB_ENGINE_ITERATOR             (sdb_engine_iterator_get_type ())
 #define SYMBOL_DB_ENGINE_ITERATOR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYMBOL_TYPE_DB_ENGINE_ITERATOR, SymbolDBEngineIterator))
 #define SYMBOL_DB_ENGINE_ITERATOR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), SYMBOL_TYPE_DB_ENGINE_ITERATOR, SymbolDBEngineIteratorClass))
 #define SYMBOL_IS_DB_ENGINE_ITERATOR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYMBOL_TYPE_DB_ENGINE_ITERATOR))
@@ -43,49 +44,46 @@
 
 struct _SymbolDBEngineIteratorClass
 {
-	GObjectClass parent_class;
+	SymbolDBEngineIteratorNodeClass parent_class;
 };
 
 struct _SymbolDBEngineIterator
 {
-	GObject parent_instance;
+	SymbolDBEngineIteratorNode parent_instance;
 	SymbolDBEngineIteratorPriv *priv;
 };
 
-GType symbol_db_engine_iterator_get_type (void) G_GNUC_CONST;
+GType sdb_engine_iterator_get_type (void) /*G_GNUC_CONST*/;
 
 
 SymbolDBEngineIterator *
 symbol_db_engine_iterator_new (GdaDataModel *model);
 
-const gchar* 
-symbol_db_engine_iterator_get_symbol_name (SymbolDBEngineIterator *dbi);
+gboolean
+symbol_db_engine_iterator_first (SymbolDBEngineIterator *dbi);
 
-gint
-symbol_db_engine_iterator_get_symbol_file_pos (SymbolDBEngineIterator *dbi);
+gboolean
+symbol_db_engine_iterator_move_next (SymbolDBEngineIterator *dbi);
 
 gboolean
-symbol_db_engine_iterator_get_symbol_is_file_scope (SymbolDBEngineIterator *dbi);
+symbol_db_engine_iterator_move_prev (SymbolDBEngineIterator *dbi);
 
-const gchar* 
-symbol_db_engine_iterator_get_symbol_signature (SymbolDBEngineIterator *dbi);
-
 gint 
 symbol_db_engine_iterator_get_n_items (SymbolDBEngineIterator *dbi);
 
 gboolean
-symbol_db_engine_iterator_move_prev (SymbolDBEngineIterator *dbi);
+symbol_db_engine_iterator_last (SymbolDBEngineIterator *dbi);
 
 gboolean
-symbol_db_engine_iterator_move_next (SymbolDBEngineIterator *dbi);
+symbol_db_engine_iterator_set_position (SymbolDBEngineIterator *dbi, gint pos);
 
-/* just one SYMINFO_* per time. It is NOT possible to pass something like
- * SYMINFO_1 | SYMINFO_2 | ...
- */
-const gchar*
-symbol_db_engine_iterator_get_symbol_extra_string (SymbolDBEngineIterator *dbi,
-												   gint sym_info);
+gint
+symbol_db_engine_iterator_get_position (SymbolDBEngineIterator *dbi);
 
+void
+symbol_db_engine_iterator_foreach (SymbolDBEngineIterator *dbi, GFunc callback, 
+								   gpointer user_data);
+
 G_END_DECLS
 
 #endif /* _SYMBOL_DB_ENGINE_ITERATOR_H_ */
Index: plugins/symbol-db/tables.sql
===================================================================
--- plugins/symbol-db/tables.sql	(Revision 3173)
+++ plugins/symbol-db/tables.sql	(Arbeitskopie)
@@ -84,8 +84,7 @@
                        
 CREATE TABLE scope (scope_id integer PRIMARY KEY AUTOINCREMENT,
                     scope varchar(256) not null,
-                    type_id integer REFERENCES sym_type (type_id),
-					unique (scope, type_id)
+                    type_id integer REFERENCES sym_type (type_id)
                     );
                     
 CREATE TABLE __tmp_heritage_scope (tmp_heritage_scope_id integer PRIMARY KEY AUTOINCREMENT,
@@ -107,8 +106,16 @@
 
 CREATE UNIQUE INDEX symbol_idx_2 ON symbol (name, file_defined_id, file_position);
 
-CREATE UNIQUE INDEX uniq_scope_idx ON scope (scope);
+CREATE UNIQUE INDEX scope_uniq_idx_1 ON scope (scope);
 
+CREATE UNIQUE INDEX scope_uniq_idx_2 ON scope (scope, type_id);
+
+CREATE INDEX file_idx_1 ON file (file_path);
+
+CREATE INDEX sym_type_idx_1 ON sym_type (type);
+
+CREATE INDEX sym_type_idx_2 ON sym_type (type, type_name);
+
 CREATE TRIGGER delete_file BEFORE DELETE ON file
 FOR EACH ROW
 BEGIN
Index: plugins/symbol-db/Makefile.am
===================================================================
--- plugins/symbol-db/Makefile.am	(Revision 3173)
+++ plugins/symbol-db/Makefile.am	(Arbeitskopie)
@@ -1,4 +1,7 @@
 if HAVE_PLUGIN_SYMBOL_DB
+
+#SUBDIRS = test
+
 # Plugin UI file
 symbol_db_uidir = $(anjuta_ui_dir)
 symbol_db_ui_DATA =  symbol-db.ui
@@ -58,8 +61,11 @@
 	symbol-db-engine.h symbol-db-view.h  \
 	symbol-db-view.c \
 	symbol-db-view-locals.c \
-	symbol-db-view-locals.h symbol-db-view-search.h \
-	symbol-db-view-search.c 
+	symbol-db-view-locals.h \
+	symbol-db-view-search.h \
+	symbol-db-view-search.c \
+        symbol-db-engine-iterator-node.h \
+	symbol-db-engine-iterator-node.c
 
 # Plugin dependencies
 libanjuta_symbol_db_la_LIBADD = \
Index: plugins/symbol-db/symbol-db-engine.c
===================================================================
--- plugins/symbol-db/symbol-db-engine.c	(Revision 3173)
+++ plugins/symbol-db/symbol-db-engine.c	(Arbeitskopie)
@@ -211,7 +211,7 @@
 	 PREP_QUERY_PROJECT_NEW,
 	 "INSERT INTO project (project_name, wrkspace_id, analize_time) "
 	 "VALUES (## /* name:'prjname' type:gchararray */,"
-	 "## /* name:'wsid' type:gint */," "datetime ('now', 'localtime'))",
+	 "## /* name:'wsid' type:gint */, datetime ('now', 'localtime'))",
 	 NULL
 	},
 	{
@@ -660,17 +660,11 @@
 	priv->gda_client = NULL;	
 	priv->db_connection = NULL;
 
-	if (priv->data_source) 
-	{
-		g_free (priv->data_source);
-		priv->data_source = NULL;
-	}	
+	g_free (priv->data_source);
+	priv->data_source = NULL;
 
-	if (priv->dsn_name) 
-	{
-		g_free (priv->dsn_name);
-		priv->dsn_name = NULL;
-	}	
+	g_free (priv->dsn_name);
+	priv->dsn_name = NULL;
 
 	if (priv->dict)
 	{
@@ -682,6 +676,8 @@
 	return TRUE;
 }
 
+static GTimer *sym_timer_DEBUG  = NULL;
+
 /**
  * If base_prj_path != NULL then fake_file will not be parsed. Else
  * if fake_file is != NULL we claim and assert that tags contents which are
@@ -719,13 +715,25 @@
 
 	gda_connection_begin_transaction (priv->db_connection, "fixme", 0, NULL);
 
+	if (sym_timer_DEBUG == NULL)
+		sym_timer_DEBUG = g_timer_new ();
+	else
+		g_timer_reset (sym_timer_DEBUG);
+	gint tags_total_DEBUG = 0;
+	
 	while (tagsNext (tag_file, &tag_entry) != TagFailure)
 	{
 		sdb_engine_add_new_symbol (dbe, &tag_entry, fake_file_on_db == NULL ?
 								   base_prj_path : NULL, fake_file_on_db,
 								   force_sym_update);
+		
+		tags_total_DEBUG ++;
 	}
-
+	
+	gdouble elapsed_DEBUG = g_timer_elapsed (sym_timer_DEBUG, NULL);
+	DEBUG_PRINT ("elapsed: %f for (%d) [%f per symbol]", elapsed_DEBUG,
+				 tags_total_DEBUG, elapsed_DEBUG / tags_total_DEBUG);
+	
 	gda_connection_commit_transaction (priv->db_connection, "fixme", NULL);
 }
 
@@ -1055,10 +1063,7 @@
 
 	sdb_engine_disconnect_from_db (dbe);
 
-	if (priv->project_name) 
-	{
-		g_free (priv->project_name);
-	}
+	g_free (priv->project_name);
 
 	if (priv->scan_queue)
 	{
@@ -1151,7 +1156,7 @@
 }
 
 GType
-symbol_db_engine_get_type (void)
+sdb_engine_get_type (void)
 {
 	static GType our_type = 0;
 
@@ -1268,6 +1273,7 @@
 	gda_command_free (command);
 
 	g_free (contents);
+	return TRUE;
 }
 
 /**
@@ -1326,6 +1332,7 @@
 
 
 	priv->data_source = g_strdup (prj_directory);
+
 	dsn_name = g_strdup_printf ("DB_DIR=%s;DB_NAME=%s", prj_directory,
 								ANJUTA_DB_FILE);
 
@@ -1614,7 +1621,6 @@
 
 	g_return_val_if_fail (priv->db_connection != NULL, FALSE);
 
-
 	if ((query =
 		 sdb_engine_get_query_by_id (dbe, PREP_QUERY_WORKSPACE_NEW)) == NULL)
 	{
@@ -1649,6 +1655,7 @@
 	/* execute the query with parametes just set */
 	gda_query_execute ((GdaQuery *) query, par_list, FALSE, NULL);
 	gda_value_free (value);
+
 	return TRUE;
 }
 
@@ -1723,13 +1730,11 @@
 
 	priv = dbe->priv;
 
-	if (priv->project_name)
-	{
-		g_free (priv->project_name);
-		priv->project_name = NULL;				
-	}
+	g_free (priv->project_name);
+	priv->project_name = NULL;				
 
 	sdb_engine_disconnect_from_db (dbe);
+	return TRUE;
 }
 
 
@@ -2051,6 +2056,41 @@
 	return TRUE;
 }
 
+
+static void
+sdb_prepare_executing_commands (SymbolDBEngine *dbe)
+{
+	GdaCommand *command;
+	SymbolDBEnginePriv *priv;
+	priv = dbe->priv;
+
+	command = gda_command_new ("PRAGMA page_size = 4096", GDA_COMMAND_TYPE_SQL,
+							   GDA_COMMAND_OPTION_STOP_ON_ERRORS);
+	gda_connection_execute_non_select_command (priv->db_connection,
+											   command, NULL, NULL);
+	gda_command_free (command);
+	
+	command = gda_command_new ("PRAGMA cache_size = 10000", GDA_COMMAND_TYPE_SQL,
+							   GDA_COMMAND_OPTION_STOP_ON_ERRORS);
+	gda_connection_execute_non_select_command (priv->db_connection,
+											   command, NULL, NULL);
+	gda_command_free (command);
+
+	command = gda_command_new ("PRAGMA synchronous = OFF", GDA_COMMAND_TYPE_SQL,
+							   GDA_COMMAND_OPTION_STOP_ON_ERRORS);
+	gda_connection_execute_non_select_command (priv->db_connection,
+											   command, NULL, NULL);
+	gda_command_free (command);
+	
+	command = gda_command_new ("PRAGMA temp_store = MEMORY", GDA_COMMAND_TYPE_SQL,
+							   GDA_COMMAND_OPTION_STOP_ON_ERRORS);
+	gda_connection_execute_non_select_command (priv->db_connection,
+											   command, NULL, NULL);
+	gda_command_free (command);
+	
+	
+}
+
 gboolean
 symbol_db_engine_add_new_files (SymbolDBEngine * dbe, const gchar * project,
 								const GPtrArray * files_path, const gchar * language,
@@ -2065,6 +2105,10 @@
 	g_return_val_if_fail (priv->db_connection != NULL, FALSE);
 	g_return_val_if_fail (project != NULL, FALSE);
 
+	/* FIXME try this... */
+	//sdb_prepare_executing_commands (dbe);
+	
+	
 	if (symbol_db_engine_is_project_opened (dbe, project) == FALSE) 
 	{
 		g_warning ("your project isn't opened, %s (priv %s)", project, 
@@ -2083,7 +2127,7 @@
 			continue;
 		}
 			
-		DEBUG_PRINT ("gonna adding symbols for %s", node);
+/*		DEBUG_PRINT ("gonna adding symbols for %s", node);*/
 		
 		if (sdb_engine_add_new_file (dbe, project, node, language) == FALSE)
 		{
@@ -2582,28 +2626,28 @@
 			== NULL)
 		{
 			g_warning ("query is null");
-			return;
+			return -1;
 		}
 
 		if (GDA_QUERY_TYPE_NON_PARSED_SQL ==
 			gda_query_get_query_type ((GdaQuery *) query))
 		{
 			g_warning ("non parsed sql error");
-			return;
+			return -1;
 		}
 
 		if ((par_list =
 			 gda_query_get_parameter_list ((GdaQuery *) query)) == NULL)
 		{
 			g_warning ("par_list is NULL!\n");
-			return;
+			return -1;
 		}
 
 		/* scope parameter */
 		if ((param = gda_parameter_list_find_param (par_list, "scope")) == NULL)
 		{
 			g_warning ("param scope is NULL from pquery!");
-			return;
+			return -1;
 		}
 
 		value = gda_value_new (G_TYPE_STRING);
@@ -2615,7 +2659,7 @@
 			 gda_parameter_list_find_param (par_list, "typeid")) == NULL)
 		{
 			g_warning ("param typeid is NULL from pquery!");
-			return;
+			return -1;
 		}
 
 		gda_value_reset_with_type (value, G_TYPE_INT);
@@ -2737,13 +2781,13 @@
 		gda_query_get_query_type ((GdaQuery *) query))
 	{
 		g_warning ("non parsed sql error");
-		return;
+		return -1;
 	}
 
 	if ((par_list = gda_query_get_parameter_list ((GdaQuery *) query)) == NULL)
 	{
 		g_warning ("par_list is NULL!\n");
-		return;
+		return -1;
 	}
 
 	/* symreferid parameter */
@@ -2751,7 +2795,7 @@
 		 gda_parameter_list_find_param (par_list, "symreferid")) == NULL)
 	{
 		g_warning ("param symreferid is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	value = gda_value_new (G_TYPE_INT);
@@ -2762,7 +2806,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "finherits")) == NULL)
 	{
 		g_warning ("param finherits is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2773,7 +2817,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "fstruct")) == NULL)
 	{
 		g_warning ("param fstruct is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2784,7 +2828,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "ftyperef")) == NULL)
 	{
 		g_warning ("param ftyperef is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2795,7 +2839,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "fenum")) == NULL)
 	{
 		g_warning ("param fenum is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2806,7 +2850,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "funion")) == NULL)
 	{
 		g_warning ("param funion is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2817,7 +2861,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "fclass")) == NULL)
 	{
 		g_warning ("param fclass is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2829,7 +2873,7 @@
 		 gda_parameter_list_find_param (par_list, "fnamespace")) == NULL)
 	{
 		g_warning ("param fnamespace is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_STRING);
@@ -2900,9 +2944,9 @@
 
 	g_strfreev (tmp_str_splitted);
 
-	/*
-	 * DEBUG_PRINT ("2nd pass scope: got %s %s (from %s)", token_name, object_name, 
-	 * tmp_str); */
+	/*	DEBUG_PRINT ("2nd pass scope: got %s %s (from %s)", token_name, object_name, 	 
+	 * tmp_str);
+	 */
 
 	value1 = gda_value_new (G_TYPE_STRING);
 	g_value_set_string (value1, token_name);
@@ -2933,12 +2977,10 @@
 	/* if we reach this point we should have a good scope_id.
 	 * Go on with symbol updating.
 	 */
-
 	value_id2 = gda_data_model_get_value_at_col_name (data, "symbol_referer_id",
 													  data_row);
 	symbol_id = g_value_get_int (value_id2);
 
-
 	if ((query = sdb_engine_get_query_by_id (dbe,
 											 PREP_QUERY_UPDATE_SYMBOL_SCOPE_ID))
 		== NULL)
@@ -2951,20 +2993,20 @@
 		== gda_query_get_query_type ((GdaQuery *) query))
 	{
 		g_warning ("non parsed sql error");
-		return;
+		return -1;
 	}
 
 	if ((par_list = gda_query_get_parameter_list ((GdaQuery *) query)) == NULL)
 	{
 		g_warning ("par_list is NULL!\n");
-		return;
+		return -1;
 	}
 
 	/* scopeid parameter */
 	if ((param = gda_parameter_list_find_param (par_list, "scopeid")) == NULL)
 	{
 		g_warning ("param scopeid is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	value = gda_value_new (G_TYPE_INT);
@@ -2975,7 +3017,7 @@
 	if ((param = gda_parameter_list_find_param (par_list, "symbolid")) == NULL)
 	{
 		g_warning ("param symbolid is NULL from pquery!");
-		return;
+		return -1;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_INT);
@@ -3279,8 +3321,7 @@
 					g_object_unref (base_data);
 			}
 
-			if (namespace_name)
-				g_free (namespace_name);
+			g_free (namespace_name);
 			g_free (klass_name);
 			
 			DEBUG_PRINT ("gonna sdb_engine_add_new_heritage with "
@@ -3527,6 +3568,7 @@
 
 	type_id = sdb_engine_add_new_sym_type (dbe, tag_entry);
 
+
 	/* scope_definition_id tells what scope this symbol defines
 	 * this call *MUST BE DONE AFTER* sym_type table population.
 	 */
@@ -3538,6 +3580,7 @@
 	scope_id = 0;
 
 	kind_id = sdb_engine_add_new_sym_kind (dbe, tag_entry);
+	
 	access_kind_id = sdb_engine_add_new_sym_access (dbe, tag_entry);
 	implementation_kind_id =
 		sdb_engine_add_new_sym_implementation (dbe, tag_entry);
@@ -3949,7 +3992,7 @@
 	gint i;
 	SymbolDBEnginePriv *priv;
 
-	g_return_if_fail (dbe != NULL);
+	g_return_val_if_fail (dbe != NULL, FALSE);
 	
 	priv = dbe->priv;
 
@@ -4136,21 +4179,21 @@
 			== NULL)
 		{
 			g_warning ("query is null");
-			return;
+			return FALSE;
 		}
 
 		if (GDA_QUERY_TYPE_NON_PARSED_SQL ==
 			gda_query_get_query_type ((GdaQuery *) query))
 		{
 			g_warning ("non parsed sql error");
-			return;
+			return FALSE;
 		}
 
 		if ((par_list =
 			 gda_query_get_parameter_list ((GdaQuery *) query)) == NULL)
 		{
 			g_warning ("par_list is NULL!\n");
-			return;
+			return FALSE;
 		}
 
 		/* prjname parameter */
@@ -4158,7 +4201,7 @@
 			== NULL)
 		{
 			g_warning ("param prjname is NULL from pquery!");
-			return;
+			return FALSE;
 		}
 
 		value = gda_value_new (G_TYPE_STRING);
@@ -4223,7 +4266,7 @@
 	{
 		g_warning ("query is null");
 		gda_value_free (value);
-		return -1;
+		return FALSE;
 	}
 
 	if (GDA_QUERY_TYPE_NON_PARSED_SQL ==
@@ -4231,21 +4274,21 @@
 	{
 		g_warning ("non parsed sql error");
 		gda_value_free (value);
-		return -1;
+		return FALSE;
 	}
 
 	if ((par_list = gda_query_get_parameter_list ((GdaQuery *) query)) == NULL)
 	{
 		g_warning ("par_list is NULL!\n");
 		gda_value_free (value);
-		return -1;
+		return FALSE;
 	}
 
 	/* prjid parameter */
 	if ((param = gda_parameter_list_find_param (par_list, "prjid")) == NULL)
 	{
 		g_warning ("param prjname is NULL from pquery!");
-		return -1;
+		return FALSE;
 	}
 
 	gda_value_reset_with_type (value, G_TYPE_INT);
@@ -4265,6 +4308,7 @@
 		if (obj != NULL)
 			g_object_unref (obj);
 		obj = NULL;
+		return FALSE;
 	}
 
 	/* we don't need it anymore */
@@ -4400,6 +4444,7 @@
 		symbol_db_engine_update_files_symbols (dbe, project,
 											   files_to_scan, TRUE);
 	}
+	return TRUE;
 }
 
 
@@ -4438,6 +4483,7 @@
 	
 	/* emits removed symbols signals */
 	sdb_engine_detects_removed_ids (dbe);
+	return TRUE;
 }
 
 
@@ -4838,9 +4884,9 @@
 
 	if (sym_info & SYMINFO_FILE_INCLUDE)
 	{
-		info_data = g_string_append (info_data, ",file_include.type AS file_include_type");
-		join_data = g_string_append (join_data, "LEFT JOIN ext_ignore ON "
-				"ext_iclude.prj_id = project.project_id "
+		info_data = g_string_append (info_data, ",file_include.type AS file_include_type ");
+		join_data = g_string_append (join_data, "LEFT JOIN ext_include ON "
+				"ext_include.prj_id = project.project_id "
 				"LEFT JOIN file_include ON "
 				"ext_include.file_incl_id = file_include.file_include_id ");
 	}
Index: plugins/Makefile.am
===================================================================
--- plugins/Makefile.am	(Revision 3173)
+++ plugins/Makefile.am	(Arbeitskopie)
@@ -30,6 +30,8 @@
 	sourceview \
 	language-support-cpp-java \
 	glade \
+	profiler \
+	symbol-db \
 	devhelp \
 	profiler \
 	language-manager
Index: libanjuta/interfaces/libanjuta.idl
===================================================================
--- libanjuta/interfaces/libanjuta.idl	(Revision 3173)
+++ libanjuta/interfaces/libanjuta.idl	(Arbeitskopie)
@@ -3916,20 +3916,22 @@
 	}
 	
 	// Methods
-	Type type ();                // Symbol type
+	Type type ();                // Symbol type [int value]
+	const gchar *type_str ();	 // Symbol type [const char* value]
+	const gchar *type_name ();	 // Symbol type name. e.g. a member which name is 
+								 // 'my_foo_member'.
 	const gchar *name ();        // Symbol name
 	const gchar *args ();        // Args list (functions/prototypes/macros)
 	const gchar *scope ();       // Scope of symbol
 	const gchar *inheritance (); // Parent classes
 	const gchar *var_type ();    // Variable type (maps to struct for typedefs)
-	gchar access ();             // Access type (public/protected/private/etc.)
-	gchar impl ();               // Implementation (e.g. virtual)
-	const gchar *file ();        // File in which the symbol occurs
+	const gchar *access ();      // Access type (public/protected/private/etc.)
+	const gchar *impl ();        // Implementation (e.g. virtual)
+	const gchar *file ();   	 // File in which the symbol occurs
 	gulong line ();              // Line number of the symbol
 	gboolean is_local ();        // Is the symbol of local scope
-	guint pointer_order ();      // The number of pointer signs
 	
-	GdkPixbuf *icon ();          // Pixbuf icon representing the symbol
+	const GdkPixbuf *icon ();          // Pixbuf icon representing the symbol
 }
 
 /**
