RFR: JDK-8294529 : IGV: Highlight the current graphs in the Outline

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Thu Sep 29 07:33:16 UTC 2022


On Wed, 28 Sep 2022 14:44:10 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

> # 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.

This feature is useful and works generally well, the only issue I found is that group and graph HTML names are not escaped. Currently, this issue affects only group names (e.g. the first group in #10440's [test IGV graph file](https://github.com/openjdk/jdk/files/9653179/hello.zip)), but I would suggest to escape graph names as well for completeness.

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

Changes requested by rcastanedalo (Reviewer).

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


More information about the hotspot-compiler-dev mailing list