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 227102 - In place editing interrupted when it should not
Summary: In place editing interrupted when it should not
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 13:42 UTC by AngeloD
Modified: 2013-03-08 22:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed Solution and Unit Test (4.16 KB, application/octet-stream)
2013-03-06 13:42 UTC, AngeloD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AngeloD 2013-03-06 13:42:03 UTC
Created attachment 132264 [details]
Proposed Solution and Unit Test

Whenever our users are editing one line of an outlineview, a change to the table model (triggered externally) stops the editing in progress even if the changed property is not the one being edited.

The attached patch contains both a unit test showing the problem and the proposed solution.
Comment 1 Martin Entlicher 2013-03-08 13:22:52 UTC
This should be reviewed by the maintainer of SheetCell.
Comment 2 Martin Entlicher 2013-03-08 13:25:58 UTC
Perhaps, it should be tested whether this problem is solved by the fix of issue #227183. The table might be completely refreshed as a result of the property change event, I'll try to check this...
Comment 3 Martin Entlicher 2013-03-08 15:27:51 UTC
The fix of issue #227183 has no effect on this.
IMHO rather then ignoring the PropertyChangeEvent, one could check, whether the editing row and editing column matches the node, which fired the property change.
Comment 4 Stanislav Aubrecht 2013-03-08 16:41:36 UTC
AFAIT the patch affects only the subclass of SheetCell that's used in Outline table only. And the patch does use the logic suggested in comment #3 so it looks ok to me.
Comment 5 Martin Entlicher 2013-03-08 17:06:47 UTC
It's not true. The patch does not care about the specific node, which fired the event, it just compares the columns (properties). And what if someone edits a node's display name, which changes underneath?

OutlineSheetCell.propertyChange() method looks also wrong to me, because when a *single* node fires a property change event, it calls:
outline.tableChanged(new TableModelEvent(outline.getModel(), 0, outline.getRowCount()));
It refreshes the *whole* table. This must be wrong.
Comment 6 AngeloD 2013-03-08 22:20:52 UTC
(In reply to comment #5)
> It's not true. The patch does not care about the specific node, which fired the
> event, it just compares the columns (properties). And what if someone edits a
> node's display name, which changes underneath?
> 
Why should editing be stopped if the node display name changes underneath?

The all point is that, if I am editing a property I do not want to be kicked out if another property is changed by someone else.

For what concerns the OutlineSheetCell.propertyChange() I somehow agree but that is another problem.