-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8343705: IGV: Interactive Node Moving in Hierarchical Layout #22430
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
This reverts commit 2f4e3fd.
|
👋 Welcome back tholenstein! A progress list of the required criteria for merging this PR into |
|
@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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
|
@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. |
1edb0bf to
648057c
Compare
|
@tobiasholenstein this pull request can not be integrated into git checkout JDK-8343705
git fetch https://git.openjdk.org/jdk.git pr/22402
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge pr/22402"
git push |
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.
I thoroughly tested this with a few complex graphs and it works great. This is an awesome enhancement!
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.
I tested and benchmarked this change using the same methodology as in JDK-8314512. Both testing and performance results are OK. The change seems to introduce a slight overhead of around 10% w.r.t. JDK-8314512 but still speeds up the baseline (current IGV) by around 1.4x thanks to disabling assertions in JDK-8314512. See full results here: results.ods. I will start to review the actual code changes.
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.
I re-tested this change after merging the latest changes from #22402 and did not find any issue.
|
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout JDK-8343705
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
|
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.
Great work! This is a really nice feature. I've tested it on Linux and it works as expected.
...zer/HierarchicalLayout/src/main/java/com/sun/hotspot/igv/hierarchicallayout/LayoutGraph.java
Outdated
Show resolved
Hide resolved
…a/com/sun/hotspot/igv/hierarchicallayout/LayoutGraph.java Co-authored-by: Christian Hagedorn <christian.hagedorn@oracle.com>
|
Thanks @robcasloz , @TobiHartmann and @chhagedorn for the reviews! /integrate |
|
@tobiasholenstein This pull request has not yet been marked as ready for integration. |
|
/integrate |
|
Going to push as commit 28b0f3e. |
|
@tobiasholenstein Pushed as commit 28b0f3e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR depends on #22402 . To check out this PR locally:
git fetch https://git.openjdk.org/jdk.git pull/22430/head:pull/22430git checkout pull/22430This pull request enhances the Ideal Graph Visualizer (IGV) by introducing an interactive feature that allows users to move nodes within the hierarchical layout by dragging them to new positions. This manual adjustment helps users better understand and explore the graph structure by customizing the layout according to their needs.
Overview
Previously, the hierarchical layout in IGV was static, and users could not adjust node positions manually. This limitation made it challenging to reorganize the graph for improved readability or to focus on specific areas of interest. With this enhancement is new:
Limitations
Sea of nodesview withcut long edgesoff. (The standard option for IGV)When the graph changes - for example, when nodes are removed or hidden, or layers are applied - the rearrangements are lost since the graph gets re-laid out. To preserve rearrangements, support for a stable incremental layout algorithm would be needed.
Main Changes
LayoutMover Interface
Created a new interface
LayoutMoverwith methodsmoveVertex,moveVertices, andmoveLink.HierarchicalLayoutManagernow implementsLayoutMover, providing concrete implementations for these methods.Enhancements to HierarchicalLayoutManager
Improved the
HierarchicalLayoutManagerso it can handle moving nodes interactively. Added methods to move single nodes or multiple nodes, and to adjust links. Nodes can now be moved within the same layer or to different layers while keeping the graph consistent. Also added awriteBackmethod to apply these changes.Modifications to LayoutGraph
Updated
LayoutGraphto support changes when nodes are moved. Added methods to manage layers, like creating and deleting layers, inserting new ones when needed, and removing empty layers. Also added ways to handle nodes and edges, like removing them or adding edges with dummy nodes if necessary. Improved how edges are handled to reduce crossings and straighten them, and made better algorithms to position nodes and minimize edge crossings.User Interface Enhancements in DiagramScene
Enhanced the user interface to let users move nodes and edges by dragging them. Added visual feedback like shadows and pointers when moving nodes. We updated the actions for
FigureWidgetto include move actions, making nodes draggable. We also adjusted the methods that rebuild the layout to handle these dynamic changes.FigureWidget and LineWidget
Made changes so that when nodes and edges are moved, the UI components update accordingly. In
FigureWidget, added anupdatePositionmethod to update its position when the node moves. InLineWidget, we made the start and end points editable so edges can adjust when nodes move, and added methods to support moving edges interactively.Examples
1. Moving a node to a different layer
2. Moving a node within the layer to a different position
3. Moving the position where an edge crosses a layer
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22430/head:pull/22430$ git checkout pull/22430Update a local copy of the PR:
$ git checkout pull/22430$ git pull https://git.openjdk.org/jdk.git pull/22430/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22430View PR using the GUI difftool:
$ git pr show -t 22430Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22430.diff
Using Webrev
Link to Webrev Comment