final IBrowserConnection[] referralConnection = new IBrowserConnection[1];
PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
{
public void run()
{
SelectReferralConnectionDialog dialog = new SelectReferralConnectionDialog( PlatformUI.getWorkbench()
.getDisplay().getActiveShell(), referralUrl );
if ( dialog.open() == SelectReferralConnectionDialog.OK )
{
IBrowserConnection connection = dialog.getReferralConnection();
referralUrlToReferralConnectionCache.put( referralUrl, connection );
referralConnection[0] = connection;
}
}
} );