This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245291 - Please add Text selection for the result in the Go to File/Type/Symbol and so on dialog.
Summary: Please add Text selection for the result in the Go to File/Type/Symbol and so...
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Jump To (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 223657 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-27 13:47 UTC by Christian Lenz
Modified: 2015-05-27 05:54 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Text selection (16.03 KB, image/png)
2014-06-27 13:47 UTC, Christian Lenz
Details
ScreenShot (78.46 KB, image/png)
2014-06-27 13:52 UTC, Tomas Zezula
Details
No selection (33.61 KB, image/png)
2014-06-27 14:03 UTC, Christian Lenz
Details
Screen shot (44.73 KB, image/png)
2015-04-28 12:25 UTC, Tomas Zezula
Details
Brackets (39.45 KB, image/png)
2015-05-09 08:38 UTC, Tomas Zezula
Details
Eclipse (15.36 KB, image/png)
2015-05-09 08:38 UTC, Tomas Zezula
Details
Idea (101.56 KB, image/png)
2015-05-09 08:39 UTC, Tomas Zezula
Details
Sublime (108.62 KB, image/png)
2015-05-09 08:39 UTC, Tomas Zezula
Details
Shows highlighting of all lines in CC (20.11 KB, image/png)
2015-05-09 14:14 UTC, markiewb
Details
Screenshot (42.67 KB, image/png)
2015-05-25 16:13 UTC, Tomas Zezula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lenz 2014-06-27 13:47:43 UTC
Created attachment 147803 [details]
Text selection

If you can see it in my screenshot (Text selection) you can see that intelliJ select the text from the search term, I search for "angc." and it will select ang, c and . At the moment the search term doesn't work for netbeans, because of this bug: https://netbeans.org/bugzilla/show_bug.cgi?id=244122 but it should be clear what I mean.


Regards

Chris
Comment 1 Tomas Zezula 2014-06-27 13:52:36 UTC
Created attachment 147804 [details]
ScreenShot
Comment 2 Tomas Zezula 2014-06-27 13:54:36 UTC
The NetBeans highlights the matched parts of the name by bold fond in Go To File, Go To Type, Go To Symbol. See the attached screenshot.
Comment 3 Christian Lenz 2014-06-27 14:00:59 UTC
Nice, but if you see my screenshot, it's not there, I stick my eyes to my monitor and can't see it. Windows 7 (x64). I will try it at an other place but I think it isn't there too as I remember.
Comment 4 Christian Lenz 2014-06-27 14:01:24 UTC
Sry, please see my new screenshot (No selection)
Comment 5 Christian Lenz 2014-06-27 14:03:27 UTC
Created attachment 147805 [details]
No selection
Comment 6 Christian Lenz 2014-06-27 14:04:48 UTC
I can't see any bolder text. Maybe it's because of my monitors, but I don't know.
Comment 7 Tomas Zezula 2014-06-27 14:07:25 UTC
It may be a font problem. The OS/JVM has not bolt version of given font.
It's Windows 7 which JDK?
Thanks
Comment 8 Christian Lenz 2014-06-27 14:45:01 UTC
Java 7 Update 60 and Java SE Development Kit 7 Update 60.
Comment 9 Tomas Zezula 2014-06-27 14:46:24 UTC
I will try to get some Windows 7 machine and try to reproduce it.
Thanks for info!
Comment 10 Christian Lenz 2014-07-21 14:44:58 UTC
Should we reopened the ticket?
Comment 11 Tomas Zezula 2014-07-21 15:43:50 UTC
Yes, please reopen it.
Comment 12 Christian Lenz 2014-07-21 16:04:44 UTC
Reopened as discussed.
Comment 13 Tomas Zezula 2015-04-28 12:14:07 UTC
jet-main 2567aaa2e009
Comment 14 Tomas Zezula 2015-04-28 12:24:17 UTC
Hi Chris.
The color highlighting is now implemented just for Go To Type and Go To Symbol.
I will add Go To File later.

The NB highlights matches by bold by default, but as you pointed out it may be problem on some systems. The jumpto uses NB specific HtmlRenderer to render the name with bold. It's faster compared to JLabel. Unfortunately it cannot paint background. So I needed to use JLabel for background rendering. As far as I remember there were some problems regarding using JLabel in jumpto, but I don't remeber them. On Mac the JLabel looks fine (see attached screenshot), unfortunately I have no other OS to try.

So I enabled the color highlighting just on command line option jumpto.highlight=color. Can you test it if it's OK on Windows? You need to start NB with -J-Djumpto.highlight=color option.

Thanks Tomas
Comment 15 Tomas Zezula 2015-04-28 12:25:47 UTC
Created attachment 153433 [details]
Screen shot
Comment 16 Tomas Zezula 2015-04-28 12:26:36 UTC
If it will be OK on all supported systems I will turn it on by default.
Comment 17 markiewb 2015-04-28 12:53:16 UTC
Duplicate of https://netbeans.org/bugzilla/show_bug.cgi?id=223657 ?
Comment 18 Tomas Zezula 2015-04-28 13:09:57 UTC
*** Bug 223657 has been marked as a duplicate of this bug. ***
Comment 19 Tomas Zezula 2015-04-28 13:10:25 UTC
Yes, it's duplicate.
Comment 20 markiewb 2015-04-28 13:23:51 UTC
(In reply to Tomas Zezula from comment #14)
> Unfortunately it cannot paint background. So I needed to use JLabel for background rendering.

I used background-rendering in the past, but I am not sure, if a JLabel is used for rendering.

Screenshot: https://netbeans.org/bugzilla/attachment.cgi?id=123071
Code: https://netbeans.org/bugzilla/attachment.cgi?id=123070&action=diff
Original issue: https://netbeans.org/bugzilla/show_bug.cgi?id=216833
Comment 21 Tomas Zezula 2015-04-28 13:26:00 UTC
Yes, it was JLabel, I've added the HtmlRenderer because there was some problem.
Unfortunately I don't remember the problem anymore :-)
Comment 22 Tomas Zezula 2015-04-28 16:29:10 UTC
Go to file part: jet-main b58e70d18f39
Comment 24 Christian Lenz 2015-04-29 11:12:25 UTC
Nice, really thx for thix little enhancement :). I would really like to test it, I have to download the latest dev build to test it, I only have the stable 8.0.2 version. I will check it at the weekend or so. Thx :). I will give feedback soon.


Cheers

Chris
Comment 25 Quality Engineering 2015-04-30 02:33:38 UTC
Integrated into 'main-silver', will be available in build *201504300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2567aaa2e009
User: Tomas Zezula <tzezula@netbeans.org>
Log: #245291:Please add Text selection for the result in the Go to File/Type/Symbol and so on dialog
Comment 26 markiewb 2015-05-05 20:15:55 UTC
(In reply to Quality Engineering from comment #25)
> Integrated into 'main-silver', will be available in build *201504300001* on
> http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
> 
> Changeset: http://hg.netbeans.org/main-silver/rev/2567aaa2e009
> User: Tomas Zezula <tzezula@netbeans.org>
> Log: #245291:Please add Text selection for the result in the Go to
> File/Type/Symbol and so on dialog

It works using Windows 7. But it is correct that only the selected line shows the matching characters? Looks strange to me.
Comment 27 Tomas Zezula 2015-05-07 09:12:42 UTC
Hi Benno,
Thanks for trying on Windows.

Yes, it's intentional when all the items were marked it was very colorful, so I am marking just the selected item. I can add an cmd line option to mark all items, so you can see.

I will do it later today and let you know
Comment 28 Tomas Zezula 2015-05-07 15:37:46 UTC
Added the option for highlighting all items jet-main 7a3a8fa3c112.
If you run the IDE with -J-Djumpto.highlight=color -J-Djumpto.highlight.all=true all items will be highlighted.
But I think that highlighting just the selected item is nicer.
Comment 29 markiewb 2015-05-08 13:13:44 UTC
(In reply to Tomas Zezula from comment #28)
> Added the option for highlighting all items jet-main 7a3a8fa3c112.
> If you run the IDE with -J-Djumpto.highlight=color
> -J-Djumpto.highlight.all=true all items will be highlighted.
> But I think that highlighting just the selected item is nicer.

Idea, Eclipse, Sublime also highlight all items. So i guess that behaviour is expected IMHO. I will wait for a dev build, which integrates your changes, so that I can try it out.
Comment 30 Tomas Zezula 2015-05-09 08:37:45 UTC
1) Idea highlight just selected (active) item - see idea_screenshot.png

2) Eclipse highlights all items but by bold font as NB. This has the same problem as in NB it's not visible. In eclipse specially the highlighting of active item is not visible at all, see eclipse_screenshot.png

