RFR: JDK-8294529 : IGV: Highlight the current graphs in the Outline [v2]
Christian Hagedorn
chagedorn at openjdk.org
Fri Sep 30 11:00:24 UTC 2022
On Thu, 29 Sep 2022 16:27:53 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.
>
> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>
> escapeHTML in getHtmlDisplayName()
Works well and looks good (if the mentioned issue is not a new bug from this change).
src/utils/IdealGraphVisualizer/Coordinator/src/main/java/com/sun/hotspot/igv/coordinator/FolderNode.java line 140:
> 138: }
> 139:
> 140: private boolean selected = false;
You should move this field up to the other field declarations.
src/utils/IdealGraphVisualizer/Coordinator/src/main/java/com/sun/hotspot/igv/coordinator/GraphNode.java line 63:
> 61: }
> 62:
> 63: private boolean selected = false;
You should move this field up to the other field declarations.
src/utils/IdealGraphVisualizer/Coordinator/src/main/java/com/sun/hotspot/igv/coordinator/OutlineTopComponent.java line 229:
> 227:
> 228: private GraphNode[] selectedGraphs = new GraphNode[0];
> 229: private final Set<FolderNode> selectedFolders = new HashSet<>();
You should move these fields up to the other field declarations.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10468
More information about the hotspot-compiler-dev
mailing list