[Geany] Detecting symbols

Filip Gruszczyński gruszczy at xxxxx
Mon May 18 17:54:24 UTC 2009


> This was already requested a couple of times. I'm not sure whether we
> want this. It would probably require quite some effort to parse import
> statements from an opened source file, find the corresponding Python
> files, parse them, merge the parsed information into tagmanager(the
> code which provides the main part of symbol completion data).
> Additionally, added symbols should maybe removed again when the source
> file is closed which also might not be that trivial.

I am not suggesting anything as complicated, as you say. I understand,
that in situation like
thos:

import sth

you want to find module sth.py and detect all symbols inside. I think
enough is to add sth to namespace. It would became useful in following
situation:

from sth import LongNameClass, AnotherLongNameClass

and simply add those two. You need to only parse imports and detect
names, that were added to the local namespace.

> And after all as always, the code still has to be written.

Yep, as always ;-)

> Another, more manual way could be to create a global tags file yourself
> from these Python libs you usually use.
> General information about globals tags and how to use them can be found
> on http://geany.org/manual/#global-tags.
> For creating your custom Python tags files, you could use
> http://geany.svn.sourceforge.net/viewvc/geany/trunk/scripts/create_py_tags.py?revision=3465&view=markup
> as an inspiration on how to create one.

I'll seriously consider this ;-)

-- 
Filip Gruszczyński



More information about the Users mailing list