Kaydet (Commit) a95fc1a9 authored tarafından Jiří Techet's avatar Jiří Techet

Don't expose the source file update function to plugins

üst 90944c77
......@@ -350,8 +350,6 @@
geany_functions->p_tm->tm_source_file_free
#define tm_workspace_add_source_file \
geany_functions->p_tm->tm_workspace_add_source_file
#define tm_workspace_update_source_file \
geany_functions->p_tm->tm_workspace_update_source_file
#define tm_workspace_remove_source_file \
geany_functions->p_tm->tm_workspace_remove_source_file
#define tm_workspace_add_source_files \
......
......@@ -2488,7 +2488,7 @@ void document_update_tags(GeanyDocument *doc)
g_free(locale_filename);
if (doc->tm_file)
tm_workspace_add_source_file(doc->tm_file);
tm_workspace_add_source_file_noupdate(doc->tm_file);
}
/* early out if there's no tm source file and we couldn't create one */
......
......@@ -602,7 +602,6 @@ typedef struct TagManagerFuncs
TMSourceFile* (*tm_source_file_new) (const char *file_name, const char *name);
void (*tm_source_file_free) (TMSourceFile *source_file);
void (*tm_workspace_add_source_file) (TMSourceFile *source_file);
void (*tm_workspace_update_source_file) (TMSourceFile *source_file);
void (*tm_workspace_remove_source_file) (TMSourceFile *source_file);
void (*tm_workspace_add_source_files) (GPtrArray *source_files);
void (*tm_workspace_remove_source_files) (GPtrArray *source_files);
......
......@@ -292,7 +292,6 @@ static TagManagerFuncs tagmanager_funcs = {
&tm_source_file_new,
&tm_source_file_free,
&tm_workspace_add_source_file,
&tm_workspace_update_source_file,
&tm_workspace_remove_source_file,
&tm_workspace_add_source_files,
&tm_workspace_remove_source_files
......
......@@ -154,9 +154,7 @@ static void update_source_file(TMSourceFile *source_file, guchar* text_buf,
}
/** Adds a source file to the workspace. At some point, tm_workspace_update_source_file()
has to be called to parse the source file, create the source file's tag array
and update the workspace tag arrays.
/** Adds a source file to the workspace, parses it and updates the workspace tags.
@param source_file The source file to add to the workspace.
*/
void tm_workspace_add_source_file(TMSourceFile *source_file)
......@@ -164,15 +162,15 @@ void tm_workspace_add_source_file(TMSourceFile *source_file)
g_return_if_fail(source_file != NULL);
g_ptr_array_add(theWorkspace->source_files, source_file);
update_source_file(source_file, NULL, 0, FALSE, TRUE);
}
/** Parses the source file, updates its tag array and the workspace tag arrays.
@param source_file The source file to update.
*/
void tm_workspace_update_source_file(TMSourceFile *source_file)
void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file)
{
update_source_file(source_file, NULL, 0, FALSE, TRUE);
g_return_if_fail(source_file != NULL);
g_ptr_array_add(theWorkspace->source_files, source_file);
}
......@@ -277,7 +275,7 @@ void tm_workspace_add_source_files(GPtrArray *source_files)
{
TMSourceFile *source_file = source_files->pdata[i];
tm_workspace_add_source_file(source_file);
tm_workspace_add_source_file_noupdate(source_file);
update_source_file(source_file, NULL, 0, FALSE, FALSE);
}
......
......@@ -38,8 +38,6 @@ typedef struct
void tm_workspace_add_source_file(TMSourceFile *source_file);
void tm_workspace_update_source_file(TMSourceFile *source_file);
void tm_workspace_remove_source_file(TMSourceFile *source_file);
void tm_workspace_add_source_files(GPtrArray *source_files);
......@@ -68,6 +66,8 @@ const GPtrArray *tm_workspace_find_scope_members(const GPtrArray *file_tags,
gboolean find_global,
gboolean no_definitions);
void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file);
void tm_workspace_update_source_file_buffer(TMSourceFile *source_file, guchar* text_buf,
gint buf_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment