Permalink
Browse files

Fix debug chanel for new symbol-bd system

  • Loading branch information...
1 parent a99ee76 commit 8fba199f5a59ed8cfdffbf426b8bb6616b29740d @pepeleproso pepeleproso committed Jan 14, 2011
View
2 README
@@ -80,7 +80,7 @@ will activate plugins and document chanel.
* The following list contains the avariable debug chanels:
- GPHPEDIT_NO_DEBUG (disable debug output)
- - GPHPEDIT_DEBUG_CALLTIP
+ - GPHPEDIT_DEBUG_SYMBOLIZABLE
- GPHPEDIT_DEBUG_CLASSBROWSER
- GPHPEDIT_DEBUG_CLASSBROWSER_PARSE
- GPHPEDIT_DEBUG_DOCUMENT
View
@@ -21,11 +21,6 @@
The GNU General Public License is contained in the file COPYING.
*/
-/* ******* CLASSBROWSER DESIGN ********
-* classbrowser widget has two part. UI and backend. the Backend process open files and
-* return a list of classes and functions in files.
-* UI process backend signal and fill the classbrowser Tree.
-*/
#include "debug.h"
#include <glib/gi18n.h>
@@ -236,7 +231,7 @@ void classbrowser_set_sortable(GtkTreeStore *classtreestore)
classbrowser_compare_function_names, NULL,NULL);
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(classtreestore),
0, classbrowser_compare_function_names,
- NULL,NULL);
+ NULL, NULL);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(classtreestore),
0,
GTK_SORT_ASCENDING);
@@ -268,6 +263,7 @@ GtkTreeModel *classbrowser_get_model(gphpeditClassBrowserPrivate *priv)
*/
void sdb_update_cb (SymbolManager *symbolmg, gpointer user_data)
{
+ gphpedit_debug(DEBUG_CLASSBROWSER);
gphpeditClassBrowserPrivate *priv= (gphpeditClassBrowserPrivate *) user_data;
static guint press_event = 0;
static guint release_event = 0;
@@ -480,6 +476,7 @@ gint treeview_click_release(GtkWidget *widget, GdkEventButton *event, gpointer f
*/
void classbrowser_update(gphpeditClassBrowser *classbrowser)
{
+ gphpedit_debug(DEBUG_CLASSBROWSER);
if (!classbrowser) return ;
gphpeditClassBrowserPrivate *priv;
priv = CLASSBROWSER_BACKEND_GET_PRIVATE(classbrowser);
@@ -493,7 +490,6 @@ void classbrowser_update(gphpeditClassBrowser *classbrowser)
}
}
-
void classbrowser_update_selected_label(gphpeditClassBrowserPrivate *priv, gchar *filename, gint line)
{
if(filename) {
View
@@ -48,8 +48,8 @@ gphpedit_debug_init (void)
return;
}
- if (g_getenv ("GPHPEDIT_DEBUG_CALLTIP") != NULL)
- debug = debug | GPHPEDIT_DEBUG_CALLTIP;
+ if (g_getenv ("GPHPEDIT_DEBUG_SYMBOLIZABLE") != NULL)
+ debug = debug | GPHPEDIT_DEBUG_SYMBOLIZABLE;
if (g_getenv ("GPHPEDIT_DEBUG_CLASSBROWSER") != NULL)
debug = debug | GPHPEDIT_DEBUG_CLASSBROWSER;
if (g_getenv ("GPHPEDIT_DEBUG_DOCUMENT") != NULL)
View
@@ -40,7 +40,7 @@
*/
typedef enum {
GPHPEDIT_NO_DEBUG = 0,
- GPHPEDIT_DEBUG_CALLTIP = 1 << 0,
+ GPHPEDIT_DEBUG_SYMBOLIZABLE = 1 << 0,
GPHPEDIT_DEBUG_CLASSBROWSER = 1 << 1,
GPHPEDIT_DEBUG_CLASSBROWSER_PARSE = 1 << 2,
GPHPEDIT_DEBUG_DOCUMENT = 1 << 3,
@@ -55,7 +55,7 @@ typedef enum {
} DebugSection;
-#define DEBUG_CALLTIP GPHPEDIT_DEBUG_CALLTIP, __FILE__, __LINE__, G_STRFUNC
+#define DEBUG_SYMBOLIZABLE GPHPEDIT_DEBUG_SYMBOLIZABLE, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_CLASSBROWSER GPHPEDIT_DEBUG_CLASSBROWSER, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_CLASSBROWSER_PARSE GPHPEDIT_DEBUG_CLASSBROWSER_PARSE, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_DOCUMENT GPHPEDIT_DEBUG_DOCUMENT, __FILE__, __LINE__, G_STRFUNC
View
@@ -146,6 +146,7 @@ static void symbol_bd_cobol_save_result_in_cache(SymbolBdCOBOLDetails *symbolbdd
static gchar *symbol_bd_cobol_get_symbols_matches (Symbolizable *self, const gchar *symbol_prefix, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCOBOLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_COBOL_GET_PRIVATE(self);
symbolbddet->completion_prefix = (gchar *) symbol_prefix;
@@ -181,21 +182,25 @@ static gchar *symbol_bd_cobol_get_symbols_matches (Symbolizable *self, const gch
static gchar *symbol_bd_cobol_get_class_symbols (Symbolizable *self, const gchar *class_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static gchar *symbol_bd_cobol_get_classes (Symbolizable *self)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static gchar *symbol_bd_cobol_get_calltip (Symbolizable *self, const gchar *symbol_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static GList *symbol_bd_cobol_get_custom_symbols_list (Symbolizable *self, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCOBOLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_COBOL_GET_PRIVATE(self);
if (((flags & SYMBOL_FUNCTION) == SYMBOL_FUNCTION)) {
@@ -239,6 +244,7 @@ static void add_custom_var_item (gpointer key, gpointer value, gpointer user_dat
static GList *symbol_bd_cobol_get_custom_symbols_list_by_filename (Symbolizable *self, gint symbol_type, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCOBOLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_COBOL_GET_PRIVATE(self);
if(!filename) return NULL;
@@ -264,6 +270,7 @@ static GList *symbol_bd_cobol_get_custom_symbols_list_by_filename (Symbolizable
static void symbol_bd_cobol_rescan_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
}
static void remove_custom_function_item (gpointer key, gpointer value, gpointer user_data)
@@ -295,6 +302,7 @@ static void remove_custom_var_item (gpointer key, gpointer value, gpointer user_
static void symbol_bd_cobol_purge_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCOBOLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_COBOL_GET_PRIVATE(self);
if(!filename) return ;
@@ -316,6 +324,7 @@ static void symbol_bd_cobol_purge_file (Symbolizable *self, gchar *filename)
*/
static void symbol_bd_cobol_add_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCOBOLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_COBOL_GET_PRIVATE(self);
if(!filename) return ;
@@ -414,7 +423,7 @@ symbol_bd_cobol_init (SymbolBdCOBOL *symbolbd)
/* init API tables */
symbol_bd_function_list_from_array_prepare(cobol_keyword, &symbolbddet->cobol_api_tree);
- /*init file table */
+ /* init file table */
symbolbddet->db_file_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
/* custom symbols tables */
View
@@ -112,6 +112,7 @@ static void symbol_bd_css_save_result_in_cache(SymbolBdCSSDetails *symbolbddet,
static gchar *symbol_bd_css_get_symbols_matches (Symbolizable *self, const gchar *symbol_prefix, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCSSDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CSS_GET_PRIVATE(self);
symbolbddet->completion_prefix = (gchar *) symbol_prefix;
@@ -141,16 +142,19 @@ static gchar *symbol_bd_css_get_symbols_matches (Symbolizable *self, const gchar
static gchar *symbol_bd_css_get_class_symbols (Symbolizable *self, const gchar *class_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static gchar *symbol_bd_css_get_classes (Symbolizable *self)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static gchar *symbol_bd_css_get_calltip (Symbolizable *self, const gchar *symbol_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCSSDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CSS_GET_PRIVATE(self);
@@ -173,24 +177,29 @@ static gchar *symbol_bd_css_get_calltip (Symbolizable *self, const gchar *symbol
static GList *symbol_bd_css_get_custom_symbols_list (Symbolizable *self, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static GList *symbol_bd_css_get_custom_symbols_list_by_filename (Symbolizable *self, gint symbol_type, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
return NULL;
}
static void symbol_bd_css_rescan_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
}
static void symbol_bd_css_purge_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
}
static void symbol_bd_css_add_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
}
static void symbol_bd_css_symbolizable_init(SymbolizableIface *iface, gpointer user_data)
View
@@ -164,6 +164,7 @@ static void symbol_bd_cxx_save_result_in_cache(SymbolBdCXXDetails *symbolbddet,
static gchar *symbol_bd_cxx_get_symbols_matches (Symbolizable *self, const gchar *symbol_prefix, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
symbolbddet->completion_prefix = (gchar *) symbol_prefix;
@@ -220,6 +221,7 @@ static void make_result_member_string (gpointer key, gpointer value, gpointer us
static gchar *symbol_bd_cxx_get_class_symbols (Symbolizable *self, const gchar *class_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
symbolbddet->completion_string = NULL;
@@ -251,6 +253,7 @@ static void make_class_completion_string (gpointer key, gpointer value, gpointer
static gchar *symbol_bd_cxx_get_classes (Symbolizable *self)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
symbolbddet->completion_string = NULL;
@@ -263,6 +266,7 @@ static gchar *symbol_bd_cxx_get_classes (Symbolizable *self)
static gchar *symbol_bd_cxx_get_calltip (Symbolizable *self, const gchar *symbol_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
@@ -291,6 +295,7 @@ static gchar *symbol_bd_cxx_get_calltip (Symbolizable *self, const gchar *symbol
static GList *symbol_bd_cxx_get_custom_symbols_list (Symbolizable *self, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
if (((flags & SYMBOL_FUNCTION) == SYMBOL_FUNCTION)) {
@@ -334,6 +339,7 @@ static void add_custom_var_item (gpointer key, gpointer value, gpointer user_dat
static GList *symbol_bd_cxx_get_custom_symbols_list_by_filename (Symbolizable *self, gint symbol_type, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
if(!filename) return NULL;
@@ -359,6 +365,7 @@ static GList *symbol_bd_cxx_get_custom_symbols_list_by_filename (Symbolizable *s
static void symbol_bd_cxx_rescan_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
}
static void remove_custom_function_item (gpointer key, gpointer value, gpointer user_data)
@@ -390,6 +397,7 @@ static void remove_custom_var_item (gpointer key, gpointer value, gpointer user_
static void symbol_bd_cxx_purge_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
if(!filename) return ;
@@ -411,6 +419,7 @@ static void symbol_bd_cxx_purge_file (Symbolizable *self, gchar *filename)
*/
static void symbol_bd_cxx_add_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdCXXDetails *symbolbddet;
symbolbddet = SYMBOL_BD_CXX_GET_PRIVATE(self);
if(!filename) return ;
View
@@ -166,6 +166,7 @@ static void symbol_bd_perl_save_result_in_cache(SymbolBdPERLDetails *symbolbddet
static gchar *symbol_bd_perl_get_symbols_matches (Symbolizable *self, const gchar *symbol_prefix, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
symbolbddet->completion_prefix = (gchar *) symbol_prefix;
@@ -222,6 +223,7 @@ static void make_result_member_string (gpointer key, gpointer value, gpointer us
static gchar *symbol_bd_perl_get_class_symbols (Symbolizable *self, const gchar *class_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
symbolbddet->completion_string = NULL;
@@ -253,6 +255,7 @@ static void make_class_completion_string (gpointer key, gpointer value, gpointer
static gchar *symbol_bd_perl_get_classes (Symbolizable *self)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
symbolbddet->completion_string = NULL;
@@ -265,6 +268,7 @@ static gchar *symbol_bd_perl_get_classes (Symbolizable *self)
static gchar *symbol_bd_perl_get_calltip (Symbolizable *self, const gchar *symbol_name)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
@@ -283,6 +287,7 @@ static gchar *symbol_bd_perl_get_calltip (Symbolizable *self, const gchar *symbo
static GList *symbol_bd_perl_get_custom_symbols_list (Symbolizable *self, gint flags)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
if (((flags & SYMBOL_FUNCTION) == SYMBOL_FUNCTION)) {
@@ -326,6 +331,7 @@ static void add_custom_var_item (gpointer key, gpointer value, gpointer user_dat
static GList *symbol_bd_perl_get_custom_symbols_list_by_filename (Symbolizable *self, gint symbol_type, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
if(!filename) return NULL;
@@ -351,6 +357,7 @@ static GList *symbol_bd_perl_get_custom_symbols_list_by_filename (Symbolizable *
static void symbol_bd_perl_rescan_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
}
static void remove_custom_function_item (gpointer key, gpointer value, gpointer user_data)
@@ -382,6 +389,7 @@ static void remove_custom_var_item (gpointer key, gpointer value, gpointer user_
static void symbol_bd_perl_purge_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
if(!filename) return ;
@@ -403,6 +411,7 @@ static void symbol_bd_perl_purge_file (Symbolizable *self, gchar *filename)
*/
static void symbol_bd_perl_add_file (Symbolizable *self, gchar *filename)
{
+ gphpedit_debug (DEBUG_SYMBOLIZABLE);
SymbolBdPERLDetails *symbolbddet;
symbolbddet = SYMBOL_BD_PERL_GET_PRIVATE(self);
if(!filename) return ;
Oops, something went wrong.

0 comments on commit 8fba199

Please sign in to comment.