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 145463 - I18N - Search results look close to each other.
Summary: I18N - Search results look close to each other.
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-08-28 16:52 UTC by kaa
Modified: 2008-09-10 17:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image (74.18 KB, image/jpeg)
2008-08-28 16:52 UTC, kaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaa 2008-08-28 16:52:26 UTC
Product Version: NetBeans IDE Dev (Build 200808240201)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
I'm running in Japanese locale, using a pseudo localized Netbeans with font size 16 option.

1. Create Java App.
2. Add a class with multibyte chars in name
3. Try to search in the project for multibyte chars used in the name

Search results look close to each other.
Glyphs seems ok but Latin chars are not: see the image

a. It happen with English characters like p or g

b. with Asian chars, if some lower parts missing, its more serious than with English since context of what the character
is might be missing. With English its might be easier to see context of what the letter is.
Comment 1 kaa 2008-08-28 16:52:47 UTC
Created attachment 68552 [details]
image
Comment 2 Ken Frank 2008-08-28 17:12:50 UTC
to issue evaluator  - please put in correct category - we were not sure if this is for utilities
or something specific to java or other project types since don't know if its implemented
separately by each project type or common code/messages.

ken.frank@sun.com
Comment 3 Peter Pis 2008-08-29 15:03:49 UTC
Reassigning to utlilities.
Comment 4 Marian Petras 2008-08-29 15:28:22 UTC
Could you attach the file you were searching, please?
Comment 5 Marian Petras 2008-09-01 14:06:06 UTC
I miss some more information about your environment. Please do the following:

1) In the NetBeans main menu, select item View > IDE Log.
   (IDE log file is dumped to the Output window.)
2) In the Output window, scroll to the beginning (top) of the log file and copy the following two lines of the System
   Info here:

      Operating System = ...
      System Locale; Encoding = ...

I would also like to know the font size - either the default size or the size explicitly specified using command-line
parameter --fontsize <number>.
Comment 6 kaa 2008-09-01 15:21:32 UTC
Product Version: NetBeans IDE Dev (Build 200808240201)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)

I didn't search a file. I opened search dialog from the main menu: Edit -> Find in Projects
Then I entered in 'Containing Text' field few mbyte chars used in the project name and press Find button.
The image contains search result.

I'm running in Japanese locale, using a pseudo localized Netbeans with font size 16 option.
I used Windows-31j project encoding. The same behavior for UTF-8.

If you have no any questions, remove incomplete keyword please.
Comment 7 Marian Petras 2008-09-01 15:33:34 UTC
Thanks.
Comment 8 Marian Petras 2008-09-03 21:03:36 UTC
I found the cause - it is the fixed height of the row in a JTree. Unless otherwise specified, JTree uses fixed height of
rows - 16 pixels, not taking font size into account. There are two ways how to fix it - either set a proper fixed height
or use a variable height. I decided to set a properly computed fixed row height.
Comment 9 Ken Frank 2008-09-03 21:23:51 UTC
is there some code or api pattern that might be used to search for such instances as this one
of creating or setting dimensions of jtree with no height specified ?   we can add it to other source
code checking related to font sizes and sizes of ui objects. 

ken.frank@sun.com
Comment 10 Marian Petras 2008-09-03 21:44:57 UTC
I would say that every module whose source code contains substring "new JTree" and does not contains substring
"setRowHeight" is highly suspicious. To make the search more reliable, search for occurrences of "new JTree" (there
should not be many) and then inspect the surrounding code whether it calls 'setRowHeight' on the created JTree.
Comment 11 Marian Petras 2008-09-04 09:24:06 UTC
Fixed.

Changeset Id:
cab29402bc0b
(http://hg.netbeans.org/main/rev/cab29402bc0b)
Comment 12 Quality Engineering 2008-09-05 06:13:31 UTC
Integrated into 'main-golden', will be available in build *200809050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/cab29402bc0b
User: Marian Petras <mpetras@netbeans.org>
Log: fixed bug #145463 - "Search results look close to each other"
Comment 13 kaa 2008-09-10 17:51:21 UTC
verified: build 0910