IdeSnippetParser: Builder SDK Reference

## IdeSnippetParser IdeSnippetParser — A parser for Builder's snippet text format |

## Functions

IdeSnippetParser * | ide_snippet_parser_new ()
gboolean | ide_snippet_parser_load_from_data ()
gboolean | ide_snippet_parser_load_from_file ()
GList * | ide_snippet_parser_get_snippets ()

## Signals

void | parsing-error | Run Last

## Types and Values

#define | IDE_TYPE_SNIPPET_PARSER
| IdeSnippetParser

## Object Hierarchy

        GObject
        ╰── IdeSnippetParser

## Description

The IdeSnippetParser can be used to parse ".snippets" formatted text files. This is generally only used internally by Builder, but can be used by plugins under certain situations.

## Functions

### ide_snippet_parser_new ()

    IdeSnippetParser *
    ide_snippet_parser_new (void);

### ide_snippet_parser_load_from_data ()

    gboolean
    ide_snippet_parser_load_from_data (IdeSnippetParser *parser,
                                       const gchar *defalut_language,
                                       const gchar *data,
                                       gssize data_len,
                                       GError **error);

### ide_snippet_parser_load_from_file ()

    gboolean
    ide_snippet_parser_load_from_file (IdeSnippetParser *parser,
                                       GFile *file,
                                       GError **error);

### ide_snippet_parser_get_snippets ()

    GList *
    ide_snippet_parser_get_snippets (IdeSnippetParser *parser);

Get the list of all the snippets loaded.

#### Parameters

parser | a IdeSnippetParser |

#### Returns

a GList of IdeSnippets items.

[transfer none][element-type Ide.Snippet]

Since: 3.32

## Types and Values

### IDE_TYPE_SNIPPET_PARSER

    #define IDE_TYPE_SNIPPET_PARSER (ide_snippet_parser_get_type())

### IdeSnippetParser

    typedef struct _IdeSnippetParser IdeSnippetParser;

## Signal Details

### The `“parsing-error”` signal

    void
    user_function (IdeSnippetParser *idesnippetparser,
                   GFile            *arg1,
                   guint             arg2,
                   gchar            *arg3,
                   gpointer          user_data)

Flags: Run Last