Top | ![]() |
![]() |
![]() |
![]() |
The IdeCodeIndexer interface is used to index source code in the project. Plugins that want to provide global search features for source code should implement this interface and specify which languages they support in their .plugin definition, using "X-Code-Indexer-Languages". For example. to index Python source code, you might use:
X-Code-Indexer-Languages=python,python3
void ide_code_indexer_index_file_async (IdeCodeIndexer *self
,GFile *file
,const gchar * const *build_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
This function will take index source file and create an array of symbols in
file
. callback
is called upon completion and must call
ide_code_indexer_index_file_finish()
to complete the operation.
self |
An IdeCodeIndexer instance. |
|
file |
Source file to index. |
|
build_flags |
array of build flags to parse |
[nullable][array zero-terminated=1] |
cancellable |
a GCancellable. |
[nullable] |
callback |
a GAsyncReadyCallback |
|
user_data |
closure data for |
Since: 3.28
IdeCodeIndexEntries * ide_code_indexer_index_file_finish (IdeCodeIndexer *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to ide_code_indexer_index_file_async()
.
Since: 3.28
void ide_code_indexer_generate_key_async (IdeCodeIndexer *self
,IdeSourceLocation *location
,const gchar * const *build_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
This function will get key of reference located at IdeSoureLocation.
In 3.30 this function gained the build_flags
parameter.
self |
An IdeCodeIndexer instance. |
|
location |
Source location of refernece. |
[not nullable] |
build_flags |
array of build flags to parse |
[nullable][array zero-terminated=1] |
cancellable |
a GCancellable. |
[nullable] |
callback |
A callback to execute upon indexing. |
|
user_data |
User data to pass to |
Since: 3.26
gchar * ide_code_indexer_generate_key_finish (IdeCodeIndexer *self
,GAsyncResult *result
,GError **error
);
Returns key for declaration of reference at a location.
Since: 3.26
struct IdeCodeIndexerInterface { GTypeInterface parent_iface; void (*generate_key_async) (IdeCodeIndexer *self, IdeSourceLocation *location, const gchar * const *build_flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gchar *(*generate_key_finish) (IdeCodeIndexer *self, GAsyncResult *result, GError **error); void (*index_file_async) (IdeCodeIndexer *self, GFile *file, const gchar * const *build_flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); IdeCodeIndexEntries *(*index_file_finish) (IdeCodeIndexer *self, GAsyncResult *result, GError **error); };