Author Topic: Incremental Search  (Read 25074 times)

Offline rhf

  • Multiple posting newcomer
  • *
  • Posts: 123
Re: Incremental Search
« Reply #30 on: October 11, 2008, 05:51:48 pm »
Compile IncrementalSearch with the attached project file. I suspect recursive addition of image file is not working here (this was affecting Linux builds, too).  :)
That did it!  Thanks.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Incremental Search
« Reply #31 on: October 11, 2008, 05:52:20 pm »
Are the images inside "IncrementalSearch.zip" (it should be in "share/CodeBlocks").
The images are in the subfolder "images" and "images/16x16" inside the zip-file.
No, the images are not there.

Compile IncrementalSearch with the attached project file. I suspect recursive addition of image file is not working here (this was affecting Linux builds, too).  :)
In Linux the problem was, that I only included "images/*.png" (I don't want the conf-dialog images inside the zip-file, because they don't belong there) with "-R"-switch for recursion. That can only find images with path "images/*.png", but not "images/16x16/*.png".
I use "22x22", so I did not stumble over it.

On windows I use only "*.png" and of course the "-R"-switch.
That works for me on w2k and XP without problems and includes the whole "images" folder with all subfolders containing png-images.

But it might be a problem with different behaviour of different zip-versions.
I use "Zip 2.32" from June 19th 2006.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Incremental Search
« Reply #32 on: October 11, 2008, 05:58:18 pm »
@Biplab:
thanks for the fixes to the autoconf-files.

I hopefully will learn how it works some days, but until now I did not find a good readable and easy to understand documentation.
So it's still more or less trial and error.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Incremental Search
« Reply #33 on: October 11, 2008, 06:03:54 pm »
I can test it either, since I have upgraded my wx to 2.8.9 on my 64-bit linux box. And now it builds correctly :-)

I tested it without version-guard and the deprecated (older) functions and it also works.
So I think it's secure to commit the version with the "wxCHECK_VERSION".
I will also update the windows cbp-file, because that will not break anything, but the cbp-file that's in svn now, seems not to work reliably.

Sorry for the inconvenience.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Incremental Search
« Reply #34 on: October 11, 2008, 06:12:52 pm »
@Biplab:
thanks for the fixes to the autoconf-files.

I hopefully will learn how it works some days, but until now I did not find a good readable and easy to understand documentation.
So it's still more or less trial and error.

Honestly speaking I'm also not good at it. You can try the tutorial at the following link. :)

Quote
http://www-src.lip6.fr/homepages/Alexandre.Duret-Lutz/autotools.html
Be a part of the solution, not a part of the problem.

Offline rhf

  • Multiple posting newcomer
  • *
  • Posts: 123
Re: Incremental Search
« Reply #35 on: October 11, 2008, 06:49:23 pm »
But it might be a problem with different behaviour of different zip-versions.  I use "Zip 2.32" from June 19th 2006.
Ouch! My zip version was Zip 2.3 dated November 29th 1999!  Think I'll upgrade now - sorry to cause you problems.

Offline fabrizio.benedetti

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Incremental Search
« Reply #36 on: October 16, 2008, 11:50:26 am »
I commited Incremental search this afternoon.

I built the last version from SVN with the incremental search plugin yesterday. Thanks! That was really missing!

