RFR: JDK-8293364: IGV: Refactor Action in EditorTopComponent and fix minor bugs [v8]

Tobias Holenstein tholenstein at openjdk.org
Tue Sep 20 11:48:14 UTC 2022


On Mon, 19 Sep 2022 08:34:57 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   undo removing variable generated by form editor
>
> src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java line 268:
> 
>> 266: 
>> 267:     public DiagramViewModel getModel() {
>> 268:         return  scene.getModel();
> 
> Suggestion:
> 
>         return scene.getModel();

done

> src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/EditorTopComponent.java line 275:
> 
>> 273:     }
>> 274: 
>> 275:     public void selectionMode(boolean b) {
> 
> I suggest to rename it to `setSelectionMode` as it otherwise suggests being a getter.

done

> src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/actions/ReduceDiffAction.java line 99:
> 
>> 97:         model.getViewPropertiesChangedEvent().removeListener(this);
>> 98:         model.getHiddenNodesChangedEvent().removeListener(this);
>> 99:     }
> 
> These three methods seem to be shared among all subclasses. Is it possible to move them to the super class?

Done. I added an abstract superclass `ModelAwareAction.java`

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

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


More information about the hotspot-compiler-dev mailing list