[anjuta] remove unused functions



commit c74feab3dab09c5433c1c1e6ca3e9b9c2fe62592
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Mon Sep 21 20:20:03 2009 +0200

    remove unused functions
    
    https://bugzilla.gnome.org/show_bug.cgi?id=596007

 plugins/debug-manager/queue.c                      |   19 ---
 .../language-support-cpp-java/cpp-java-assist.c    |  126 --------------------
 plugins/symbol-db/test-queries/main.c              |   69 -----------
 3 files changed, 0 insertions(+), 214 deletions(-)
---
diff --git a/plugins/debug-manager/queue.c b/plugins/debug-manager/queue.c
index 4b7a074..85920e9 100644
--- a/plugins/debug-manager/queue.c
+++ b/plugins/debug-manager/queue.c
@@ -77,25 +77,6 @@ struct _DmaDebuggerQueueClass {
 /* Queue function
  *---------------------------------------------------------------------------*/
 
-static void
-dma_queue_cancel (DmaDebuggerQueue *self, DmaCommandFlag flag)
-{
-	GList* node = g_queue_peek_head_link(self->queue);
-
-	/* Cancel all commands in queue with the flag */
-	while (node != NULL)
-	{
-		GList* next = g_list_next (node);
-		DmaQueueCommand* cmd = (DmaQueueCommand *)node->data;
-		
-		if (dma_command_has_flag (cmd, flag))
-		{
-			dma_command_cancel (cmd);
-			g_queue_delete_link (self->queue, node);
-		}
-		node = next;
-	}
-}
 
 /* Cancel all commands those cannot handle this unexpected state
  * Return TRUE if the state of the queue need to be changed too
diff --git a/plugins/language-support-cpp-java/cpp-java-assist.c b/plugins/language-support-cpp-java/cpp-java-assist.c
index ceb6395..3ac66ae 100644
--- a/plugins/language-support-cpp-java/cpp-java-assist.c
+++ b/plugins/language-support-cpp-java/cpp-java-assist.c
@@ -254,40 +254,6 @@ cpp_java_assist_get_pre_word (IAnjutaEditor* editor, IAnjutaIterable *iter)
 	return preword_chars;
 }
 
-static gchar*
-cpp_java_assist_get_scope_operator (IAnjutaEditor* editor,
-									IAnjutaIterable *iter)
-{
-	gchar op[3] = {'\0', '\0', '\0'};
-	
-	op[1] = ianjuta_editor_cell_get_char (IANJUTA_EDITOR_CELL (iter), 0, NULL);
-	if (op[1] == ':' || op[1] == '>' || op[1] == '.')
-	{
-		if (ianjuta_iterable_previous (iter, NULL))
-		{
-			op[0] = ianjuta_editor_cell_get_char (IANJUTA_EDITOR_CELL (iter),
-												  0, NULL);
-			if ((op[0] == ':' && op[1] == ':') ||
-				(op[0] == '-' && op[1] == '>'))
-			{
-				ianjuta_iterable_previous (iter, NULL);
-				return g_strdup (op);
-			}
-			else
-			{
-				if (op[1] == '.')
-					return g_strdup (&op[1]);
-			}
-		}
-		else
-		{
-			if (op[1] == '.')
-				return g_strdup (&op[1]);
-		}
-	}
-	return NULL;
-}
-
 static void
 cpp_java_assist_destroy_completion_cache (CppJavaAssist *assist,
 										  gboolean cancel_idle)
@@ -320,98 +286,6 @@ cpp_java_assist_destroy_completion_cache (CppJavaAssist *assist,
 	}
 }
 
-static void
-cpp_java_assist_create_scope_completion_cache (CppJavaAssist *assist,
-											   const gchar *scope_operator,
-											   const gchar *scope_context)
-{		
-	DEBUG_PRINT ("scope context: %s", scope_context);
-	cpp_java_assist_destroy_completion_cache (assist, TRUE);
-	if (g_str_equal (scope_operator, "::"))
-	{
-		/* Go through the possible namespace (Gnome::Glade, for example) */
-		GStrv contexts = g_strsplit (scope_context, "::", -1);
-		gint cur_context = 0;
-		if (contexts[0] != NULL)
-		{
-			DEBUG_PRINT ("Scope[%d] = %s", cur_context, contexts[0]);
-			IAnjutaIterable* symbol = 
-				ianjuta_symbol_manager_search (assist->priv->isymbol_manager,
-											   IANJUTA_SYMBOL_TYPE_CLASS | IANJUTA_SYMBOL_TYPE_NAMESPACE,
-											   TRUE,
-											   IANJUTA_SYMBOL_FIELD_SIMPLE,
-											   contexts[0],
-											   FALSE,
-											   IANJUTA_SYMBOL_MANAGER_SEARCH_FS_PUBLIC,
-											   TRUE,
-											   1,
-											   -1,
-											   NULL);
-			if (symbol && ianjuta_iterable_get_length(symbol, NULL))
-			{
-				while (contexts[++cur_context] != NULL)
-				{							
-					DEBUG_PRINT ("Scope[%d] = %s", cur_context, contexts[0]);
-					IAnjutaIterable* members = 
-						ianjuta_symbol_manager_get_members(assist->priv->isymbol_manager,
-														   IANJUTA_SYMBOL(symbol),
-														   IANJUTA_SYMBOL_FIELD_SIMPLE,
-														   NULL);
-					if (members && ianjuta_iterable_get_length (members, NULL))
-					{
-						gboolean found = FALSE;
-						do
-						{
-							if (g_str_equal (ianjuta_symbol_get_name (IANJUTA_SYMBOL(members),
-																	  NULL),
-											 contexts[cur_context]))
-							{
-								g_object_unref (symbol);
-								symbol = members;
-								found = TRUE;
-								break;
-							}
-						}
-						while (ianjuta_iterable_next (members, NULL));
-						if (found)
-							continue;
-						else
-						{
-							g_object_unref (symbol);
-							symbol = NULL;
-							break;
-						}
-					}
-				}
-				if (symbol)
-				{
-					IAnjutaIterable* members = 
-						ianjuta_symbol_manager_get_members(assist->priv->isymbol_manager,
-														   IANJUTA_SYMBOL(symbol),
-														   IANJUTA_SYMBOL_FIELD_SIMPLE,
-														   NULL);
-					if (members)
-					{
-						assist->priv->completion_cache =
-							create_completion (assist->priv->iassist, members, NULL);
-						assist->priv->scope_context_cache = g_strdup (scope_context);
-						g_object_unref (members);
-					}
-					g_object_unref (symbol);
-				}
-			}
-		}
-		g_strfreev(contexts);
-	}
-	
-	else if (g_str_equal (scope_operator, ".") ||
-			 g_str_equal (scope_operator, "->"))	
-	{
-		/* TODO: Find the type of context by parsing the file somehow and
-		search for the member as it is done with the :: context */
-	}	
-}
-
 static gboolean
 cpp_java_assist_show_autocomplete (CppJavaAssist *assist)
 {
diff --git a/plugins/symbol-db/test-queries/main.c b/plugins/symbol-db/test-queries/main.c
index f6e7710..5c8333c 100644
--- a/plugins/symbol-db/test-queries/main.c
+++ b/plugins/symbol-db/test-queries/main.c
@@ -42,75 +42,6 @@ find_symbol_in_scope (SymbolDBEngine *dbe)
 }
 
 static void
