Top | ![]() |
![]() |
![]() |
![]() |
IdeSnippetContextIdeSnippetContext — Context for expanding IdeSnippetChunk |
IdeSnippetContext * | ide_snippet_context_new () |
void | ide_snippet_context_emit_changed () |
void | ide_snippet_context_clear_variables () |
void | ide_snippet_context_add_variable () |
void | ide_snippet_context_add_shared_variable () |
const gchar * | ide_snippet_context_get_variable () |
gchar * | ide_snippet_context_expand () |
void | ide_snippet_context_set_tab_width () |
void | ide_snippet_context_set_use_spaces () |
void | ide_snippet_context_set_line_prefix () |
void | ide_snippet_context_dump () |
This class is currently used primary as a hashtable. However, the longer term goal is to have it hold onto a GjsContext as well as other languages so that IdeSnippetChunk can expand themselves by executing script within the context.
The IdeSnippet will build the context and then expand each of the chunks during the insertion/edit phase.
void
ide_snippet_context_emit_changed (IdeSnippetContext *context
);
void
ide_snippet_context_clear_variables (IdeSnippetContext *context
);
void ide_snippet_context_add_variable (IdeSnippetContext *context
,const gchar *key
,const gchar *value
);
void ide_snippet_context_add_shared_variable (IdeSnippetContext *context
,const gchar *key
,const gchar *value
);
const gchar * ide_snippet_context_get_variable (IdeSnippetContext *context
,const gchar *key
);
gchar * ide_snippet_context_expand (IdeSnippetContext *context
,const gchar *input
);
void ide_snippet_context_set_tab_width (IdeSnippetContext *context
,gint tab_size
);
void ide_snippet_context_set_use_spaces (IdeSnippetContext *context
,gboolean use_spaces
);
void ide_snippet_context_set_line_prefix (IdeSnippetContext *context
,const gchar *line_prefix
);
“changed”
signalvoid user_function (IdeSnippetContext *idesnippetcontext, gpointer user_data)
Flags: Run First