8187474: Tree-/TableCell, TreeCell: editingCell/Item not updated in cell.startEdit#638
8187474: Tree-/TableCell, TreeCell: editingCell/Item not updated in cell.startEdit#638kleopatra wants to merge 3 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back fastegal! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
Interesting, I just saw that it worked before because of the TableCellBehavior (edit method). Does this mean this can be removed from the behaviour in future? |
hmm .. the behavior talks directly to the control (not the cell) by invoking control.edit(...) - which might be a problem (or not, didn't look closely yet - left to later when dealing with with big big edit issue ;) The issue here is cell.startEdit which must call the control.edit(...) to switch the control into editing, independent on other parties. |
an aside I forgot to mention yesterday: this interference from behavior (triggered by mouseEvents) is one of the major stumbling-blocks in solving the ominous commit-on-focusLost issue - by cancelling an edit. |
Yeah right, just want to share my findings though. :) |
|
And by the way, you know why there is a requestFocus() in List/TreeCell, but not in the other two cells? :) |
plain oversight? or the wrong thing to do, anyway? or having weird side-effects in tabular controls which were evaded by not requesting focus? We'll see the deeper we go in the cleanup quest :) |
Maran23
left a comment
There was a problem hiding this comment.
Looks good, just left one minor comment. :)
modules/javafx.controls/src/test/java/test/javafx/scene/control/TableCellTest.java
Outdated
Show resolved
Hide resolved
and removed unused (by this fix) import in same file
| setupForEditing(); | ||
| int editingRow = 1; | ||
| cell.updateIndex(editingRow); | ||
| TablePosition<?,?> editingCell = new TablePosition<>(table, editingRow, editingColumn); |
There was a problem hiding this comment.
Just saw you added the space for the <?,?> in line 559 (which I didn't saw 😄) but not here :)
There was a problem hiding this comment.
darn .. ;) Thanks
There was a problem hiding this comment.
hmm .. I'm all for consistency, so don't mind trying again but ... what is the formatting rule? Searching in controls:
- wildcard search:
<?,?>= 1000+ vs.<?, ?>= 379 - verbatim:
<\?,\?>= 173 vs.<\?, \?>= 98
Looks .. inconclusive .. 😁?
But then, generics tutorial has the space - so the space it will be.
There was a problem hiding this comment.
Weird. Also standard classes like HashMap, AbstractMap or just Map doesn't have the space. I'm also for consisteny, but don't know which would be 'the best' 😄
|
@kleopatra This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 10 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
/integrate |
|
Going to push as commit adcc40d.
Your commit was automatically rebased without conflicts. |
|
@kleopatra Pushed as commit adcc40d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
cell startEdit is supposed to update the editing location on its associated control - was done in ListCell, not in Tree-/TableCell nor TreeCell.
Fix was to add control.edit(..). Note that ListCell was also touched to use the exact same method call pattern as the fixed cell types.
Added/unignored cell tests that are failing/passing before/after the fix.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/638/head:pull/638$ git checkout pull/638Update a local copy of the PR:
$ git checkout pull/638$ git pull https://git.openjdk.java.net/jfx pull/638/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 638View PR using the GUI difftool:
$ git pr show -t 638Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/638.diff