Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4262: Duplicate headers when copying thread dump text to clipboard #529

Closed
wants to merge 1 commit into from

Conversation

aptmac
Copy link
Member

@aptmac aptmac commented Oct 30, 2023

This PR addresses JMC-4262 [0], 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


Progress

  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JMC-4262: Duplicate headers when copying thread dump text to clipboard (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmc.git pull/529/head:pull/529
$ git checkout pull/529

Update a local copy of the PR:
$ git checkout pull/529
$ git pull https://git.openjdk.org/jmc.git pull/529/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 529

View PR using the GUI difftool:
$ git pr show -t 529

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jmc/pull/529.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 30, 2023

👋 Welcome back aptmac! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Oct 30, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 30, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Nov 30, 2023

@aptmac 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:

4262: Duplicate headers when copying thread dump text to clipboard

Reviewed-by: hirt

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 3 new commits pushed to the master branch:

  • d734567: 7192: Event browser should be able to search and show event type ids
  • 2a076d2: 8145: Upgrade Jetty to version 10.0.17
  • 0d0df70: 8129: Add tool to simplify platform upgrades

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Nov 30, 2023
@aptmac
Copy link
Member Author

aptmac commented Dec 1, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Dec 1, 2023

Going to push as commit 8dd7683.
Since your change was applied there have been 5 commits pushed to the master branch:

  • fea5d67: 8144: Add rule to detect GC Inverted Parallelism
  • 48162df: 7307: Move org.openjdk.jmc.flightrecorder.configuration bundle from application to core
  • d734567: 7192: Event browser should be able to search and show event type ids
  • 2a076d2: 8145: Upgrade Jetty to version 10.0.17
  • 0d0df70: 8129: Add tool to simplify platform upgrades

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Dec 1, 2023
@openjdk openjdk bot closed this Dec 1, 2023
@openjdk openjdk bot removed ready rfr labels Dec 1, 2023
@openjdk
Copy link

openjdk bot commented Dec 1, 2023

@aptmac Pushed as commit 8dd7683.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@aptmac aptmac deleted the 4262 branch December 1, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants