Board index » jbuilder » Searching for strings with underlines

Searching for strings with underlines


2004-04-29 02:05:07 AM
jbuilder18
When the cursor is focussed on a string with underlines, as in:
string_wi|th_underlines
if I call the search window with Ctrl-F, the default behavior is
to search for "with". I would prefer to have the search look
for "string_with_underlines" (I know I can select the entire
phrase with a double-click and then Ctrl-F, but the idea is
to maximize using the keyboard and minimize mouse use).
I believe there was an OpenTools fix for this problem, but
I can't find it in the OpenTools page.
Thanks,
Dan
 
 

Re:Searching for strings with underlines

Dan wrote:
Quote
When the cursor is focussed on a string with underlines, as in:

string_wi|th_underlines

if I call the search window with Ctrl-F, the default behavior is
to search for "with". I would prefer to have the search look
for "string_with_underlines" (I know I can select the entire
phrase with a double-click and then Ctrl-F, but the idea is
to maximize using the keyboard and minimize mouse use).

I believe there was an OpenTools fix for this problem, but
I can't find it in the OpenTools page.
JBuilder Help>Keyboard Mappings.
Assuming you are using CUA, click on that, click
on "Selection" in the list, and voila:
select word : Control-w
--
Paul Furbacher (TeamB)
Save time, search the archives:
www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

Re:Searching for strings with underlines

Paul,
This helps a bit -- but it still requires a "Ctrl-W Ctrl-F" combination to
select the word and then initiate the search. What I'm really after is to
just do a Ctrl-F (or Ctrl-R when replacing) and automatically select
the entire word for the find/replace action. I rarely need to find/replace
the string delineated by the underscores.
As I said, I thought there was an Opentools to set this by default some
time ago...
Thanks,
Dan
"Paul Furbacher [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Dan wrote:

>When the cursor is focussed on a string with underlines, as in:
>
>string_wi|th_underlines
>
>if I call the search window with Ctrl-F, the default behavior is
>to search for "with". I would prefer to have the search look
>for "string_with_underlines" (I know I can select the entire
>phrase with a double-click and then Ctrl-F, but the idea is
>to maximize using the keyboard and minimize mouse use).
>
>I believe there was an OpenTools fix for this problem, but
>I can't find it in the OpenTools page.

JBuilder Help>Keyboard Mappings.

Assuming you are using CUA, click on that, click
on "Selection" in the list, and voila:

select word : Control-w


--


Paul Furbacher (TeamB)

Save time, search the archives:
www.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

{smallsort}

Re:Searching for strings with underlines

Dan wrote:
Quote
As I said, I thought there was an Opentools to set this by default some
time ago...
I don't know if this tool will do that, or if it will even work at all,
but it's probably the one you're thinking of.
codecentral.borland.com/codecentral/ccweb.exe/listing
--
Gillmer J. Derge (TeamB)
 

Re:Searching for strings with underlines

Gillmer,
You are correct, this is the tool I was thinking of. Unfortunately, it's
still
not exactly what I want. This tool allows selection of the entire
word when double-clicking (or using Ctrl-W), a problem which was
eventually fixed. I'm trying to have the Ctrl-F select the entire word
in the same manner.
Oh, well, maybe it's time I learned to write my own Opentools feature
to fix this. If there are any FAQ's on that, I would appreciate a pointer
to them. Thanks,
Dan
"Gillmer J. Derge (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
Dan wrote:
>As I said, I thought there was an Opentools to set this by default some
>time ago...

I don't know if this tool will do that, or if it will even work at all,
but it's probably the one you're thinking of.

codecentral.borland.com/codecentral/ccweb.exe/listing

--
Gillmer J. Derge (TeamB)
 

Re:Searching for strings with underlines

Dan wrote:
Quote
Oh, well, maybe it's time I learned to write my own Opentools feature
to fix this. If there are any FAQ's on that, I would appreciate a
pointer
Quote
to them. Thanks,
Not a FAQ per se, but JBuilder itself comes with quite a bit of
documentation on OpenTools along with a number of sample tools.
I imagine that if you wanted to do this it might be easiest to implement
it sort of like a keyboard macro. Find the action that implements
"select-word" and find the action that implements a Ctrl-F search. Then
make your action be essentially:
public void actionPerformed(ActionEvent e) {
selectWordAction.actionPerformed(e);
searchAction.actionPerformed(e);
}
You'd probably want to look into the EditorAction class to start with.
There are a few samples that implement EditorActions.
--
Gillmer J. Derge (TeamB)