On Fri, 16 Apr 2010 20:39:59 +0200, Colomban wrote: >jordan a écrit : >>> As Enzo said, there is the scope to determine if a particular line >>> is part of a function or not, but its is not supported by every tag >>> generator used by Geany. What I personally chose was to walk the tag >>> list and find the tag closest to the current line. Tweaking this >>> way a bit gives quite good results. >>> >>> And for the function definition, see the tag list, there is >>> everything you probably want (or almost). One missing thing is the >>> argument list – I personally chose to fix this with a regular >>> expression, but there might be better solutions; for example if >>> hard-coded things are acceptable, a custom argument parser is a >>> somewhat easy task. >>> >>> >> How do I access the scope, or this tag list you speak of, I noticed >> nothing like that in plug-in api documentation? >See the tm_file field of GeanyDocument. I don't know exactly for the >scope, but the tag list is doc->tm_file->tags_array.
An alternative way is using symbols_get_current_function() but this is currently not part of the plugin API. But we could add it if requested. Regards, Enrico -- Get my GPG key from http://www.uvena.de/pub.asc
pgppAtkSMIJ6H.pgp
Description: PGP signature
_______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel