After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 507072 - Symbol db does not handle ianjuta_symbol_manager_search() correctly
Symbol db does not handle ianjuta_symbol_manager_search() correctly
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: symbol-db
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: Massimo Cora'
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-03 17:40 UTC by Johannes Schmid
Modified: 2008-07-02 11:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johannes Schmid 2008-01-03 17:40:06 UTC
* search not case-sensitive
* partial = FALSE should only give exact matches and no partial ones
Comment 1 Massimo Cora' 2008-01-07 19:45:16 UTC
I fixed on my local copy the case-sensitive issue. It was a PRAGMA to give to the database.

About the ianjuta_symbol_manager_search() interface:
I saw that IAnjutaSymbolField isn't used anywhere in Anjuta.
IMHO IAnjutaSymbol isn't a good interface for symbol-db. It supposes to have all the fields available to retrieve the scope (), the name (), the inheritance () etc. While this is right for a tm_tagmanager structure, this isn't for symbol-db. Infact every info is stored in database but in different tables and so for every ISymbol we would need a big join with many tables, which may slow down the entire process of querying.
What I would like to see in the interface is very similar to what happens now in SymbolDBEngineIteratorNode and SymbolDBEngineIterator, i.e. to give always some base functions like symbol_db_engine_iterator_node_get_symbol_name (), symbol_db_engine_iterator_node_get_symbol_file_pos () etc which are directly retrieverable from 'symbol' table, and extra functions in a way like symbol_db_engine_iterator_node_get_symbol_extra_string ().
I would like to change IAnjutaSymbolField to something like SymExtraInfo on symbol-engine.h.
Search function can then be similar to:

IAnjutaIterable* search (IAnjutaSymbolType match_types, IAnjutaSymbolField info_fields, const gchar *match_name, gboolean partial_name_match, gboolean global_search);

where on 'info_fields' parameter you insert the extra info you want to know [e.g. the number of joins to do on database].
If it's ok for you I'll procede with new interface and then do the appropriate changes on the plugins that use this plugin.

regards,
Massimo
Comment 2 Massimo Cora' 2008-01-20 22:15:09 UTC
Should be fixed with the patch given at comment #80 on bug #358479.
Let me know, in case I'll close this one.

regards,
Massimo