-find_symbol_by_name_pattern_filtered (SymbolDBEngine *dbe)
-{	
-	SymbolDBEngineIterator *iter;
-	DEBUG_PRINT ("");	
-		
-	iter = symbol_db_engine_find_symbol_by_name_pattern_filtered (dbe, 
-	    "TwoC", 
-	    SYMTYPE_UNDEF,
-	    TRUE,
-	    SYMSEARCH_FILESCOPE_IGNORE,
-	    NULL,
-	    -1,
-	    -1,
-	    SYMINFO_SIMPLE);
-
-	if (iter == NULL)
-	{
-		g_warning ("Iterator null");
-		return;
-	}
-
-	do {
-		SymbolDBEngineIteratorNode *node;
-
-		node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iter);
-
-		DEBUG_PRINT ("node name %s", 
-		    symbol_db_engine_iterator_node_get_symbol_name (node));
-		
-	} while (symbol_db_engine_iterator_move_next (iter) == TRUE);
-}
-
-static void
-get_scope_members_by_path (SymbolDBEngine* dbe)
-{
-	GPtrArray *array;
-	SymbolDBEngineIterator *iter;
-
-	DEBUG_PRINT ("");
-	
-	array = g_ptr_array_new ();
-	g_ptr_array_add (array, "namespace");	
-//	g_ptr_array_add (array, "NSOne");
-	g_ptr_array_add (array, "NSFour");
-	g_ptr_array_add (array, NULL);
-	
-	iter = symbol_db_engine_get_scope_members_by_path (dbe, array, SYMINFO_SIMPLE);
-
-	if (iter == NULL)
-	{
-		g_warning ("Iterator null");
-		return;
-	}
-
-	do {
-		SymbolDBEngineIteratorNode *node;
-
-		node = SYMBOL_DB_ENGINE_ITERATOR_NODE (iter);
-
-		DEBUG_PRINT ("node name %s", 
-		    symbol_db_engine_iterator_node_get_symbol_name (node));
-		
-	} while (symbol_db_engine_iterator_move_next (iter) == TRUE);
-	
-
-	g_ptr_array_free (array, TRUE);
-}
-
-static void
 do_test_queries (SymbolDBEngine* dbe)
 {
     



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