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 235276 - Search results should be left-trimmed
Summary: Search results should be left-trimmed
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 20:35 UTC by markiewb
Modified: 2013-09-06 01:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Shows the issue (105.94 KB, image/png)
2013-08-29 20:35 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-08-29 20:35:03 UTC
Created attachment 139458 [details]
Shows the issue

ACTUAL: Search results contain the whitespaces from its indentation - see screenshot. Does it makes sense when you search for a non-whitespace text, that you want to see the whitespaces at the left?

EXPECTED: Search results are left-trimmed of the whitespaces
Comment 1 Jaroslav Havlin 2013-08-30 05:10:51 UTC
Actually, the indentation is currently shown intentionally :-)

I think that the white-space at the beginning makes it easier to see
where the occurrence is (e.g. in a top-level class vs. in an inner class),
and can be helpful sometimes.

CCing uireviews. Please, do you have any opinions or ideas?
Comment 2 richgunther 2013-09-03 14:43:29 UTC
In my opinion we should left-trim them, but that's speaking solely from the perspective of being consistent with other search results lists I've seen. I think adding the whitespace just makes it so you need to expand the window ever larger to see the line of code.
Comment 3 Jaroslav Havlin 2013-09-04 06:20:20 UTC
(In reply to richgunther from comment #2)
> In my opinion we should left-trim them, but that's speaking solely from the
> perspective of being consistent with other search results lists I've seen.
Indeed, Find Usages Results Window also trims the line. Thanks.

> I think adding the whitespace just makes it so you need to expand the window
> ever larger to see the line of code.
I agree, it would be an advantage for smaller displays to trim the results.

Anyway, the context of the line is actually shown in tooltip.

OK, I'll fix it. Thanks for reporting and your comments.
Comment 4 Jaroslav Havlin 2013-09-05 11:44:06 UTC
http://hg.netbeans.org/core-main/rev/9c844c2467d9
Fixed.
Comment 5 Quality Engineering 2013-09-06 01:37:42 UTC
Integrated into 'main-silver', will be available in build *201309060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9c844c2467d9
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #235276: Search results should be left-trimmed