Integrated: 8265433: IGV: add graph tooltips with properties

Koichi Sakata ksakata at openjdk.org
Tue Aug 9 08:21:52 UTC 2022


On Thu, 4 Aug 2022 08:52:58 GMT, Koichi Sakata <ksakata at openjdk.org> wrote:

> This pull request adds tooltips that show properties to groups and graphs in the Outline window and remaining nodes in the graph view window.
> 
> # Tests
> 
> There are no test classes correspond to classes that this PR changed. So I tested manually. Screenshots are as follows.
> 
> ## Screenshots
> ### Group in Outline Window
> <img width="500" alt="スクリーンショット 2022-07-15 17 19 28" src="https://user-images.githubusercontent.com/60008/182804933-3df1ebdb-c0eb-4df6-ae45-aa4ccfe9f9fc.png">
> 
> ### Graph in Outline Window
> <img width="500" alt="スクリーンショット 2022-07-15 17 17 29" src="https://user-images.githubusercontent.com/60008/182805052-96824754-e9f5-41c6-9e6c-eadd62238f12.png">
> 
> ###  Graph View Window
> <img width="500" alt="スクリーンショット 2022-07-15 17 18 31" src="https://user-images.githubusercontent.com/60008/182804997-b69af84e-9c83-4747-83d8-171162c8072c.png">
> 
> # Details
> 
> I added a new class, which is `PropertiesConverter`, to format text in tooltip. We can use HTML tags for formatting tooltip text. `PropertiesConverter` converts Properties object to HTML string. If there is a more appropriate class for processing it, please let me know.
> 
> This PR has one side effect. When an item in Outline window is selected, the description in the properties window, which is at the bottom right of each image, shows the same content as the tooltip. Before applying this PR, only the name was shown in that. The reason is that the property window shows the return value of `getShortDescription()` of the node object by default. The value is also used for tooltip. That is explained in `org.openide.nodes.Node` class. So I overrided the method. 
> 
> 
>     /** Set the short description of the node. Fires a property change event.
>     * <p>This description may be used for tool tips, etc.
>     * @param s the new description
>     */
>     @Override
>     public void setShortDescription(String s) {
> 
> https://github.com/apache/netbeans/blob/master/platform/openide.nodes/src/org/openide/nodes/Node.java
> 
> In the case of Graph View window, the properties window stays as it was. Because Widget class has `setToolTipText` method for tooltip. 
> 
> # Concerns
> 
> As stated earlier, contents of the description depends on the window the selected item is in. I'm concerned about this behavior.

This pull request has now been integrated.

Changeset: af243ca3
Author:    Koichi Sakata <ksakata at openjdk.org>
Committer: Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/af243ca334c8ce29bc3337ac9388ad45a4ee9041
Stats:     52 lines in 3 files changed: 51 ins; 0 del; 1 mod

8265433: IGV: add graph tooltips with properties

Reviewed-by: rcastanedalo, tholenstein

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

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


More information about the hotspot-compiler-dev mailing list