[wingide-users] Enhancement: List/Goto caller (Goto sourcereverse)
Tom Stambaugh
tms at zeetix.com
Wed Jun 4 08:08:55 MDT 2008
Good luck, folks.
Something similar can be done now, using the "search in files" page. Search
for "my_function". Sometimes it helps to turn on the "whole word" option.
The way that Smalltalk accomplishes this task is that Smalltalk creates an
instance of "CompiledMethod" for each method. That class includes a list of
symbols used by that method, including any methods invoked. The "find
callers" method in Smalltalk is thus able to traverse all instances of
CompiledMethod and answer those that match the desired call.
I do not believe the Python language metastructure, as is, supports anything
this sophisticated. I suppose it might be possible to extend the environment
by writing a tool that examines the compiled PYC files, but even that would
depend on whether the symbol is actually present in the compiled form of a
method -- I don't know the answer to that.
The principle disadvantage of a simple search (which can be done now) is the
false-positives.
The alternative, which I have been developing for some years now, is to
create an environment above Python that provides the metastructure necessary
to support such behavior. Such an approach works well for code that exists
within that environment (I use it every day), but does not handle arbitrary
Python source files.
Thanks,
Tom S
----- Original Message -----
From: "Vania Smrkovski" <vania at pandorasdream.com>
To: "Wolfram Kriesing" <wolfram.kriesing at gmail.com>
Cc: <wingide-users at wingware.com>
Sent: Wednesday, June 04, 2008 9:55 AM
Subject: Re: [wingide-users] Enhancement: List/Goto caller (Goto
sourcereverse)
> +1
>
> On Wed, Jun 4, 2008 at 9:35 AM, Wolfram Kriesing
> <wolfram.kriesing at gmail.com>
> wrote:
>
>> I guess this is old and had been asked a lot of times ...
>> Since there is a goto-source-definition already, I guess there is some
>> kind
>> of
>> map which can be evaluated backwards to show all usages of a function.
>>
>>
>> I just thought this would be great
>> 1) mouse over "def my_function()"
>> 2) right mous click
>> 3) select "usages in ..." which opens a list of modules+functions
>> where "my_function" is used
>> 4) clicking one jumps there
>>
>> --
>> cu
>>
>> Wolfram
>> _________________________________________________
>> Wing IDE users list
>> http://wingware.com/lists/wingide
>>
>
>
>
> --
> ____________________________________
> http://picasaweb.google.com/vania.smirk
>
> Life is like a sewer. What you get out of it depends on what you put into
> it. --Tom Lehrer
>
--------------------------------------------------------------------------------
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
More information about the wingide-users
mailing list