-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8290063: IGV: Give the graphs a unique number in the outline #10873
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
Conversation
👋 Welcome back tholenstein! A progress list of the required criteria for merging this PR into |
@tobiasholenstein The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
9ff6e47
to
4d1d3b1
Compare
|
dc020ea
to
05c0640
Compare
Webrevs
|
It works well for me but I'm wondering if "click and wait for 1-2 seconds" (which is more like 3 seconds on my system) should be replaced by an entry in the right-click menu. For fast renaming, a shortcut (F2) can be used, which already works. I spotted the following (existing) issue:
I don't think deleting a non-opened phase should affect the currently opened one, right? |
@tobiasholenstein Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information. |
Thanks for testing @TobiHartmann ! I agree that a right-click menu is more convenient. I added this functionality and updated the PR. The issue with the deleting is known and it already exists an bug report: https://bugs.openjdk.org/browse/JDK-8294066 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating. Looks good to me!
@tobiasholenstein 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 58 new commits pushed to the
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement! Works as expected - looks good to me.
...ealGraphVisualizer/Coordinator/src/main/java/com/sun/hotspot/igv/coordinator/FolderNode.java
Show resolved
Hide resolved
...dealGraphVisualizer/Coordinator/src/main/java/com/sun/hotspot/igv/coordinator/GraphNode.java
Show resolved
Hide resolved
Thanks @chhagedorn and @TobiHartmann for the reviews! |
@tobiasholenstein Your integration request cannot be fulfilled at this time, as the status check |
/integrate |
Going to push as commit a1c349f.
Your commit was automatically rebased without conflicts. |
@tobiasholenstein Pushed as commit a1c349f. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Some graphs may have the same name more than once in IGV. To make it clearer which graph is currently open, all graphs within a group are now enumerated with
1.
,2.
,3.
, etc. Similarly, groups are enumerated with1 -
,2 -
, etc.The make it even further easier to distinguish different graphs and group, we can now rename them in two ways.
(A) To rename a group or graph:
(B) To rename a group or graph:
RenameAction
isALT-CTRL-R
orOPT-CMD-R
on a mac keyboardThe numbering always starts at 1 and is continuous from 1 to N for N graphs. When a graph is deleted, the numbering of the following graphs changes. This implementation allows the keep the XML format unchanged, because the numbering is only local and not part of the name. However, if a graph/group is renamed, the name in the XML file will also change when it is saved.
Implementation
The renaming is simply enabled by overriding
canRename() {return true;}
inFolderNode
andGraphNode
The numbering is implemented in
getDisplayName()
inGroup
andInputGraph
by concatenating the index of the group/graph with the name.When a group/graph is deleted the we trigger an update of the index in
FolderNode
->destroyNodes(Node[] nodes)
by callingnode.setDisplayName(node.getDisplayName())
for all nodes.Refresh the group/graph name in the
EditorTopComponent
of the opened graph is a bit tricky. It is implemented by adding aListener
to thegetDisplayNameChangedEvent()
of the currently openedInputGraph
inDiagramViewModel
.getDisplayNameChangedEvent()
is fired whenever the name or the group name of the correspondingInputGraph
is changed.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10873/head:pull/10873
$ git checkout pull/10873
Update a local copy of the PR:
$ git checkout pull/10873
$ git pull https://git.openjdk.org/jdk pull/10873/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10873
View PR using the GUI difftool:
$ git pr show -t 10873
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10873.diff