TODO comments and searching

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

TODO comments and searching

Mark Volkmann
If I put TODO comments in my code to mark things I still need to  
finish, is there an easy way to get a list of all of those? For that  
matter, how do you search all the code in a given category for a given  
string?

---
Mark Volkmann




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TODO comments and searching

NorbertHartl
On Tue, 2008-09-30 at 05:31 -0500, Mark Volkmann wrote:
> If I put TODO comments in my code to mark things I still need to  
> finish, is there an easy way to get a list of all of those? For that  
> matter, how do you search all the code in a given category for a given  
> string?
>
Searching for strings inside the code you can do by selecting
a string and press ALT-Shitf-e. For your purpose you might have
a look at Object>>flag: This way you mark your code this way

self flag: #todo

Then you can select todo and press Alt-n to get all senders
of this symbol.

Norbert

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TODO comments and searching

Mariano Abel Coca
Actually, I use:

self toDo: 'Not forget to refactor this!!! It's ugly!!! bla bla bla...'.

And then I look up for senders of toDo: with alt+n

The implementation is:

Object>>toDo: aString
    "Do nothing, just annotation"
    ^self

I think it's more descriptive than just a Symbol flag. But, it all depends of what you are used to.


Cheers,

--
Mariano.

On Tue, Sep 30, 2008 at 7:36 AM, Norbert Hartl <[hidden email]> wrote:
On Tue, 2008-09-30 at 05:31 -0500, Mark Volkmann wrote:
> If I put TODO comments in my code to mark things I still need to
> finish, is there an easy way to get a list of all of those? For that
> matter, how do you search all the code in a given category for a given
> string?
>
Searching for strings inside the code you can do by selecting
a string and press ALT-Shitf-e. For your purpose you might have
a look at Object>>flag: This way you mark your code this way

self flag: #todo

Then you can select todo and press Alt-n to get all senders
of this symbol.

Norbert

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TODO comments and searching

NorbertHartl
On Tue, 2008-09-30 at 17:52 -0300, Mariano Abel Coca wrote:

> Actually, I use:
>
> self toDo: 'Not forget to refactor this!!! It's ugly!!! bla bla
> bla...'.
>
> And then I look up for senders of toDo: with alt+n
>
> The implementation is:
>
> Object>>toDo: aString
>     "Do nothing, just annotation"
>     ^self
>
> I think it's more descriptive than just a Symbol flag. But, it all
> depends of what you are used to.

You don't need to pass the string to the method. The string is obviously
a comment. So

"Not forget to refactor this!!! It's ugly!!! bla bla bla..."
self flag: #todo

serves the same purpose. The difference is that flag: is already defined
in the image. Have a look at ProtoObject>>flag:
And you can easily separate your issues by severities than just having
todo.

Norbert

> Cheers,
>
> --
> Mariano.
>
> On Tue, Sep 30, 2008 at 7:36 AM, Norbert Hartl <[hidden email]>
> wrote:
>         On Tue, 2008-09-30 at 05:31 -0500, Mark Volkmann wrote:
>         > If I put TODO comments in my code to mark things I still
>         need to
>         > finish, is there an easy way to get a list of all of those?
>         For that
>         > matter, how do you search all the code in a given category
>         for a given
>         > string?
>         >
>        
>         Searching for strings inside the code you can do by selecting
>         a string and press ALT-Shitf-e. For your purpose you might
>         have
>         a look at Object>>flag: This way you mark your code this way
>        
>         self flag: #todo
>        
>         Then you can select todo and press Alt-n to get all senders
>         of this symbol.
>        
>         Norbert
>        
>        
>         _______________________________________________
>         Beginners mailing list
>         [hidden email]
>         http://lists.squeakfoundation.org/mailman/listinfo/beginners
>        
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TODO comments and searching

Mark Volkmann
In reply to this post by NorbertHartl
On Sep 30, 2008, at 5:36 AM, Norbert Hartl wrote:

> On Tue, 2008-09-30 at 05:31 -0500, Mark Volkmann wrote:
>> If I put TODO comments in my code to mark things I still need to
>> finish, is there an easy way to get a list of all of those? For that
>> matter, how do you search all the code in a given category for a  
>> given
>> string?
>>
> Searching for strings inside the code you can do by selecting
> a string and press ALT-Shitf-e. For your purpose you might have
> a look at Object>>flag: This way you mark your code this way
>
> self flag: #todo
>
> Then you can select todo and press Alt-n to get all senders
> of this symbol.


Select "todo" without the #?
Either way, pressing alt-n (I believe that's cmd-n on a Mac) doesn't  
do anything. I also tried pressing the "senders" button. That wants me  
to choose either "initialize", "flag:" or "new".

---
Mark Volkmann




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TODO comments and searching

Rob Rothwell
Mark,

I just tried this out (neat trick!); it worked for me in an OmniBrowser, regular old SystemBrowser, or a Workspace by highlighting [todo] (no brackets!) and pressing Alt-N (windows).  It listed just the senders of #todo...

Rob

On Tue, Sep 30, 2008 at 8:43 PM, Mark Volkmann <[hidden email]> wrote:
On Sep 30, 2008, at 5:36 AM, Norbert Hartl wrote:

On Tue, 2008-09-30 at 05:31 -0500, Mark Volkmann wrote:
If I put TODO comments in my code to mark things I still need to
finish, is there an easy way to get a list of all of those? For that
matter, how do you search all the code in a given category for a given
string?

Searching for strings inside the code you can do by selecting
a string and press ALT-Shitf-e. For your purpose you might have
a look at Object>>flag: This way you mark your code this way

self flag: #todo

Then you can select todo and press Alt-n to get all senders
of this symbol.


Select "todo" without the #?
Either way, pressing alt-n (I believe that's cmd-n on a Mac) doesn't do anything. I also tried pressing the "senders" button. That wants me to choose either "initialize", "flag:" or "new".

---
Mark Volkmann





_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners