RFR: JDK-8294529 : IGV: Highlight the current graphs in the Outline
Tobias Holenstein
tholenstein at openjdk.org
Wed Sep 28 14:59:48 UTC 2022
# Problem
IGV marks the graph(s) of the current active `EditorTopComponent` as selected. Here is an example of a difference graph between the `Inremental Boxing Inline` and `Before CountedLoop` graphs:
<img width="280" alt="before1" src="https://user-images.githubusercontent.com/71546117/192809113-20c73d39-4627-435b-8a0d-4b36f76541b2.png">
The selection can be changed when the user selects another graph (without opening in). This is needed for example to selected graphs that the user wants to delete:
<img width="262" alt="before2" src="https://user-images.githubusercontent.com/71546117/192809411-b2203f81-5103-4b07-82aa-d4ccd9b9ae5d.png">
# Proposed Solution
Change the font of the open graph to `bold` and make the icon darker. Do the same for the folder where the graph is located. Now the user can select different graphs and still see which graphs are currently opened in the active `EditorTopComponent`.
<img width="313" alt="new_highlighting" src="https://user-images.githubusercontent.com/71546117/192809686-73b01459-93a2-48d3-b30d-5ed19c05ec45.png">
# Implementation Details
Introduce a new `selected` variable in `FolderNode` and `GraphNode`. Whenever the currently viewed graphs change, the function `changed(InputGraphProvider lastProvider)` in `OutlineTopComponent` is called. Here we set the `FolderNode` and `GraphNode` to be (un)selected. This fires a `fireDisplayNameChange` and a `fireIconChange` which updates the text/icons.
-------------
Commit messages:
- JDK-8294529 : IGV: Highlight the current graphs in the Outline
Changes: https://git.openjdk.org/jdk/pull/10468/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10468&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8294529
Stats: 65 lines in 5 files changed: 59 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/10468.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10468/head:pull/10468
PR: https://git.openjdk.org/jdk/pull/10468
More information about the hotspot-compiler-dev
mailing list