summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-09-06 08:40:28 +0300
committerAvi Levin <avi.levin@samsung.com>2015-09-07 09:21:58 +0300
commit5e341332ce7c905e248d14648809896747aed3d0 (patch)
tree53fe82fcb9b4ee1895d26e49e2265862ee880202
parentda37fe2944b8e27438a40fd0be3bf6c9b83e139b (diff)
Autocomplete Eo classes by Eolian
-rw-r--r--src/bin/cli.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/bin/cli.c b/src/bin/cli.c
index fb2cea0..65197ae 100644
--- a/src/bin/cli.c
+++ b/src/bin/cli.c
@@ -489,7 +489,6 @@ _list_resp_handler(const void *buf, int size, void **buf_ret, int *size_ret)
489 { 489 {
490 eina_hash_add(objects_hash, &info->ptr, 490 eina_hash_add(objects_hash, &info->ptr,
491 info); 491 info);
492 ac_insert(&ac_classes_root, info->kl_name);
493 } 492 }
494 493
495 /* Fill children lists */ 494 /* Fill children lists */
@@ -591,6 +590,23 @@ main()
591 eolian_init(); 590 eolian_init();
592 eolian_directory_scan(EOLIAN_EO_DIR); 591 eolian_directory_scan(EOLIAN_EO_DIR);
593 592
593 /* Adding Eo classes to autocomplete data structure */
594 eolian_all_eo_files_parse();
595
596 Eina_Iterator *all_classes_list = eolian_all_classes_get();
597 Eolian_Class *ekl;
598 EINA_ITERATOR_FOREACH(all_classes_list, ekl)
599 {
600 const char *class_name = eolian_class_full_name_get(ekl);
601 char temp[50];
602 strcpy(temp, class_name);
603 char* dot = strchr(temp, '.');
604 if(dot)
605 *dot = '_';
606 ac_insert(&ac_classes_root, temp);
607 }
608 eina_iterator_free(all_classes_list);
609
594 buffer = malloc(MAX_BUF); 610 buffer = malloc(MAX_BUF);
595 pthread_create(&thread, NULL, _thread_start, NULL); 611 pthread_create(&thread, NULL, _thread_start, NULL);
596 612