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 140174 - [65cat] Combo-boxes in 'Find in Projects' do not work properly
Summary: [65cat] Combo-boxes in 'Find in Projects' do not work properly
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker with 1 vote (vote)
Assignee: Marian Petras
URL:
Keywords: L&F
Depends on:
Blocks:
 
Reported: 2008-07-15 22:34 UTC by Michel Graciano
Modified: 2009-04-08 14:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2008-07-15 22:34:50 UTC
[ BUILD # : 200807040101 ]
[ JDK VERSION : 1.6.0_07 ]

The 'Containing Text' field should can be updated by UP/DOWN keys,
when there is another option on combo box. If I navigate between the
values, the text is not updated, neither with TAB or ENTER after
update the chosen item.
Comment 1 Marian Petras 2008-07-16 15:45:41 UTC
This is caused by a KeyListener in class org.netbeans.modules.search.BasicSearchForm. The listener listens on the
combo-box editors and when the Enter key is pressed, activates the Find button. The problem is that it does not care
whether the combo-box has a pop-up displayed or not.

I will fix it such that if the Enter key is pressed at the moment the pop-up is visible, the Find button is not
activated such that the key press is handled by the default Swing routine.
Comment 2 Marian Petras 2008-07-16 16:09:48 UTC
Fixed.

Changeset Id:
01ee552fbc3b
(http://hg.netbeans.org/main/rev/01ee552fbc3b)
Comment 3 Quality Engineering 2008-07-17 04:50:06 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #324 build
Changeset: http://hg.netbeans.org/main/rev/01ee552fbc3b
User: Marian Petras <mpetras@netbeans.org>
Log: fixed bug #140174
Comment 4 Michel Graciano 2008-07-17 21:43:33 UTC
Product Version: NetBeans IDE Dev (Build 200807170007)
Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23
System: Linux version 2.6.24-19-generic running on i386; ISO-8859-1; pt_BR (nb)

For Ubuntu with GTK L&F it works, but with Metal L&F it doen't works. Now it is worse than before because neither mouse
works for combo selection. Now, if I try to select another item on combo, the selection is no more updated on the popup.
Comment 5 Michel Graciano 2008-07-21 20:10:45 UTC
It must be fixed soon or patch should be removed asap because now it is worse than before. Not even mouse selection
works after I try to select an item using the keyboard.
Comment 6 Marian Petras 2008-07-22 14:03:14 UTC
You are right. I tested the fix only with GTK L&F. I am now working on a proper fix. I will verify it on multiple
platforms and L&F.
Comment 7 Marian Petras 2008-07-23 16:21:27 UTC
I was not able to find the root cause of the bug in a reasonable amount of time. I will add a condition such that the
patch is enabled only with GTK L&F and only if variable "org.netbeans.modules.search.disable_patch_140174" is not set.
Comment 8 Michel Graciano 2008-07-23 17:05:59 UTC
Steps to reproduce:
1-Go to 'Find in Project' and search for 'a' string, and some results are found;
2-Go to 'Find in Project' again and search for 'b', and some results are found;
3-Go to 'Find in Project' again and try to select the 'a' from combobox using the keyboard. When you press Enter, 'b' is
the current value for 'Containing Text' and is no more possible to select another value in combobox.

I hope it can help.
Comment 9 Marian Petras 2008-07-24 12:45:18 UTC
hmichel, thanks for the exact description of the issue. I was able to reproduce it. I just was not able to find the
cause of the bad behaviour in three or four hours. I believe I would be able to find the cause if I continued the search
but I decided to stop for now such that I can fix other, more severe bugs. I will change the code such that my fix is
only used with GTK L&F and the original behaviour is used with all other L&F.

I reproduced the problem with combo-boxes on Linux with Metal L&F and also on Windows XP with the default L&F (Windows L&F).
Comment 10 Marian Petras 2008-07-24 13:12:40 UTC
I just disabled the fix for all L&F's except for GTK L&F, such that the behaviour does not worsen on any L&F.

Changeset Id:
2c7e57babebd
(http://hg.netbeans.org/main/rev/2c7e57babebd)
Comment 11 Michel Graciano 2008-07-24 14:19:00 UTC
I understand your point and agree about focus on severe issue.
Thanks.
Comment 12 Marian Petras 2008-11-03 18:58:40 UTC
Fixed.

The source of the bug was the custom ComboBoxModel, which never fired any ListDataEvents. I changed it such that it
fires a ListDataEvent when its selectedItem changes and the combo-box started working as expected. As an extra benefit,
I could remove quite a lot of search form's source code, which actually served as a workaround for the issue caused by
the broken ComboBoxModel.


Changeset Id:
70f66feb9f24
(http://hg.netbeans.org/main/rev/70f66feb9f24)
Comment 13 Quality Engineering 2008-11-04 16:25:14 UTC
Integrated into 'main-golden', will be available in build *200811041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/70f66feb9f24
User: Marian Petras <mpetras@netbeans.org>
Log: fixed bug #140174 - "Combo-boxes in 'Find in Projects' do not work properly"
Comment 14 kaa 2008-12-16 18:43:55 UTC
Product Version: NetBeans IDE Dev (Build 200812150750)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
Comment 15 Michel Graciano 2009-01-21 12:22:39 UTC
Any chance to see it for patch 2?
Comment 16 pgebauer 2009-04-08 14:18:48 UTC
The status whiteboard "65fixes4-candidate" has been removed.
At this time our proactive patches for the NetBeans 6.5.x IDE have concluded.

If you own a Sun service plan contract for NetBeans, you may wish to contact
Sun Service http://www.sun.com/contact/support.jsp to request a fix via the
product defect escalation process.

For more information on purchasing a Sun service plan contract for NetBeans,
refer to the service plan item "Sun Software Service Plans (S3P) for Developers"
in the Sun Service table found on our NetBeans Support Resources
page http://www.netbeans.org/kb/support.html