TODO helper

Posted by toddw on 2007-09-07 15:01 | Staff Pick!
1.4.4
Todd Whiteman
Mon, 2013-03-11 13:23
  • : 4.4.0 - 8.*
  • : 4.4.0 - 8.*

Display TODO items found in the current file / opened files / active project.

Features:

  • regex search markers
  • case sensitivity
  • search in current file, all opened files or the active project
  • double-click to jump to file
  • next, previous buttons to jump between markers
  • statusbar icon shown when todo items found

The extension search results will be updated on each of these Komodo events:

  • File open
  • File close
  • File save
  • View changed
  • Project changed

Screenshot:
Todo helper screenshot

Source code:
The complete source code for the todo extension is available through the OpenKomodo svn repository:
http://svn.openkomodo.com/openkomodo/browse/addons/todo

Contributors:

Special thanks to Renato Rodrigues (RRaver) for providing the following additions to the todo extension:
* extension icon (as seen in the extension manager)
* statusbar notifier
* localization support

pd | Fri, 2008-12-05 02:58

It seems that the plug in also scans the print lines in Python scripts, which is probably not desirable. Perhaps an options could be added to only
scan for to do tokens in comments?

toddw
ActiveState Staff
Fri, 2008-12-05 11:57

Yes, you are correct about the TODO extension scanning for all occurrences of the search text, which is not always what you want. For the most part this can be tweaked using the find expression itself, as it uses a regular expression syntax.

The context specific searching is a good idea, one on which we have a Komodo enhancement request for:
http://bugs.activestate.com/show_bug.cgi?id=80034

Once that is completed for Komodo's find system, it will also filter down to the TODO extension (which is implemented on top of the Komodo find system).

Cheers,
Todd

pd | Mon, 2008-12-08 02:01

Thank you for the reply and explanation. Hope this feature will be implemented in the next 5.0.x updates then.

cendrizzi | Fri, 2009-06-12 13:02

Maybe I'll try to figure out how to do an extension, but this probably would be something easy to implement for those that do know, and would be very helpful.

The little status bar thing is nice, but I never notice it. I think it would be more helpful to show a number on the tab name with the number of todo's on the page. For example "TODO (3)". Maybe this could just be a preference.

veryvito | Fri, 2009-08-07 13:09

For the past few days, I've been experiencing miserable slowdowns with Komodo (to the point that it had become unusable with larger projects), but after much trial and error, I've discovered that removing the TODO plugin seems to relieve the pain.

Any idea what I should check? Love the plugin, and not sure why it's just started acting up (or why I've just noticed it).

toddw
ActiveState Staff
Fri, 2009-08-07 13:49

The only thing I can think of is that the TODO extension is set to find all markers in the current project, and this project has a large number of files... resulting in the TODO extension searching a large number of files.

Note that the TODO list is refreshed upon every save action you make.

veryvito | Mon, 2009-08-10 21:26

Thanks, Todd!

Sometimes I just need a good kick. Somehow I'd forgotten that one could choose not to check an entire project (in fact, I'd forgotten all about that convenient drop-down right there on the panel, and kept looking for hidden settings elsewhere). Sigh.

I've been working on small projects lately, and after returning to a gigantic framework-based project, the overhead was suddenly painful (especially when switching views between code and XML data files).

All better now, though. Thanks!

Thx
eemie | Thu, 2010-03-18 11:39

wow, thank you toddw for your quick response :)

riegersn | Thu, 2010-03-25 21:13

I find it annoying that the returned todo text includes the actual tabs/spaces in front of the comment & the todo pattern. Just a personal preference but i feel that this:

458  uncomment modification to append bx-ourl path to our stream url

would look (and be easier to read) then this:

458            #todo - uncomment modification to append bx-ourl path to our stream url

--

especially when you have comments at multiple indentation points then your todo list is all over the place. Again, I'm still using it, don't mean to complain :) just preference.

toddw
ActiveState Staff
Fri, 2010-03-26 10:45

I've added this as an enhancement to the Komodo find system (which is what the TODO helper uses under the hood):
http://bugs.activestate.com/show_bug.cgi?id=86487

Thanks for the suggestion. Cheers,
Todd

groupr | Thu, 2011-09-22 06:40

I like the idea of removing the indentation and comment character(s) from in front of the TODO pattern, but think it would help to be able to still see the pattern itself. This means I can use:
# FIX this bit of code causes a crash when the moon is in sagitarious.
# TODO add more features here.
# RESUME this is where I was when I was dragged off onto other work.
and see the context of the comment in the TODO section.

stjohncj | Thu, 2010-05-13 11:19

I love this plugin and find it very useful, but... Most of my development is with Rails projects, and any "todo" lines other programmers' code put in gems, plugins, or javascript libraries that I include in my Rails project are also included in my TODO list. I would like the ability to ignore certain directories and files, such as the "vendor" folder in Rails.

toddw
ActiveState Staff
Thu, 2010-05-13 11:34

Thanks for the suggestion. There is the following request to be able to filter find results:
http://bugs.activestate.com/show_bug.cgi?id=86325
which would also apply for the TODO results.

Cheers,
Todd

bwalker111 | Fri, 2013-11-15 07:30

