SF.net SVN: geany:[3852] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Jun 10 18:24:44 UTC 2009


Revision: 3852
          http://geany.svn.sourceforge.net/geany/?rev=3852&view=rev
Author:   eht16
Date:     2009-06-10 18:24:44 +0000 (Wed, 10 Jun 2009)

Log Message:
-----------
Display calltips for Pascal symbols in the Pascal way (#2803945).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/editor.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-06-10 15:14:22 UTC (rev 3851)
+++ trunk/ChangeLog	2009-06-10 18:24:44 UTC (rev 3852)
@@ -1,3 +1,9 @@
+2009-06-10  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * tagmanager/editor.c:
+   Display calltips for Pascal symbols in the Pascal way (#2803945).
+
+
 2009-06-10  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/editor.c, tagmanager/include/tm_workspace.h,

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2009-06-10 15:14:22 UTC (rev 3851)
+++ trunk/src/editor.c	2009-06-10 18:24:44 UTC (rev 3852)
@@ -1442,27 +1442,42 @@
 	if (! tag->atts.entry.arglist)
 		return FALSE;
 
-	if (tag->atts.entry.var_type)
-	{
-		guint i;
+	if (ft_id != GEANY_FILETYPES_PASCAL)
+	{	/* usual calltips: "retval tagname (arglist)" */
+		if (tag->atts.entry.var_type)
+		{
+			guint i;
 
-		g_string_append(str, tag->atts.entry.var_type);
-		for (i = 0; i < tag->atts.entry.pointerOrder; i++)
+			g_string_append(str, tag->atts.entry.var_type);
+			for (i = 0; i < tag->atts.entry.pointerOrder; i++)
+			{
+				g_string_append_c(str, '*');
+			}
+			g_string_append_c(str, ' ');
+		}
+		if (tag->atts.entry.scope)
 		{
-			g_string_append_c(str, '*');
+			const gchar *cosep = symbols_get_context_separator(ft_id);
+
+			g_string_append(str, tag->atts.entry.scope);
+			g_string_append(str, cosep);
 		}
+		g_string_append(str, tag->name);
 		g_string_append_c(str, ' ');
+		g_string_append(str, tag->atts.entry.arglist);
 	}
-	if (tag->atts.entry.scope)
-	{
-		const gchar *cosep = symbols_get_context_separator(ft_id);
+	else
+	{	/* special case Pascal calltips: "tagname (arglist) : retval" */
+		g_string_append(str, tag->name);
+		g_string_append_c(str, ' ');
+		g_string_append(str, tag->atts.entry.arglist);
 
-		g_string_append(str, tag->atts.entry.scope);
-		g_string_append(str, cosep);
+		if (NZV(tag->atts.entry.var_type))
+		{
+			g_string_append(str, " : ");
+			g_string_append(str, tag->atts.entry.var_type);
+		}
 	}
-	g_string_append(str, tag->name);
-	g_string_append_c(str, ' ');
-	g_string_append(str, tag->atts.entry.arglist);
 
 	return TRUE;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list