RFR: 4262: Duplicate headers when copying thread dump text to clipboard
Alex Macdonald
aptmac at openjdk.org
Mon Oct 30 17:36:56 UTC 2023
This PR addresses JMC-4262 [[0]](https://bugs.openjdk.org/browse/JMC-4262), in which copying thread dump nodes in the tree view exhibits some unexpected behaviour.
The above issue describes that if you select two nodes from the tree and use the copy context menu action, then the thread dump header gets duplicated. However, what I'm seeing is that the parent thread dump information is also added to the clipboard along side the actual selected information I'm looking for. Further more, if I'm selecting parent nodes from the treeview, I get both the entire thread dump plus the thread dump body (duplicated) for each selected node.
For example, if I'm trying to copy 2 parent nodes, I end up with 4 thread dump bodies. Or if I'm just trying to copy the entries from GC Threads 0 through 4, I end up with my selection, plus 4 copies of the thread dump.
This PR adjusts the copy action to use the same functionality used for displaying the selection in the sashform. This way, the selections the user makes in the treeview is what is actually copied into the clipboard.
Before:
- the clipboard text includes what the user selects in the treeviewer, along with the parent node for each selection
After:
- clipboard text is based on exactly what the user selects in the treeviewer
[0] https://bugs.openjdk.org/browse/JMC-4262
-------------
Commit messages:
- 4262: Duplicate headers when copying thread dump text to clipboard
Changes: https://git.openjdk.org/jmc/pull/529/files
Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=529&range=00
Issue: https://bugs.openjdk.org/browse/JMC-4262
Stats: 25 lines in 1 file changed: 0 ins; 19 del; 6 mod
Patch: https://git.openjdk.org/jmc/pull/529.diff
Fetch: git fetch https://git.openjdk.org/jmc.git pull/529/head:pull/529
PR: https://git.openjdk.org/jmc/pull/529
More information about the jmc-dev
mailing list