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

Virag Purnam vpurnam at openjdk.org
Sun Mar 3 11:48:52 UTC 2024


On Fri, 1 Mar 2024 16:33:27 GMT, Brice Dutheil <bdutheil at openjdk.org> wrote:

>> application/org.openjdk.jmc.flightrecorder.flamegraph/src/main/java/org/openjdk/jmc/flightrecorder/flamegraph/views/FlamegraphSwingView.java line 603:
>> 
>>> 601: 		Display.getDefault().syncExec(new Runnable() {
>>> 602: 			public void run() {
>>> 603: 				IWorkbenchPage activePage = PlatformUI.getWorkbench().getWorkbenchWindows()[0].getActivePage();
>> 
>> Minor syntax nit, but I think this could be replaced with `PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()`  ?
>
> Interesting, I think Eclipse workbench allows for multiple windows (or detached one), could that be an issue for `PlatformUI.getWorkbench().getWorkbenchWindows()[0]` ?

Idea is to get the active editor and we get the same with PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() as well. I have done the required change.

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

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


More information about the jmc-dev mailing list