The TMSourceFile structure and associated functions are used to maintain tags for individual files.
More...
The TMSourceFile structure and associated functions are used to maintain tags for individual files.
gboolean tm_source_file_buffer_update |
( |
TMWorkObject * |
source_file, |
|
|
guchar * |
text_buf, |
|
|
gint |
buf_size, |
|
|
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.
- Parameters
-
source_file | The source file to update with a buffer. |
text_buf | A text buffer. The user should take care of allocate and free it after the use here. |
buf_size | The size of text_buf. |
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. |
- Returns
- TRUE if the file was parsed, FALSE otherwise.
- See also
- tm_work_object_update(), tm_project_update(), tm_workspace_update()
gboolean tm_source_file_update |
( |
TMWorkObject * |
source_file, |
|
|
gboolean |
force, |
|
|
gboolean |
recurse, |
|
|
gboolean |
update_parent |
|
) |
| |
Updates the source file by reparsing if the modification time is greater than the timestamp in the structure, or if force is TRUE. 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.
- Parameters
-
source_file | The source file to update. |
force | Ignored. The source file is always updated. |
recurse | This parameter is ignored for source files and is only there for consistency. |
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. |
- Returns
- TRUE if the file was parsed, FALSE otherwise.
- See also
- tm_work_object_update(), tm_project_update(), tm_workspace_update()