Author Topic: ThreadSearch - sort in the list control  (Read 17893 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
ThreadSearch - sort in the list control
« on: February 16, 2010, 10:12:42 pm »
Hello,

I have a little feature request for this great plugin:
Sort the list control, when the user clicks on the header (the 'buttons' for Directory, File, Line, Text).
Is that possible? I've read part of the source and I think it will require knowledge of the internals.
Can someone do it or give me some hint how to do it efficiently?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: ThreadSearch - sort in the list control
« Reply #1 on: February 17, 2010, 06:42:14 am »
Can someone do it or give me some hint how to do it efficiently?
Have a look at e.g. the symbols tables plugin where the entries are sortable. Basically you'll need to provide (fast!) search sort methods. Doing it the same way for ThreadSearch shouldn't be a problem.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ThreadSearch - sort in the list control
« Reply #2 on: February 17, 2010, 08:10:26 am »
I've looked at the TODO plugin, but the thing is that in the ThreadSearch, there is no user data in the items, so I need to introduce one.

p.s. how do one test changes in a contrib plugin?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: ThreadSearch - sort in the list control
« Reply #3 on: February 17, 2010, 09:22:49 am »
I've looked at the TODO plugin, but the thing is that in the ThreadSearch, there is no user data in the items, so I need to introduce one.
True.

p.s. how do one test changes in a contrib plugin?
Not sure what you mean... provide a patch and... erm... test?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ThreadSearch - sort in the list control
« Reply #4 on: February 17, 2010, 12:24:22 pm »
True.
Any suggestions how to do it best?

Not sure what you mean... provide a patch and... erm... test?!
To test C::B one needs to open the project file and hit run.
What do I need to do to test changes in a contrib plugin?
I must open the Contrib-unix.workspace, choose the plugin I want to modify and hit run?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: ThreadSearch - sort in the list control
« Reply #5 on: February 17, 2010, 01:28:44 pm »
Any suggestions how to do it best?
Look at te symbol tables plugin. this is done quite efficient.

What do I need to do to test changes in a contrib plugin?
I've made myself a new workspace which is basically C::B project + contrib workspace. Then you can just run the C::B project which will also run the contrib plugin.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: ThreadSearch - sort in the list control
« Reply #6 on: February 17, 2010, 10:32:38 pm »
Any suggestions how to do it best?
Look at te symbol tables plugin. this is done quite efficient.

What do I need to do to test changes in a contrib plugin?
I've made myself a new workspace which is basically C::B project + contrib workspace. Then you can just run the C::B project which will also run the contrib plugin.

If the host program and the projects execution working directory are setup correctly, this will also work without opening the C::B project.
But in fact some of the projetcs have to be fixed, to work directly and with the debugger.

I will check the projects and do the fixes for linux and windows the next days.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ThreadSearch - sort in the list control
« Reply #7 on: February 18, 2010, 12:30:55 am »
Jens: Does debugging wxSmith work for you?

For me it doesn't - cb r6112 debugger branch amd64
Code
LD_LIBRARY_PATH=.:/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/devel:/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/base/tinyxml:/usr/lib64:/usr/lib64:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args ./codeblocks
Working dir : /home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/plugins/contrib/wxSmith/
warning: Can not parse XML syscalls information; XML support was disabled at compile time.
./codeblocks: There is no such file or directory.

If it does work, might be a problem that I have introduced in the branch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: ThreadSearch - sort in the list control
« Reply #8 on: February 18, 2010, 10:47:07 am »
Jens: Does debugging wxSmith work for you?

For me it doesn't - cb r6112 debugger branch amd64
Code
LD_LIBRARY_PATH=.:/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/devel:/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/base/tinyxml:/usr/lib64:/usr/lib64:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args ./codeblocks
Working dir : /home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/plugins/contrib/wxSmith/
warning: Can not parse XML syscalls information; XML support was disabled at compile time.
./codeblocks: There is no such file or directory.

If it does work, might be a problem that I have introduced in the branch.

Not out of the box.

If you change the execution working dir (in projects properties) to "." and the host-application in "Project -> Set program's arguments" for "wxSmith" to "../../../devel/codeblocks" (on linux), it should work with debugger and if you start with the run-button.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ThreadSearch - sort in the list control
« Reply #9 on: March 07, 2010, 01:46:57 pm »
I've submitted the patch for this feature: 002944

Comments are welcome :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: ThreadSearch - sort in the list control
« Reply #10 on: March 07, 2010, 04:54:17 pm »
I've submitted the patch for this feature: 002944

Comments are welcome :)
I assigned it to me and will look into it (most likely no commen ts before next weekend, because I'm without internet from monday to friday).

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: ThreadSearch - sort in the list control
« Reply #11 on: March 07, 2010, 11:36:10 pm »
Hello!

I didn't try the patch but I have one question...

It is possible to keep the results of successive searches in the log window (tree or list ctrl).
In my opinion, the patch should sort the results by search not mixing several different searches results.

Is it the case?

Dje

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ThreadSearch - sort in the list control
« Reply #12 on: March 08, 2010, 09:10:02 am »
How can I keep the results from the previous search? There is an option?

The patch probably sorts both searches as one...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5905
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: ThreadSearch - sort in the list control
« Reply #13 on: March 08, 2010, 09:40:28 am »
It is possible to keep the results of successive searches in the log window (tree or list ctrl).
A good feature request.
I would like to have this feature in the thread search plugin too. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ThreadSearch - sort in the list control
« Reply #14 on: March 08, 2010, 09:55:27 am »
Olly: I think he means this feature is present :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]