Hope this add-on is still under development.

I'm using Drupal at the moment and when I choose the Active Project option I get the todos in all the contributed modules. Just the ability to target a specific folder/folders would make this an invaluable tool for me. Thanks.

joho | Fri, 2011-01-28 06:01

TODO/TASKS/etc should be a core feature, IMHO. I find it strange that it isn't.

-joho

dlaflam | Tue, 2011-08-02 10:05

Hi Todd,
Does the TODO helper work for you in Komodo 7 alpha 3, as it doesn't seem to work for me. In the bottom pane I don't have the TODO tab like I've seen before.

toddw
ActiveState Staff
Tue, 2011-08-02 13:43

Yes, the Todo Helper is working correctly for me in Komodo 7.0.0a3 - it likely won't work for 7.0.0a2 - so double-check you've got the a3 version and not a2.

Also, check Komodo's Help > Troubleshooting > View log file menu to see if there are any errors pertaining to the todo helper.

Cheers,
Todd

dlaflam | Tue, 2011-08-02 16:33

Here's the version I currently have installed - Komodo IDE, version 7.0.0-alpha3, build 64548, platform macosx-x86. Built on Tue Jun 21 21:35:55 2011.

Below is the log file info:

[2011-08-02 09:07:47,486] [ERROR] ko.extensions.todo: 
-- EXCEPTION START --
+ message (string) '_gFindResultsTab_managers is not defined'
+ fileName (string) 'chrome://todo/content/todo.js'
+ lineNumber (number) 545
+ stack (string) '(3791)@chrome://todo/content/todo.js:545
'
+ name (string) 'ReferenceError'
*
(3791)@chrome://todo/content/todo.js:545
-- EXCEPTION END --

toddw
ActiveState Staff
Wed, 2011-08-03 15:01

That is strange - Komodo 7 it's not supposed to be loading the "todo.js" file - it should be loading "todo-ko7.js" instead.

You might want to completely uninstall the add-on and then re-install it.

Cheers,
Todd

dlaflam | Wed, 2011-08-03 16:35

Un-installing and re-installing it did the trick. All is good. sorry about that.

tone | Wed, 2011-09-21 06:54

I had the same experience. After uninstalling and installing again, TODO worked.

Below is the error from pystderr.log when TODO failed before uninstalling:

[2011-09-21 08:47:19,043] [ERROR] ko.extensions.todo:
-- EXCEPTION START --
+ message (string) 'panel is null'
+ fileName (string) 'chrome://komodo/content/find/findResultsTab.js'
+ lineNumber (number) 186
+ stack (string) '_FindResultsTab_Create(720)@chrome://komodo/content/find/findResultsTab.js:186
(720)@chrome://todo/c'...278 chars
+ name (string) 'TypeError'
*
_FindResultsTab_Create(720)@chrome://komodo/content/find/findResultsTab.js:186
(720)@chrome://todo/content/todo.js:319
([object Proxy],[object XULElement],"XXX|TODO")@chrome://todo/content/todo.js:354
()@chrome://todo/content/todo.js:308
(-36)@chrome://todo/content/todo.js:548
-- EXCEPTION END --

groupr | Fri, 2011-09-16 12:26

Help urgently needed.

I installed the TODO helper which worked fine. But now when I try to remotely debug an Apache CGI perl script (on the local machine) I get:

Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. The resize program didn't work. at C:/Perl/lib/Term/ReadKey.pm line 362.

I uninstalled the TODO helper, but the error persisted.
I reinstalled Komodo IDE 6.1.2, but the error persisted.
I deleted the contents of C:\Users\\AppData\Local\ActiveState\KomodoIDE and reinstalled Komodo IDE 6.1.2, but the error persisted.

How do I remove all trace of the TODO helper so that I can continue to debug Apache CGI perl scripts?

toddw
ActiveState Staff
Fri, 2011-09-16 14:27

I think the todo helper is a red herring. Nothing in the todo helper could/should affect debugging. My guess is that it has something to do with the environment or environment variables...

You might try enabling the "Debug in separate console" checkbox (available in the Debugging Options when you start local debugging).

Cheers,
Todd

groupr | Sat, 2011-09-17 02:08

I rechecked everything. When debugging Apache scripts you use remote debugging even if debugging a script running on the local host. Apache is configured with two statements like this:
SetEnv PERL5LIB "C:\Program Files\ActiveState Komodo IDE 6\lib\support\dbgp\perllib"
SetEnv PERLDB_OPTS "RemotePort=localhost:55553"

On checking, my Apache refered to ActiveState Komodo IDE 5. It had not been changed since I upgraded to 6. At the same time as installing the TODO helper, I uninstalled the redundant Komodo 5, which is what caused the problem.

Appologies for slighting the TODO helper, I'll now reinstall it.

tschertel | Mon, 2013-06-03 12:21

I really like this add-on.
But I think the todo/fix/xxx list should not show spaces in front of actual text in "content" column.
Thanks.

tarulia | Fri, 2013-06-28 08:15

So, 8.5b1 was released with the brilliant Abyss skin. I'm still using TODO helper, but TODO Helper is like a floodlight down at the bottom :)

Seems like it's not using "native" Elements :|