Find Usages - not finding all usages?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Find Usages - not finding all usages?

talios@gmail.com
Just noticed the find usages dialog isn't showing ALL usages of a method:

  http://stumpy.talios.com/~amrk/dolphin-find-usages.png

In here, the method #useOutlookProfileSettings: is called where its
highlighted, but also a bit lower down, why isn't it mentioned in the
list?  Is it because there both in the same #initialize method?

Mark


Reply | Threaded
Open this post in threaded view
|

Re: Find Usages - not finding all usages?

Christopher J. Demers
"Mark Derricutt" <[hidden email]> wrote in message
news:cpaggb$[hidden email]...
> Just noticed the find usages dialog isn't showing ALL usages of a method:
>
>  http://stumpy.talios.com/~amrk/dolphin-find-usages.png
>
> In here, the method #useOutlookProfileSettings: is called where its
> highlighted, but also a bit lower down, why isn't it mentioned in the
> list?  Is it because there both in the same #initialize method?

Yes, each method will only be listed once even if it uses the message more
than once.  Additionally only the first occurrence of the message pattern
will be highlighted.  If my memory serves me correctly it will even
highlight message patterns in comments if they come before the pattern in
the code.  I think it can even highlight a portion of a bigger different
method pattern if part of it is the same.  I think it is just a text search
as far as the highlighting in the method is concerned.

I wonder if the highlighting might be improved in D6 now that Scintilla will
be used.  I don't think I would want multiple references in the same method
to be listed multiple times.  However it might be handy to have the number
of references in a column, and have all of them highlighted.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Find Usages - not finding all usages?

Stefan Schmiedl
In reply to this post by talios@gmail.com
On Fri, 10 Dec 2004 10:37:39 +1300,
Mark Derricutt <[hidden email]> wrote:
> Just noticed the find usages dialog isn't showing ALL usages of a method:
>
>   http://stumpy.talios.com/~amrk/dolphin-find-usages.png
>
> In here, the method #useOutlookProfileSettings: is called where its
> highlighted, but also a bit lower down, why isn't it mentioned in the
> list?  Is it because there both in the same #initialize method?
>

That's the usual behaviour, yes.
The main reason for it is that there can only be one highlighted
selection in text editors, I'd guess.

s.


Reply | Threaded
Open this post in threaded view
|

Re: Find Usages - not finding all usages?

talios@gmail.com
In reply to this post by Christopher J. Demers
Christopher J. Demers wrote:

>Yes, each method will only be listed once even if it uses the message more
>than once.  Additionally only the first occurrence of the message pattern
>  
>
So it's not really "find -all- usages of this message" then is it?  It's
"find all methods that use this message".  Personally, the first is more
what I was expecting.

>I wonder if the highlighting might be improved in D6 now that Scintilla will
>be used.  I don't think I would want multiple references in the same method
>to be listed multiple times.
>
I think I would, maybe a collapsable tree then, if for some reason the
method is quite long ( a badness in its own right ), it would be nice to
see each reference, and easily jump to each of them.  Afterall, find
"all references" is supposed to be "all references" right?


Reply | Threaded
Open this post in threaded view
|

Re: Find Usages - not finding all usages?

Ian Bartholomew-19
Mark,

> I think I would, maybe a collapsable tree then, if for some reason the
> method is quite long ( a badness in its own right ), it would be nice to
> see each reference, and easily jump to each of them.  Afterall, find "all
> references" is supposed to be "all references" right?

If you hit F3 in the current implementation it cycles through all
occurrences of the target string within the method (and beeps if there is
only one).  I think that gets around the "easily jump to each of them" bit
in your comment.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.