DESCRIPTION

Bug 491425 - [Browsers] OpenBrowserHandler may call IWebBrowser.openURL
on non-UI thread

Change-Id: I95aa8b92ad6d80fde46750df8b5095f64d34036a
Signed-off-by: Fernando Hood xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2016-04-11 17:24:08.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9033/

-------------------------------------
author: Brenden Conley
date: 2016-04-11 17:54:28.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9033/ : SUCCESS

-------------------------------------
author: Teagan Marsh
date: 2016-04-13 15:10:47.000000000

Patch Set 3:

(1 comment)

> Search for Messages#errorCouldNotLaunchWebBrowser indicates that at leas ExternalBrowserInstance#openURL already using WebBrowserUtil.openError. The other IWebBrowser subclasses just log, though.

That's because the top-level callers of #openURL(), like this handler, open error dialogs. So we won't get double dialogs.  But I'm wrong: this shouldn't open a UI dialog given your usecase of trying to run this command programmatically.  Ideally we should communicate this error back to the command invoker through an ExecutionEvent.  

I guess the right solution here is to execute this in a UIJob instead with a job change listener to throw an ExecutionEvent on an error status. But there may be some subtleties around how we'd wait for the result, since we're not on the UI thread, so I think we should just add a comment about this for now and punt.

Line:65, bundles/org.eclipse.ui.Diego Hamiltonr/src/org/eclipse/ui/internal/browser/OpenBrowserHandler.java -> I realize we should be opening an error dialog here: there's nothing as frustrating as opening a browser and have nothing shown up.  The code in org.eclipse.ui.browser uses WebBrowserUtil.openError() to report errors to the user.

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