Incremental Search Toolbar module uploaded

OBSOLETE

The tool bar based variant of the Incremental Search module is now obsolete. Use the sidebar based version.

I have uploaded the Incremental Search Toolbar module to my Netbeans update center described here.

This module installs the Incremental Search Toolbar.

Incremental Search Toolbar

Typing Ctrl+/ puts the focus in the incremental search text field in the Incremental Search Toolbar. If there was text in the incremental search text field, it is preselected. You can start typing the text to search and the matching text will be highlighted in the current editor. The search text is shown in red color when no matching text is found. Typing ENTER or Ctrl+/ again,  finds the next match. Typing Shift+ENTER finds the previous match. Typing ESCAPE puts the focus back in current editor. The Find Next and Find Previous do what they imply.The Search Backwards check box searches the text in backward direction. The Match Case check box controls whether the case of text is considered while searching.

Sources

DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk. 

Comments:

Hi Sandip, Thanks for making these awesome modules! Infact, they are coming so fast that I am getting dazzled! I am a very recent Eclipse to Netbeans convert and the pace of development in Netbeans is truly astonishing. Cheers, Tarun

Posted by Tarun Elankath on November 16, 2006 at 03:43 AM PST #

When I install this module in NB 5.5, the search input field has a height of 3 lines.

Posted by Thomas Boerkel on November 16, 2006 at 04:40 PM PST #

I looked at it. This happens if you are using large toolbar icons. I will fix it ASAP.

Thanks for the feedback.

Posted by Sandip on November 16, 2006 at 10:08 PM PST #

The issue of 3 line high incremental search textfield when toolbars are showing large icons has been fixed. I also reduced the width of the textfield to 8 columns.

Posted by Sandip on November 16, 2006 at 10:30 PM PST #

I love your tools and this is just another great one. Yet I'm having one little problem with it. When I hit ctrl+/ the text does get highlighted but when I start typing it it effects my document. I believe it might be because I'm running in SDI Mode but I'm not sure. Just wanted to let you know. Thanks again for all the tools.

Posted by Matthew Casebeer on November 20, 2006 at 10:45 PM PST #

Matthew, I think you are correct. This is happening because you are using SDI mode. In the code, when the user types Ctrl+/ I use requestFocusInWindow() API to put focus in the incremental search text field. Howevere that does not activate the window that contains the incremental search toolbar.

Actually I did not know that SDI mode is still supported in Netbeans 5.5. Can you please tell me how can I configure the IDE in SDI mode so that I can test my fix.

Posted by Sandip on November 21, 2006 at 12:55 AM PST #

Ditto on the kudos for your great work. When I installed 1.8, alongside your line tools and rectangular cut and paste icons into my NB 5.5 toolbar, the textfield showed up hanging off the far right of my tool bar, with the little next/previous icons and the backwards/match case checkboxes missing. Mucking around with the placement, there was sometimes a \*lot\* of space around the text field, and sometimes the icons would reappear or disappear. Finally I got it positioned and sized okay, but something funky is definitely going on with the placement/padding. NB 5.5 on JDK 1.5_07 on WinXP/SP2.

Posted by Johnny Tolliver on November 21, 2006 at 04:43 AM PST #

Matthew, that was it...sdi mode was causing the problem. It is fixed now.

Posted by Sandip on November 21, 2006 at 05:58 AM PST #

Johnny, thanks.

About layout, the problem is with the layout manager (I think it is BoxLayout) used for the panel that contains toolbars. If you make the incremental search toolbar the non-last toolbar the layout problems will be fixed. I tried to position the toolbar but that did not work. I need to look into it.

Posted by Sandip on November 21, 2006 at 06:01 AM PST #

Hi, Sandip, thanks again for your modules. One UI comment. Could we have the light mode without any additional UI components (new toolbar elemens, dialogs and so on)? I mean, the behavior like in vi, emacs, Visual Studio... I just press the shortcut and start typing... the typed text is displayed in editor's status line, and incremental search works as you described. ESC to stop. Thank you!

Posted by Vladimir Voskresensky on November 21, 2006 at 06:11 PM PST #

Vladimir, first I thought if I simply hide the toolbar I may get what you want. However that did not work.

I can understand your request as the toolbar may be starting to get crowded :(

To implement something that you want, may need some kind of mode in the editor. I don't that is easy to do for all editors. Also it may be hard to know if one has made a mistake in typing the incremental search text and correct it if it is not visible anywhere.

I have not seen the vi and Visual Studio functionality but in case of emacs the incremental search text is shown in the mini buffer. This mini buffer also has it's own key map.

Posted by Sandip on November 22, 2006 at 10:37 AM PST #

Sandip, I see... just and idea.: we can put any component in main status bar, isn't it? If yes => we can make: laber + text area with gray bg and no borders, like: Search: [ ] and user thinks he types in status bar (Visual Studio do this way). Just a trick to introduce emacs-like minibuffer in main status bar which dissapear after ESC.

Posted by Vladimir Voskresensky on November 22, 2006 at 11:15 AM PST #

Vladimir, I see...so you are OK with some UI i.e. in the status bar. I think that should be possible. In fact Eclipse does it that way (try Ctrl+J in Eclipse editor).

Posted by Sandip on November 22, 2006 at 03:49 PM PST #

Sandip, yes, some UI in status bar after Ctrl+/ and restoring status bar after ESC.

Posted by Vladimir Voskresensky on November 23, 2006 at 03:04 AM PST #

Vladimir, your wishes have been granted. See my latest blog.

Posted by Sandip on November 25, 2006 at 08:55 AM PST #

Post a Comment:
Comments are closed for this entry.
About

sandipchitale

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today