RFR: 8288480: IGV: toolbar action is not applied to the focused graph

Christian Hagedorn chagedorn at openjdk.org
Fri Jun 17 08:56:46 UTC 2022


On Wed, 15 Jun 2022 13:45:53 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> When multiple graphs are displayed simultaneously in split windows, the following toolbar actions are always applied to the same graph, regardless of which graph window is focused:
> 
> - search nodes and blocks
> - extract node
> - hide node
> - show all nodes
> - zoom in
> - zoom out
> 
> This changeset ensures that each of the above actions is only applied within its corresponding graph window. This is achieved by applying the actions to the graph window that is currently activated (`EditorTopComponent.getRegistry().getActivated()`) instead of the first matching occurrence in `WindowManager.getDefault().getModes()`.
> 
> The changeset makes it practical, for example, to explore different views of the same graph simultaneously, as illustrated here:
> 
> ![multi-view](https://urldefense.com/v3/__https://user-images.githubusercontent.com/8792647/173841115-084c6396-3843-4d9b-9951-f93c932100c3.png__;!!ACWV5N9M2RV99hQ!OoFVJo-CIaqfoGFi4ZiGV7cyHdMA7xCc89Ev6icxalPfvroplEaJ7LaHAx5gfeNJOzKaTVDww3cEwfGSITjK-B-oPRcZQhsxyQ$ )
> 
> Tested manually by triggering the above actions within multiple split graph windows and asserting that they are only applied to their corresponding graphs.

I've also ran into this problem before, thanks for fixing this! Looks good!

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

Marked as reviewed by chagedorn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list