RFR: 8288480: IGV: toolbar action is not applied to the focused graph
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Wed Jun 15 14:00:37 UTC 2022
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:

Tested manually by triggering the above actions within multiple split graph windows and asserting that they are only applied to their corresponding graphs.
-------------
Commit messages:
- Apply toolbar actions to the graph window that is actually active
Changes: https://git.openjdk.org/jdk/pull/9169/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9169&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8288480
Stats: 8 lines in 1 file changed: 0 ins; 7 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/9169.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9169/head:pull/9169
PR: https://git.openjdk.org/jdk/pull/9169
More information about the hotspot-compiler-dev
mailing list