RFR: 8204 : Keyboard traps in flamegraph view for search option [v2]

Alex Macdonald aptmac at openjdk.org
Fri Mar 1 15:18:55 UTC 2024


On Tue, 27 Feb 2024 16:50:24 GMT, Virag Purnam <vpurnam at openjdk.org> wrote:

>> application/org.openjdk.jmc.console.agent/src/main/java/org/openjdk/jmc/console/agent/manager/wizards/PresetManagerPage.java line 209:
>> 
>>> 207: 
>>> 208: 				tableInspector.getViewer().refresh();
>>> 209: 				tableInspector.setFocus();
>> 
>> **suggestion:** Might be worth extracting all `setFocus()` statements in a single method with a comment, since the issue is not quite straightforward.
>
> I have addressed this and extracted a method.

Reading Brice's comment above, I'm thinking he meant move the `tableInspector.setFocus()` lines into it's own method so there is a centralized location to add a comment as to why this line is needed?

Something like ..

// 8204: this set focus is required in order to ..
private void setFocusOnTableInspector() {
  tableInspector.setFocus();
}

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

PR Review Comment: https://git.openjdk.org/jmc/pull/554#discussion_r1509093655


More information about the jmc-dev mailing list