RFR: JDK-8293364: IGV: Refactor Action in EditorTopComponent and fix minor bugs [v5]
Tobias Holenstein
tholenstein at openjdk.org
Thu Sep 15 09:29:40 UTC 2022
On Thu, 8 Sep 2022 13:16:37 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> This changeset seems to disable the keyboard shortcuts for `Extract`, `Show all nodes`, and `Hide` right after a graph is opened. Interestingly, after clicking around for a while, the keyboard shortcuts start working again. Please let me know if you need more details to reproduce the problem, hopefully it is reproducible in other platforms than my own (Ubuntu 20.04).
Thanks for spotting that @robcasloz! Defining the `Shortcuts` in `layer.xml` is not recommended anymore and cause problems with `ContextAction`. The more modern approach is to use `@ActionXXX` annotations and define the shortcuts there.
Also, `ContextAction<DiagramViewModel>` listened only to `getDiagramChangedEvent()`. I changed them to also listened to `getViewChangedEvent()`, `getViewPropertiesChangedEvent()` and `getHiddenNodesChangedEvent()`. Otherwise the context aware action missed being updated when node selection or view changed.
I updated to PR description accordingly
-------------
PR: https://git.openjdk.org/jdk/pull/10170
More information about the hotspot-compiler-dev
mailing list