Runnable (@Nullable Project project) { Window projectWindow = project == null ? null : WindowManager.getInstance().suggestParentWindow(project); return () -> SwingUtilities.invokeLater(() -> { makeCurrentMessageDialogGoAway(projectWindow == null ? Window.getWindows() : projectWindow.getOwnedWindows()); }); }