}
if (WebBrowserPreference.getBrowserChoice() == WebBrowserPreference.EXTERNAL) {
openUrlInExternalBrowser(url);
}
else {
IWebBrowser browser = null;
int flags = customFlags;
if (WorkbenchBrowserSupport.getInstance().isInternalWebBrowserAvailable()) {
flags |= IWorkbenchBrowserSupport.AS_EDITOR
| IWorkbenchBrowserSupport.LOCATION_BAR
| IWorkbenchBrowserSupport.NAVIGATION_BAR;
}
else {
flags |= IWorkbenchBrowserSupport.AS_EXTERNAL
| IWorkbenchBrowserSupport.LOCATION_BAR
| IWorkbenchBrowserSupport.NAVIGATION_BAR;
}
String generatedId = SpringUIPlugin.PLUGIN_ID + "-"
+ Calendar.getInstance().getTimeInMillis();
browser = WorkbenchBrowserSupport.getInstance().createBrowser(flags, generatedId,
null, null);
browser.openURL(url);
}
}
catch (PartInitException e) {
MessageDialog.openError(Display.getDefault().getActiveShell(), "Browser init error",
"Browser could not be initiated");