SF.net SVN: geany: [872] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Oct 8 15:52:39 UTC 2006


Revision: 872
          http://svn.sourceforge.net/geany/?rev=872&view=rev
Author:   eht16
Date:     2006-10-08 08:52:31 -0700 (Sun, 08 Oct 2006)

Log Message:
-----------
Added some new keywords for filetype Ferite.
Added auto completion for iferr construct for filetype Ferite.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/data/filetypes.ferite
    trunk/src/highlighting.c
    trunk/src/sci_cb.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-10-08 12:53:33 UTC (rev 871)
+++ trunk/ChangeLog	2006-10-08 15:52:31 UTC (rev 872)
@@ -1,3 +1,10 @@
+2006-10-08  Enrico Tröger  <enrico.troeger at uvena.de>
+
+ * src/highlighting.c, data/filetypes.ferite: Added some new keywords.
+ * src/sci_cb.c:
+   Added auto completion for iferr construct for filetype Ferite.
+
+
 2006-10-08  Nick Treleaven  <nick.treleaven at btinternet.com>
 
  * tagmanager/tm_source_file.c:

Modified: trunk/data/filetypes.ferite
===================================================================
--- trunk/data/filetypes.ferite	2006-10-08 12:53:33 UTC (rev 871)
+++ trunk/data/filetypes.ferite	2006-10-08 15:52:31 UTC (rev 872)
@@ -23,8 +23,8 @@
 
 [keywords]
 # all items must be in one line
-primary=false null self super true abstract alias arguments attribute_missing break case class closure conformsToProtocol constructor default deliver destructor diliver do else extends final fix for function if iferr implements include instanceof method_missing modifies namespace new private protected protocol public recipient rename return static switch uses using while
-types=string number array object void XML Unix Sys String Stream Serialize RMI Posix Number Network Math FileSystem Console Array
+primary=false null self super true abstract alias and arguments attribute_missing break case class closure conformsToProtocol constructor continue default deliver destructor diliver directive do else extends eval final fix for function global handle if iferr implements include instanceof isa method_missing modifies monitor namespace new or private protected protocol public raise recipient rename return static switch uses using while
+types=boolean string number array object void XML Unix Sys String Stream Serialize RMI Posix Number Network Math FileSystem Console Array Regexp XSLT
 docComment=brief class declaration description end example extends function group implements modifies module namespace param protocol return return static type variable warning
 
 [settings]

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2006-10-08 12:53:33 UTC (rev 871)
+++ trunk/src/highlighting.c	2006-10-08 15:52:31 UTC (rev 872)
@@ -2585,9 +2585,9 @@
 	get_keyfile_int(config, config_home, "styling", "styling_within_preprocessor", 1, 0, &style_sets[GEANY_FILETYPES_FERITE].styling[19]);
 
 	style_sets[GEANY_FILETYPES_FERITE].keywords = g_new(gchar*, 4);
-	get_keyfile_keywords(config, config_home, "keywords", "primary", GEANY_FILETYPES_FERITE, 0, "false null self super true abstract alias arguments attribute_missing break case class closure conformsToProtocol constructor default deliver destructor diliver do else extends final fix for function if iferr implements include instanceof method_missing modifies namespace new private protected protocol public recipient rename return static switch uses using while");
-	get_keyfile_keywords(config, config_home, "keywords", "types", GEANY_FILETYPES_FERITE, 1, "number string array object void");
-	get_keyfile_keywords(config, config_home, "keywords", "docComment", GEANY_FILETYPES_FERITE, 2, "@brief @class @declaration @description @end @example @extends @function @group @implements @modifies @module @namespace @param @protocol @return @return @static @type @variable @warning");
+	get_keyfile_keywords(config, config_home, "keywords", "primary", GEANY_FILETYPES_FERITE, 0, "false null self super true abstract alias and arguments attribute_missing break case class closure conformsToProtocol constructor continue default deliver destructor diliver directive do else extends eval final fix for function global handle if iferr implements include instanceof isa method_missing modifies monitor namespace new or private protected protocol public raise recipient rename return static switch uses using while");
+	get_keyfile_keywords(config, config_home, "keywords", "types", GEANY_FILETYPES_FERITE, 1, "boolean string number array object void");
+	get_keyfile_keywords(config, config_home, "keywords", "docComment", GEANY_FILETYPES_FERITE, 2, "brief class declaration description end example extends function group implements modifies module namespace param protocol return return static type variable warning");
 	style_sets[GEANY_FILETYPES_FERITE].keywords[3] = NULL;
 
 	get_keyfile_wordchars(config, config_home, GEANY_WORDCHARS,

Modified: trunk/src/sci_cb.c
===================================================================
--- trunk/src/sci_cb.c	2006-10-08 12:53:33 UTC (rev 871)
+++ trunk/src/sci_cb.c	2006-10-08 15:52:31 UTC (rev 872)
@@ -906,7 +906,18 @@
 		sci_goto_pos(sci, pos + 1, TRUE);
 		g_free(construct);
 	}
+	else if (! strncmp("iferr", buf + 10, 5))
+	{
+		if (doc_list[idx].file_type->id != GEANY_FILETYPES_FERITE ||
+			! isspace(*(buf + 9))) goto free_and_return;
 
+		construct = g_strdup_printf("%s{%s\t%s}%sfix%s{%s\t%s}%s", eol, eol, eol, eol, eol, eol, eol, eol);
+
+		SSM(sci, SCI_INSERTTEXT, pos, (sptr_t) construct);
+		sci_goto_pos(sci, pos + 4 + (2 * strlen(indent)), TRUE);
+		g_free(construct);
+	}
+
 	free_and_return:
 	g_free(eol);
 }


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