[anjuta] language-support-cpp-java: show return type in tooltip



commit 9de2c233d7e1f430df12936bd84ac1f1e69e86d3
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Jun 23 10:46:12 2009 +0200

    language-support-cpp-java: show return type in tooltip

 .../language-support-cpp-java/cpp-java-assist.c    |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cpp-java-assist.c b/plugins/language-support-cpp-java/cpp-java-assist.c
index 9ab8637..36e7c93 100644
--- a/plugins/language-support-cpp-java/cpp-java-assist.c
+++ b/plugins/language-support-cpp-java/cpp-java-assist.c
@@ -653,6 +653,7 @@ cpp_java_assist_create_calltips (IAnjutaIterable* iter)
 			if (name != NULL)
 			{
 				const gchar* args = ianjuta_symbol_get_args(symbol, NULL);
+				const gchar* rettype = ianjuta_symbol_get_returntype (symbol, NULL);
 				gchar* print_args;
 				gchar* separator;
 				gchar* white_name = g_strnfill (strlen(name) + 1, ' ');
@@ -666,8 +667,11 @@ cpp_java_assist_create_calltips (IAnjutaIterable* iter)
 				
 				argv = g_strsplit (args, ",", -1);
 				print_args = g_strjoinv (separator, argv);
+
+				if (!rettype)
+					rettype = "";
 				
-				gchar* tip = g_strdup_printf ("%s %s", name, print_args);
+				gchar* tip = g_strdup_printf ("%s %s %s", rettype, name, print_args);
 				
 				if (!g_list_find_custom (tips, tip, (GCompareFunc) strcmp))
 					tips = g_list_append (tips, tip);



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