3) Sublime the same as eclipse - bold font used for highlighting, not much visible, see sublime_screenshot.png

4) Brackets the same as Eclipse.

In general the IDEs (editors) either highlight by colour with just active line highlighting or by the bold font with all highlighting. This is also the way how it's implemented in the NB the HighlightingStrategy.isHighlightAll() is true for Bold and false for Color.
Comment 31 Tomas Zezula 2015-05-09 08:38:23 UTC
Created attachment 153577 [details]
Brackets
Comment 32 Tomas Zezula 2015-05-09 08:38:50 UTC
Created attachment 153578 [details]
Eclipse
Comment 33 Tomas Zezula 2015-05-09 08:39:16 UTC
Created attachment 153579 [details]
Idea
Comment 34 Tomas Zezula 2015-05-09 08:39:43 UTC
Created attachment 153580 [details]
Sublime
Comment 35 markiewb 2015-05-09 14:14:44 UTC
Created attachment 153584 [details]
Shows highlighting of all lines in CC

(In reply to Tomas Zezula from comment #30)
> In general the IDEs (editors) either highlight by colour with just active
> line highlighting or by the bold font with all highlighting. 

I am sorry Tomas. You are correct, I checked it. 

I mixed it up with the highlighting in the code completion. There also the non-active lines got highlighted. See the attached screenshot. But this is not part of this issue.
Comment 36 Tomas Zezula 2015-05-11 10:15:02 UTC
Hi Benno,
no problem.

We should just decide what we enable in release.
Ideally there should be a UI option to switch from Bold to Colour highlighting as Sublime users may prefer Bold while the others may prefer the Colour. For me the colour is much more visible.
However I am unsure if it deserves a panel in IDE Options/Editor
Comment 37 Quality Engineering 2015-05-12 03:26:30 UTC
Integrated into 'main-silver', will be available in build *201505120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7a3a8fa3c112
User: Tomas Zezula <tzezula@netbeans.org>
Log: #245291:Please add Text selection for the result in the Go to File/Type/Symbol and so on dialog.
Comment 38 Tomas Zezula 2015-05-15 06:37:03 UTC
Hi Benno,
any update on this?
I think that the best solution will be to add an panel into the IDE's options allowing the user to switch Colour or Bold and All items vs Single Items.
Comment 39 markiewb 2015-05-15 14:36:42 UTC
(In reply to Tomas Zezula from comment #38)
> Hi Benno,
> any update on this?
> I think that the best solution will be to add an panel into the IDE's
> options allowing the user to switch Colour or Bold and All items vs Single
> Items.

I thought your last question was a rhetorical one....

An option would be good, but what will be the default. IMHO Most users will neverchange this setting, so the reception of NB UI will be based on the default configuration. 

What do you think? Should we ask/survey the nbdt or platform_dev?
Comment 40 Christian Lenz 2015-05-15 20:04:48 UTC
Didn't tried it yet but in my perspective, an option would be very cool to toggle bold/character background selection and first match/all matches. Default should be character background selection and first match. Only my opinion :)
Comment 41 Tomas Zezula 2015-05-15 20:09:44 UTC
Thanks Benno & Chris.

I will add the settings into the IDE options and run some kind of survey about defaults.

My personal preferences are the same as Chris described.
Comment 42 Tomas Zezula 2015-05-25 16:12:07 UTC
Fixed jet-main 934f05e746f6
Comment 43 Tomas Zezula 2015-05-25 16:12:55 UTC
Added panel into options to allow user to choose the highlighting method, see attached screenshot.
Comment 44 Tomas Zezula 2015-05-25 16:13:22 UTC
Created attachment 153850 [details]
Screenshot
Comment 45 Quality Engineering 2015-05-27 05:54:08 UTC
Integrated into 'main-silver', will be available in build *201505270357* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/934f05e746f6
User: Tomas Zezula <tzezula@netbeans.org>
Log: #245291:Please add Text selection for the result in the Go to File/Type/Symbol and so on dialog.