I'd like to suggest some refinements in its behaviour:

 - there should be a way to exit from incremental search mode using the keyboard, and go back to typing; pressing Esc or the assigned shortcut (Ctrl+I) seems the most intuitive way (now seems that the only way is to press the [x> icon on the toolbar near the search text);

 - search options for incremental search could have their shortcut, active during incremental search (VS does i.e. ctrl-c for case sense);

 - the searched text should be selected when exiting from incremental search (as in the case of normal search);

  Now, given I'm a VS6 guy, there's another search feature I'm missing. It's not related to incremental search but I'm reporting it here... it's the Ctrl-F3 shortcut, which starts searching for the word under the cursor - if no text is selected, otherwise it searches for the selected text. That's very quick, no search dialog is shown, you just jump to the next result. Whooa! (and yes, Shift-Ctrl-F3 does it backward). Anyone else liking it out there?

  Ciao
    Fabrizio
« Last Edit: October 16, 2008, 12:05:20 pm by fabrizio.benedetti »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Incremental Search
« Reply #37 on: October 16, 2008, 12:57:36 pm »
I commited Incremental search this afternoon.

I built the last version from SVN with the incremental search plugin yesterday. Thanks! That was really missing!
Thanks.  :)
- there should be a way to exit from incremental search mode using the keyboard, and go back to typing; pressing Esc or the assigned shortcut (Ctrl+I) seems the most intuitive way (now seems that the only way is to press the [x> icon on the toolbar near the search text);

 - search options for incremental search could have their shortcut, active during incremental search (VS does i.e. ctrl-c for case sense);
That make sonly sense, if both is implemented.
I will think about it.
- the searched text should be selected when exiting from incremental search (as in the case of normal search);
If the first will be implemented, this would be easy (but should be configurable)

  Now, given I'm a VS6 guy, there's another search feature I'm missing. It's not related to incremental search but I'm reporting it here... it's the Ctrl-F3 shortcut, which starts searching for the word under the cursor - if no text is selected, otherwise it searches for the selected text. That's very quick, no search dialog is shown, you just jump to the next result. Whooa! (and yes, Shift-Ctrl-F3 does it backward). Anyone else liking it out there?

Maybe this can also be implemented inside the plugin.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Incremental Search
« Reply #38 on: October 16, 2008, 05:09:30 pm »
- there should be a way to exit from incremental search mode using the keyboard, and go back to typing; pressing Esc or the assigned shortcut (Ctrl+I) seems the most intuitive way (now seems that the only way is to press the [x> icon on the toolbar near the search text);

I've already implemented this feature. I prefer Escape Key. I'll commit it later. :)
Be a part of the solution, not a part of the problem.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Incremental Search
« Reply #39 on: October 18, 2008, 10:35:49 am »
- there should be a way to exit from incremental search mode using the keyboard, and go back to typing; pressing Esc or the assigned shortcut (Ctrl+I) seems the most intuitive way (now seems that the only way is to press the [x> icon on the toolbar near the search text);

I've already implemented this feature. I prefer Escape Key. I'll commit it later. :)

I also implemented it.

I did not find a way to catch all key-events from all windows, I'm not sure if it is possible, or even if it would be very good (because of the overhead it and the possible slowdown of the whole app).

I catch the key events of the text-control inside the toolbar, and (re)set the on it, when using any of the  toolbar-buttons (and of course with Ctrl-I like now).

If you then press ESC everything looks like as if you empty the textcontrol.
You can select the last found phrase if you have checked the appropriate ooption on the configuration dialog.

ALT-DELETE will erase the content of the text-control.

I did not apply any other shortcuts, because they interfere with the normal keyboard-shortcuts, or the other accelerators.


If you know another (better) way to catch the key-events, please post a patch, or send it me with a pm or mail, or commit it, if it not slows down the whole C::B.
I wait until I commit my changes.


I also fixed the problem if the found text is in a column outside the actual editor-window, because the line is too ling.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Incremental Search
« Reply #40 on: October 19, 2008, 09:24:44 pm »
I just commited the changes to trunk (r5277).
I also included a bugfix, see here: http://forums.codeblocks.org/index.php/topic,9402.msg66771.html#msg66771

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Re: Incremental Search
« Reply #41 on: October 25, 2008, 07:26:48 am »
it is good plugin for codeblocks.
Incremental Search is reasonable to Show this ability. :D


Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Re: Incremental Search
« Reply #42 on: October 27, 2008, 01:35:01 pm »
I have a idea, but I don't know that is it good .

before                after
wxTextctrl => wxComboBox


So I can reuse  some keyword by myself.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Incremental Search
« Reply #43 on: October 27, 2008, 01:38:17 pm »
Hi !

I developped an history combo box that stores searched expressions and sorts them by recent search order.
The class is available in ThreadSearch classes; it may be useful.

Dje

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Re: Incremental Search
« Reply #44 on: October 27, 2008, 02:11:55 pm »
Thank you for your response.
I now Interest in IncrementalSearch.
it's easy to use(ThreadSearch  is too professional, if i have some time i will research it  :P)


Arrow icon in the IncrementalSearch is left and right direction.
Why not to change up and down direction ?
Seem to be to match behavior more.