Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 108431

Summary: [CellEditors] Different focusLost behaviour on Text and Combo
Product: [Eclipse Project] Platform Reporter: Koen van Dijken <koen.van.dijken>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: 3vanhourigan, deepatwal, krzysztof.michalski, Mike_Wilson, Szymon.Brandys, tom.schindl
Version: 3.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on: 142981    
Bug Blocks:    

Description Koen van Dijken CLA 2005-08-30 17:46:08 EDT
There is a difference in loosing focus on Text and Combo controls. This is
apparent in TextCellEditor and ComboBoxCellEditor.

- select a property in the propertyview with a TextCellEditor
- make a change in the text property, but do not give <enter> or mouseclicks
- select main window of another program running (not this Eclipse instance)
- the changed text gets saved in the property

When you do the same on a property with a ComboBoxCellEditor, the change does
not get saved.

When you put a breakpoint on the focusLost() methods in the celleditors, you'll
get a focusLost() on TextCellEditor, but not on ComboBoxCellEditor when
switching to another program before saving the change. The focusLost on
TextCellEditor causes the change to be saved.

It also gives a difference in appearance: because in TextCellEditor the cell
editor is deactivated, upon returning to Eclipse after switching programs, the
entry in the properties view is gray (name and value). For a ComboBoxCellEditor,
upon returning to Eclipse, the value is still highlighted.

This is not very dramatic on its own. However, I'm writing a subclass of
DialogCellEditor, where the contents of the DialogCellEditor is another
CellEditor delegate. This difference in un-focusing behaviour causes me a lot of
troubles.

This is on Eclipse 3.2M1.
Comment 1 Koen van Dijken CLA 2005-08-31 01:13:52 EDT
In reproducing this you should return to Eclipse by clicking on the main
titlebar of the Eclipse window. The ComboBox has style SWT.READ_ONLY.
Comment 2 Eric Moffatt CLA 2007-07-11 11:39:29 EDT
Hmm, I'll take a look...
Comment 3 Thomas Schindl CLA 2008-04-28 18:55:22 EDT
should be passed to SWT because the your firing the event to close the list. I think the problem is how CCombo works (it shows a List-Widget in a new shell and somehow SWT doesn't recognize that the List-Shell is deactivated another one not under their control is activated)
Comment 4 Thomas Schindl CLA 2008-04-28 18:57:52 EDT
on OS-X at least the Popup-List is hidden on Win32 the List shows infront of every window I guess this is because the List has the SWT.ON_TOP style set
Comment 5 deepak patwal CLA 2014-02-06 01:47:01 EST
Hi,

Please let us know what is the fix for this issue. We are using eclipse RCP in our project where we are facing such issue.
Do we need to change from focuslistener to selectionlistener ?
Your help is very  critical to us.

Thanks in advance !!!!!
Comment 6 Eclipse Genie CLA 2020-02-13 16:52:43 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.