Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: larienna on February 13, 2024, 12:41:32 pm

Title: My todo list is always empty
Post by: larienna on February 13, 2024, 12:41:32 pm
I reinstalled my computer lately, and code::blocks does not seems to display TODO comments anymore in it`s list. I tried putting the list in a side column or in the message dialogs. I tried using the TODO comment generator and not any of those solutions adds any TODO to the list. I would need to search them manually.

Does anybody has a solution?

Is it a problem with the plugin?

This is my current software info:
Code
Name                   : Code::Blocks
Version                : svn-r13046
SDK Version            : 2.23.0
Scintilla Version      : 3.7.5
Author                 : The Code::Blocks Team
E-mail                 : info@codeblocks.org
Website                : https://www.codeblocks.org
OS                     : Linux 6.1.0-16-amd64 x86_64
Scaling factor         : 1.000000
Detected scaling factor: 1.000000
Display PPI            : 96x96
Display count          : 1
Display 0              : XY=[0,0]; Size=[1366,768]; Primary

wxWidgets Library (wxGTK port)
Version 3.2.2 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.36.

This is my plugins list:
Code
Autosave                      : 0.1
Code completion               : 1.0
Compiler                      : 0.99
Debugger                      : 0.3
Files extension handler       : 1.0
Open files list               : 1.0
Scripted wizard               : 0.9
Source code formatter (AStyle): 3.1.0
Todo List                     : 0.3
Title: Re: My todo list is always empty
Post by: ollydbg on February 14, 2024, 03:52:49 am
Hi, what is the format of your "TODO" style comments in your source code?

I mean it could be:

Code

// todo: 1

// TODO: 2

// @TODO: 3


You can specify which kinds of todos you want the plugin to parse in your source code. This is an option in the TODO plugin.
Title: Re: My todo list is always empty
Post by: larienna on February 18, 2024, 06:03:01 am
I only have 2 option check box in the settings->environment panel: Change sync and add todo pannel to bottom pannel.

My todo messages are very similar to yours, here are some samples:

Code
//TODO: Define constants for program exit codes.
//TODO: Maybe code obsolete if search files
//TODO Problem: How conver single int to a char.
//TODO GLYPH to load in option
//TODO Depending on the tools, might not need everything like the examples.


Title: Re: My todo list is always empty
Post by: blauzahn on February 18, 2024, 07:58:41 am
When I add a TODO either via standard settings in menu "Add Todo item" or by hand like

Code
// TODO (jon doe#1#): improve efficiency

it shows up in my TODO panel.

Code
Version                : svn-r13456
OS                     : Linux 6.7.4-arch1-1 x86_64
wxWidgets Library (wxGTK port)
Version 3.3.0 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.41.

same on Ubuntu
Title: Re: My todo list is always empty
Post by: ollydbg on February 18, 2024, 08:46:14 am
You need to check whether the "Types" include the "TODO" option, see the screen shot in attachment.

Title: Re: My todo list is always empty
Post by: Miguel Gimenez on February 18, 2024, 09:57:58 am
The OP has no spaces between the comment and the TODO and they lack user or priority information, so the regex may skip them.
Title: Re: My todo list is always empty
Post by: ollydbg on February 18, 2024, 10:12:26 am
The OP has no spaces between the comment and the TODO and they lack user or priority information, so the regex may skip them.

In my test(see the screen shot in my previous comment), I do not have any spaces between "//" and the "TODO".
Title: Re: My todo list is always empty
Post by: larienna on February 20, 2024, 12:46:57 pm
Thanks "ollydbg"

I tried the "type" button. Everything was checked, but the list was empty as you can see in my attached screenshot.

Then when I clicked OK, it refreshed the list and now it shows all my todo.

So it was a refreshment issue.
Title: Re: My todo list is always empty
Post by: ollydbg on February 20, 2024, 12:54:54 pm
I'm grad that you find the solution.

I think the actual issue is that what time you want to refresh the list. (when you refresh the list, you mean you let the todo plugin to scan your source files in the project to detect those marked comment items).