SF.net SVN: geany:[3188] trunk/tagmanager/include/tm_source_file.h

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Nov 7 14:38:38 UTC 2008


Revision: 3188
          http://geany.svn.sourceforge.net/geany/?rev=3188&view=rev
Author:   eht16
Date:     2008-11-07 14:38:38 +0000 (Fri, 07 Nov 2008)

Log Message:
-----------
Oops, forgot to commit.

Modified Paths:
--------------
    trunk/tagmanager/include/tm_source_file.h

Modified: trunk/tagmanager/include/tm_source_file.h
===================================================================
--- trunk/tagmanager/include/tm_source_file.h	2008-11-07 14:38:13 UTC (rev 3187)
+++ trunk/tagmanager/include/tm_source_file.h	2008-11-07 14:38:38 UTC (rev 3188)
@@ -78,6 +78,26 @@
 gboolean tm_source_file_update(TMWorkObject *source_file, gboolean force
   , gboolean recurse, gboolean update_parent);
 
+/*! Updates the source file by reparsing the text-buffer passed as parameter.
+ Ctags will use a parsing based on buffer instead of on files.
+ You should call this function when you don't want a previous saving of the file
+ you're editing. It's useful for a "real-time" updating of the tags.
+ The tags array and the tags themselves are destroyed and re-created, hence any
+ other tag arrays pointing to these tags should be rebuilt as well. All sorting
+ information is also lost. The language parameter is automatically set the first
+ time the file is parsed.
+ \param source_file The source file to update with a buffer.
+ \param text_buf A text buffer. The user should take care of allocate and free it after
+ the use here.
+ \param buf_size The size of text_buf.
+ \param update_parent If set to TRUE, sends an update signal to parent if required. You should
+ always set this to TRUE if you are calling this function directly.
+ \return TRUE if the file was parsed, FALSE otherwise.
+ \sa tm_work_object_update(), tm_project_update(), tm_workspace_update()
+*/
+gboolean tm_source_file_buffer_update(TMWorkObject *source_file, guchar* text_buf,
+			gint buf_size, gboolean update_parent);
+
 /* Parses the source file and regenarates the tags.
  \param source_file The source file to parse
  \return TRUE on success, FALSE on failure
@@ -85,6 +105,15 @@
 */
 gboolean tm_source_file_parse(TMSourceFile *source_file);
 
+/* Parses the text-buffer and regenarates the tags.
+ \param source_file The source file to parse
+ \param text_buf The text buffer to parse
+ \param buf_size The size of text_buf.
+ \return TRUE on success, FALSE on failure
+ \sa tm_source_file_update()
+*/
+gboolean tm_source_file_buffer_parse(TMSourceFile *source_file, guchar* text_buf, gint buf_size);
+
 /*
  This function is registered into the ctags parser when a file is parsed for
  the first time. The function is then called by the ctags parser each time


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