PreviousNextTracker indexSee it online !

(92/212) 257 - Highlight terms in HyperSearch Results Window/color for type

It would be a big increase in usability if the terms searched for were highlighted in the lines displayed in the hypersearch results window and the lines were colored for type (e.g. comments in "comment" color).

When there are a lot of results, and the terms are only part of each line, it can be difficult to find the relevant ones.

For example:

I might search for the term "boolean" but I'm not interested in any cases where it appears in a comment, or where it's part of a method name.

So instead of:

public boolean doIt() {
public void booleanChecker(int boolVal) {
this appears in a multi-line comment about booleans

I would see (excuse the HTML code):

public <font style="color: BLUE;">boolean</font> doIt() {
public void <font style="color: BLUE;">boolean</font>Checker(int boolVal) {
<font style="color: GREEN;">this appears in a multi-line comment about <font style="color: BLUE;">boolean</font>s</font>

Submitted dmusicant - 2008-12-18 21:15:19 Assigned
Priority 5 Labels core
Status open Group v5.2
Resolution None

Comments

2009-01-29 22:00:35
*anonymous

Partial implementation - simple highlighting of matches in the hypersearch results - is added in SVN rev. 14514. Currently - the highlighting is by displaying the matches in bold - no coloring and no configurable highlighting.

2009-01-29 23:35:13
*anonymous

An enhanced implementation of hypersearch result highlighting is now available in the SVN trunk version of the Highlight plugin. It does not use jEdit token types - it simply uses the highlighting configuration of the Highlight plugin. A new action in that plugin applies the highlighting to the hypersearch results.

Let me know if this satisfied your feature request or not. I think an enhanced version like you suggest is a little bit too much to place in the core.

2009-04-06 06:27:56
*anonymous

While it can be a big increase in usability, applying syntax highlighting in the hypersearch results is not feasible in general. It can be feasible for several edit modes, but not all. In general, the token type of a word in the text cannot be derived just by reading the line of the token; e.g. in order to find out that a word belongs to a multi-line comment, jEdit must start marking syntax tokens from the first line of the comment. If just the line of the word is marked for tokens, the same word would not be seen as a comment.

Of course, multi-file hypersearch reads the entire files for matching the search pattern, but this is much quicker than marking tokens in the files. Marking tokens can make the hypersearch unacceptably slow.

2013-11-28 08:52:50
*anonymous

In addition to syntax highlighting, it would be very nice to also be able
to use the settings of the Highlight plugin in the hypersearch results.
Many times I use a some other log viewer tool just because it adds the
ability to paint parts of the search results differently; for example I
search for the regexp "started|ended" and I want "started" to be painted
one way and "ended" be painted another way. Adding the capabilities of
Highlight plugin into the hypersearch results would eliminate the need to
use a log viewer.

Then it would be nice if we could configure how to paint the hypersearch results; either use type-specific style, or use the Highlight plugin, or both.

2013-11-28 08:55:33
*anonymous

Oops... ignore my last comment. My bad... I didn't realize that this is already implemented and that I actually commented about it almost 5 years ago. :)