RFR: JDK-8295934: IGV: keep node selection when changing view or graph

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Mon Nov 14 09:56:25 UTC 2022


On Wed, 9 Nov 2022 14:30:48 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

> In IGV nodes can be selected by clicking on it. When a user selects nodes in a certain view, e.g. "Cluster nodes into blocks" view, and then change to e.g. "Sea of nodes" view, the selection should be kept. Same when the user goes a different graph in the same group, the selection should be kept (as long as the nodes are still present)
> 
> New selection features:
> - When opening a new graph and no nodes where selected previously the root nodes is selected and centered. 
> <img width="807" alt="selected_root" src="https://user-images.githubusercontent.com/71546117/201100062-3e5cb919-cce1-41d9-8041-08a5f1c31f22.png">
> 
> - When a graph in the same group is opened, the previously selected nodes as selected as well if they are present in the graph. The selected nodes are centered in the new graph. 
> - The selected nodes are kept when changing the view, or the properties of the view (e.g. "show neighboring nodes semi-transparent") 
> <img width="370" alt="cluster_view" src="https://user-images.githubusercontent.com/71546117/201100267-3420fc5c-aa0d-4d04-8b91-2197fdc3e0d2.png">
> <img width="360" alt="desired" src="https://user-images.githubusercontent.com/71546117/201100285-b96b56bb-35be-439d-8f9a-05bb770108a9.png">
> 
> - When "show neighboring nodes semi-transparent" is disabled, previously semi-transparent nodes that were selected are now unselected (because they are not visible anymore)
> - It would also be desired adjust the scroll pane to center the selected nodes when changing view, graph, etc.

Keeping the user's node selection across views and related graphs is a useful enhancement, thanks!

As a user, I only have an objection to selecting the Root node when opening a new graph without a previous selection: I would rather not select any node in that situation. Selecting the Root node forces the attention of the user to an arbitrary part of the graph, and this node is not relevant to all views, e.g. the CFG view of the current "Final Code" graph.

Regarding the code changes, I think it would be better for ease of reviewing and traceability to leave cleanups and unrelated refactorings (such as removal of unused imports in `GraphViewerImplementation.java` or not passing a `SceneAnimator` to `LineWidget.java`) to separate RFEs.

-------------

Changes requested by rcastanedalo (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11062


More information about the hotspot-compiler-dev mailing list