Bug 10497 - [Cell Editors] Properties View Edit doesn't release cursor on <Enter>
Summary: [Cell Editors] Properties View Edit doesn't release cursor on <Enter>
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: Sun Solaris
: P4 trivial (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate, needinfo
Depends on:
Blocks:
 
Reported: 2002-02-28 11:45 EST by Justin Noel CLA
Modified: 2009-08-30 02:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Noel CLA 2002-02-28 11:45:06 EST
Eclipse Drop: December 19th Stable
OS: Solaris 2.7 w/ Sun Recommended Patches
HW: Sun Ultra 60
JRE: Sun 1.3.1
Motif: 2.1
CDE: 1.3

To Reporduce:
Open Plug-in Perspective
Open a plug-in prject manifest
Choose something that will bring up editable fields in the "Properties View"
Edit a field ending with <Enter>
Failure
Notice the property changes but the cursor is not released. Pressing <Esc> or
clicking on some blacnk background will release the cursor.

Consistant slighty annoying behavior under Linux-Motif.
Comment 1 DJ Houghton CLA 2002-02-28 11:55:13 EST
Moving to Platform/UI as they deal with the Properties View.
Comment 2 Lynne Kues CLA 2002-03-23 14:10:07 EST
Behavior not specific to Linux.
Comment 3 Lynne Kues CLA 2002-03-23 14:24:28 EST
Can easily add a traverse listener to the cellEditor in the 
PropertiesSheetViewer.  The question is why isn't this support part of the base 
JFace cell editors?  Need to get with RG about this.
Comment 4 Lynne Kues CLA 2002-04-16 10:53:34 EDT
The complaint is that <return> does not end the cell edit in the Properties 
View.  

I can easily change the PropertySheetViewer to do this by listening for the 
SWT.TRAVERSE_RETURN event on the cell editor widget, but my question is why 
don't the JFace cell editors do this in the first place?  Was it a conscious 
decision *not* to end the edit during <return> or just an oversight?

I've run across the following code in both the TextCellEditor and the 
ComboBoxCellEditor:

text.addTraverseListener(new TraverseListener() {
  public void keyTraversed(TraverseEvent e) {
    if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) {
      e.doit = false;
    }
  }
});

Whether doit is true or false seems to have no effect.  Any idea why these 
lines are there?  According to the SWT comments, it sounds like the doit field 
only matters for a dialog.

Also, if I select an item from the list in a ComboBoxCellEditor and then press 
ESC, my value is not reverted to its original value (i.e., the selected value 
is applied instead).  Again, was this a conscious decision?
Comment 5 Lynne Kues CLA 2002-04-16 10:54:22 EDT
From RG:

Cell editors can also be used in dialogs (editor for a table widget for 
example) so the doit.false code below is required.

I would not get the viewer to listen while the editor is active.
Interaction with cell editors should be via their interfaces 
(ICellEditorListener etc.)

It was a conscious decision to trigger applyEditorValue on return (see the 
ICellEditorListener comment).

I don't see an easy solution for the problem. There are situations when using a 
text cell editor that return should trigger an apply but not end the edit.
You could look at making the PropertySheetViewer end the edit on 
applyEditorValue. You would have to verify that the combo box cell editor sends 
this only on double click or return and not on item selection.

The Esc problem sounds like an error in the PropertySheetViewer. It may go away 
if you end the edit whenever you apply.

Note that you may run into complaints from others that they want to be able to 
change a value in the propety sheet and have it applied without ending the edit.
Comment 6 Lynne Kues CLA 2002-05-15 15:21:12 EDT
Defer
Comment 7 Randy Giffen CLA 2002-08-09 13:01:14 EDT
Reopen to investigate
Comment 8 Kevin Haaland CLA 2003-02-07 15:10:15 EST
There are no plans for the UI team to work on this defect until higher priority 
items are addressed. If you are interested in working on this defect please let 
us know on the ui team's mailing list.
Comment 9 Tod Creasey CLA 2006-06-26 10:20:33 EDT
Is this still an issue in 3.2?
Comment 10 Denis Roy CLA 2009-08-30 02:10:34 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.