VitaliyKulikov / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

timeout results in confusing "unable to handle..." message #286

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Not sure about reproducing it.  I had an exception on the AWT event thread
when clicking on a cell, and it made it so that selecting the cell timed out.

What is the expected output? What do you see instead?

I expect to get a message like "Timed out waiting for editor activation." 
Instead, I get a message "Unable to handle editor component of type
javax.swing.JTextField."

What version of the product are you using? On what operating system?

FEST-Swing 1.0.

Please provide any additional information below.

This just needs to be touched up.  In
AbstractJTableCellWriter.waitForEditorActivation(..), it catches a
WaitTimedOutError, which results in cannotHandleEditor(..) being called. 
It's not that the editor can't be handled.

Original issue reported on code.google.com by geis....@gmail.com on 23 Jan 2009 at 10:09

GoogleCodeExporter commented 8 years ago
Agreed. Thanks! :)

Original comment by Alex.Rui...@gmail.com on 24 Jan 2009 at 6:54

GoogleCodeExporter commented 8 years ago
It's worse than I thought.

Higher in my call stack, 
JTableTextComponentEditorCellWriter.doStartCellEditing(..)
tries to catch a WaitTimedOutError.  This never happens because the 
WaitTimedOutError
is caught in AbstractJTableCellWriter.waitForEditorActivation(..) and rethrown 
as an
ActionFailedException.

On top of that, JTableTextComponentEditorCellWriter.doStartCellEditing(..) calls
activateEditorWithF2Key(..) without checking first to see if the cell editor is
already activated.  In my application, the cell goes into edit mode when the 
table
gets focus.  The effect of sending F2 at that point is deactivating the cell 
editor.

Original comment by geis....@gmail.com on 27 Jan 2009 at 10:39

GoogleCodeExporter commented 8 years ago
Thanks Ken for the update.

If I understood correctly there are more than one issue here:

1. Wrong error message "Unable to handle editor component of type x"
2. Trying to catch a WaitTimedOutError when in reality it should catch
ActionFailedException.
3. Check if cell editor is already activated before trying to activate it.

Please let me know if that is correct.

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 28 Jan 2009 at 12:08

GoogleCodeExporter commented 8 years ago
Yes, exactly.  I wasn't sure if you wanted to break it up into three separate 
issues
or if this is OK.

Original comment by geis....@gmail.com on 28 Jan 2009 at 1:19

GoogleCodeExporter commented 8 years ago
I'd prefer to treat them as separate issues. I'll create additional issues later
tonight (I'm about to head home.)

Thanks!
-ALlex

Original comment by Alex.Rui...@gmail.com on 28 Jan 2009 at 1:28

GoogleCodeExporter commented 8 years ago

Original comment by Alex.Rui...@gmail.com on 5 Feb 2009 at 5:02

GoogleCodeExporter commented 8 years ago
Created issue 308.

Original comment by Alex.Rui...@gmail.com on 8 Feb 2009 at 7:40

GoogleCodeExporter commented 8 years ago
Created issue 309.

Original comment by Alex.Rui...@gmail.com on 8 Feb 2009 at 7:41

GoogleCodeExporter commented 8 years ago
Fixed. Changes can be found at 
http://code.google.com/p/fest/source/detail?r=2263
(r2263).

I created separate bugs for the remaining items.

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 8 Feb 2009 at 7:47

GoogleCodeExporter commented 8 years ago
Issue migrated to http://kenai.com/jira/browse/FEST-14

Original comment by Alex.Rui...@gmail.com on 14 Feb 2009 at 9:36

GoogleCodeExporter commented 8 years ago
Issue migrated to http://jira.codehaus.org/browse/FEST-16

Original comment by Alex.Rui...@gmail.com on 2 Mar 2009 at 6:50