Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Search word under cursor
Search word under cursor [message #189248] Wed, 04 February 2004 10:23 Go to next message
Mike Lischke is currently offline Mike LischkeFriend
Messages: 78
Registered: July 2009
Member
Hi,

please bear with me when I ask this really basic question. I can't for my
life find an option to make the Eclipse Java editor to search the word
that currently contains the cursor without first selecting the word.
Please, can somebody tell me what I need to make this simple thing working?

I really hope the answer is not: "You always have to select the word to
search for it." I mean this is an absolute basic feature and supported in
every other editor with mouse support I ever used (and there were quite
some, I even wrote a few myself), so I cannot imagine this is intended.

Mike
--
www.delphi-gems.com
Re: Search word under cursor [message #189518 is a reply to message #189248] Wed, 04 February 2004 17:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-user.jibeinc.com

Mike Lischke wrote:
> Hi,
>
> please bear with me when I ask this really basic question. I can't for my
> life find an option to make the Eclipse Java editor to search the word
> that currently contains the cursor without first selecting the word.
> Please, can somebody tell me what I need to make this simple thing working?
>
> I really hope the answer is not: "You always have to select the word to
> search for it." I mean this is an absolute basic feature and supported in
> every other editor with mouse support I ever used (and there were quite
> some, I even wrote a few myself), so I cannot imagine this is intended.

Couple of comments:
1) I am not familiar with the feature you describe. So I opened up
TextEdit and tried to find a way to place the cursor on a word and
search for it without selecting the word first - no can do. TextEdit is
a pretty popular editor, so I guess my point is that this does not seem
like such a common feature.

2) Is it a problem for you to simply double-click the word to select it
before doing a search? That seems like a very reasonable substitute for
the missing feature you're talking about.

3) If it is really important to you, then file a feature request in
Bugzilla and perhaps it will get implemented. Better yet, if you were so
inclined you could implement it yourself and submit the code as a patch
- working patches with tests seem to be readily incorporated by the
Eclipse development team.

HTH,
Eric
--
Eric Rizzo
Software Architect
Jibe, Inc.
http://www.jibeinc.com
Re: Search word under cursor [message #189872 is a reply to message #189518] Thu, 05 February 2004 09:24 Go to previous messageGo to next message
Mike Lischke is currently offline Mike LischkeFriend
Messages: 78
Registered: July 2009
Member
Eric Rizzo wrote:

Thank you for your answer.

> 1) I am not familiar with the feature you describe. So I opened up
> TextEdit and tried to find a way to place the cursor on a word and
> search for it without selecting the word first - no can do. TextEdit is
> a pretty popular editor, so I guess my point is that this does not seem
> like such a common feature.

Well, well, the different worlds again. I never heard about TextEdit. I'm
usually working with editors like Delphi, MSVC, PHPEdit, UltraEdit, MS
Word etc. However, I realize MS Word does also not search for the word at
the cursor.

> 2) Is it a problem for you to simply double-click the word to select it
> before doing a search? That seems like a very reasonable substitute for
> the missing feature you're talking about.

Right, this is what is implemented and I never thought about this feature
as it always worked where I needed it. But now that I don't have it I miss
it badly. I'm really surprised that nobody ever complained about that
(well, they might not know it). I mean, it's a big disadvantage to have to
use two hands to search for a word where it could be simple to implement
the needed feature. So yes, I have a problem with first selecting a word
before it can be searched.

> 3) If it is really important to you, then file a feature request in
> Bugzilla and perhaps it will get implemented.

Not a bad idea. I should do that.

>Better yet, if you were so
> inclined you could implement it yourself and submit the code as a patch
> - working patches with tests seem to be readily incorporated by the
> Eclipse development team.

I'm just a beginner with Java and Eclipse (otherwise I should already got
used to the kind search is performed ;-)). Currently I'm fighting with the
most basic things in Eclipse so I doubt I would be a real help in this
regard.


Mike
--
www.delphi-gems.com
Re: Search word under cursor [message #190154 is a reply to message #189248] Thu, 05 February 2004 20:01 Go to previous messageGo to next message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
Mike Lischke wrote:
> please bear with me when I ask this really basic question. I can't for my
> life find an option to make the Eclipse Java editor to search the word
> that currently contains the cursor without first selecting the word.
> Please, can somebody tell me what I need to make this simple thing working?

Can't directly do it at the moment. Note that in the JavaEditor, if you
turn on the "Mark Occurrences" feature, you get it for free (and even
better, as the search is AST based instead of purely textual.

-tom
Re: Search word under cursor [message #190704 is a reply to message #190154] Fri, 06 February 2004 17:46 Go to previous messageGo to next message
Mike Lischke is currently offline Mike LischkeFriend
Messages: 78
Registered: July 2009
Member
Hi Tom Eicher,

> Can't directly do it at the moment. Note that in the JavaEditor, if you turn
> on the "Mark Occurrences" feature, you get it for free (and even better, as
> the search is AST based instead of purely textual.

Thank you Tom. I'll give it a try (haven't seen that option yet).

Mike
--
www.delphi-gems.com
www.lischke-online.de
Re: Search word under cursor [message #743026 is a reply to message #189518] Fri, 21 October 2011 03:58 Go to previous messageGo to next message
gurpsgroup is currently offline gurpsgroupFriend
Messages: 1
Registered: October 2011
Junior Member
It is a while since this thread was created, but I have to completely agree with Mike here. Not being able to instantly search for the word under the cursor is a big drag for me. In Vim/GVim, one can hit "#" or "*" to search up or down for the word under the cursor w/o typing in that word, or highlighting it with keyboard/mouse. Very fast, very powerful, you hate to loose it once you are used to it. I could live with a work around, and that would be that the word under the cursor could be pre-populated into the search window. That's equally annoying that you have to manually type in the word you want to find, or escape out of the find window, double-click the word you are after, and then bring up the search window again. A lot of programmers learn to ignore the mouse for 90% of what they do, so let's see some speed-ups in this reguard.

-David
Re: Search word under cursor [message #743474 is a reply to message #743026] Fri, 21 October 2011 14:14 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
If you feel a feature is missing, file a bug report.
Previous Topic:Contributed toolbar not resizing
Next Topic:Mac OS X 64bit Eclipse (3.6.2) "Cannot load 32-bit SWT libraries on 64-bit JVM"
Goto Forum:
  


Current Time: Fri Mar 29 05:51:21 GMT 2024

Powered by FUDForum. Page generated in 0.08349 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top