Searching package for comment content

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

Searching package for comment content

sergio_101
Hi, all.

Does anyone have any ideas on this? 

I would like to be able to do a quick text search in all classes and methods in a package for text. 

for instance, when i see an opportunity for a refactor, i put a comment something like:

"TODO: break this method apart here"

and move on..

it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Searching package for comment content

Marcus Denker-4

> On 09 Mar 2015, at 15:44, sergio_101 <[hidden email]> wrote:
>
> Hi, all.
>
> Does anyone have any ideas on this?
>
> I would like to be able to do a quick text search in all classes and methods in a package for text.
>
> for instance, when i see an opportunity for a refactor, i put a comment something like:
>
> "TODO: break this method apart here"
>
> and move on..
>
> it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.
>

You can just add

self flag: #TODO. “do this complex thing later…"

search for senders of TODO -> list of everything.

Or add the description as the argument to #flag:

self flag ‘TODO: break this method apart here’.



        Marcus


Reply | Threaded
Open this post in threaded view
|

Re: Searching package for comment content

Andrei Chis
Or you can add

<todo: 'fix me'>
and then search for methods using the pragma todo:


Andrei

On Mon, Mar 9, 2015 at 3:51 PM, Marcus Denker <[hidden email]> wrote:

> On 09 Mar 2015, at 15:44, sergio_101 <[hidden email]> wrote:
>
> Hi, all.
>
> Does anyone have any ideas on this?
>
> I would like to be able to do a quick text search in all classes and methods in a package for text.
>
> for instance, when i see an opportunity for a refactor, i put a comment something like:
>
> "TODO: break this method apart here"
>
> and move on..
>
> it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.
>

You can just add

self flag: #TODO. “do this complex thing later…"

search for senders of TODO -> list of everything.

Or add the description as the argument to #flag:

self flag ‘TODO: break this method apart here’.



        Marcus



Reply | Threaded
Open this post in threaded view
|

Re: Searching package for comment content

Thierry Goubier
In reply to this post by sergio_101
Hi Sergio,

use the finder, write TODO in the search area, select Source instead of Selectors, and you're set.

Thierry

2015-03-09 15:44 GMT+01:00 sergio_101 <[hidden email]>:
Hi, all.

Does anyone have any ideas on this? 

I would like to be able to do a quick text search in all classes and methods in a package for text. 

for instance, when i see an opportunity for a refactor, i put a comment something like:

"TODO: break this method apart here"

and move on..

it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Searching package for comment content

EstebanLM
In reply to this post by Andrei Chis
I always do: 

self flag: #todo. “An explanation here”

probably not the best… but works. 

Esteban

On 09 Mar 2015, at 15:55, Andrei Chis <[hidden email]> wrote:

Or you can add

<todo: 'fix me'>
and then search for methods using the pragma todo:


Andrei

On Mon, Mar 9, 2015 at 3:51 PM, Marcus Denker <[hidden email]> wrote:

> On 09 Mar 2015, at 15:44, sergio_101 <[hidden email]> wrote:
>
> Hi, all.
>
> Does anyone have any ideas on this?
>
> I would like to be able to do a quick text search in all classes and methods in a package for text.
>
> for instance, when i see an opportunity for a refactor, i put a comment something like:
>
> "TODO: break this method apart here"
>
> and move on..
>
> it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.
>

You can just add

self flag: #TODO. “do this complex thing later…"

search for senders of TODO -> list of everything.

Or add the description as the argument to #flag:

self flag ‘TODO: break this method apart here’.



        Marcus




Reply | Threaded
Open this post in threaded view
|

Re: Searching package for comment content

sergio_101
thanks all! this is just what i was looking for..

On Mon, Mar 9, 2015 at 11:01 AM Esteban Lorenzano <[hidden email]> wrote:
I always do: 

self flag: #todo. “An explanation here”

probably not the best… but works. 

Esteban

On 09 Mar 2015, at 15:55, Andrei Chis <[hidden email]> wrote:

Or you can add

<todo: 'fix me'>
and then search for methods using the pragma todo:


Andrei

On Mon, Mar 9, 2015 at 3:51 PM, Marcus Denker <[hidden email]> wrote:

> On 09 Mar 2015, at 15:44, sergio_101 <[hidden email]> wrote:
>
> Hi, all.
>
> Does anyone have any ideas on this?
>
> I would like to be able to do a quick text search in all classes and methods in a package for text.
>
> for instance, when i see an opportunity for a refactor, i put a comment something like:
>
> "TODO: break this method apart here"
>
> and move on..
>
> it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.
>

You can just add

self flag: #TODO. “do this complex thing later…"

search for senders of TODO -> list of everything.

Or add the description as the argument to #flag:

self flag ‘TODO: break this method apart here’.



        Marcus




Reply | Threaded
Open this post in threaded view
|

Re: Searching package for comment content

stepharo
In reply to this post by Marcus Denker-4
you can even use a nautilus plugin that shows you the list of all the
flag: method in a package.


Le 9/3/15 15:51, Marcus Denker a écrit :

>> On 09 Mar 2015, at 15:44, sergio_101 <[hidden email]> wrote:
>>
>> Hi, all.
>>
>> Does anyone have any ideas on this?
>>
>> I would like to be able to do a quick text search in all classes and methods in a package for text.
>>
>> for instance, when i see an opportunity for a refactor, i put a comment something like:
>>
>> "TODO: break this method apart here"
>>
>> and move on..
>>
>> it would be great if i could quickly find all methods in my package that contain the text "TODO" in a comment somewhere.
>>
> You can just add
>
> self flag: #TODO. “do this complex thing later…"
>
> search for senders of TODO -> list of everything.
>
> Or add the description as the argument to #flag:
>
> self flag ‘TODO: break this method apart here’.
>
>
>
> Marcus
>
>
>